public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/98742] New: [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435
@ 2021-01-19 9:42 asolokha at gmx dot com
2021-01-19 10:01 ` [Bug c++/98742] [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 since r11-6752-ga6d22fb21c6f1ad7 marxin at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: asolokha at gmx dot com @ 2021-01-19 9:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98742
Bug ID: 98742
Summary: [11 Regression] ICE: tree check: expected class
'type', have 'exceptional' (error_mark) in
finish_omp_clauses, at cp/semantics.c:7435
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, openmp
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: asolokha at gmx dot com
Target Milestone: ---
g++-11.0.0-alpha20210117 snapshot (g:0f4c8f517b7954e113afb4d5c7212123c8ee2418)
ICEs when compiling the following testcase, extracted from
test/OpenMP/task_messages.cpp from the clang 11.0.1 test suite, w/ -fopenmp:
void foo() {
#pragma omp task detach(0)
;
}
% g++-11.0.0 -fopenmp -c xmwkrwrg.cpp
xmwkrwrg.cpp: In function 'void foo()':
xmwkrwrg.cpp:2:25: error: expected unqualified-id before numeric constant
2 | #pragma omp task detach(0)
| ^
xmwkrwrg.cpp:2:27: internal compiler error: tree check: expected class 'type',
have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435
2 | #pragma omp task detach(0)
| ^
0x80a0d3 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/tree.c:9862
0x6cc3b5 tree_class_check(tree_node*, tree_code_class, char const*, int, char
const*)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/tree.h:3461
0x6cc3b5 finish_omp_clauses(tree_node*, c_omp_region_type)
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/semantics.c:7435
0xa59ef4 cp_parser_omp_all_clauses
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:38597
0xa3bd17 cp_parser_omp_task
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:41107
0xa3bd17 cp_parser_omp_construct
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:44371
0xa3d68d cp_parser_pragma
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:45000
0xa45b08 cp_parser_statement
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:11720
0xa4688d cp_parser_statement_seq_opt
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:12112
0xa46968 cp_parser_compound_statement
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:12062
0xa63ca4 cp_parser_function_body
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:23990
0xa63ca4 cp_parser_ctor_initializer_opt_and_function_body
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:24041
0xa658ca cp_parser_function_definition_after_declarator
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:29931
0xa66d29 cp_parser_function_definition_from_specifiers_and_declarator
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:29847
0xa66d29 cp_parser_init_declarator
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:21563
0xa429e7 cp_parser_simple_declaration
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:14381
0xa700cd cp_parser_declaration
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:14078
0xa70bc8 cp_parser_toplevel_declaration
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:14107
0xa70bc8 cp_parser_translation_unit
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:4936
0xa70bc8 c_parse_file()
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20210117/work/gcc-11-20210117/gcc/cp/parser.c:45172
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98742] [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 since r11-6752-ga6d22fb21c6f1ad7
2021-01-19 9:42 [Bug c++/98742] New: [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 asolokha at gmx dot com
@ 2021-01-19 10:01 ` marxin at gcc dot gnu.org
2021-01-19 10:12 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-19 10:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98742
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |11.0
Target Milestone|--- |11.0
Summary|[11 Regression] ICE: tree |[11 Regression] ICE: tree
|check: expected class |check: expected class
|'type', have 'exceptional' |'type', have 'exceptional'
|(error_mark) in |(error_mark) in
|finish_omp_clauses, at |finish_omp_clauses, at
|cp/semantics.c:7435 |cp/semantics.c:7435 since
| |r11-6752-ga6d22fb21c6f1ad7
Ever confirmed|0 |1
Last reconfirmed| |2021-01-19
Status|UNCONFIRMED |NEW
CC| |kcy at codesourcery dot com,
| |marxin at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-6752-ga6d22fb21c6f1ad7.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98742] [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 since r11-6752-ga6d22fb21c6f1ad7
2021-01-19 9:42 [Bug c++/98742] New: [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 asolokha at gmx dot com
2021-01-19 10:01 ` [Bug c++/98742] [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 since r11-6752-ga6d22fb21c6f1ad7 marxin at gcc dot gnu.org
@ 2021-01-19 10:12 ` jakub at gcc dot gnu.org
2021-01-20 7:38 ` cvs-commit at gcc dot gnu.org
2021-01-20 8:54 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-19 10:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98742
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 #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49999
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49999&action=edit
gcc11-pr98742.patch
Untested fix.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98742] [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 since r11-6752-ga6d22fb21c6f1ad7
2021-01-19 9:42 [Bug c++/98742] New: [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 asolokha at gmx dot com
2021-01-19 10:01 ` [Bug c++/98742] [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 since r11-6752-ga6d22fb21c6f1ad7 marxin at gcc dot gnu.org
2021-01-19 10:12 ` jakub at gcc dot gnu.org
@ 2021-01-20 7:38 ` cvs-commit at gcc dot gnu.org
2021-01-20 8:54 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-01-20 7:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98742
--- Comment #3 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:7ab1abf3b82a3bcfff9b7bc596166fef6a0d83ab
commit r11-6810-g7ab1abf3b82a3bcfff9b7bc596166fef6a0d83ab
Author: Jakub Jelinek <jakub@redhat.com>
Date: Wed Jan 20 08:35:20 2021 +0100
openmp: Don't ICE on detach clause with erroneous decl [PR98742]
Similarly to how we handle erroneous operands to e.g. allocate clause,
this change just removes those clauses instead of accessing
TYPE_MAIN_VARIANT
of its type, which doesn't work on error_mark_node. Also, just for good
measure, bails out if TYPE_NAME is NULL.
2021-01-20 Jakub Jelinek <jakub@redhat.com>
PR c++/98742
* semantics.c (finish_omp_clauses) <case OMP_CLAUSE_DETACH>: If
error_operand_p, remove clause without further checking. Check
for non-NULL TYPE_NAME.
* c-c++-common/gomp/task-detach-2.c: New test.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c++/98742] [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 since r11-6752-ga6d22fb21c6f1ad7
2021-01-19 9:42 [Bug c++/98742] New: [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 asolokha at gmx dot com
` (2 preceding siblings ...)
2021-01-20 7:38 ` cvs-commit at gcc dot gnu.org
@ 2021-01-20 8:54 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-01-20 8:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98742
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed, thanks for the report.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-01-20 8:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 9:42 [Bug c++/98742] New: [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 asolokha at gmx dot com
2021-01-19 10:01 ` [Bug c++/98742] [11 Regression] ICE: tree check: expected class 'type', have 'exceptional' (error_mark) in finish_omp_clauses, at cp/semantics.c:7435 since r11-6752-ga6d22fb21c6f1ad7 marxin at gcc dot gnu.org
2021-01-19 10:12 ` jakub at gcc dot gnu.org
2021-01-20 7:38 ` cvs-commit at gcc dot gnu.org
2021-01-20 8:54 ` jakub 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).