File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -1504,11 +1504,19 @@ begin
1504
1504
Namet.Finalize;
1505
1505
Check_Rep_Info;
1506
1506
1507
- -- Exit the driver with an appropriate status indicator. This will
1508
- -- generate an empty object file for ignored Ghost units, otherwise
1509
- -- no object file will be generated .
1507
+ if Ecode /= E_Success then
1508
+ -- If we cannot generate code, exit the driver with an appropriate
1509
+ -- status indicator .
1510
1510
1511
- Exit_Program (Ecode);
1511
+ Exit_Program (Ecode);
1512
+
1513
+ else
1514
+ -- Otherwise use a goto so that finalization occurs normally and
1515
+ -- for instance any late processing in the GCC code can be
1516
+ -- performed.
1517
+
1518
+ goto End_Of_Program;
1519
+ end if ;
1512
1520
end if ;
1513
1521
1514
1522
-- In -gnatc mode we only do annotation if -gnatR is also set, or if
You can’t perform that action at this time.
0 commit comments