https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117333
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-10-29 Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Ever confirmed|0 |1 Status|UNCONFIRMED |ASSIGNED --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- tree tree_size_b = TYPE_SIZE_UNIT (TREE_TYPE (DR_REF (b))); (gdb) p tree_size_b $2 = <tree 0x0> (gdb) p debug_gimple_stmt ($4) # .MEM_8 = VDEF <.MEM_7> ps_4(D)->ac = "abcdef"; where the LHS is <component_ref 0x7ffff69da780 type <array_type 0x7ffff69b2690 type <integer_type 0x7ffff68223f0 char public QI type <integer_type 0x7ffff68223f0 char public QI size <integer_cst 0x7ffff6824048 constant 8> unit-size <integer_cst 0x7ffff6824060 constant 1> align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff68223f0 precision:8 min <integer_cst 0x7ffff6824090 -128> max <integer_cst 0x7ffff68240c0 127> pointer_to_this <pointer_type 0x7ffff682de70>> BLK align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff69b2690 domain <integer_type 0x7ffff69b25e8 type <integer_type 0x7ffff6822000 sizetype> DI size <integer_cst 0x7ffff6802f48 constant 64> unit-size <integer_cst 0x7ffff6802f60 constant 8> align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type 0x7ffff69b25e8 precision:64 min <integer_cst 0x7ffff6802f78 0>>> where this stmt is from the *ps = (struct s) gs; gimplification: *ps = {}; ps->ul = 3; ps->i = -4; ps->ac = "abcdef"; while it's reasonably easy to fend off the ICE the IL we have here is unfortunate. The size of the access comes from the RHS in this case.