https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89690
Bug ID: 89690 Summary: ICE on a MEM_REF in trivial gimple Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: msebor at gcc dot gnu.org Target Milestone: --- The following test case is one of a few I tried that triggers an ICE. I'm not sure if it's valid or not but I put it together in response to the suggestion here: https://gcc.gnu.org/ml/gcc-patches/2019-03/msg00543.html $ cat z.c && gcc -O2 -S -Wall -fdump-tree-gimple=/dev/stdout -fgimple z.c void __GIMPLE () h (void) { unsigned char a[4]; __MEM <void *>((char*)&a + 16) = 0; // ditto with MEM <void*> ((char*)&a) = 0; } h () { unsigned char a[4]; MEM[(char *)&a + 16B] = 0; return; } z.c: In function ‘h’: z.c:1:18: error: non-trivial conversion at assignment 1 | void __GIMPLE () h (void) | ^ void * int MEM[(char *)&a + 16B] = 0; during GIMPLE pass: *warn_unused_result z.c:1:18: internal compiler error: verify_gimple failed 0x11d4f03 verify_gimple_in_seq(gimple*) /src/gcc/git-svn/gcc/tree-cfg.c:5094 0xfd9b5d execute_function_todo /src/gcc/git-svn/gcc/passes.c:1979 0xfd8a82 do_per_function /src/gcc/git-svn/gcc/passes.c:1638 0xfd9d57 execute_todo /src/gcc/git-svn/gcc/passes.c:2031 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.