https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84191
Bug ID: 84191 Summary: Compiler ICEs when trying to resolve impossible arithmetic operations Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: cjdb.ns at gmail dot com Target Milestone: --- Created attachment 43332 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=43332&action=edit Output from -save-temps for GCC 7.2 (Seven-point-two) # Description It's possible to cause an ICE on some arithmetic expressions when `T op U` is ill-formed. The ICE goes away when this particular expression is fixed. I've attached the ICEing temps; please let me know if you'd like the success temps too. # Command line ninja test.doge.gl.uniform # Platforms observed * g++-7 (Ubuntu 7.2.0-1ubuntu1~16.04) 7.2.0 * g++.exe (Rev1, Built by MSYS2 project) 7.3.0 # Compiler flags /usr/bin/g++-7 -I/mnt/c/Users/cjdbn/projects/doge/doge/include -I/c/Users/cjdbn/projects/cmcstl2/include -I/c/Users/cjdbn/projects/GSL/include -I/c/Users/cjdbn/projects/stb -std=c++17 -fconcepts -march=native -Wall -Wextra -Wno-attributes -pedantic -Werror -ftemplate-backtrace-limit=0 -O0 -g3 -fno-inline -fstack-protector-all -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=address -fsanitize=undefined -MD -MT test/doge/gl/CMakeFiles/test.doge.gl.uniform.dir/uniform.cpp.o -MF test/doge/gl/CMakeFiles/test.doge.gl.uniform.dir/uniform.cpp.o.d -o test/doge/gl/CMakeFiles/test.doge.gl.uniform.dir/uniform.cpp.o -c /mnt/c/Users/cjdbn/projects/doge/doge/test/doge/gl/uniform.cpp ## Notes * /c is a symlink for /mnt/c * Same results when compiling with -fno-strict-aliasing -fwrapv # Diagnostic /mnt/c/Users/cjdbn/projects/doge/doge/test/doge/gl/uniform.cpp: In lambda function: /mnt/c/Users/cjdbn/projects/doge/doge/test/doge/gl/uniform.cpp:250:40: internal compiler error: in expand_expr_real_1, at expr.c:9843 check_binary_arithmetic_operation(f, a, n); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ 0x867d45 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../src/gcc/expr.c:9837 0x86ee25 expand_expr ../../src/gcc/expr.h:276 0x86ee25 expand_expr_addr_expr_1 ../../src/gcc/expr.c:7782 0x8656fe expand_expr_addr_expr ../../src/gcc/expr.c:7903 0x8656fe expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../src/gcc/expr.c:11046 0x86f6ba store_expr_with_bounds(tree_node*, rtx_def*, int, bool, bool, tree_node*) ../../src/gcc/expr.c:5552 0x87030e expand_assignment(tree_node*, tree_node*, bool) ../../src/gcc/expr.c:5321 0x781620 expand_gimple_stmt_1 ../../src/gcc/cfgexpand.c:3639 0x781620 expand_gimple_stmt ../../src/gcc/cfgexpand.c:3737 0x782bef expand_gimple_basic_block ../../src/gcc/cfgexpand.c:5744 0x787d76 execute ../../src/gcc/cfgexpand.c:6357 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions. ninja: build stopped: subcommand failed.