Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 461694 (PR56707) - [4.7/ICE] Error: open CFI at the end of file; missing .cfi_endproc directive on Atom
Summary: [4.7/ICE] Error: open CFI at the end of file; missing .cfi_endproc directive ...
Status: RESOLVED WONTFIX
Alias: PR56707
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR56707
Whiteboard:
Keywords:
: 468472 484462 499898 503202 515714 525422 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-14 07:22 UTC by cmuelle8
Modified: 2015-10-22 14:07 UTC (History)
10 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
output of /cave info firefox/ (gentoo.info,9.91 KB, text/plain)
2013-03-14 07:25 UTC, cmuelle8
Details
messages of /cave resolve -x firefox/ (gentoo.messages,2.79 KB, text/plain)
2013-03-14 07:25 UTC, cmuelle8
Details
output of /cave resolve -x firefox/ (gentoo.out,269.65 KB, text/plain)
2013-03-14 07:26 UTC, cmuelle8
Details
preprocessed source for /LC_ALL=C i686-pc-linux-gnu-g++ -save-temps -o Stack.o [...] Stack.cpp/ (Stack.ii.gz,309.67 KB, text/plain)
2013-03-14 07:33 UTC, cmuelle8
Details
Stack.ii.gz (preprocessed source for /LC_ALL=C i686-pc-linux-gnu-g++ -save-temps -o Stack.o [...] Stack.cpp/ (Stack.ii.gz,309.67 KB, application/x-gzip)
2013-03-14 07:40 UTC, cmuelle8
Details
Stack.s (preprocessed source for /LC_ALL=C i686-pc-linux-gnu-g++ -save-temps -o Stack.o [...] Stack.cpp/ (Stack.s,130.35 KB, text/plain)
2013-03-14 07:41 UTC, cmuelle8
Details
reduced case test (bug461694.i,459 bytes, text/plain)
2013-03-24 08:44 UTC, Kacper Kowalik (Xarthisius) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cmuelle8 2013-03-14 07:22:56 UTC
Prerequisites:

- gcc-4.7.2-r1
- ld.bfd linker (but ld.gold does not make a difference)

- LTO flags /disabled/
- ccache /disabled/

- custom-cflags of firefox /disabled/
- custom-optimization of firefox /disabled/

- this is on x86 ATOM N270 platform

I'll attach cave messages, output log, info and preprocessed source for 19.0.2, but tried 19.0 also - no difference.

In short:
<code>
i686-pc-linux-gnu-g++ -o Stack.o -c  -I./../../dist/system_wrappers_js -include /var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/config/gcc_hidden.h -DENABLE_TYPEDARRAY_MOVE -DENABLE_YARR_JIT=1 -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\".so\" -DUSE_ZLIB -I/usr/lib/libffi-3.0.12/include  -I.  -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/../../mfbt/double-conversion -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src -I. -I./../../dist/include  -I/usr/include/nspr      -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/assembler -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/yarr  -fPIC  -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -march=native -pipe -mno-avx -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -pthread -pipe  -DNDEBUG -DTRIMMED -g -O2 -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/Stack.o.pp  /var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/Stack.cpp
/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/Stack.cpp: In member function 'js::StackIter& js::StackIter::operator++()':
/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/Stack.cpp:1541:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
{standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
make[5]: *** [Stack.o] Error 1
make[5]: Leaving directory `/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/obj-i686-pc-linux-gnu/js/src'
make[4]: *** [libs_tier_js] Error 2
make[4]: Leaving directory `/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/obj-i686-pc-linux-gnu'
make[3]: Leaving directory `/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/obj-i686-pc-linux-gnu'
make[3]: *** [tier_js] Error 2
make[2]: *** [default] Error 2
make[2]: Leaving directory `/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/obj-i686-pc-linux-gnu'
make[1]: *** [realbuild] Error 2
make[1]: Leaving directory `/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release'
make: *** [build] Error 2
/usr/libexec/paludis/utils/emake: emake returned error 2

!!! ERROR in www-client/firefox-19.0.2::gentoo:
!!! In src_compile at line 6213
!!! emake failed
</code>

Greetings

Reproducible: Always
Comment 1 cmuelle8 2013-03-14 07:25:17 UTC
Created attachment 341986 [details]
output of /cave info firefox/
Comment 2 cmuelle8 2013-03-14 07:25:54 UTC
Created attachment 341988 [details]
messages of /cave resolve -x firefox/
Comment 3 cmuelle8 2013-03-14 07:26:47 UTC
Created attachment 341990 [details]
output of /cave resolve -x firefox/
Comment 4 cmuelle8 2013-03-14 07:33:25 UTC
Created attachment 341992 [details]
preprocessed source for /LC_ALL=C i686-pc-linux-gnu-g++ -save-temps -o Stack.o [...] Stack.cpp/

gziped due to 1000kb limit
Comment 5 cmuelle8 2013-03-14 07:40:01 UTC
Created attachment 341994 [details]
Stack.ii.gz (preprocessed source for /LC_ALL=C i686-pc-linux-gnu-g++ -save-temps -o Stack.o [...] Stack.cpp/
Comment 6 cmuelle8 2013-03-14 07:41:41 UTC
Created attachment 341996 [details]
Stack.s (preprocessed source for /LC_ALL=C i686-pc-linux-gnu-g++ -save-temps -o Stack.o [...] Stack.cpp/
Comment 7 cmuelle8 2013-03-14 07:52:44 UTC
Please note that I recompiled whole system with gcc-4.7.2-r1, LTO and ld.gold enabled, about 700 packages on this platform with no unsolvable issues.  Larger packages like GIMP built and work without problems.

Note for testing firefox compile I did

  binutils-config --linker ld.bfd

beforehand to ensure ld.bfd is used in all circumstances.  Here is my complete

  /etc/paludis/bashrc

for reference



# paludis bashrc

ARCH_CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe -mfpmath=sse"
ARCH_LDFLAGS="-Wl,--as-needed -Wl,-O1 -Wl,--hash-style=gnu -Wl,--sort-common"

CHOST="i686-pc-linux-gnu"
CFLAGS="${ARCH_CFLAGS} -flto=1 -fuse-linker-plugin -floop-interchange -floop-strip-mine -floop-block"
CXXFLAGS="${CFLAGS}"
LDFLAGS="${CFLAGS} ${ARCH_LDFLAGS}"

MAKEOPTS="-j1"


case "${CATEGORY}/${PN}" in
    dev-util/anjuta)
        LDFLAGS="$LDFLAGS -lrt"
        ;;&

    sys-devel/binutils)
        EXTRA_ECONF="--enable-gold=default"
        ;;&

    sys-boot/grub) ;&
    DISABLE-GOLD-LINKER)
        LD="/usr/i686-pc-linux-gnu/binutils-bin/2.23.1/ld.bfd"
        ;;&

    app-text/rarian) ;&
    dev-lang/perl) ;&
    dev-lang/spidermonkey) ;&
    dev-libs/elfutils) ;&
    dev-libs/libaio) ;&
    media-libs/alsa-lib) ;&
    media-libs/mesa) ;&
    media-libs/netpbm) ;&
    media-video/ffmpeg) ;&
    sys-apps/pciutils) ;&
    sys-devel/llvm) ;&
    www-client/firefox) ;&
    x11-base/xorg-server) ;&
    x11-libs/cairo) ;&
    x11-misc/x11vnc) ;&
    DISABLE-LTO-FEATURES-OF-GCC)
        CFLAGS="${ARCH_CFLAGS}"
        CXXFLAGS="${CFLAGS}"
        LDFLAGS="${CFLAGS} ${ARCH_LDFLAGS}"
        ;;&
esac
Comment 8 cmuelle8 2013-03-14 07:56:47 UTC
Also, this is not a RAM issue - the machine has 1GB physical with ~9GB configured as swap memory.

I had top monitor RAM usage during the compile.  While Stack.cpp is processed it maxes out at about a mere 189m (~18% relative).


Thanks
cmuelle8
Comment 9 cmuelle8 2013-03-14 18:01:28 UTC
A compile with gcc-4.6.3 on the same system, with otherwise unchanged prerequisites works.
Comment 10 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-03-14 18:26:12 UTC
(In reply to comment #8)
> Also, this is not a RAM issue - the machine has 1GB physical with ~9GB
> configured as swap memory.
> 
> I had top monitor RAM usage during the compile.  While Stack.cpp is
> processed it maxes out at about a mere 189m (~18% relative).

Could you check 'dmesg' or syslog for anything out of ordinary though? Your stack.ii compiles fine here, though I don't have atom to test it.
Comment 11 cmuelle8 2013-03-14 19:39:55 UTC
(In reply to comment #10)
> 
> Could you check 'dmesg' or syslog for anything out of ordinary though? Your
> stack.ii compiles fine here, though I don't have atom to test it.

The machine is fine, I'm using the gcc-4.6.3 compiled version of FF 19.0.2 writing this right now.  Dmesg/syslog report nothing suspicious.  Also, I gave it a couple of tries before reporting - the error is reproducible, it errors out on the exact same file each time tried.

Did you surely test with "-O2"?  I noticed there is a difference between

i686-pc-linux-gnu-g++ -fPIC  -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -march=native -pipe -mno-avx -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions  -pipe  -DNDEBUG -DTRIMMED -g -O2 -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -o Stack.o Stack.ii

and

i686-pc-linux-gnu-g++ -fPIC  -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -march=native -pipe -mno-avx -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions  -pipe  -DNDEBUG -DTRIMMED -g -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -o Stack.o Stack.ii

but then, -O2 is a standard option set by some mozconfig eclass, so I suppose we find a fix or rework that eclass to not use -O2 for combination of firefox gcc-4.7.2 ..


Greetings
Comment 12 Ryan Hill (RETIRED) gentoo-dev 2013-03-14 20:26:20 UTC
$ echo "" | gcc -march=native -v -E - 2>&1 | grep cc1
Comment 13 cmuelle8 2013-03-14 22:29:26 UTC
(In reply to comment #12)
> $ echo "" | gcc -march=native -v -E - 2>&1 | grep cc1

yields:

/usr/libexec/gcc/i686-pc-linux-gnu/4.7.2/cc1 -E -quiet -v - -march=atom -mno-cx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=atom
Comment 14 Ryan Hill (RETIRED) gentoo-dev 2013-03-14 22:42:59 UTC
Reproduced on x86-64 with 

$ g++ -m32 -O2 -march=atom -o Stack.o Stack.ii
Comment 15 Ryan Hill (RETIRED) gentoo-dev 2013-03-15 04:16:56 UTC
Also fails with
gcc version 4.7.3-pre9999 20130314 (prerelease) commit eaf7c63943573e430f06d4001bdb2bc2941f666e (Gentoo 4.7.3_pre9999)
Comment 16 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-03-15 06:38:19 UTC
gdb --args gcc/cc1plus -m32 -mtune=atom -O2 ~xarth/Stack.ii

Program received signal SIGSEGV, Segmentation fault.
distance_non_agu_define_in_bb (regno1=3, regno2=4294967295, insn=0x7ffff059cd80, distance=2, start=<optimized out>, found=0x7fffffffdc7f "")
    at ../../gcc/config/i386/i386.c:16614
16614	      if (prev == BB_HEAD (bb))
(gdb) bt
#0  distance_non_agu_define_in_bb (regno1=3, regno2=4294967295, insn=0x7ffff059cd80, distance=2, start=<optimized out>, found=0x7fffffffdc7f "")
    at ../../gcc/config/i386/i386.c:16614
#1  0x00000000009c14d9 in distance_non_agu_define (insn=0x7ffff059cd80, regno2=4294967295, regno1=3) at ../../gcc/config/i386/i386.c:16668
#2  ix86_lea_outperforms (insn=0x7ffff059cd80, regno0=0, regno1=3, regno2=4294967295, split_cost=0) at ../../gcc/config/i386/i386.c:16838
#3  0x0000000000b5e27d in output_64 (operands=0x13da420, insn=0x7ffff059cd80) at ../../gcc/config/i386/i386.md:2169
#4  0x00000000006cd013 in final_scan_insn (insn=0x7ffff059cd80, file=0x143b460, optimize_p=<optimized out>, nopeepholes=<optimized out>, seen=0x7fffffffddec)
    at ../../gcc/final.c:2682
#5  0x00000000006cd8b6 in final (first=0x7ffff0d5b200, file=0x143b460, optimize_p=2) at ../../gcc/final.c:1786
#6  0x00000000006cdc36 in rest_of_handle_final () at ../../gcc/final.c:4319
#7  0x00000000007b25e8 in execute_one_pass (pass=0x1291dc0) at ../../gcc/passes.c:2084
#8  0x00000000007b2945 in execute_pass_list (pass=0x1291dc0) at ../../gcc/passes.c:2139
#9  0x00000000007b2957 in execute_pass_list (pass=0x1292b60) at ../../gcc/passes.c:2140
#10 0x00000000007b2957 in execute_pass_list (pass=0x1292bc0) at ../../gcc/passes.c:2140
#11 0x000000000088acc9 in tree_rest_of_compilation (fndecl=0x7ffff3f51f00) at ../../gcc/tree-optimize.c:422
#12 0x000000000063bb8a in cgraph_expand_function (node=0x7ffff1d25900) at ../../gcc/cgraphunit.c:1837
#13 0x000000000063d2fc in cgraph_expand_all_functions () at ../../gcc/cgraphunit.c:1904
#14 cgraph_optimize () at ../../gcc/cgraphunit.c:2218
#15 0x000000000063d84a in cgraph_finalize_compilation_unit () at ../../gcc/cgraphunit.c:1344
#16 0x00000000005192af in cp_write_global_declarations () at ../../gcc/cp/decl2.c:4053
#17 0x00000000008447c8 in compile_file () at ../../gcc/toplev.c:573
#18 do_compile () at ../../gcc/toplev.c:1941
#19 toplev_main (argc=5, argv=0x7fffffffe108) at ../../gcc/toplev.c:2017
#20 0x00007ffff716d6d5 in __libc_start_main () from /lib64/libc.so.6
#21 0x00000000004baf11 in _start ()
Comment 17 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-03-15 09:30:18 UTC
Fixed in trunk by:

commit 8ee14c01c788aa62e6c8d827671f5f863ffc2acb
Author: rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Thu Apr 19 12:44:07 2012 +0000

    2012-04-19  Richard Guenther  <rguenther@suse.de>

        * ira-int.h (ira_allocno_object_iter_cond): Avoid out-of-bound
        array access.

http://gcc.gnu.org/viewcvs?view=revision&revision=186590

I'll reduce and file upstream bug asking to backport
Comment 18 cmuelle8 2013-03-17 10:46:35 UTC
(In reply to comment #17)
> Fixed in trunk by:
> 
> http://gcc.gnu.org/viewcvs?view=revision&revision=186590
> 
> I'll reduce and file upstream bug asking to backport


I rebuilt gcc-4.7.2 to include the patch from that revision:

--- ira-int.h	2012-01-19 21:46:31.000000000 +0100
+++ /root/Downloads/ira-int.h	2013-03-17 01:58:07.490876234 +0100
@@ -1138,8 +1138,13 @@
 ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t a,
 			      ira_object_t *o)
 {
-  *o = ALLOCNO_OBJECT (a, i->n);
-  return i->n++ < ALLOCNO_NUM_OBJECTS (a);
+  int n = i->n++;
+  if (n < ALLOCNO_NUM_OBJECTS (a))
+    {
+      *o = ALLOCNO_OBJECT (a, n);
+      return true;
+    }
+  return false;
 }
 
 /* Loop over all objects associated with allocno A.  In each
@@ -1416,3 +1421,6 @@
 	reg_costs[i] = val;
     }
 }
+
+extern rtx ira_create_new_reg (rtx);
+extern int first_moveable_pseudo, last_moveable_pseudo;



I checked twice for proper inclusion of the patch (and rebuilt gcc twice).  However, a firefox compile with the patched gcc still errors out on the same occasion, same error.

i686-pc-linux-gnu-g++ -o Stack.o -c  -I./../../dist/system_wrappers_js -include /var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/config/gcc_hidden.h -DENABLE_TYPEDARRAY_MOVE -DENABLE_YARR_JIT=1 -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -DEXPORT_JS_API -DJS_HAS_CTYPES -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\".so\" -DUSE_ZLIB -I/usr/lib/libffi-3.0.12/include  -I.  -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/../../mfbt/double-conversion -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src -I. -I./../../dist/include  -I/usr/include/nspr      -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/assembler -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/yarr  -fPIC  -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null -Wno-ctor-dtor-privacy -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros -Wcast-align -march=native -fomit-frame-pointer -pipe -mfpmath=sse -mno-avx -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -pthread -pipe  -DNDEBUG -DTRIMMED -g -O2 -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -include ./js-confdefs.h -MD -MF .deps/Stack.o.pp  /var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/Stack.cpp
/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/Stack.cpp: In member function 'js::StackIter& js::StackIter::operator++()':
/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/Stack.cpp:1541:1: internal compiler error: Segmentation fault



Did you try with a complete gcc snapshot from trunk post commiting date, then trying to determine backwards which patch most probably fixed the issue?  Or did you take the same route I did (using single patch on a version release)?

In the former case I suppose it might be a different commit fixing the issue.  I'm asking to determine wheter it's worth the effort to pull a gcc snapshot, one dating post April 2012.


Thx
Comment 19 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-03-17 16:53:38 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > Fixed in trunk by:
> > 
> > http://gcc.gnu.org/viewcvs?view=revision&revision=186590
> > 
> > I'll reduce and file upstream bug asking to backport
> 
> 
> I rebuilt gcc-4.7.2 to include the patch from that revision:
> 
> --- ira-int.h	2012-01-19 21:46:31.000000000 +0100
> +++ /root/Downloads/ira-int.h	2013-03-17 01:58:07.490876234 +0100
> @@ -1138,8 +1138,13 @@
>  ira_allocno_object_iter_cond (ira_allocno_object_iterator *i, ira_allocno_t
> a,
>  			      ira_object_t *o)
>  {
> -  *o = ALLOCNO_OBJECT (a, i->n);
> -  return i->n++ < ALLOCNO_NUM_OBJECTS (a);
> +  int n = i->n++;
> +  if (n < ALLOCNO_NUM_OBJECTS (a))
> +    {
> +      *o = ALLOCNO_OBJECT (a, n);
> +      return true;
> +    }
> +  return false;
>  }
>  
>  /* Loop over all objects associated with allocno A.  In each
> @@ -1416,3 +1421,6 @@
>  	reg_costs[i] = val;
>      }
>  }
> +
> +extern rtx ira_create_new_reg (rtx);
> +extern int first_moveable_pseudo, last_moveable_pseudo;
> 
> 
> 
> I checked twice for proper inclusion of the patch (and rebuilt gcc twice). 
> However, a firefox compile with the patched gcc still errors out on the same
> occasion, same error.
> 
> i686-pc-linux-gnu-g++ -o Stack.o -c  -I./../../dist/system_wrappers_js
> -include
> /var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/
> config/gcc_hidden.h -DENABLE_TYPEDARRAY_MOVE -DENABLE_YARR_JIT=1
> -DMOZ_GLUE_IN_PROGRAM -DNO_NSPR_10_SUPPORT -DEXPORT_JS_API -DJS_HAS_CTYPES
> -DDLL_PREFIX=\"lib\" -DDLL_SUFFIX=\".so\" -DUSE_ZLIB
> -I/usr/lib/libffi-3.0.12/include  -I. 
> -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/../.
> ./mfbt/double-conversion
> -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src -I.
> -I./../../dist/include  -I/usr/include/nspr     
> -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src
> -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/
> assembler
> -I/var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/
> yarr  -fPIC  -Wall -Wpointer-arith -Woverloaded-virtual -Werror=return-type
> -Wtype-limits -Wempty-body -Werror=conversion-null -Wno-ctor-dtor-privacy
> -Wno-overlength-strings -Wno-invalid-offsetof -Wno-variadic-macros
> -Wcast-align -march=native -fomit-frame-pointer -pipe -mfpmath=sse -mno-avx
> -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -pthread -pipe
> -DNDEBUG -DTRIMMED -g -O2 -fomit-frame-pointer -DUSE_SYSTEM_MALLOC=1
> -DENABLE_ASSEMBLER=1 -DENABLE_JIT=1   -DMOZILLA_CLIENT -include
> ./js-confdefs.h -MD -MF .deps/Stack.o.pp 
> /var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/
> Stack.cpp
> /var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/
> Stack.cpp: In member function 'js::StackIter& js::StackIter::operator++()':
> /var/tmp/paludis/www-client-firefox-19.0.2/work/mozilla-release/js/src/vm/
> Stack.cpp:1541:1: internal compiler error: Segmentation fault
> 
> 
> 
> Did you try with a complete gcc snapshot from trunk post commiting date,
> then trying to determine backwards which patch most probably fixed the
> issue?  Or did you take the same route I did (using single patch on a
> version release)?
No, I've run git bisect

> In the former case I suppose it might be a different commit fixing the
> issue.  I'm asking to determine wheter it's worth the effort to pull a gcc
> snapshot, one dating post April 2012.

Could you compile gcc with debug flags (at least -g) and see if backtrace is the same as mine?
Comment 20 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-03-17 16:55:58 UTC
I've also tried to reduce your testcase, though it's a bit tricky and so far yielded invalid outcome, like ICE I've ended up with produced different backtrace...
Comment 21 Andrey Grozin gentoo-dev 2013-03-18 11:49:57 UTC
Same problem here
Comment 22 cmuelle8 2013-03-19 14:09:59 UTC
(In reply to comment #19)

> Could you compile gcc with debug flags (at least -g) and see if backtrace is
> the same as mine?

lgbox src # LC_ALL=C gdb --args /usr/libexec/gcc/i686-pc-linux-gnu/4.7.2/cc1plus -fpreprocessed Stack.ii -march=atom -mno-cx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=atom -quiet -dumpbase Stack.ii -auxbase Stack -O2 -Wno-invalid-offsetof -version -o /tmp/ccIshfFi.s
GNU gdb (Gentoo 7.5.1 p2) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/libexec/gcc/i686-pc-linux-gnu/4.7.2/cc1plus...done.
(gdb) set environment COLLECT_GCC_OPTIONS '-v' '-march=native' '-O2' '-Wno-invalid-offsetof'
(gdb) help show environment 
The environment to give the program, or one variable's value.
With an argument VAR, prints the value of environment variable VAR to
give the program being debugged.  With no arguments, prints the entire
environment to be given to the program.
(gdb) show environment COLLECT_GCC_OPTIONS 
COLLECT_GCC_OPTIONS = '-v' '-march=native' '-O2' '-Wno-invalid-offsetof'
(gdb) run
Starting program: /usr/libexec/gcc/i686-pc-linux-gnu/4.7.2/cc1plus -fpreprocessed Stack.ii -march=atom -mno-cx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=atom -quiet -dumpbase Stack.ii -auxbase Stack -O2 -Wno-invalid-offsetof -version -o /tmp/ccIshfFi.s
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
GNU C++ (Gentoo 4.7.2-r1 p1.5, pie-0.5.5) version 4.7.2 (i686-pc-linux-gnu)
	compiled by GNU C version 4.7.2, GMP version 5.1.1, MPFR version 3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=112470
GNU C++ (Gentoo 4.7.2-r1 p1.5, pie-0.5.5) version 4.7.2 (i686-pc-linux-gnu)
	compiled by GNU C version 4.7.2, GMP version 5.1.1, MPFR version 3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=112470
Compiler executable checksum: ab6040dabab5fbc52f3336ab709c8b39

Program received signal SIGSEGV, Segmentation fault.
0x087a455f in distance_non_agu_define_in_bb (regno1=3, regno2=4294967295, insn=0xb35a7c18, distance=2, 
    start=0xb35a79fc, found=0xbfffe85b)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16502
16502	/var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c: No such file or directory.
(gdb) bt
#0  0x087a455f in distance_non_agu_define_in_bb (regno1=3, regno2=4294967295, insn=0xb35a7c18, distance=2, 
    start=0xb35a79fc, found=0xbfffe85b)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16502
#1  0x087a471d in distance_non_agu_define (regno1=3, regno2=4294967295, insn=0xb35a7c18)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16560
#2  0x087a4b2e in ix86_lea_outperforms (insn=0xb35a7c18, regno0=0, regno1=3, regno2=4294967295, split_cost=0)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16726
#3  0x087a4e56 in ix86_use_lea_for_mov (insn=0xb35a7c18, operands=0x90fd6e0 <recog_data>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16835
#4  0x089d8428 in output_64 (operands=0x90fd6e0 <recog_data>, insn=0xb35a7c18)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.md:2215
#5  0x08390705 in get_insn_template (code=64, insn=0xb35a7c18)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/final.c:1817
#6  0x083917cc in final_scan_insn (insn=0xb35a7c18, file=0x916a0b8, optimize_p=2, nopeepholes=0, seen=0xbfffea90)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/final.c:2682
#7  0x083905c7 in final (first=0xb35ac0e0, file=0x916a0b8, optimize_p=2)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/final.c:1786
#8  0x08393e2a in rest_of_handle_final () at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/final.c:4319
#9  0x084d9f58 in execute_one_pass (pass=0x8fe8640 <pass_final>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/passes.c:2084
#10 0x084da124 in execute_pass_list (pass=0x8fe8640 <pass_final>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/passes.c:2139
#11 0x084da150 in execute_pass_list (pass=0x8fe8f80 <pass_postreload>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/passes.c:2140
#12 0x084da150 in execute_pass_list (pass=0x8fe8f40 <pass_rest_of_compilation>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/passes.c:2140
#13 0x086049a4 in tree_rest_of_compilation (fndecl=0xb58f9b00)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/tree-optimize.c:422
#14 0x082d7b34 in cgraph_expand_function (node=0xb44da3d8)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cgraphunit.c:1837
#15 0x082d7d08 in cgraph_expand_all_functions ()
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cgraphunit.c:1904
#16 0x082d8682 in cgraph_optimize () at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cgraphunit.c:2218
#17 0x082d6a55 in cgraph_finalize_compilation_unit ()
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cgraphunit.c:1344
#18 0x08168b2d in cp_write_global_declarations ()
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cp/decl2.c:4057
#19 0x085a2753 in compile_file () at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/toplev.c:573
#20 0x085a46d9 in do_compile () at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/toplev.c:1938
#21 0x085a4858 in toplev_main (argc=43, argv=0xbfffee14)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/toplev.c:2014
#22 0x08263bc8 in main (argc=43, argv=0xbfffee14)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/main.c:36



Sorry this has taken a while, since


a) /usr/bin/gcc does not have any debug symbols
   one has to use "/usr/bin/gcc-4.7.2" to find out,
   if the compiler was indeed built using "-ggdb" ..

b) /usr/bin/gcc-4.7.2 was not the process segfaulting,
   but gdb only attached to it, not its children by default
     - using "-v" flag to gcc-4.7.2 revealed which programm was run
     - used this to get a backtrace on cc1plus
     (see above for environment and args to cc1plus)

I still wonder if there is some fancy option to gdb to let all childs started by a debugee be attached to gdb right away, without the detour of figuring out the segfaulting child by oneself and submitting that as an argument.


Thx
cmuelle8
Comment 23 cmuelle8 2013-03-19 19:53:28 UTC
The backtrace in comment #22 was produced with plain gcc-4.7.2-r1 from portage tree, the following one is from gcc-4.7.2-r1 with the patch applied suggested in comment #17 (ira-int.h).  It does not seem to make a difference wrt the problem.


lgbox src # LC_ALL=C gdb --args /usr/libexec/gcc/i686-pc-linux-gnu/4.7.2/cc1plus -fpreprocessed Stack.ii -march=atom -mno-cx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=atom -quiet -dumpbase Stack.ii -auxbase Stack -O2 -Wno-invalid-offsetof -version -o /tmp/ccIshfFi.s
GNU gdb (Gentoo 7.5.1 p2) 7.5.1
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.gentoo.org/>...
Reading symbols from /usr/libexec/gcc/i686-pc-linux-gnu/4.7.2/cc1plus...done.
(gdb) set environment COLLECT_GCC_OPTIONS '-v' '-march=native' '-O2' '-Wno-invalid-offsetof'
(gdb) run
Starting program: /usr/libexec/gcc/i686-pc-linux-gnu/4.7.2/cc1plus -fpreprocessed Stack.ii -march=atom -mno-cx16 -msahf -mmovbe -mno-aes -mno-pclmul -mno-popcnt -mno-abm -mno-lwp -mno-fma -mno-fma4 -mno-xop -mno-bmi -mno-bmi2 -mno-tbm -mno-avx -mno-avx2 -mno-sse4.2 -mno-sse4.1 -mno-lzcnt -mno-rdrnd -mno-f16c -mno-fsgsbase --param l1-cache-size=24 --param l1-cache-line-size=64 --param l2-cache-size=512 -mtune=atom -quiet -dumpbase Stack.ii -auxbase Stack -O2 -Wno-invalid-offsetof -version -o /tmp/ccIshfFi.s
warning: Could not load shared library symbols for linux-gate.so.1.
Do you need "set solib-search-path" or "set sysroot"?
GNU C++ (Gentoo 4.7.2-r1 p1.5, pie-0.5.5) version 4.7.2 (i686-pc-linux-gnu)
	compiled by GNU C version 4.7.2, GMP version 5.1.1, MPFR version 3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=112470
GNU C++ (Gentoo 4.7.2-r1 p1.5, pie-0.5.5) version 4.7.2 (i686-pc-linux-gnu)
	compiled by GNU C version 4.7.2, GMP version 5.1.1, MPFR version 3.1.1-p2, MPC version 1.0.1
GGC heuristics: --param ggc-min-expand=90 --param ggc-min-heapsize=112470
Compiler executable checksum: 8d4a4ff04a7e5f73aa4f5917a6a5ed0f

Program received signal SIGSEGV, Segmentation fault.
distance_non_agu_define_in_bb (regno1=regno1@entry=3, regno2=regno2@entry=4294967295, insn=insn@entry=0xb35a7c18, 
    distance=distance@entry=2, start=0xb35a79fc, found=found@entry=0xbfffe9ef)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16502
16502	/var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c: No such file or directory.
(gdb) bt
#0  distance_non_agu_define_in_bb (regno1=regno1@entry=3, regno2=regno2@entry=4294967295, insn=insn@entry=0xb35a7c18, 
    distance=distance@entry=2, start=0xb35a79fc, found=found@entry=0xbfffe9ef)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16502
#1  0x08646bd2 in distance_non_agu_define (insn=0xb35a7c18, regno2=4294967295, regno1=3)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16560
#2  ix86_lea_outperforms (insn=0xb35a7c18, regno0=0, regno1=3, regno2=4294967295, split_cost=0)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.c:16726
#3  0x087d87fd in output_64 (operands=0x8da9300 <recog_data>, insn=0xb35a7c18)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/config/i386/i386.md:2215
#4  0x0831abb1 in final_scan_insn (insn=insn@entry=0xb35a7c18, file=file@entry=0x8e110b8, 
    optimize_p=optimize_p@entry=2, nopeepholes=nopeepholes@entry=0, seen=seen@entry=0xbfffeadc)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/final.c:2682
#5  0x0831b474 in final (first=0xb35ac0e0, file=0x8e110b8, optimize_p=2)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/final.c:1786
#6  0x0831b81b in rest_of_handle_final () at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/final.c:4319
#7  0x08413d14 in execute_one_pass (pass=pass@entry=0x8c8f520 <pass_final>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/passes.c:2084
#8  0x0841407d in execute_pass_list (pass=0x8c8f520 <pass_final>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/passes.c:2139
#9  0x08414090 in execute_pass_list (pass=0x8c8fde0 <pass_postreload>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/passes.c:2140
#10 0x08414090 in execute_pass_list (pass=0x8c8fe20 <pass_rest_of_compilation>)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/passes.c:2140
#11 0x084f6b35 in tree_rest_of_compilation (fndecl=0xb58f9b00)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/tree-optimize.c:422
#12 0x0827cda5 in cgraph_expand_function (node=0xb44da3d8)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cgraphunit.c:1837
#13 0x0827e6d5 in cgraph_expand_all_functions ()
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cgraphunit.c:1904
#14 cgraph_optimize () at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cgraphunit.c:2218
#15 0x0827ec0f in cgraph_finalize_compilation_unit ()
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cgraphunit.c:1344
#16 0x0814f6eb in cp_write_global_declarations ()
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/cp/decl2.c:4057
#17 0x084aea7a in compile_file () at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/toplev.c:573
#18 do_compile () at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/toplev.c:1938
#19 toplev_main (argc=43, argv=0xbfffee14) at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/toplev.c:2014
#20 0x08223e0c in main (argc=43, argv=0xbfffee14)
    at /var/tmp/paludis/sys-devel-gcc-4.7.2-r1/work/gcc-4.7.2/gcc/main.c:36
Comment 24 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-03-24 08:44:02 UTC
Created attachment 343068 [details]
reduced case test

Bisecting once again...
Comment 25 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-03-24 10:24:08 UTC
(In reply to comment #24)
> Created attachment 343068 [details]
> reduced case test
> 
> Bisecting once again...

Seems to be gone in trunk with following:

a2b85e40cf2dd5a7174685077c7d54fc8a67ac45 is the first bad commit
commit a2b85e40cf2dd5a7174685077c7d54fc8a67ac45
Author: vries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Sat Apr 14 12:17:41 2012 +0000

    2012-04-14  Tom de Vries  <tom@codesourcery.com>
    
    	* cfgcleanup.c (try_optimize_cfg): Replace call to delete_insn_chain by
    	call to delete_insn.  Remove code to reorder BASIC_BLOCK note and
    	DELETED_LABEL note, and move it to ...
    	* cfgrtl.c (delete_insn): ... here.  Change return type to void.
    	(delete_insn_and_edges): Likewise.
    	(delete_insn_chain): Handle new return type of delete_insn.  Delete
    	chain backwards rather than forwards.
    	* rtl.h (delete_insn, delete_insn_and_edges): Change return type to
    	void.
    	* cfglayout.c (fixup_reorder_chain): Delete unused label.
    
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186451 138bc75d-0d04-0410-961f-82ee72b054a4
Comment 26 cmuelle8 2013-03-27 11:45:40 UTC
Thanks for digging into this and reporting the bug to the gcc guys.  Let's hope for a backport in 4.7.3 

Meanwhile I tried clang as well, but it's not a breeze either (put a link in "see also" field).  Some patches I could figure out myself, so -O2 building works.

Greetings
Comment 27 Randy Andy 2013-03-29 13:08:50 UTC
Same problem here.

Using gcc-4.6.3 compiles firefox-19.0.2 successfully where 4.7.2 fails on my  i686 Intel(R) Atom(TM) CPU N270 @ 1.60GHz with 1GB RAM and 4GB swap.
Comment 28 Kacper Kowalik (Xarthisius) (RETIRED) gentoo-dev 2013-05-08 07:48:00 UTC
*** Bug 468472 has been marked as a duplicate of this bug. ***
Comment 29 Ryan Hill (RETIRED) gentoo-dev 2013-05-14 02:27:40 UTC
I think you nailed the offending commit, but the fix seems to be just papering over the problem.  Still present in 4.7.3 in any case.
Comment 30 Ryan Hill (RETIRED) gentoo-dev 2013-10-06 08:39:33 UTC
*** Bug 484462 has been marked as a duplicate of this bug. ***
Comment 31 Eric Chatellier 2013-12-19 10:12:31 UTC
Same problem here.

Can't compile postgresql-server-9.3.2:
pgtz.c: In function ‘pg_tzenumerate_start’:
pgtz.c:392:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.
{standard input}: Assembler messages:
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive
Comment 32 Magnus Granberg gentoo-dev 2014-01-31 19:29:06 UTC
*** Bug 499898 has been marked as a duplicate of this bug. ***
Comment 33 Magnus Granberg gentoo-dev 2014-03-02 13:53:47 UTC
*** Bug 503202 has been marked as a duplicate of this bug. ***
Comment 34 Jeroen Roovers (RETIRED) gentoo-dev 2014-06-30 14:05:53 UTC
*** Bug 515714 has been marked as a duplicate of this bug. ***
Comment 35 Jeroen Roovers (RETIRED) gentoo-dev 2014-10-15 08:41:04 UTC
*** Bug 525422 has been marked as a duplicate of this bug. ***
Comment 36 J. Hoos 2014-10-15 12:46:32 UTC
I can confirm that switching to gcc-4.8.3 from test branch solves the problem.
Comment 37 SpanKY gentoo-dev 2015-10-22 14:07:03 UTC
gcc-4.9 is stable now, so throwing away older bugs we don't plan on doing backports for as this should be fixed w/4.9+.  please re-open if it's still an issue with 4.9.3+ though.