Bug 47152 - ice in try_head_merge_bb at cfgcleanup.c:2177
ice in try_head_merge_bb at cfgcleanup.c:2177
Status: RESOLVED WORKSFORME
Product: gcc
Classification: Unclassified
Component: middle-end
4.6.0
: P3 normal
: ---
Assigned To: Not yet assigned to anyone
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-01-02 18:26 UTC by aesok
Modified: 2015-02-06 17:39 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: cris-axis-elf v850-unknown-elf
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
dp-bit.i (33.63 KB, text/plain)
2011-01-02 18:28 UTC, aesok
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aesok 2011-01-02 18:26:25 UTC
Hello.

make[4]: Entering directory `/home/aesok/cris/build/cris-elf/v10/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/home/aesok/cris/build/./gcc/xgcc -B/home/aesok/cris/build/./gcc/ -B/home/aesok/
cross-local/cris-elf/cris-elf/bin/ -B/home/aesok/cross-local/cris-elf/cris-elf/l
ib/ -isystem /home/aesok/cross-local/cris-elf/cris-elf/include -isystem /home/ae
sok/cross-local/cris-elf/cris-elf/sys-include --sysroot=/home/aesok/cross-local
/cris-elf   -g -O2 -march=v10 -mbest-lib-options -O2  -g -O2 -DIN_GCC -DCROSS_DI
RECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmi
ssing-prototypes -Wold-style-definition  -isystem ./include   -g  -DIN_LIBGCC2 -
D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector   -I. -I. -I../../.././gcc -I../../
../../gcc/libgcc -I../../../../gcc/libgcc/. -I../../../../gcc/libgcc/../gcc -I..
/../../../gcc/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o _addsub_df.o -MT
_addsub_df.o -MD -MP -MF _addsub_df.dep -DFINE_GRAINED_LIBRARIES -DL_addsub_df -
c ../../.././gcc/dp-bit.c
../../.././gcc/dp-bit.c: In function '_fpadd_parts':
../../.././gcc/dp-bit.c:730:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [_addsub_df.o] Error 1



This GDB was configured as "x86_64-linux-gnu".
(gdb) file  /home/aesok/cris/build/./gcc/cc1
Reading symbols from /home/aesok/cris/build/gcc/cc1...done.
(gdb) run -fpreprocessed dp-bit.i -melf -ffunction-sections -fdata-sections -quiet -dumpbase dp-bit.c -march=v10 -mbest-lib-options -auxbase-strip _addsub_df.o -g -g -g -O2 -O2 -O2 -Wextra -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fno-stack-protector -o dp-bit.s
Starting program: /home/aesok/cris/build/gcc/cc1 -fpreprocessed dp-bit.i -melf -ffunction-sections -fdata-sections -quiet -dumpbase dp-bit.c -march=v10 -mbest-lib-options -auxbase-strip _addsub_df.o -g -g -g -O2 -O2 -O2 -Wextra -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version -fno-stack-protector -o dp-bit.s
GNU C (GCC) version 4.6.0 20110102 (experimental) [trunk revision 152933] (cris-elf)
        compiled by GNU C version 4.3.2, GMP version 4.2.2, MPFR version 2.4.1,
MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.6.0 20110102 (experimental) [trunk revision 152933] (cris-elf)
        compiled by GNU C version 4.3.2, GMP version 4.2.2, MPFR version 2.4.1,
MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: d661c5447d50525e7c2e92079814b9be

Program received signal SIGSEGV, Segmentation fault.
try_head_merge_bb (bb=0x7ffff7635888) at ../../gcc/gcc/cfgcleanup.c:2177
2177                  while (!NONDEBUG_INSN_P (curr));
(gdb) bt
#0  try_head_merge_bb (bb=0x7ffff7635888) at ../../gcc/gcc/cfgcleanup.c:2177
#1  0x00000000009ff29e in cleanup_cfg (mode=2)
    at ../../gcc/gcc/cfgcleanup.c:2480
#2  0x0000000000a17f47 in rest_of_handle_stack_adjustments ()
    at ../../gcc/gcc/combine-stack-adj.c:554
#3  0x000000000072d34f in execute_one_pass (pass=0xe8b0e0)
    at ../../gcc/gcc/passes.c:1553
#4  0x000000000072d645 in execute_pass_list (pass=0xe8b0e0)
    at ../../gcc/gcc/passes.c:1608
#5  0x000000000072d65d in execute_pass_list (pass=0xe86880)
    at ../../gcc/gcc/passes.c:1609
#6  0x000000000072d65d in execute_pass_list (pass=0xe86820)
    at ../../gcc/gcc/passes.c:1609
#7  0x000000000080f556 in tree_rest_of_compilation (fndecl=0x7ffff75c8400)
    at ../../gcc/gcc/tree-optimize.c:422
#8  0x0000000000994110 in cgraph_expand_function (node=0x7ffff75c6580)
    at ../../gcc/gcc/cgraphunit.c:1508
#9  0x0000000000996f29 in cgraph_optimize ()
    at ../../gcc/gcc/cgraphunit.c:1567
#10 0x000000000099735d in cgraph_finalize_compilation_unit ()
    at ../../gcc/gcc/cgraphunit.c:1031
#11 0x000000000047a4b4 in c_write_global_declarations ()
    at ../../gcc/gcc/c-decl.c:9843
#12 0x00000000007b299f in toplev_main (argc=30, argv=0x7fffffffe5b8)
    at ../../gcc/gcc/toplev.c:591
#13 0x00007ffff766a1a6 in __libc_start_main () from /lib/libc.so.6
#14 0x0000000000469a19 in _start ()
(gdb)

Anatoly.
Comment 1 aesok 2011-01-02 18:28:10 UTC
Created attachment 22881 [details]
dp-bit.i
Comment 2 H.J. Lu 2011-01-02 18:44:21 UTC
(In reply to comment #0)
> Hello.
> 
> make[4]: Entering directory `/home/aesok/cris/build/cris-elf/v10/libgcc'
> # If this is the top-level multilib, build all the other
> # multilibs.
> /home/aesok/cris/build/./gcc/xgcc -B/home/aesok/cris/build/./gcc/
> -B/home/aesok/
> cross-local/cris-elf/cris-elf/bin/
> -B/home/aesok/cross-local/cris-elf/cris-elf/l
> ib/ -isystem /home/aesok/cross-local/cris-elf/cris-elf/include -isystem
> /home/ae
> sok/cross-local/cris-elf/cris-elf/sys-include --sysroot=/home/aesok/cross-local
> /cris-elf   -g -O2 -march=v10 -mbest-lib-options -O2  -g -O2 -DIN_GCC
> -DCROSS_DI
> RECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes
> -Wmi
> ssing-prototypes -Wold-style-definition  -isystem ./include   -g  -DIN_LIBGCC2
> -
> D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector   -I. -I. -I../../.././gcc
> -I../../
> ../../gcc/libgcc -I../../../../gcc/libgcc/. -I../../../../gcc/libgcc/../gcc
> -I..
> /../../../gcc/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o _addsub_df.o -MT
> _addsub_df.o -MD -MP -MF _addsub_df.dep -DFINE_GRAINED_LIBRARIES -DL_addsub_df
> -
> c ../../.././gcc/dp-bit.c
> ../../.././gcc/dp-bit.c: In function '_fpadd_parts':
> ../../.././gcc/dp-bit.c:730:1: internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.
> make[4]: *** [_addsub_df.o] Error 1
> 
> 
> 
> This GDB was configured as "x86_64-linux-gnu".
> (gdb) file  /home/aesok/cris/build/./gcc/cc1
> Reading symbols from /home/aesok/cris/build/gcc/cc1...done.
> (gdb) run -fpreprocessed dp-bit.i -melf -ffunction-sections -fdata-sections
> -quiet -dumpbase dp-bit.c -march=v10 -mbest-lib-options -auxbase-strip
> _addsub_df.o -g -g -g -O2 -O2 -O2 -Wextra -Wall -Wwrite-strings -Wcast-qual
> -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -version
> -fno-stack-protector -o dp-bit.s
> Starting program: /home/aesok/cris/build/gcc/cc1 -fpreprocessed dp-bit.i -melf
> -ffunction-sections -fdata-sections -quiet -dumpbase dp-bit.c -march=v10
> -mbest-lib-options -auxbase-strip _addsub_df.o -g -g -g -O2 -O2 -O2 -Wextra
> -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
> -Wold-style-definition -version -fno-stack-protector -o dp-bit.s
> GNU C (GCC) version 4.6.0 20110102 (experimental) [trunk revision 152933]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Are you sure your GCC tree is up to date?
Comment 3 aesok 2011-01-02 20:47:22 UTC
> > GNU C (GCC) version 4.6.0 20110102 (experimental) [trunk revision 152933]
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Are you sure your GCC tree is up to date?

Yes.

~/cris2/gcc$ svn update
At revision 168408.
~/cris2/gcc$ cd ../build
~/cris2/build$ make
....
make[4]: Entering directory `/home/aesok/cris2/build/cris-elf/v10/libgcc'
# If this is the top-level multilib, build all the other
# multilibs.
/home/aesok/cris2/build/./gcc/xgcc -B/home/aesok/cris2/build/./gcc/ -B/home/aeso
k/cross-local/cris-elf/cris-elf/bin/ -B/home/aesok/cross-local/cris-elf/cris-elf
/lib/ -isystem /home/aesok/cross-local/cris-elf/cris-elf/include -isystem /home/
aesok/cross-local/cris-elf/cris-elf/sys-include --sysroot=/home/mstein/cross-loc
al/cris-elf   -g -O2 -march=v10 -mbest-lib-options -O2  -g -O2 -DIN_GCC -DCROSS_
DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -W
missing-prototypes -Wold-style-definition  -isystem ./include   -g  -DIN_LIBGCC2
 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector   -I. -I. -I../../.././gcc -I../.
./../../gcc/libgcc -I../../../../gcc/libgcc/. -I../../../../gcc/libgcc/../gcc -I
../../../../gcc/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o _addsub_df.o -M
T _addsub_df.o -MD -MP -MF _addsub_df.dep -DFINE_GRAINED_LIBRARIES -DL_addsub_df
 -c ../../.././gcc/dp-bit.c
../../.././gcc/dp-bit.c: In function '_fpadd_parts':
../../.././gcc/dp-bit.c:730:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
....
~/cris2/build$ /home/aesok/cris2/build/./gcc/xgcc --version
xgcc (GCC) 4.6.0 20110102 (experimental)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~/cris2/build$ /home/aesok/cris2/build/./gcc/cc1 -version
GNU C (GCC) version 4.6.0 20110102 (experimental) (cris-elf)
        compiled by GNU C version 4.3.2, GMP version 4.2.2, MPFR version 2.4.1,
MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

Anatoly.
Comment 4 aesok 2011-01-07 20:55:35 UTC
The same for v850 target:

/home/aesok/m32c/build-v850/./gcc/xgcc -B/home/aesok/m32c/build-v850/./gcc/ -B/h
ome/aesok/cross-local/v850-elf/v850-elf/bin/ -B/home/aesok/cross-local/v850-elf/
v850-elf/lib/ -isystem /home/aesok/cross-local/v850-elf/v850-elf/include -isyste
m /home/aesok/cross-local/v850-elf/v850-elf/sys-include --sysroot=/home/mstein/c
ross-local/v850-elf  -mv850 -g -O2 -O2  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCT
URE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototyp
es -Wold-style-definition  -isystem ./include -mno-app-regs -msmall-sld -Wa,-mwa
rn-signed-overflow -Wa,-mwarn-unsigned-overflow  -g  -DIN_LIBGCC2 -D__GCC_FLOAT_
NOT_NEEDED -fno-stack-protector   -I. -I. -I../../.././gcc -I../../../../gcc/lib
gcc -I../../../../gcc/libgcc/. -I../../../../gcc/libgcc/../gcc -I../../../../gcc
/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o _divsc3.o -MT _divsc3.o -MD -M
P -MF _divsc3.dep -DL_divsc3 -c ../../../../gcc/libgcc/../gcc/libgcc2.c \

../../../../gcc/libgcc/../gcc/libgcc2.c: In function '__divsc3':
../../../../gcc/libgcc/../gcc/libgcc2.c:1944:1: internal compiler error: Segment
ation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [_divsc3.o] Error 1

This GDB was configured as "x86_64-linux-gnu".
(gdb) file  /home/aesok/m32c/build-v850/./gcc/cc1
Reading symbols from /home/aesok/m32c/build-v850/gcc/cc1...done.
(gdb) run -fpreprocessed libgcc2.i -quiet -dumpbase libgcc2.c -mv850 -mno-app-
regs -msmall-sld -auxbase-strip _divsc3.o -g -g -g -O2 -O2 -O2 -Wextra -Wall -
Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-styl
e-definition -version -fno-stack-protector -o libgcc2.s
Starting program: /home/aesok/m32c/build-v850/gcc/cc1 -fpreprocessed libgcc2.i -
quiet -dumpbase libgcc2.c -mv850 -mno-app-regs -msmall-sld -auxbase-strip _divsc
3.o -g -g -g -O2 -O2 -O2 -Wextra -Wall -Wwrite-strings -Wcast-qual -Wstrict-prot
otypes -Wmissing-prototypes -Wold-style-definition -version -fno-stack-protector
 -o libgcc2.s
GNU C (GCC) version 4.6.0 20110102 (experimental) [trunk revision 163490] (v850-
elf)
        compiled by GNU C version 4.3.2, GMP version 4.2.4, MPFR version 2.4.1,
MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C (GCC) version 4.6.0 20110102 (experimental) [trunk revision 163490] (v850-
elf)
        compiled by GNU C version 4.3.2, GMP version 4.2.4, MPFR version 2.4.1,
MPC version 0.8
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 911337ac19654219c2ba858d4c92924f

Program received signal SIGSEGV, Segmentation fault.
try_head_merge_bb (bb=0x7ffff76f0b60) at ../../gcc/gcc/cfgcleanup.c:2177
2177                  while (!NONDEBUG_INSN_P (curr));
(gdb) bt
#0  try_head_merge_bb (bb=0x7ffff76f0b60) at ../../gcc/gcc/cfgcleanup.c:2177
#1  0x0000000000a0fd5e in cleanup_cfg (mode=2)
    at ../../gcc/gcc/cfgcleanup.c:2480
#2  0x0000000000a28547 in rest_of_handle_stack_adjustments ()
    at ../../gcc/gcc/combine-stack-adj.c:554
#3  0x000000000073241f in execute_one_pass (pass=0xecbb00)
    at ../../gcc/gcc/passes.c:1553
#4  0x0000000000732715 in execute_pass_list (pass=0xecbb00)
    at ../../gcc/gcc/passes.c:1608
#5  0x000000000073272d in execute_pass_list (pass=0xec6f40)
    at ../../gcc/gcc/passes.c:1609
#6  0x000000000073272d in execute_pass_list (pass=0xec6ee0)
    at ../../gcc/gcc/passes.c:1609
#7  0x0000000000830656 in tree_rest_of_compilation (fndecl=0x7ffff7f90c00)
    at ../../gcc/gcc/tree-optimize.c:422
#8  0x00000000009b3da0 in cgraph_expand_function (node=0x7ffff7881000)
    at ../../gcc/gcc/cgraphunit.c:1508
#9  0x00000000009b6bb9 in cgraph_optimize ()
    at ../../gcc/gcc/cgraphunit.c:1567
#10 0x00000000009b6fed in cgraph_finalize_compilation_unit ()
    at ../../gcc/gcc/cgraphunit.c:1031
#11 0x000000000047e564 in c_write_global_declarations ()
    at ../../gcc/gcc/c-decl.c:9843
#12 0x00000000007d3a77 in toplev_main (argc=28, argv=0x7fffffffe5b8)
    at ../../gcc/gcc/toplev.c:591
#13 0x00007ffff78a91a6 in __libc_start_main () from /lib/libc.so.6
#14 0x000000000046dac9 in _start ()
(gdb)
Comment 5 Jeffrey A. Law 2015-02-06 17:39:51 UTC
I was unable to get this to fail using same trunk revisions.

If this is still failing, please feel free to re-open with some more details and we can try to investigate further.