[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 Martin Liška changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #15 from Martin Liška --- I'm closing this, please open a separate issue.
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org, ||marxin at gcc dot gnu.org, ||mpolacek at gcc dot gnu.org Status|NEW |WAITING --- Comment #14 from Eric Gallager --- Note that I can't reproduce my original bug anymore. Ryan, would you like to keep this bug open for your variation on it, or are you going to open a separate bug for it?
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 --- Comment #13 from Eric Gallager --- (In reply to Ryan Schmidt from comment #12) > How would I do that? Add -save-temps to the compile command and then attach the lj_cconv.i file that is produced
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 --- Comment #12 from Ryan Schmidt --- How would I do that?
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 --- Comment #11 from Eric Gallager --- (In reply to Ryan Schmidt from comment #9) > I am also encountering this problem on i386-apple-darwin9.8.0 when compiling > texlive-bin 20170604 with gcc 6.4.0, though in my case it's -Os not -Ofast: > > libtool: compile: /opt/local/bin/gcc-mp-6 -DHAVE_CONFIG_H -I. > -I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6 > -U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer > -march=i686 -msse -msse2 -mfpmath=sse -fno-stack-protector -Wall -pipe -Os > -m32 -MT LuaJIT-src/src/lj_cconv.lo -MD -MP -MF > LuaJIT-src/src/.deps/lj_cconv.Tpo -c LuaJIT-src/src/lj_cconv.c -fno-common > -DPIC -o LuaJIT-src/src/.libs/lj_cconv.o > LuaJIT-src/src/lj_cconv.c: In function 'lj_cconv_ct_ct': > LuaJIT-src/src/lj_cconv.c:368:1: internal compiler error: in gen_reg_rtx, at > emit-rtl.c:1025 > } > ^ > libbacktrace could not find executable to open Actually could you attach the preprocessed source for lj_cconv.c anyways? I want to compare to see if it really is the same bug as I was originally experiencing.
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 Eric Gallager changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2017-12-30 CC||egallager at gcc dot gnu.org Ever confirmed|0 |1 --- Comment #10 from Eric Gallager --- (In reply to Ryan Schmidt from comment #9) > I am also encountering this problem on i386-apple-darwin9.8.0 when compiling > texlive-bin 20170604 with gcc 6.4.0, though in my case it's -Os not -Ofast: > > libtool: compile: /opt/local/bin/gcc-mp-6 -DHAVE_CONFIG_H -I. > -I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6 > -U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer > -march=i686 -msse -msse2 -mfpmath=sse -fno-stack-protector -Wall -pipe -Os > -m32 -MT LuaJIT-src/src/lj_cconv.lo -MD -MP -MF > LuaJIT-src/src/.deps/lj_cconv.Tpo -c LuaJIT-src/src/lj_cconv.c -fno-common > -DPIC -o LuaJIT-src/src/.libs/lj_cconv.o > LuaJIT-src/src/lj_cconv.c: In function 'lj_cconv_ct_ct': > LuaJIT-src/src/lj_cconv.c:368:1: internal compiler error: in gen_reg_rtx, at > emit-rtl.c:1025 > } > ^ > libbacktrace could not find executable to open I'll take this as confirmation.
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 Ryan Schmidt changed: What|Removed |Added CC||gcc at ryandesign dot com --- Comment #9 from Ryan Schmidt --- I am also encountering this problem on i386-apple-darwin9.8.0 when compiling texlive-bin 20170604 with gcc 6.4.0, though in my case it's -Os not -Ofast: libtool: compile: /opt/local/bin/gcc-mp-6 -DHAVE_CONFIG_H -I. -I./LuaJIT-src/src -DLUAJIT_ENABLE_LUA52COMPAT -DLUAI_HASHLIMIT=6 -U_FORTIFY_SOURCE -isystem/opt/local/include -fomit-frame-pointer -march=i686 -msse -msse2 -mfpmath=sse -fno-stack-protector -Wall -pipe -Os -m32 -MT LuaJIT-src/src/lj_cconv.lo -MD -MP -MF LuaJIT-src/src/.deps/lj_cconv.Tpo -c LuaJIT-src/src/lj_cconv.c -fno-common -DPIC -o LuaJIT-src/src/.libs/lj_cconv.o LuaJIT-src/src/lj_cconv.c: In function 'lj_cconv_ct_ct': LuaJIT-src/src/lj_cconv.c:368:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:1025 } ^ libbacktrace could not find executable to open
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 --- Comment #8 from Eric Gallager --- I reduced the command line required to trigger the ICE. It depends on whether -fmath-errno is set or not. With: $ /usr/local/bin/gcc -c -Ofast -I. -I../include -DHAVE_CONFIG_H -I../bfd -Imacosx -Iconfig -Wno-deprecated-declarations -fno-math-errno valarith.c ...it ICEs as it did previously, but with: $ /usr/local/bin/gcc -c -Ofast -I. -I../include -DHAVE_CONFIG_H -I../bfd -Imacosx -Iconfig -Wno-deprecated-declarations -fmath-errno valarith.c ...it compiles successfully. That could explain why it wouldn't reproduce on x86_64-linux-gnu, as I believe the default for -fmath-errno is different between Darwin and GNU/Linux.
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 --- Comment #7 from Eric Gallager --- Created attachment 39089 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39089=edit some compressed compiler output Still happens with trunk from the end of July. I tried playing around with some of the developer options to generate some dumpfiles, but there's too many of them, and when I group them into folders, the archives are too big to upload even after compressing them, so I'm not really sure what to upload, besides the attached tempfiles. Current version info: $ /usr/local/bin/g++ -march=native -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-debug --with-isl --enable-objc-gc --enable-host-shared CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ Thread model: posix gcc version 7.0.0 20160730 (experimental) (GCC)
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 --- Comment #6 from Eric Gallager --- I investigated more. What's happening at ../../gcc/emit-rtl.c:1025 is that the following assert is failing: gcc_assert (can_create_pseudo_p ()); This fails if and only if gen_reg_rtx is passed V2DImode as its mode parameter. I tried editing emit-rtl.c to make the assert conditional, like this: if (mode != V2DImode) gcc_assert (can_create_pseudo_p ()); ...but that only resulted in a different error: valarith.c: In function ‘value* value_binop(value*, value*, exp_opcode)’: valarith.c:1408:1: error: insn does not satisfy its constraints: (insn 3157 1585 3158 192 (set (reg:V2DI 1029) (vec_concat:V2DI (mem/c:DI (reg/f:SI 7 sp) [50 %sfp+-64 S8 A128]) (const_int 0 [0]))) valarith.c:1180 3653 {vec_concatv2di} (nil)) Breakpoint 1, internal_error (gmsgid=0x15ee807 "in %s, at %s:%d") at ../../gcc/diagnostic.c:1337 1337 va_start (ap, gmsgid); Any ideas what's going on?
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 --- Comment #5 from Eric Gallager --- I rebuilt with debugging info and got a better backtrace: Breakpoint 1, internal_error (gmsgid=0x15ee807 "in %s, at %s:%d") at ../../gcc/diagnostic.c:1337 1337 va_start (ap, gmsgid); (gdb) bt #0 internal_error (gmsgid=0x15ee807 "in %s, at %s:%d") at ../../gcc/diagnostic.c:1337 #1 0x01266866 in fancy_abort (file=0x157ccd5 "../../gcc/emit-rtl.c", line=1025, function=0x190cd98 "gen_reg_rtx") at ../../gcc/diagnostic.c:1405 #2 0x00945479 in gen_reg_rtx (mode=V2DImode) at ../../gcc/emit-rtl.c:1025 #3 0x00579f86 in gen_split_349 (curr_insn=0x325acf0, operands=0x1ff95c0) at ../../gcc/config/i386/sse.md:1129 #4 0x0076bb58 in split_8 (x1=0x3255ce4, insn=0x325acf0) at ../../gcc/config/i386/sse.md:1115 #5 0x00778c75 in split_insns (x1=0x3255ce4, insn=0x325acf0) at ../../gcc/config/i386/sse.md:13387 #6 0x0094b3e4 in try_split (pat=0x3255ce4, trial=0x325acf0, last=1) at ../../gcc/emit-rtl.c:3658 #7 0x00d4a502 in split_insn (insn=0x325acf0) at ../../gcc/recog.c:2887 #8 0x00d4a7c5 in split_all_insns () at ../../gcc/recog.c:2977 #9 0x00d4c34b in rest_of_handle_split_after_reload () at ../../gcc/recog.c:3913 #10 0x00d4c389 in (anonymous namespace)::pass_split_after_reload::execute (this=0x50d0e190) at ../../gcc/recog.c:3942 #11 0x00d12144 in execute_one_pass (pass=0x50d0e190) at ../../gcc/passes.c:2344 #12 0x00d12495 in execute_pass_list_1 (pass=0x50d0e190) at ../../gcc/passes.c:2428 #13 0x00d124c5 in execute_pass_list_1 (pass=0x50d0e0d0) at ../../gcc/passes.c:2429 #14 0x00d124c5 in execute_pass_list_1 (pass=0x50d0d590) at ../../gcc/passes.c:2429 #15 0x00d12515 in execute_pass_list (fn=0x2b35bb8, pass=0x50d0b190) at ../../gcc/passes.c:2439 #16 0x008539ee in cgraph_node::expand (this=0x2d4b424) at ../../gcc/cgraphunit.c:1983 #17 0x00853fff in expand_all_functions () at ../../gcc/cgraphunit.c:2119 #18 0x00854c8b in symbol_table::compile (this=0x50e0b000) at ../../gcc/cgraphunit.c:2475 #19 0x00854ed1 in symbol_table::finalize_compilation_unit (this=0x50e0b000) at ../../gcc/cgraphunit.c:2565 #20 0x00e246cd in compile_file () at ../../gcc/toplev.c:490 #21 0x00e26f70 in do_compile () at ../../gcc/toplev.c:1998 #22 0x00e27332 in toplev::main (this=0xbfff94de, argc=140, argv=0xbfff9510) at ../../gcc/toplev.c:2132 #23 0x0124f80f in main (argc=140, argv=0xbfff9510) at ../../gcc/main.c:39 Current language: auto; currently c++ (gdb) bt full #0 internal_error (gmsgid=0x15ee807 "in %s, at %s:%d") at ../../gcc/diagnostic.c:1337 ap = 0x0 richloc = { static MAX_RANGES = , static MAX_FIXIT_HINTS = , m_num_ranges = 0, m_ranges = {{ m_loc = 33527040, m_show_caret_p = 204 }, { m_loc = 0, m_show_caret_p = false }, { m_loc = 0, m_show_caret_p = true }}, m_column_override = 0, m_have_expanded_location = 104, m_expanded_location = { file = 0xd47953 "??\020\017U???\030?x?\001\002??u2?E\b\017?", line = 18, column = 1356874188, data = 0x0, sysp = false }, m_num_fixit_hints = 18, m_fixit_hints = {0x50e041cc, 0x0} } __FUNCTION__ = "internal_error" #1 0x01266866 in fancy_abort (file=0x157ccd5 "../../gcc/emit-rtl.c", line=1025, function=0x190cd98 "gen_reg_rtx") at ../../gcc/diagnostic.c:1405 No locals. #2 0x00945479 in gen_reg_rtx (mode=V2DImode) at ../../gcc/emit-rtl.c:1025 val = (rtx) 0xd479ef align = 128 __FUNCTION__ = "gen_reg_rtx" #3 0x00579f86 in gen_split_349 (curr_insn=0x325acf0, operands=0x1ff95c0) at ../../gcc/config/i386/sse.md:1129 tmp = (rtx) 0x50e0e430 _val = (rtx_insn *) 0x0 __FUNCTION__ = "gen_split_349" #4 0x0076bb58 in split_8 (x1=0x3255ce4, insn=0x325acf0) at ../../gcc/config/i386/sse.md:1115 operands = (rtx * const) 0x1ff95c0 x2 = (rtx) 0x3259dd0 x3 = (rtx) 0x3259dc0 x4 = (rtx) 0x32c22f0 x5 = (rtx) 0x27c6018 x6 = (rtx) 0x0 x7 = (rtx) 0x3255ccc x8 = (rtx) 0x3254eb0 x9 = (rtx) 0x32797e0 x10 = (rtx) 0x0 #5 0x00778c75 in split_insns (x1=0x3255ce4, insn=0x325acf0) at ../../gcc/config/i386/sse.md:13387 operands = (rtx * const) 0x1ff95c0 x2 = (rtx) 0xbfff91d8 x3 = (rtx) 0xbfff922b x4 = (rtx) 0x2d4b424 x5 = (rtx) 0x3251a28 x6 = (rtx) 0xbfff91c8 x7 = (rtx) 0x27c0cdc x8 = (rtx) 0x325acf0 x9 = (rtx) 0xc07a4e x10 = (rtx) 0xbfff91c8 x11 = (rtx) 0x0 x12 = (rtx) 0x3251a28 x13 = (rtx) 0x95215c x14 = (rtx) 0xbfff91b8 x15 = (rtx) 0x27c0cdc x16 = (rtx) 0x325ad14 x17 = (rtx) 0x9521eb #6 0x0094b3e4 in try_split (pat=0x3255ce4, trial=0x325acf0, last=1) at ../../gcc/emit-rtl.c:3658 before = (rtx_insn *) 0x325aca8 after = (rtx_insn *) 0x325ad14 note = (rtx) 0x325aca8 seq = (rtx_insn *) 0x0 tem = (rtx_insn *) 0xbfff9248
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 Martin Liška changed: What|Removed |Added CC||marxin at gcc dot gnu.org --- Comment #4 from Martin Liška --- I also can't reproduce the ICE on x86_64-linux-gnu.
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 --- Comment #3 from Eric Gallager --- Still happens with: $ /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-debug --without-isl --enable-objc-gc --enable-host-shared CC=/usr/local/bin/gcc CXX=/usr/local/bin/g++ Thread model: posix gcc version 7.0.0 20160526 (experimental) (GCC) This time I attached gdb and got a backtrace: (gdb) bt #0 0x00ed6004 in internal_error () #1 0x00ed5040 in fancy_abort () #2 0x00719077 in gen_reg_rtx () #3 0x0048fc28 in gen_split_343 () #4 0x00569b62 in split_8 () #5 0x00720956 in try_split () #6 0x00a6a7be in split_insn () #7 0x00a6ec9a in split_all_insns () #8 0x00a6ecfb in (anonymous namespace)::pass_split_after_reload::execute () #9 0x00a3c567 in execute_one_pass () #10 0x00a3cb59 in execute_pass_list_1 () #11 0x00a3cb6c in execute_pass_list_1 () #12 0x00a3cb6c in execute_pass_list_1 () #13 0x00a3cbba in execute_pass_list () #14 0x0063b7d9 in cgraph_node::expand () #15 0x0063d244 in symbol_table::compile () #16 0x0063f74d in symbol_table::finalize_compilation_unit () #17 0x00b19b51 in compile_file () #18 0x0177f168 in toplev::main () #19 0x01780a24 in main () I'll have to rebuild gcc for debugging to get further info.
[Bug target/71009] g++: ICE on modified gdb/valarith.c with -Ofast
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71009 Marek Polacek changed: What|Removed |Added CC||mpolacek at gcc dot gnu.org Component|c++ |target --- Comment #2 from Marek Polacek --- Must be target-specific.