public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [Ada] Skip postponed validation checks with compilation errors
@ 2022-05-12 12:40 Pierre-Marie de Rodat
  0 siblings, 0 replies; only message in thread
From: Pierre-Marie de Rodat @ 2022-05-12 12:40 UTC (permalink / raw)
  To: gcc-patches; +Cc: Piotr Trojanek

[-- Attachment #1: Type: text/plain, Size: 348 bytes --]

If there are compilation errors then gigi doesn't backannotate the AST
with sizes, alignment, etc. The postponed compilation validation checks
can then easily crash or give spurious errors. We now just skip them.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* gnat1drv.adb (Gnat1drv): Skip postponed checks when there are
	errors.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-diff, Size: 358 bytes --]

diff --git a/gcc/ada/gnat1drv.adb b/gcc/ada/gnat1drv.adb
--- a/gcc/ada/gnat1drv.adb
+++ b/gcc/ada/gnat1drv.adb
@@ -1256,7 +1256,6 @@ begin
 
       if Compilation_Errors then
          Treepr.Tree_Dump;
-         Post_Compilation_Validation_Checks;
          Errout.Finalize (Last_Call => True);
          Errout.Output_Messages;
          Namet.Finalize;



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-12 12:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-12 12:40 [Ada] Skip postponed validation checks with compilation errors Pierre-Marie de Rodat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).