From: Arnaud Charlet Date: Mon, 16 Jul 2018 14:12:23 +0000 (+0000) Subject: [Ada] Only unnest subprograms if no previous errors were detected X-Git-Tag: basepoints/gcc-10~5335 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4af4c79a53886d0807f187f23e066fe4f0265897;p=thirdparty%2Fgcc.git [Ada] Only unnest subprograms if no previous errors were detected 2018-07-16 Arnaud Charlet gcc/ada/ * frontend.adb: Only unnest subprograms if no previous errors were detected. From-SVN: r262729 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cea35021a1de..2f860ac4e409 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2018-07-16 Arnaud Charlet + + * frontend.adb: Only unnest subprograms if no previous errors were + detected. + 2018-07-16 Ed Schonberg * exp_ch7.adb (Check_Unnesting_Elaboration_Code): Handle loops that diff --git a/gcc/ada/frontend.adb b/gcc/ada/frontend.adb index 730062bd8ccb..48a5d8149224 100644 --- a/gcc/ada/frontend.adb +++ b/gcc/ada/frontend.adb @@ -466,7 +466,9 @@ begin -- At this stage we can unnest subprogram bodies if required - Exp_Unst.Unnest_Subprograms (Cunit (Main_Unit)); + if Total_Errors_Detected = 0 then + Exp_Unst.Unnest_Subprograms (Cunit (Main_Unit)); + end if; -- List library units if requested