https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009
Bug ID: 71009 Summary: g++: ICE on modified gdb/valarith.c with -Ofast Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: egall at gwmail dot gwu.edu Target Milestone: --- Host: i386-apple-darwin9.8.0 Target: i386-apple-darwin9.8.0 Build: i386-apple-darwin9.8.0 Full command line and output: $ make CFLAGS="-g3 -Ofast -force_cpusubtype_ALL -gstrict-dwarf -gdwarf-2 -gfull -save-temps" V=1 this target, 'config.h' just makes its dep, 'stamp-h' /usr/local/bin/g++ -g3 -Ofast -force_cpusubtype_ALL -gstrict-dwarf -gdwarf-2 -gfull -save-temps -arch i386 -DTARGET_I386 -I./macosx -I./macosx -DWITH_CFM=0 -DUSE_PTHREADS=1 -D_DARWIN_UNLIMITED_STREAMS -mmacosx-version-min=10.5 -I. -I. -I./config -DHAVE_CONFIG_H -DHAVE_SYS_TYPES_H -DLOCALEDIR="\"/usr/local/share/locale\"" -I./../include/opcode -I./../readline/.. -I./../zlib -I../bfd -I./../bfd -I./../include -I./../mmalloc -I../mmalloc -I../intl -I./../intl -DMI_OUT=1 -I/sw/include/libxml2 -I/sw/include -D__MigTypeCheck=1 -D__DARWIN_UNIX03=1 -Wreturn-type -Wcomment -Wtrigraphs -Wparentheses -Wpointer-arith -Wchar-subscripts -Wno-unused -Wunused-value -Wunused-label -Wunused-result -Wunused-variable -Wunused-but-set-variable -Wunused-function -Wempty-body -Wmissing-declarations -Wignored-qualifiers -Wmissing-format-attribute -Waddress -Wattributes -Wswitch -Wclobbered -Wcoverage-mismatch -Wdiv-by-zero -Wdouble-promotion -Wfree-nonheap-object -Wsign-compare -Wtype-limits -Winvalid-memory-model -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-include-dirs -Woverflow -Woverlength-strings -Wpragmas -Wreturn-local-addr -Wsequence-point -Wsizeof-pointer-memaccess -Wtrampolines -Wunknown-pragmas -Wnormalized=nfkc -Wlogical-op -Wfloat-conversion -Wmissing-field-initializers -Wno-deprecated-declarations -Wbool-compare -Wlogical-not-parentheses -Wsizeof-array-argument -Wswitch-bool -Wshift-count-negative -Wshift-count-overflow -Wshift-negative-value -Wshift-overflow=2 -Wmisleading-indentation -Wlto-type-mismatch -Wtautological-compare -Wduplicated-cond -Wwrite-strings -Wenum-compare -Wnonnull-compare -Wabi -Wabi-tag -Woverloaded-virtual -Wsign-promo -Wodr -Wsubobject-linkage -Wctor-dtor-privacy -Wterminate -Wc++11-compat -Wdelete-incomplete -Wdelete-non-virtual-dtor -Winherited-variadic-ctor -Winvalid-offsetof -Wliteral-suffix -Wnoexcept -Wnon-template-friend -Wnon-virtual-dtor -Wreorder -Wstrict-null-sentinel -Wmultiple-inheritance -Wvirtual-inheritance -Wpmf-conversions -Wtemplates -Wvirtual-move-assign -Wconversion-null -Weffc++ -Wsized-deallocation -Wplacement-new=2 -fpermissive -Wendif-labels -Wformat -Wformat-y2k -Wformat-security -Wnonnull -Wnonportable-cfstrings -Wno-unused-const-variable -std=gnu++03 -pedantic -Wno-long-long -Wcast-align -Wuninitialized -Winit-self -Wmissing-noreturn -Wvolatile-register-var -Wdisabled-optimization -Winline -Waggressive-loop-optimizations -Wvector-operation-performance -Wmaybe-uninitialized -Wstrict-overflow=1 -fno-strict-aliasing -Wnull-dereference -Wframe-address -Wframe-larger-than=262144 -Wlarger-than=262144 -Wsuggest-attribute=const -Warray-bounds -Wall -Wextra -Wno-unused-parameter -c -o valarith.o valarith.c valarith.c: In function ‘value* value_binop(value*, value*, exp_opcode)’: valarith.c:1408:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1025 } ^ libbacktrace could not find executable to open Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. make: *** [valarith.o] Error 1 The file compiles fine with all the other optimization levels I've tested recently (-O3, -O2, -O1, -Os, -Og, -O0). g++ version info: $ /usr/local/bin/g++ -v Using built-in specs. COLLECT_GCC=/usr/local/bin/g++ COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/i386-apple-darwin9.8.0/7.0.0/lto-wrapper Target: i386-apple-darwin9.8.0 Configured with: ../configure --disable-werror --enable-languages=c,c++,lto,objc,obj-c++ --enable-stage1-checking=release -C --with-system-libunwind --enable-secureplt --enable-frame-pointer --enable-version-specific-runtime-libs --enable-assert --enable-fat --enable-portable-binary --enable-browser-plugin --enable-gconf-peer --enable-libgcj-debug --enable-gc-debug --enable-interpreter --enable-aot-compile-rpm --enable-java-home --with-x --enable-collections --enable-gstreamer-peer --enable-xmlj --enable-qt-peer --enable-debug --enable-local-sockets --without-isl --enable-objc-gc --enable-maintainer-mode --enable-host-shared CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ AUTOCONF=/usr/local/bin/autoconf AUTOHEADER=/usr/local/bin/autoheader AUTOM4TE=/usr/local/bin/autom4te AUTORECONF=/usr/local/bin/autoreconf AUTOSCAN=/usr/local/bin/autoscan AUTOUPDATE=/usr/local/bin/autoupdate IFNAMES=/usr/local/bin/ifnames Thread model: posix gcc version 7.0.0 20160426 (experimental) (GCC)