public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110500] New: gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate
@ 2023-06-30 14:09 141242068 at smail dot nju.edu.cn
2023-06-30 21:20 ` [Bug c/110500] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-06-30 14:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110500
Bug ID: 110500
Summary: gcc: internal compiler error: tree check: expected
class 'type', have 'exceptional' (error_mark) in
c_parser_omp_clause_allocate
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: 141242068 at smail dot nju.edu.cn
Target Milestone: ---
The program:
```
$ cat small.c
int f, l, ll, r;
void foo(int i1, int i2, int p, int s, int nth, int *q, int ntm) {
#pragma omp distribute parallel for simd \
private (p) firstprivate (f) collapse(1) dist_schedule(static, 16) \
if (parallel: i2) if(simd: i1) default(shared) shared(s) reduction(+:r)
num_threads (nth) proc_bind(spread) \
lastprivate (l) schedule(static, 4) nontemporal(ntm) \
safelen(8) simdlen(4) aligned(q: 32) order(concurrent) allocate
(omp_default_mem_alloc:f)
for (int i = 0; i < 64; i++)
ll++;
}
```
When compile it using gcc-14 with option `-fopenmp-simd -O0`, gcc reports
internal compiler errors as below:
```
<source>: In function 'foo':
<source>:8:70: error: 'omp_default_mem_alloc' undeclared (first use in this
function)
8 | safelen(8) simdlen(4) aligned(q: 32) order(concurrent) allocate
(omp_default_mem_alloc:f)
|
^~~~~~~~~~~~~~~~~~~~~
<source>:8:70: note: each undeclared identifier is reported only once for each
function it appears in
<source>:4:9: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in c_parser_omp_clause_allocate, at
c/c-parser.cc:16332
4 | #pragma omp distribute parallel for simd \
| ^~~
0x213097e internal_error(char const*, ...)
???:0
0x8947e8 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
???:0
0xa7029d c_parse_file()
???:0
0xadf919 c_common_parse_file()
???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```
This behavior can be verified by visiting the CompilerExplorer:
https://gcc.godbolt.org/z/73436b54M
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/110500] gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate
2023-06-30 14:09 [Bug c/110500] New: gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate 141242068 at smail dot nju.edu.cn
@ 2023-06-30 21:20 ` pinskia at gcc dot gnu.org
2023-06-30 21:20 ` pinskia at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-30 21:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110500
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |minor
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/110500] gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate
2023-06-30 14:09 [Bug c/110500] New: gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate 141242068 at smail dot nju.edu.cn
2023-06-30 21:20 ` [Bug c/110500] " pinskia at gcc dot gnu.org
@ 2023-06-30 21:20 ` pinskia at gcc dot gnu.org
2023-06-30 21:21 ` pinskia at gcc dot gnu.org
2023-10-18 19:02 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-30 21:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110500
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever confirmed|0 |1
Last reconfirmed| |2023-06-30
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/110500] gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate
2023-06-30 14:09 [Bug c/110500] New: gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate 141242068 at smail dot nju.edu.cn
2023-06-30 21:20 ` [Bug c/110500] " pinskia at gcc dot gnu.org
2023-06-30 21:20 ` pinskia at gcc dot gnu.org
@ 2023-06-30 21:21 ` pinskia at gcc dot gnu.org
2023-10-18 19:02 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-06-30 21:21 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110500
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 55436
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55436&action=edit
Patch which should fix this
This patch will fix this (and other) ICEs.
There might be more further below but I didn't check.
Someone can take this patch and finish it up.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug c/110500] gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate
2023-06-30 14:09 [Bug c/110500] New: gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate 141242068 at smail dot nju.edu.cn
` (2 preceding siblings ...)
2023-06-30 21:21 ` pinskia at gcc dot gnu.org
@ 2023-10-18 19:02 ` pinskia at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-18 19:02 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110500
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 111862 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-18 19:02 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-30 14:09 [Bug c/110500] New: gcc: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in c_parser_omp_clause_allocate 141242068 at smail dot nju.edu.cn
2023-06-30 21:20 ` [Bug c/110500] " pinskia at gcc dot gnu.org
2023-06-30 21:20 ` pinskia at gcc dot gnu.org
2023-06-30 21:21 ` pinskia at gcc dot gnu.org
2023-10-18 19:02 ` 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).