public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107705] New: [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529
@ 2022-11-15 18:00 gscfq@t-online.de
2022-11-15 19:14 ` [Bug c/107705] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2022-11-15 18:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107705
Bug ID: 107705
Summary: [12/13 Regression] ICE: tree check: expected class
'type', have 'exceptional' (error_mark) in
ix86_function_type_abi, at config/i386/i386.cc:1529
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started between 20210822 and 20210905 :
$ cat z1.c
int f (void)
{
int (*p) (void) = 0;
return p ();
int p = 1;
}
$ gcc-13-20221106 -c z1.c
z1.c: In function 'f':
z1.c:5:7: error: conflicting types for 'p'; have 'int'
5 | int p = 1;
| ^
z1.c:3:9: note: previous definition of 'p' with type 'int (*)(void)'
3 | int (*p) (void) = 0;
| ^
z1.c:4:10: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in ix86_function_type_abi, at
config/i386/i386.cc:1529
4 | return p ();
| ^~~~
0x6aed15 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
../../gcc/tree.cc:8896
0x130184c tree_class_check(tree_node const*, tree_code_class, char const*, int,
char const*)
../../gcc/tree.h:3911
0x130184c ix86_function_type_abi(tree_node const*)
../../gcc/config/i386/i386.cc:1529
0x130373d ix86_return_in_memory
../../gcc/config/i386/i386.cc:4249
0xb289d0 aggregate_value_p(tree_node const*, tree_node const*)
../../gcc/function.cc:2119
0xbbbea5 gimplify_modify_expr_rhs
../../gcc/gimplify.cc:5775
0xbbcb0e gimplify_modify_expr
../../gcc/gimplify.cc:6100
0xbad0f7 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gimplify.cc:16352
0xbb0fd8 gimplify_stmt(tree_node**, gimple**)
../../gcc/gimplify.cc:7211
0xbabe5e gimplify_and_add(tree_node*, gimple**)
../../gcc/gimplify.cc:492
0xbabe5e gimplify_return_expr
../../gcc/gimplify.cc:1680
0xbabe5e gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gimplify.cc:16614
0xbb0fd8 gimplify_stmt(tree_node**, gimple**)
../../gcc/gimplify.cc:7211
0xbac3cb gimplify_statement_list
../../gcc/gimplify.cc:2019
0xbac3cb gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gimplify.cc:16797
0xbb0fd8 gimplify_stmt(tree_node**, gimple**)
../../gcc/gimplify.cc:7211
0xbb1963 gimplify_bind_expr
../../gcc/gimplify.cc:1430
0xbac8da gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
../../gcc/gimplify.cc:16553
0xbb0fd8 gimplify_stmt(tree_node**, gimple**)
../../gcc/gimplify.cc:7211
0xbb2bde gimplify_body(tree_node*, bool)
../../gcc/gimplify.cc:17612
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/107705] [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529
2022-11-15 18:00 [Bug c/107705] New: [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529 gscfq@t-online.de
@ 2022-11-15 19:14 ` pinskia at gcc dot gnu.org
2022-11-16 14:31 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-15 19:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107705
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Keywords| |error-recovery
Ever confirmed|0 |1
Last reconfirmed| |2022-11-15
Target Milestone|--- |12.3
Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org
Status|UNCONFIRMED |ASSIGNED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I am going to take this one.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/107705] [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529
2022-11-15 18:00 [Bug c/107705] New: [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529 gscfq@t-online.de
2022-11-15 19:14 ` [Bug c/107705] " pinskia at gcc dot gnu.org
@ 2022-11-16 14:31 ` rguenth at gcc dot gnu.org
2022-11-17 20:46 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-16 14:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107705
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/107705] [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529
2022-11-15 18:00 [Bug c/107705] New: [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529 gscfq@t-online.de
2022-11-15 19:14 ` [Bug c/107705] " pinskia at gcc dot gnu.org
2022-11-16 14:31 ` rguenth at gcc dot gnu.org
@ 2022-11-17 20:46 ` pinskia at gcc dot gnu.org
2022-11-18 17:03 ` cvs-commit at gcc dot gnu.org
2022-11-18 17:04 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-17 20:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107705
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
diff --git a/gcc/function.cc b/gcc/function.cc
index 361aa5f7ed1..9c8773bbc59 100644
--- a/gcc/function.cc
+++ b/gcc/function.cc
@@ -2090,6 +2090,9 @@ aggregate_value_p (const_tree exp, const_tree fntype)
if (VOID_TYPE_P (type))
return 0;
+ if (error_operand_p (fntype))
+ return 0;
+
/* If a record should be passed the same as its first (and only) member
don't pass it as an aggregate. */
if (TREE_CODE (type) == RECORD_TYPE && TYPE_TRANSPARENT_AGGR (type))
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/107705] [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529
2022-11-15 18:00 [Bug c/107705] New: [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529 gscfq@t-online.de
` (2 preceding siblings ...)
2022-11-17 20:46 ` pinskia at gcc dot gnu.org
@ 2022-11-18 17:03 ` cvs-commit at gcc dot gnu.org
2022-11-18 17:04 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-18 17:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107705
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pinskia@gcc.gnu.org>:
https://gcc.gnu.org/g:ceba66ee230bb96b0889fc8ec7333c7ffae96d6e
commit r13-4144-gceba66ee230bb96b0889fc8ec7333c7ffae96d6e
Author: Andrew Pinski <apinski@marvell.com>
Date: Thu Nov 17 22:03:08 2022 +0000
Fix PR middle-end/107705: ICE after reclaration error
The problem here is after we created a call expression
in the C front-end, we replace the decl type with
an error mark node. We then end up calling
aggregate_value_p with the call expression
with the decl with the error mark as the type
and we ICE.
The fix is to check the function type
after we process the call expression inside
aggregate_value_p to get it.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
Thanks,
Andrew Pinski
gcc/ChangeLog:
PR middle-end/107705
* function.cc (aggregate_value_p): Return 0 if
the function type was an error operand.
gcc/testsuite/ChangeLog:
* gcc.dg/redecl-22.c: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/107705] [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529
2022-11-15 18:00 [Bug c/107705] New: [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529 gscfq@t-online.de
` (3 preceding siblings ...)
2022-11-18 17:03 ` cvs-commit at gcc dot gnu.org
@ 2022-11-18 17:04 ` pinskia at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-18 17:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107705
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.3 |13.0
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed for GCC 13.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-11-18 17:04 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-15 18:00 [Bug c/107705] New: [12/13 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in ix86_function_type_abi, at config/i386/i386.cc:1529 gscfq@t-online.de
2022-11-15 19:14 ` [Bug c/107705] " pinskia at gcc dot gnu.org
2022-11-16 14:31 ` rguenth at gcc dot gnu.org
2022-11-17 20:46 ` pinskia at gcc dot gnu.org
2022-11-18 17:03 ` cvs-commit at gcc dot gnu.org
2022-11-18 17:04 ` pinskia 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).