public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97958] New: ICE in build2, at tree.c:4868
@ 2020-11-23 16:44 gscfq@t-online.de
2020-11-23 17:43 ` [Bug c/97958] " jakub at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: gscfq@t-online.de @ 2020-11-23 16:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
Bug ID: 97958
Summary: ICE in build2, at tree.c:4868
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Affects versions down to at least r5 :
$ cat z1.c
int f ()
{
#pragma omp atomic
f = f + 1;
}
$ gcc-11-20201122 -c z1.c -fopenmp
z1.c: In function 'f':
z1.c:4:3: internal compiler error: in build2, at tree.c:4868
4 | f = f + 1;
| ^
0xdaaf2d build2(tree_code, tree_node*, tree_node*, tree_node*)
../../gcc/tree.c:4867
0x674105 c_parser_binary_expression
../../gcc/c/c-parser.c:8010
0x674b15 c_parser_conditional_expression
../../gcc/c/c-parser.c:7607
0x675071 c_parser_expr_no_commas
../../gcc/c/c-parser.c:7522
0x67ffd0 c_parser_omp_atomic
../../gcc/c/c-parser.c:17677
0x69045c c_parser_omp_construct
../../gcc/c/c-parser.c:21546
0x66dd07 c_parser_pragma
../../gcc/c/c-parser.c:12517
0x688206 c_parser_compound_statement_nostart
../../gcc/c/c-parser.c:5764
0x6885d3 c_parser_compound_statement
../../gcc/c/c-parser.c:5606
0x689e61 c_parser_declaration_or_fndef
../../gcc/c/c-parser.c:2543
0x690a47 c_parser_external_declaration
../../gcc/c/c-parser.c:1777
0x691569 c_parser_translation_unit
../../gcc/c/c-parser.c:1650
0x691569 c_parse_file()
../../gcc/c/c-parser.c:21882
0x6e0772 c_common_parse_file()
../../gcc/c-family/c-opts.c:1198
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
@ 2020-11-23 17:43 ` jakub at gcc dot gnu.org
2020-11-24 8:07 ` cvs-commit at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-23 17:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-11-23
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49614
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49614&action=edit
gcc11-pr97958.patch
Untested fix.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
2020-11-23 17:43 ` [Bug c/97958] " jakub at gcc dot gnu.org
@ 2020-11-24 8:07 ` cvs-commit at gcc dot gnu.org
2020-11-24 8:16 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-24 8:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
--- Comment #2 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:2aaf44a90283156ec0e70ad4d9030f3ba5054c6f
commit r11-5272-g2aaf44a90283156ec0e70ad4d9030f3ba5054c6f
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Nov 24 09:04:28 2020 +0100
openmp: Fix C ICE on OpenMP atomics
c_parser_binary_expression was using build2 to create a temporary holder
for binary expression that c_parser_atomic and c_finish_omp_atomic can then
handle. The latter performs then all the needed checking.
Unfortunately, build2 performs some checking too, e.g. PLUS_EXPR vs.
POINTER_PLUS_EXPR or matching types of the arguments, nothing we can
guarantee
at the parsing time. So we need something like C++ build_min_nt*. This
patch implements that inline.
2020-11-24 Jakub Jelinek <jakub@redhat.com>
PR c/97958
* c-parser.c (c_parser_binary_expression): For omp atomic binary
expressions, use make_node instead of build2 to avoid checking
build2
performs.
* c-c++-common/gomp/pr97958.c: New test.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
2020-11-23 17:43 ` [Bug c/97958] " jakub at gcc dot gnu.org
2020-11-24 8:07 ` cvs-commit at gcc dot gnu.org
@ 2020-11-24 8:16 ` rguenth at gcc dot gnu.org
2020-11-24 8:21 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-24 8:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.0
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed on trunk, not sure if you want to backport.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
` (2 preceding siblings ...)
2020-11-24 8:16 ` rguenth at gcc dot gnu.org
@ 2020-11-24 8:21 ` jakub at gcc dot gnu.org
2020-11-25 11:56 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-11-24 8:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
I do (while the #c0 testcase is invalid and I wouldn't care about it much, the
first function in the testcase is completely valid and we shouldn't be crashing
on that.
But will aggregate it with other fixes.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
` (3 preceding siblings ...)
2020-11-24 8:21 ` jakub at gcc dot gnu.org
@ 2020-11-25 11:56 ` cvs-commit at gcc dot gnu.org
2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-25 11:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:1cd47144fd250f37206c8e2a0cc7d51c25ad368c
commit r10-9078-g1cd47144fd250f37206c8e2a0cc7d51c25ad368c
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Nov 24 09:04:28 2020 +0100
openmp: Fix C ICE on OpenMP atomics
c_parser_binary_expression was using build2 to create a temporary holder
for binary expression that c_parser_atomic and c_finish_omp_atomic can then
handle. The latter performs then all the needed checking.
Unfortunately, build2 performs some checking too, e.g. PLUS_EXPR vs.
POINTER_PLUS_EXPR or matching types of the arguments, nothing we can
guarantee
at the parsing time. So we need something like C++ build_min_nt*. This
patch implements that inline.
2020-11-24 Jakub Jelinek <jakub@redhat.com>
PR c/97958
* c-parser.c (c_parser_binary_expression): For omp atomic binary
expressions, use make_node instead of build2 to avoid checking
build2
performs.
* c-c++-common/gomp/pr97958.c: New test.
(cherry picked from commit 2aaf44a90283156ec0e70ad4d9030f3ba5054c6f)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
` (4 preceding siblings ...)
2020-11-25 11:56 ` cvs-commit at gcc dot gnu.org
@ 2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:49 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-20 23:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:28a164db98d7cb8fa82ac3699471830284502021
commit r9-9394-g28a164db98d7cb8fa82ac3699471830284502021
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Nov 24 09:04:28 2020 +0100
openmp: Fix C ICE on OpenMP atomics
c_parser_binary_expression was using build2 to create a temporary holder
for binary expression that c_parser_atomic and c_finish_omp_atomic can then
handle. The latter performs then all the needed checking.
Unfortunately, build2 performs some checking too, e.g. PLUS_EXPR vs.
POINTER_PLUS_EXPR or matching types of the arguments, nothing we can
guarantee
at the parsing time. So we need something like C++ build_min_nt*. This
patch implements that inline.
2020-11-24 Jakub Jelinek <jakub@redhat.com>
PR c/97958
* c-parser.c (c_parser_binary_expression): For omp atomic binary
expressions, use make_node instead of build2 to avoid checking
build2
performs.
* c-c++-common/gomp/pr97958.c: New test.
(cherry picked from commit 1cd47144fd250f37206c8e2a0cc7d51c25ad368c)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
` (5 preceding siblings ...)
2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 16:49 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:08 ` jakub at gcc dot gnu.org
2021-09-11 14:20 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-22 16:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-8 branch has been updated by Jakub Jelinek
<jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:eef73af5f1b5b3f9db8439f8ef48875c6eda5f0f
commit r8-10864-geef73af5f1b5b3f9db8439f8ef48875c6eda5f0f
Author: Jakub Jelinek <jakub@redhat.com>
Date: Tue Nov 24 09:04:28 2020 +0100
openmp: Fix C ICE on OpenMP atomics
c_parser_binary_expression was using build2 to create a temporary holder
for binary expression that c_parser_atomic and c_finish_omp_atomic can then
handle. The latter performs then all the needed checking.
Unfortunately, build2 performs some checking too, e.g. PLUS_EXPR vs.
POINTER_PLUS_EXPR or matching types of the arguments, nothing we can
guarantee
at the parsing time. So we need something like C++ build_min_nt*. This
patch implements that inline.
2020-11-24 Jakub Jelinek <jakub@redhat.com>
PR c/97958
* c-parser.c (c_parser_binary_expression): For omp atomic binary
expressions, use make_node instead of build2 to avoid checking
build2
performs.
* c-c++-common/gomp/pr97958.c: New test.
(cherry picked from commit 1cd47144fd250f37206c8e2a0cc7d51c25ad368c)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
` (6 preceding siblings ...)
2021-04-22 16:49 ` cvs-commit at gcc dot gnu.org
@ 2021-04-22 17:08 ` jakub at gcc dot gnu.org
2021-09-11 14:20 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-22 17:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
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 c/97958] ICE in build2, at tree.c:4868
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
` (7 preceding siblings ...)
2021-04-22 17:08 ` jakub at gcc dot gnu.org
@ 2021-09-11 14:20 ` pinskia at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-11 14:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97958
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |8.5
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-09-11 14:20 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-23 16:44 [Bug c/97958] New: ICE in build2, at tree.c:4868 gscfq@t-online.de
2020-11-23 17:43 ` [Bug c/97958] " jakub at gcc dot gnu.org
2020-11-24 8:07 ` cvs-commit at gcc dot gnu.org
2020-11-24 8:16 ` rguenth at gcc dot gnu.org
2020-11-24 8:21 ` jakub at gcc dot gnu.org
2020-11-25 11:56 ` cvs-commit at gcc dot gnu.org
2021-04-20 23:30 ` cvs-commit at gcc dot gnu.org
2021-04-22 16:49 ` cvs-commit at gcc dot gnu.org
2021-04-22 17:08 ` jakub at gcc dot gnu.org
2021-09-11 14:20 ` 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).