public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/114640] New: ICE on 'elsif' with complex function call
@ 2024-04-08 13:35 simon at pushface dot org
2024-04-08 13:46 ` [Bug ada/114640] " simon at pushface dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: simon at pushface dot org @ 2024-04-08 13:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114640
Bug ID: 114640
Summary: ICE on 'elsif' with complex function call
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: simon at pushface dot org
CC: dkm at gcc dot gnu.org
Target Milestone: ---
Created attachment 57902
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57902&action=edit
Code as requested
With GCC 12.2.0, get a CE, also at wisitoken-syntax_trees.adb:6183:19
With GCC 13.2.0, get stack overflow
With GCC 14.0.1, see below.
gcc -c -gnat2022 wisitoken-syntax_trees.adb
+===========================GNAT BUG DETECTED==============================+
| 14.0.1 20240405 (experimental) (x86_64-apple-darwin21) Assert_Failure failed
precondition from sinfo-nodes.ads:3686|
| Error detected at wisitoken-syntax_trees.adb:6183:19 |
| Compiling wisitoken-syntax_trees.adb |
| Please submit a bug report; see https://gcc.gnu.org/bugs/ . |
| Use a subject line meaningful to you and us to track the bug. |
| Include the entire contents of this bug box in the report. |
| Include the exact command that you entered. |
| Also include sources listed below. |
+==========================================================================+
Please include these source files with error report
Note that list may not be accurate in some cases,
so please double check that the problem can still
be reproduced with the set of files listed.
Consider also -gnatd.n switch (see debug.adb).
wisitoken-syntax_trees.adb
wisitoken-syntax_trees.ads
wisitoken.ads
gnatcoll.ads
gnatcoll-memory.ads
wisitoken_utils.ads
wisitoken-lexer.ads
gnatcoll-mmap.ads
gnatcoll-strings.ads
gnatcoll-strings_impl.ads
gnatcoll-atomic.ads
a-cdllal.ads
a-idllal.ads
compilation abandoned
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/114640] ICE on 'elsif' with complex function call
2024-04-08 13:35 [Bug ada/114640] New: ICE on 'elsif' with complex function call simon at pushface dot org
@ 2024-04-08 13:46 ` simon at pushface dot org
2024-04-20 14:58 ` [Bug ada/114640] ICE on elsif part of if-statement containing if-expression ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: simon at pushface dot org @ 2024-04-08 13:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114640
--- Comment #1 from simon at pushface dot org ---
It turns out that the error does not occur if I change
if First_Term = Invalid_Node_Access then
-- Empty or all virtual
return Invalid_Line_Number;
elsif not Contains
((First =>
to
if First_Term = Invalid_Node_Access then
-- Empty or all virtual
return Invalid_Line_Number;
end if;
if not Contains
((First =>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/114640] ICE on elsif part of if-statement containing if-expression
2024-04-08 13:35 [Bug ada/114640] New: ICE on 'elsif' with complex function call simon at pushface dot org
2024-04-08 13:46 ` [Bug ada/114640] " simon at pushface dot org
@ 2024-04-20 14:58 ` ebotcazou at gcc dot gnu.org
2024-04-20 14:58 ` ebotcazou at gcc dot gnu.org
2024-04-20 14:59 ` ebotcazou at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-04-20 14:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114640
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|ICE on 'elsif' with complex |ICE on elsif part of
|function call |if-statement containing
| |if-expression
Ever confirmed|0 |1
CC| |ebotcazou at gcc dot gnu.org
Status|UNCONFIRMED |NEW
Last reconfirmed| |2024-04-20
--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Indeed, way too many chained/nested ifs here. :-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/114640] ICE on elsif part of if-statement containing if-expression
2024-04-08 13:35 [Bug ada/114640] New: ICE on 'elsif' with complex function call simon at pushface dot org
2024-04-08 13:46 ` [Bug ada/114640] " simon at pushface dot org
2024-04-20 14:58 ` [Bug ada/114640] ICE on elsif part of if-statement containing if-expression ebotcazou at gcc dot gnu.org
@ 2024-04-20 14:58 ` ebotcazou at gcc dot gnu.org
2024-04-20 14:59 ` ebotcazou at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-04-20 14:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114640
--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
This appears to be sufficient:
diff --git a/gcc/ada/exp_util.adb b/gcc/ada/exp_util.adb
index 04d114694ab..71cfdd718e0 100644
--- a/gcc/ada/exp_util.adb
+++ b/gcc/ada/exp_util.adb
@@ -6549,6 +6549,7 @@ package body Exp_Util is
| N_Aggregate
| N_Delta_Aggregate
| N_Extension_Aggregate
+ | N_Elsif_Part
and then Nkind (Parent (Par)) not in N_Function_Call
| N_Procedure_Call_Statement
| N_Entry_Call_Statement
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug ada/114640] ICE on elsif part of if-statement containing if-expression
2024-04-08 13:35 [Bug ada/114640] New: ICE on 'elsif' with complex function call simon at pushface dot org
` (2 preceding siblings ...)
2024-04-20 14:58 ` ebotcazou at gcc dot gnu.org
@ 2024-04-20 14:59 ` ebotcazou at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2024-04-20 14:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114640
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ebotcazou at gcc dot gnu.org
--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
I'll test the above fixlet.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-04-20 14:59 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-08 13:35 [Bug ada/114640] New: ICE on 'elsif' with complex function call simon at pushface dot org
2024-04-08 13:46 ` [Bug ada/114640] " simon at pushface dot org
2024-04-20 14:58 ` [Bug ada/114640] ICE on elsif part of if-statement containing if-expression ebotcazou at gcc dot gnu.org
2024-04-20 14:58 ` ebotcazou at gcc dot gnu.org
2024-04-20 14:59 ` ebotcazou at gcc dot gnu.org
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).