https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86159
Bug ID: 86159 Summary: g++ ICE at -O1 and above on valid code: incorrect type of vector CONSTRUCTOR elements Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: helloqirun at gmail dot com Target Milestone: --- It appears to be a recent regression. It happens at "-O1" and above but g++-trunk compiles. g++-8.1 also compiles at "-O1" and above. $ g++-trunk -v Using built-in specs. COLLECT_GCC=g++-trunk COLLECT_LTO_WRAPPER=/home/absozero/trunk/root-gcc/libexec/gcc/x86_64-pc-linux-gnu/9.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: ../gcc/configure --prefix=/home/absozero/trunk/root-gcc --enable-languages=c,c++ --disable-werror --enable-multilib Thread model: posix gcc version 9.0.0 20180614 (experimental) [trunk revision 261591] (GCC) $ g++-8.1 abc.c -c -O1 $ g++-trunk abc.c -c -O1 abc.c: In function ‘vec fn1()’: abc.c:2:9: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi] vec fn1() { ^ abc.c:2:5: error: incorrect type of vector CONSTRUCTOR elements vec fn1() { ^~~ {_7, _10, _13, _16, _19, _22, _25, _28} _1 = {_7, _10, _13, _16, _19, _22, _25, _28}; during GIMPLE pass: veclower2 abc.c:2:5: internal compiler error: verify_gimple failed 0xee2941 verify_gimple_in_cfg(function*, bool) ../../gcc/gcc/tree-cfg.c:5405 0xdccf7f execute_function_todo ../../gcc/gcc/passes.c:1943 0xdcde8e execute_todo ../../gcc/gcc/passes.c:1997 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. $ cat abc.c typedef int vec __attribute__((vector_size(32))); vec fn1() { vec x, zero{}; vec one = zero + 1; return x < zero ? one : zero; }