public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed
@ 2020-03-26 9:39 clyon at gcc dot gnu.org
2020-03-26 9:57 ` [Bug middle-end/94339] " rguenth at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: clyon at gcc dot gnu.org @ 2020-03-26 9:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
Bug ID: 94339
Summary: [10 regression] ICE in tree_class_check_failed
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: clyon at gcc dot gnu.org
Target Milestone: ---
Hi,
I've noticed this ICE while building GDB with recent GCC trunk, it appeared
between: r10-7336 and r10-7346
x86_64-unknown-linux-gnu-g++ -g -O2 -c ada-lang.ii
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/binutils-gdb.git~gdb-8.3.1-release/gdb/ada-lang.c:
In function ‘char* ada_main_name()’:
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/binutils-gdb.git~gdb-8.3.1-release/gdb/ada-lang.c:934:386:
internal compiler error: tree check: expected class ‘constant’, have ‘unary’
(nop_expr) in warnings_for_convert_and_check, at c-family/c-warn.c:1378
934 | main_program_name_addr = BMSYMBOL_VALUE_ADDRESS (msym);
|
^
0x604b15 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/tree.c:9763
0x9f8c69 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/tree.h:3401
0x9f8c69 warnings_for_convert_and_check(unsigned int, tree_node*, tree_node*,
tree_node*)
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/c-family/c-warn.c:1378
0x74330a cp_convert_and_check(tree_node*, tree_node*, int)
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/cvt.c:676
0x6b9c2e convert_like_real
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/call.c:7844
0x6bb3bb perform_implicit_conversion_flags(tree_node*, tree_node*, int, int)
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/call.c:11867
0x6c8794 perform_implicit_conversion(tree_node*, tree_node*, int)
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/call.c:11879
0x6c8794 build_conditional_expr_1
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/call.c:5642
0x6c90be build_conditional_expr(op_location_t const&, tree_node*, tree_node*,
tree_node*, int)
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/call.c:5705
0x9406f2 build_x_conditional_expr(unsigned int, tree_node*, tree_node*,
tree_node*, int)
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/typeck.c:6972
0x82a52a cp_parser_assignment_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:9828
0x82a7fc cp_parser_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:9992
0x8356ef cp_parser_primary_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:5359
0x84ec7d cp_parser_postfix_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:7219
0x831900 cp_parser_unary_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:8525
0x829312 cp_parser_cast_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:9416
0x829ddf cp_parser_simple_cast_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:29431
0x829ddf cp_parser_binary_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:9584
0x82a460 cp_parser_assignment_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:9822
0x82a7fc cp_parser_expression
/home/christophe.lyon/src/Linaro/abe/abe-master/mybuild/snapshots/gcc.git~master_rev_75fb811dfaa29d60a897924b0d1629577b90eee7/gcc/cp/parser.c:9992
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
@ 2020-03-26 9:57 ` rguenth at gcc dot gnu.org
2020-03-26 9:59 ` clyon at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-03-26 9:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |10.0
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Keywords| |needs-bisection
Last reconfirmed| |2020-03-26
Version|unknown |10.0
--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
An easy fix would be to use if (TREE_OVERFLOW_P (result)) clearly the code
fails to check that result is INTEGER_CST. Probably latent and only an
unrelated change changes the input to this function.
Testcase?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
2020-03-26 9:57 ` [Bug middle-end/94339] " rguenth at gcc dot gnu.org
@ 2020-03-26 9:59 ` clyon at gcc dot gnu.org
2020-03-26 10:09 ` marxin at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: clyon at gcc dot gnu.org @ 2020-03-26 9:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
--- Comment #2 from Christophe Lyon <clyon at gcc dot gnu.org> ---
Created attachment 48123
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48123&action=edit
ada-lang.ii.xz
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
2020-03-26 9:57 ` [Bug middle-end/94339] " rguenth at gcc dot gnu.org
2020-03-26 9:59 ` clyon at gcc dot gnu.org
@ 2020-03-26 10:09 ` marxin at gcc dot gnu.org
2020-03-26 10:11 ` [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d marxin at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-26 10:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #3 from Martin Liška <marxin at gcc dot gnu.org> ---
I'm bisecting and reducing the test-case.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
` (2 preceding siblings ...)
2020-03-26 10:09 ` marxin at gcc dot gnu.org
@ 2020-03-26 10:11 ` marxin at gcc dot gnu.org
2020-03-26 11:06 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-26 10:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
Summary|[10 regression] ICE in |[10 regression] ICE in
|tree_class_check_failed |tree_class_check_failed
| |since
| |r10-7344-gca6c722561ce9b9d
Keywords|needs-bisection |needs-reduction
Known to fail| |10.0
Known to work| |9.3.0
--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r10-7344-gca6c722561ce9b9d.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
` (3 preceding siblings ...)
2020-03-26 10:11 ` [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d marxin at gcc dot gnu.org
@ 2020-03-26 11:06 ` marxin at gcc dot gnu.org
2020-03-26 11:46 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-26 11:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|needs-reduction |
--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case:
$ cat ada.ii
unsigned a;
void b()
{
0 ? b(), -1 : a;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
` (4 preceding siblings ...)
2020-03-26 11:06 ` marxin at gcc dot gnu.org
@ 2020-03-26 11:46 ` jakub at gcc dot gnu.org
2020-03-27 9:03 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-26 11:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 48124
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48124&action=edit
gcc10-pr94339.patch
Untested fix.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
` (5 preceding siblings ...)
2020-03-26 11:46 ` jakub at gcc dot gnu.org
@ 2020-03-27 9:03 ` cvs-commit at gcc dot gnu.org
2020-03-27 20:18 ` jakub at gcc dot gnu.org
2020-03-27 21:31 ` cvs-commit at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-27 9:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:72809d6fe8e085440403ce125c51d01d6e7512b0
commit r10-7410-g72809d6fe8e085440403ce125c51d01d6e7512b0
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Mar 27 10:00:47 2020 +0100
c++: Handle COMPOUND_EXPRs in ocp_convert [PR94339]
My recent change to get_narrower/warnings_for_convert_and_check broke
the following testcase, warnings_for_convert_and_check is upset that
expr is a COMPOUND_EXPR with INTEGER_CST at the rightmost operand, while
result is a COMPOUND_EXPR with a NOP_EXPR of INTEGER_CST at the rightmost
operand, it expects such conversions to be simplified.
The easiest fix seems to be to handle COMPOUND_EXPRs in ocp_convert too,
by converting the rightmost operand and recreating COMPOUND_EXPR(s) if that
changed.
The attr-copy-2.C change is a workaround for PR94346, where we now ICE on
the testcase, while previously we'd ICE only if it contained a comma
expression at the outer level rather than cast of a COMPOUND_EXPR to
something. I'll defer that to Martin.
2020-03-27 Jakub Jelinek <jakub@redhat.com>
PR c++/94339
* cvt.c (ocp_convert): Handle COMPOUND_EXPR by recursion on the
second
operand and creating a new COMPOUND_EXPR if anything changed.
* g++.dg/other/pr94339.C: New test.
* g++.dg/ext/attr-copy-2.C: Comment out failing tests due to
PR94346.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
` (6 preceding siblings ...)
2020-03-27 9:03 ` cvs-commit at gcc dot gnu.org
@ 2020-03-27 20:18 ` jakub at gcc dot gnu.org
2020-03-27 21:31 ` cvs-commit at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-27 20:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
` (7 preceding siblings ...)
2020-03-27 20:18 ` jakub at gcc dot gnu.org
@ 2020-03-27 21:31 ` cvs-commit at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-03-27 21:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94339
--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:54de5afb4a9b2f7296f614820a33ec0e4eb8bf39
commit r10-7429-g54de5afb4a9b2f7296f614820a33ec0e4eb8bf39
Author: Jakub Jelinek <jakub@redhat.com>
Date: Fri Mar 27 22:29:50 2020 +0100
c++: Handle COMPOUND_EXPRs in ocp_convert [PR94339]
With the PR94346 fix in, we can revert the attr-copy-2.C workaround.
2020-03-27 Jakub Jelinek <jakub@redhat.com>
PR c++/94339
* g++.dg/ext/attr-copy-2.C: Revert the last changes.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-03-27 21:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 9:39 [Bug middle-end/94339] New: [10 regression] ICE in tree_class_check_failed clyon at gcc dot gnu.org
2020-03-26 9:57 ` [Bug middle-end/94339] " rguenth at gcc dot gnu.org
2020-03-26 9:59 ` clyon at gcc dot gnu.org
2020-03-26 10:09 ` marxin at gcc dot gnu.org
2020-03-26 10:11 ` [Bug middle-end/94339] [10 regression] ICE in tree_class_check_failed since r10-7344-gca6c722561ce9b9d marxin at gcc dot gnu.org
2020-03-26 11:06 ` marxin at gcc dot gnu.org
2020-03-26 11:46 ` jakub at gcc dot gnu.org
2020-03-27 9:03 ` cvs-commit at gcc dot gnu.org
2020-03-27 20:18 ` jakub at gcc dot gnu.org
2020-03-27 21:31 ` cvs-commit 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).