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-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4af4c79a53886d0807f187f23e066fe4f0265897;p=gcc.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 cea35021a1d..2f860ac4e40 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 730062bd8cc..48a5d814922 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