[Bug c/109598] ICE: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc

2023-04-24 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109598

Martin Liška  changed:

   What|Removed |Added

 CC||jsm28 at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org,
   ||sayle at gcc dot gnu.org

--- Comment #2 from Martin Liška  ---
Started with r12-3278-g823685221de986.

[Bug c/109598] ICE: tree check: expected array_type, have error_mark in array_ref_low_bound, at tree.cc

2023-04-24 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109598

Richard Biener  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2023-04-24
 Ever confirmed|0   |1

--- Comment #1 from Richard Biener  ---
Confirmed.  While it's possible to fend this off during gimplification it would
be nice if the frontend wouldn't emit

 
unit-size 
align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x771e33f0 precision:8 min  max

pointer_to_this >
unsigned DI
size 
unit-size 
align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x771eee70 reference_to_this >
constant
arg:0 

arg:0 
addressable used public external read BLK t.c:1:13
align:8 warn_if_not_align:0 context  chain >
arg:1 
t.c:5:12 start: t.c:5:11 finish: t.c:5:14>
t.c:5:10 start: t.c:5:10 finish: t.c:5:14>

specifically

arg:0 
arg:0 

note the array_ref has type 'char' but the var_decl has type error_mark.