* [Bug c++/102642] [12 Regression] ICE in get, at cgraph.h:2776
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
@ 2021-10-08 6:10 ` rguenth at gcc dot gnu.org
2021-10-11 9:57 ` [Bug c++/102642] [12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6 marxin at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-10-08 6:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
2021-10-08 6:10 ` [Bug c++/102642] " rguenth at gcc dot gnu.org
@ 2021-10-11 9:57 ` marxin at gcc dot gnu.org
2021-10-11 10:14 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-10-11 9:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org,
| |marxin at gcc dot gnu.org
Ever confirmed|0 |1
Last reconfirmed| |2021-10-11
Summary|[12 Regression] ICE in get, |[12 Regression] ICE in get,
|at cgraph.h:2776 |at cgraph.h:2776 since
| |r12-4032-g701075864ac4d1c6
Status|UNCONFIRMED |NEW
Known to fail| |12.0
Known to work| |11.2.0
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r12-4032-g701075864ac4d1c6.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
2021-10-08 6:10 ` [Bug c++/102642] " rguenth at gcc dot gnu.org
2021-10-11 9:57 ` [Bug c++/102642] [12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6 marxin at gcc dot gnu.org
@ 2021-10-11 10:14 ` jakub at gcc dot gnu.org
2021-10-11 10:15 ` [Bug c++/102642] [11/12 " jakub at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-10-11 10:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Keywords| |error-recovery
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [11/12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
` (2 preceding siblings ...)
2021-10-11 10:14 ` jakub at gcc dot gnu.org
@ 2021-10-11 10:15 ` jakub at gcc dot gnu.org
2021-10-11 11:06 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-10-11 10:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.0 |11.3
Summary|[12 Regression] ICE in get, |[11/12 Regression] ICE in
|at cgraph.h:2776 since |get, at cgraph.h:2776 since
|r12-4032-g701075864ac4d1c6 |r12-4032-g701075864ac4d1c6
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Note, the patch has been backported to 11.3 too.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [11/12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
` (3 preceding siblings ...)
2021-10-11 10:15 ` [Bug c++/102642] [11/12 " jakub at gcc dot gnu.org
@ 2021-10-11 11:06 ` jakub at gcc dot gnu.org
2021-10-15 2:53 ` cnsun at uwaterloo dot ca
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-10-11 11:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
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 #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 51585
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51585&action=edit
gcc12-pr102642.patch
Untested fix.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [11/12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
` (4 preceding siblings ...)
2021-10-11 11:06 ` jakub at gcc dot gnu.org
@ 2021-10-15 2:53 ` cnsun at uwaterloo dot ca
2021-10-17 8:43 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-10-15 2:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
Chengnian Sun <cnsun at uwaterloo dot ca> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |cnsun at uwaterloo dot ca
--- Comment #4 from Chengnian Sun <cnsun at uwaterloo dot ca> ---
The following might be a duplicate.
$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.gzh6IUhxke-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20211014 (experimental) [master -gee9fa8a57] (GCC)
$ cat mutant.c
static a __attribute__((weakref("")));
static b __attribute__((weakref("")));
static b __attribute__((weakref("test4_f")));
test4_f;
c() { return b }
$ gcc-trunk -w mutant.c
mutant.c: In function ‘c’:
mutant.c:5:15: error: expected ‘;’ before ‘}’ token
5 | c() { return b }
| ^~
| ;
At top level:
cc1: internal compiler error: in get, at cgraph.h:2776
0x836e01 varpool_node::get(tree_node const*)
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/cgraph.h:2776
0x836e01 varpool_node::analyze()
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/varpool.c:534
0xae7026 analyze_functions
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/cgraphunit.c:1288
0xae7fc1 symbol_table::finalize_compilation_unit()
/tmp/tmp.gzh6IUhxke-gcc-builder/gcc/gcc/cgraphunit.c:2508
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [11/12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
` (5 preceding siblings ...)
2021-10-15 2:53 ` cnsun at uwaterloo dot ca
@ 2021-10-17 8:43 ` pinskia at gcc dot gnu.org
2021-10-20 6:40 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-17 8:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [11/12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
` (6 preceding siblings ...)
2021-10-17 8:43 ` pinskia at gcc dot gnu.org
@ 2021-10-20 6:40 ` cvs-commit at gcc dot gnu.org
2021-10-20 6:48 ` cvs-commit at gcc dot gnu.org
2021-10-20 6:48 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-20 6:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
--- Comment #5 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:424945258d1778617b5d3d5273f6e1c10e718f80
commit r12-4527-g424945258d1778617b5d3d5273f6e1c10e718f80
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Oct 20 08:38:58 2021 +0200
c++: Fix up push_local_extern_decl_alias error recovery [PR102642]
My recent push_local_extern_decl_alias change broke error-recovery,
do_pushdecl can return error_mark_node and set_decl_tls_model can't be
called on that. There are other code paths that store error_mark_node
into DECL_LOCAL_DECL_ALIAS, with the intent to differentiate the cases
where we haven't yet tried to push it into the namespace scope (NULL)
and one where we have tried it but it failed (error_mark_node), but looking
around, there are other spots where we call functions or do processing
which doesn't tolerate error_mark_node.
So, the first hunk with the testcase fixes the testcase, the others
fix what I've spotted and the fix was easy to figure out (there are I think
3 other spots mainly for function multiversioning).
2021-10-20 Jakub Jelinek <jakub@redhat.com>
PR c++/102642
* name-lookup.c (push_local_extern_decl_alias): Don't call
set_decl_tls_model on error_mark_node.
* decl.c (make_rtl_for_nonlocal_decl): Don't call
set_user_assembler_name on error_mark_node.
* parser.c (cp_parser_oacc_declare): Ignore DECL_LOCAL_DECL_ALIAS
if it is error_mark_node.
(cp_parser_omp_declare_target): Likewise.
* g++.dg/tls/pr102642.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [11/12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
` (7 preceding siblings ...)
2021-10-20 6:40 ` cvs-commit at gcc dot gnu.org
@ 2021-10-20 6:48 ` cvs-commit at gcc dot gnu.org
2021-10-20 6:48 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-10-20 6:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:5d3a05456dcc95e94c21977f4aa3260362f24e18
commit r11-9176-g5d3a05456dcc95e94c21977f4aa3260362f24e18
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Oct 20 08:38:58 2021 +0200
c++: Fix up push_local_extern_decl_alias error recovery [PR102642]
My recent push_local_extern_decl_alias change broke error-recovery,
do_pushdecl can return error_mark_node and set_decl_tls_model can't be
called on that. There are other code paths that store error_mark_node
into DECL_LOCAL_DECL_ALIAS, with the intent to differentiate the cases
where we haven't yet tried to push it into the namespace scope (NULL)
and one where we have tried it but it failed (error_mark_node), but looking
around, there are other spots where we call functions or do processing
which doesn't tolerate error_mark_node.
So, the first hunk with the testcase fixes the testcase, the others
fix what I've spotted and the fix was easy to figure out (there are I think
3 other spots mainly for function multiversioning).
2021-10-20 Jakub Jelinek <jakub@redhat.com>
PR c++/102642
* name-lookup.c (push_local_extern_decl_alias): Don't call
set_decl_tls_model on error_mark_node.
* decl.c (make_rtl_for_nonlocal_decl): Don't call
set_user_assembler_name on error_mark_node.
* parser.c (cp_parser_oacc_declare): Ignore DECL_LOCAL_DECL_ALIAS
if it is error_mark_node.
(cp_parser_omp_declare_target): Likewise.
* g++.dg/tls/pr102642.C: New test.
(cherry picked from commit 424945258d1778617b5d3d5273f6e1c10e718f80)
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/102642] [11/12 Regression] ICE in get, at cgraph.h:2776 since r12-4032-g701075864ac4d1c6
2021-10-07 16:42 [Bug c++/102642] New: [12 Regression] ICE in get, at cgraph.h:2776 asolokha at gmx dot com
` (8 preceding siblings ...)
2021-10-20 6:48 ` cvs-commit at gcc dot gnu.org
@ 2021-10-20 6:48 ` jakub at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-10-20 6:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102642
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 11+ messages in thread