https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93996
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-checking Component|target |rtl-optimization --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- We set mem_attr->expr to NULL with: 0x0000000000986a22 in memcpy (__len=56, __src=0x7fffffffd2b0, __dest=0x7ffff7252ce8) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34 34 return __builtin___memcpy_chk (__dest, __src, __len, __bos0 (__dest)); (gdb) bt #0 0x0000000000986a22 in memcpy (__len=56, __src=0x7fffffffd2b0, __dest=0x7ffff7252ce8) at /usr/include/x86_64-linux-gnu/bits/string_fortified.h:34 #1 set_mem_attrs (mem=0x7ffff7343a98, attrs=0x7fffffffd2b0) at /bajas/pinskia/src/toolchain-10/scripts/../src/gcc/emit-rtl.c:387 #2 0x00000000009888c6 in set_mem_alias_set (mem=mem@entry=0x7ffff7343a98, set=set@entry=-1) at /bajas/pinskia/src/toolchain-10/scripts/../src/gcc/emit-rtl.c:2212 #3 0x000000000084631d in get_builtin_sync_mem (loc=<addr_expr 0x7ffff6c460c0>, mode=mode@entry=E_SImode) at /bajas/pinskia/src/toolchain-10/scripts/../src/gcc/builtins.c:6502 But change it to the incorrect thing with: #0 add_reg_note (insn=insn@entry=0x7ffff7252cb0, kind=kind@entry=REG_SAVE_NOTE, datum=<optimized out>) at /bajas/pinskia/src/toolchain-10/scripts/../src/gcc/rtlanal.c:2399 2398 REG_NOTES (insn) = alloc_reg_note (kind, datum, REG_NOTES (insn)); Here insn is: (note 35 33 23 4 [bb 4] NOTE_INSN_BASIC_BLOCK) Since this insn is not a INSN but a note, REG_NOTES is not value. RTL checking would have caught this issue.