public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754
@ 2023-07-17 9:14 141242068 at smail dot nju.edu.cn
2023-07-17 14:24 ` [Bug c/110699] [12/13/14 Regression] " mpolacek at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-07-17 9:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110699
Bug ID: 110699
Summary: internal compiler error: tree check: expected
array_type, have error_mark in array_ref_low_bound, at
tree.cc:12754
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: ---
When compiling below program using gcc-14 with option `gcc-14 a.c`, gcc-14
crashes:
```
typedef __attribute__((__vector_size__(64))) int T;
void f(void) {
extern char a[64], b[64];
void *p = a;
T q = *(T *)&b[0];
}
void g() {
extern char b;
}
```
GCC's output is pasted below:
```
<source>: In function 'g':
<source>:10:15: error: conflicting types for 'b'; have 'char'
10 | extern char b;
| ^
<source>:4:22: note: previous declaration of 'b' with type 'char[64]'
4 | extern char a[64], b[64];
| ^
<source>: In function 'f':
<source>:6:17: internal compiler error: tree check: expected array_type, have
error_mark in array_ref_low_bound, at tree.cc:12754
6 | T q = *(T *)&b[0];
| ~^~~
0x215104e internal_error(char const*, ...)
???:0
0x896b1b tree_check_failed(tree_node const*, char const*, int, char const*,
...)
???:0
0xd6c895 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xd6d557 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xd6db1d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xd6cf6a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xd7053a gimplify_stmt(tree_node**, gimple**)
???:0
0xd6d53e gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xd7053a gimplify_stmt(tree_node**, gimple**)
???:0
0xd6e4ab gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xd7053a gimplify_stmt(tree_node**, gimple**)
???:0
0xd6d914 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
???:0
0xd7053a gimplify_stmt(tree_node**, gimple**)
???:0
0xd719d3 gimplify_body(tree_node*, bool)
???:0
0xd71e2f gimplify_function_tree(tree_node*)
???:0
0xbaeba7 cgraph_node::analyze()
???:0
0xbb26f1 symbol_table::finalize_compilation_unit()
???: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 can be verified by visiting the Compiler Explorer:
https://gcc.godbolt.org/z/jPhnfG4f3
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/110699] [12/13/14 Regression] internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754
2023-07-17 9:14 [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 141242068 at smail dot nju.edu.cn
@ 2023-07-17 14:24 ` mpolacek at gcc dot gnu.org
2023-07-17 14:26 ` mpolacek at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-07-17 14:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110699
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2023-07-17
Target Milestone|--- |12.4
Summary|internal compiler error: |[12/13/14 Regression]
|tree check: expected |internal compiler error:
|array_type, have error_mark |tree check: expected
|in array_ref_low_bound, at |array_type, have error_mark
|tree.cc:12754 |in array_ref_low_bound, at
| |tree.cc:12754
Ever confirmed|0 |1
CC| |mpolacek at gcc dot gnu.org
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/110699] [12/13/14 Regression] internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754
2023-07-17 9:14 [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 141242068 at smail dot nju.edu.cn
2023-07-17 14:24 ` [Bug c/110699] [12/13/14 Regression] " mpolacek at gcc dot gnu.org
@ 2023-07-17 14:26 ` mpolacek at gcc dot gnu.org
2023-07-17 18:13 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-07-17 14:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110699
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |sayle at gcc dot gnu.org
--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r12-3278:
commit 823685221de986afb729910a6f2237f07a377f17
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Wed Sep 1 08:38:39 2021 +0100
C: PR c/79412: Poison decls with error_mark_node after type mismatch
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/110699] [12/13/14 Regression] internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754
2023-07-17 9:14 [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 141242068 at smail dot nju.edu.cn
2023-07-17 14:24 ` [Bug c/110699] [12/13/14 Regression] " mpolacek at gcc dot gnu.org
2023-07-17 14:26 ` mpolacek at gcc dot gnu.org
@ 2023-07-17 18:13 ` pinskia at gcc dot gnu.org
2023-07-21 19:40 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-17 18:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110699
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |trivial
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/110699] [12/13/14 Regression] internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754
2023-07-17 9:14 [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 141242068 at smail dot nju.edu.cn
` (2 preceding siblings ...)
2023-07-17 18:13 ` pinskia at gcc dot gnu.org
@ 2023-07-21 19:40 ` cvs-commit at gcc dot gnu.org
2023-07-23 12:49 ` roger at nextmovesoftware dot com
2023-07-23 17:55 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-21 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110699
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Roger Sayle <sayle@gcc.gnu.org>:
https://gcc.gnu.org/g:cfe53af09364d94fb86013f85ef598a1d47e0657
commit r14-2721-gcfe53af09364d94fb86013f85ef598a1d47e0657
Author: Roger Sayle <roger@nextmovesoftware.com>
Date: Fri Jul 21 20:37:59 2023 +0100
PR c/110699: Defend against error_mark_node in gimplify.cc.
This patch resolves PR c/110669, an ICE-after-error regression, by adding
a check that the array type isn't error_mark_node in
gimplify_compound_lval.
2023-07-21 Roger Sayle <roger@nextmovesoftware.com>
Richard Biener <rguenther@suse.de>
gcc/ChangeLog
PR c/110699
* gimplify.cc (gimplify_compound_lval): If the array's type
is error_mark_node then return GS_ERROR.
gcc/testsuite/ChangeLog
PR c/110699
* gcc.dg/pr110699.c: New test case.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/110699] [12/13/14 Regression] internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754
2023-07-17 9:14 [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 141242068 at smail dot nju.edu.cn
` (3 preceding siblings ...)
2023-07-21 19:40 ` cvs-commit at gcc dot gnu.org
@ 2023-07-23 12:49 ` roger at nextmovesoftware dot com
2023-07-23 17:55 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: roger at nextmovesoftware dot com @ 2023-07-23 12:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110699
Roger Sayle <roger at nextmovesoftware dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |roger at nextmovesoftware dot com
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #3 from Roger Sayle <roger at nextmovesoftware dot com> ---
This issue has been fixed on mainline for GCC 14.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/110699] [12/13/14 Regression] internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754
2023-07-17 9:14 [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 141242068 at smail dot nju.edu.cn
` (4 preceding siblings ...)
2023-07-23 12:49 ` roger at nextmovesoftware dot com
@ 2023-07-23 17:55 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-23 17:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110699
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|12.4 |14.0
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-07-23 17:55 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-17 9:14 [Bug c/110699] New: internal compiler error: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc:12754 141242068 at smail dot nju.edu.cn
2023-07-17 14:24 ` [Bug c/110699] [12/13/14 Regression] " mpolacek at gcc dot gnu.org
2023-07-17 14:26 ` mpolacek at gcc dot gnu.org
2023-07-17 18:13 ` pinskia at gcc dot gnu.org
2023-07-21 19:40 ` cvs-commit at gcc dot gnu.org
2023-07-23 12:49 ` roger at nextmovesoftware dot com
2023-07-23 17:55 ` 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).