View Issue Details

IDProjectCategoryView StatusLast Update
0038833FPCCompilerpublic2021-05-01 11:29
ReporterBenjamin Rosseaux Assigned ToJonas Maebe  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86_64OSWindows 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0038833: Try..Finally..End statements with empty Try Blocks but with bon-empty finally-blocks are wrongly optimized out.
DescriptionTry..Finally..End statements with empty Try Blocks but with bon-empty finally-blocks are wrongly optimized out. See testcase:

program EmptyTryFinally1;

{$mode delphi}
{$apptype console}

uses
 {$IFDEF UNIX}
 cthreads,
 {$ENDIF}
 Classes
 { you can add units after this };

begin
  try
   // Empty try statement block
  finally
    WriteLn('I should actually visible . . .'); // but I'm not
  end;
  readln;
end.
                            
TagsNo tags attached.
Fixed in Revision49305
FPCOldBugId
FPCTarget-
Attached Files

Activities

Benjamin Rosseaux

2021-04-30 23:57

reporter  

EmptyTryFinally1.pas (309 bytes)   
program EmptyTryFinally1;

{$mode delphi}
{$apptype console}

uses
 {$IFDEF UNIX}
 cthreads,
 {$ENDIF}
 Classes
 { you can add units after this };

begin
  try
   // Empty try statement block
  finally
    WriteLn('I should actually visible . . .'); // but I'm not
  end;
  readln;
end.

EmptyTryFinally1.pas (309 bytes)   

Issue History

Date Modified Username Field Change
2021-04-30 23:57 Benjamin Rosseaux New Issue
2021-04-30 23:57 Benjamin Rosseaux File Added: EmptyTryFinally1.pas
2021-05-01 11:29 Jonas Maebe Assigned To => Jonas Maebe
2021-05-01 11:29 Jonas Maebe Status new => resolved
2021-05-01 11:29 Jonas Maebe Resolution open => fixed
2021-05-01 11:29 Jonas Maebe Fixed in Version => 3.3.1
2021-05-01 11:29 Jonas Maebe Fixed in Revision => 49305
2021-05-01 11:29 Jonas Maebe FPCTarget => -