public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
@ 2012-01-01 16:59 mikpe at it dot uu.se
  2012-01-01 17:07 ` [Bug bootstrap/51725] " mikpe at it dot uu.se
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: mikpe at it dot uu.se @ 2012-01-01 16:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

             Bug #: 51725
           Summary: [4.7 regression] segfault in stage 3 when compiling
                    gcc/opts.c for sparc64-linux
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: mikpe@it.uu.se


Created attachment 26212
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26212
preprocessed source

Bootstrapping gcc-4.7-20111231 on sparc64-linux fails with:

/mnt/scratch/objdir/./prev-gcc/xgcc -B/mnt/scratch/objdir/./prev-gcc/
-B/mnt/scratch/install47/sparc64-unknown-linux-gnu/bin/
-B/mnt/scratch/install47/sparc64-unknown-linux-gnu/bin/
-B/mnt/scratch/install47/sparc64-unknown-linux-gnu/lib/ -isystem
/mnt/scratch/install47/sparc64-unknown-linux-gnu/include -isystem
/mnt/scratch/install47/sparc64-unknown-linux-gnu/sys-include    -c   -g -O2
-DIN_GCC   -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror
-Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H -I. -I.
-I/mnt/scratch/gcc-4.7-20111231/gcc -I/mnt/scratch/gcc-4.7-20111231/gcc/.
-I/mnt/scratch/gcc-4.7-20111231/gcc/../include
-I/mnt/scratch/gcc-4.7-20111231/gcc/../libcpp/include
-I/home/mikpe/pkgs/linux-sparc64/gmp-5.0.2/include
-I/home/mikpe/pkgs/linux-sparc64/mpfr-3.1.0/include
-I/home/mikpe/pkgs/linux-sparc64/mpc-0.9/include 
-I/mnt/scratch/gcc-4.7-20111231/gcc/../libdecnumber
-I/mnt/scratch/gcc-4.7-20111231/gcc/../libdecnumber/dpd -I../libdecnumber   
/mnt/scratch/gcc-4.7-20111231/gcc/opts.c -o opts.o
/mnt/scratch/gcc-4.7-20111231/gcc/opts.c: In function 'common_handle_option':
/mnt/scratch/gcc-4.7-20111231/gcc/opts.c:1751: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[3]: *** [opts.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm cpp.pod gfdl.pod gcov.pod fsf-funding.pod gcc.pod
make[3]: Leaving directory `/mnt/scratch/objdir/gcc'
make[2]: *** [all-stage3-gcc] Error 2
make[2]: Leaving directory `/mnt/scratch/objdir'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/mnt/scratch/objdir'
make: *** [bootstrap] Error 2

This is a regression since gcc-4.7-20111224 which bootstrapped fine.

The ICE is reproducible with a cross to sparc-linux hosted on i686-linux.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
@ 2012-01-01 17:07 ` mikpe at it dot uu.se
  2012-01-01 18:04 ` mikpe at it dot uu.se
                   ` (19 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: mikpe at it dot uu.se @ 2012-01-01 17:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2012-01-01 17:06:36 UTC ---
Apparently only occurs with options '-g -O2'.  I don't get the ICE if I drop -g
or select any other -O level.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
  2012-01-01 17:07 ` [Bug bootstrap/51725] " mikpe at it dot uu.se
@ 2012-01-01 18:04 ` mikpe at it dot uu.se
  2012-01-01 21:54 ` schwab@linux-m68k.org
                   ` (18 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: mikpe at it dot uu.se @ 2012-01-01 18:04 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aoliva at gcc dot gnu.org

--- Comment #2 from Mikael Pettersson <mikpe at it dot uu.se> 2012-01-01 18:04:02 UTC ---
It's caused by Alexandre Oliva's recent VTA/cselib change in r182760:
http://gcc.gnu.org/ml/gcc-cvs/2011-12/msg00900.html
http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01872.html


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
  2012-01-01 17:07 ` [Bug bootstrap/51725] " mikpe at it dot uu.se
  2012-01-01 18:04 ` mikpe at it dot uu.se
@ 2012-01-01 21:54 ` schwab@linux-m68k.org
  2012-01-02 11:21 ` rguenth at gcc dot gnu.org
                   ` (17 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: schwab@linux-m68k.org @ 2012-01-01 21:54 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|sparc64-linux               |sparc64-linux, ia64-*-linux
                 CC|                            |schwab@linux-m68k.org

--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> 2012-01-01 21:53:57 UTC ---
Also breaks ia64.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (2 preceding siblings ...)
  2012-01-01 21:54 ` schwab@linux-m68k.org
@ 2012-01-02 11:21 ` rguenth at gcc dot gnu.org
  2012-01-02 13:48 ` jakub at gcc dot gnu.org
                   ` (16 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-01-02 11:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-01-02
   Target Milestone|---                         |4.7.0
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (3 preceding siblings ...)
  2012-01-02 11:21 ` rguenth at gcc dot gnu.org
@ 2012-01-02 13:48 ` jakub at gcc dot gnu.org
  2012-01-02 13:53 ` jakub at gcc dot gnu.org
                   ` (15 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-02 13:48 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hp at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-02 13:47:46 UTC ---
*** Bug 51728 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (4 preceding siblings ...)
  2012-01-02 13:48 ` jakub at gcc dot gnu.org
@ 2012-01-02 13:53 ` jakub at gcc dot gnu.org
  2012-01-02 14:59 ` jakub at gcc dot gnu.org
                   ` (14 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-02 13:53 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-02 13:52:14 UTC ---
Seems that canonical vs. non-canonical VALUEs are mixed up.
In cselib_invalidate_mem, we don't terminate the loop:
          addr = cselib_lookup (XEXP (x, 0), VOIDmode, 0, GET_MODE (x));
          mem_chain = &addr->addr_list;
          for (;;)
            {
              if ((*mem_chain)->elt == v)
                {
                  unchain_one_elt_list (mem_chain);
                  break;
                }

              mem_chain = &(*mem_chain)->next;
            }
because v is here a canonical_cselib_val of (*mem_chain)->elt.  We could
perhaps
compare here canonical_cselib_val ((*mem_chain)->elt) == v instead, or just
canonicalizing the mem_elt value early when inserting it into
addr_list/*_containing_mem fixes this too:
--- gcc/cselib.c.jj    2012-01-01 19:54:46.000000000 +0100
+++ gcc/cselib.c    2012-01-02 14:46:51.180804640 +0100
@@ -1264,6 +1264,8 @@ add_mem_for_addr (cselib_val *addr_elt,
 {
   struct elt_loc_list *l;

+  mem_elt = canonical_cselib_val (mem_elt);
+
   /* Avoid duplicates.  */
   for (l = mem_elt->locs; l; l = l->next)
     if (MEM_P (l->loc)

ALex?


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (5 preceding siblings ...)
  2012-01-02 13:53 ` jakub at gcc dot gnu.org
@ 2012-01-02 14:59 ` jakub at gcc dot gnu.org
  2012-01-02 22:17 ` jakub at gcc dot gnu.org
                   ` (13 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-02 14:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-02 14:58:30 UTC ---
While the http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725#c5 change might not
be a complete solution, I think it is right and desirable, because
new_elt_loc_list doesn't add the MEM location to mem_elt's locs, but to its
canonical_cselib_val's locs (if different from mem_elt of course), and at that
point we'd be adding e.g. into addr_list as well as first_containing_mem chain
something that didn't get any MEM locs.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (6 preceding siblings ...)
  2012-01-02 14:59 ` jakub at gcc dot gnu.org
@ 2012-01-02 22:17 ` jakub at gcc dot gnu.org
  2012-01-02 22:20 ` jakub at gcc dot gnu.org
                   ` (12 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-02 22:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-02 22:17:05 UTC ---
Author: jakub
Date: Mon Jan  2 22:17:02 2012
New Revision: 182819

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182819
Log:
    PR bootstrap/51725
    * cselib.c (add_mem_for_addr): Call canonical_cselib_val
    on mem_elt first.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cselib.c


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (7 preceding siblings ...)
  2012-01-02 22:17 ` jakub at gcc dot gnu.org
@ 2012-01-02 22:20 ` jakub at gcc dot gnu.org
  2012-01-03  8:56 ` krebbel at gcc dot gnu.org
                   ` (11 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-02 22:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-02 22:19:30 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (8 preceding siblings ...)
  2012-01-02 22:20 ` jakub at gcc dot gnu.org
@ 2012-01-03  8:56 ` krebbel at gcc dot gnu.org
  2012-01-03 14:46 ` schwab@linux-m68k.org
                   ` (10 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: krebbel at gcc dot gnu.org @ 2012-01-03  8:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Andreas Krebbel <krebbel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |krebbel at gcc dot gnu.org

--- Comment #9 from Andreas Krebbel <krebbel at gcc dot gnu.org> 2012-01-03 08:54:33 UTC ---
*** Bug 51735 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (9 preceding siblings ...)
  2012-01-03  8:56 ` krebbel at gcc dot gnu.org
@ 2012-01-03 14:46 ` schwab@linux-m68k.org
  2012-01-03 16:25 ` jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: schwab@linux-m68k.org @ 2012-01-03 14:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Andreas Schwab <schwab@linux-m68k.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |

--- Comment #10 from Andreas Schwab <schwab@linux-m68k.org> 2012-01-03 14:45:36 UTC ---
Still crashing in the same place on ia64.

$ make -C ia64-unknown-linux-gnu/libjava gnu-CORBA.lo
/bin/bash ./libtool --tag=GCJ   --mode=compile
/home/schwab/src/gcc/test/./gcc/gcj
-B/home/schwab/src/gcc/test/ia64-unknown-linux-gnu/libjava/
-B/home/schwab/src/gcc/test/./gcc/ -B/usr/local/ia64-unknown-linux-gnu/bin/
-B/usr/local/ia64-unknown-linux-gnu/lib/ -isystem
/usr/local/ia64-unknown-linux-gnu/include -isystem
/usr/local/ia64-unknown-linux-gnu/sys-include    -funwind-tables -fclasspath=
-fbootclasspath=../../../gcc/libjava/classpath/lib --encoding=UTF-8
-Wno-deprecated -fbootstrap-classes -g -O2
-fsource-filename=/home/schwab/src/gcc/test/ia64-unknown-linux-gnu/libjava/classpath/lib/classes
-fjni -findirect-dispatch -fno-indirect-classes -c -o gnu-CORBA.lo
@gnu-CORBA.list
libtool: compile:  /home/schwab/src/gcc/test/./gcc/gcj
-B/home/schwab/src/gcc/test/ia64-unknown-linux-gnu/libjava/
-B/home/schwab/src/gcc/test/./gcc/ -B/usr/local/ia64-unknown-linux-gnu/bin/
-B/usr/local/ia64-unknown-linux-gnu/lib/ -isystem
/usr/local/ia64-unknown-linux-gnu/include -isystem
/usr/local/ia64-unknown-linux-gnu/sys-include -funwind-tables -fclasspath=
-fbootclasspath=../../../gcc/libjava/classpath/lib --encoding=UTF-8
-Wno-deprecated -fbootstrap-classes -g -O2
-fsource-filename=/home/schwab/src/gcc/test/ia64-unknown-linux-gnu/libjava/classpath/lib/classes
-fjni -findirect-dispatch -fno-indirect-classes -c @gnu-CORBA.list  -fPIC -o
.libs/gnu-CORBA.o


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (10 preceding siblings ...)
  2012-01-03 14:46 ` schwab@linux-m68k.org
@ 2012-01-03 16:25 ` jakub at gcc dot gnu.org
  2012-01-03 16:39 ` jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-03 16:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-03 16:24:00 UTC ---
Managed to reproduce this even using x86_64-linux -> ia64-linux cross.
Indeed, what happens is that when add_mem_for_addr is called, mem_elt is still
its own canonical_cselib_val, the MEM is added to its locs.
Later on
#0  new_elt_loc_list (val=0x1f71e20, loc=0x226eea0) at ../../gcc/cselib.c:290
#1  0x00000000005ccabf in new_elt_loc_list (val=0x1f71eb0, loc=0x226ee58) at
../../gcc/cselib.c:258
#2  0x00000000005d1193 in cselib_add_permanent_equiv (elt=0x1f71e20,
x=0x7fffe77dbaf8, insn=0x7fffe7217240)
    at ../../gcc/cselib.c:2339
is called and it moves all the locs to the new canonical cselib_val
  /* Bring all locs from LOC to VAL.  */
and
  /* Chain LOC back to VAL.  */
but nothing updated the first_containing_mem chain nor addr_list at this point.
So, either we update those two here, or adjust cselib_invalidate_mem.
I guess the easiest would be to update both spots.  In the new_elt_loc_list
code to move locs from a no longer canonical value to the canonical, if
next_containing_mem of the no longer canonical value is non-NULL, but canonical
value's next_containing_mem is NULL, add the canonical value to the
first_containing_mem list (I guess unchaining of the old value would be too
expensive).  And in cselib_invalidate_mem ignore non-canonical values from the
first_containing_mem chain (well, just unlink them; but I guess the code as is
does that already) and call canonical_cselib_val in the tight loop as addr_list
elements aren't necessary canonicalized.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (11 preceding siblings ...)
  2012-01-03 16:25 ` jakub at gcc dot gnu.org
@ 2012-01-03 16:39 ` jakub at gcc dot gnu.org
  2012-01-03 18:46 ` ubizjak at gmail dot com
                   ` (7 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-03 16:39 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-03 16:39:01 UTC ---
Created attachment 26232
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26232
gcc47-pr51725.patch

Untested additional fix, ia64 jc1 on gnu-CORBA.list with this now compiles fine
(in the cross-compiler).


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (12 preceding siblings ...)
  2012-01-03 16:39 ` jakub at gcc dot gnu.org
@ 2012-01-03 18:46 ` ubizjak at gmail dot com
  2012-01-03 18:59 ` ro at gcc dot gnu.org
                   ` (6 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ubizjak at gmail dot com @ 2012-01-03 18:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Uros Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|sparc64-linux, ia64-*-linux |sparc64-linux,
                   |                            |ia64-*-linux, alpha-linux

--- Comment #13 from Uros Bizjak <ubizjak at gmail dot com> 2012-01-03 18:45:12 UTC ---
Also fails on alphaev68-unknown-linux-gnu in:

FAIL: gfortran.dg/forall_7.f90  -O3 -g  (internal compiler error)
FAIL: gfortran.dg/forall_7.f90  -O3 -g  (test for excess errors)
UNRESOLVED: gfortran.dg/forall_7.f90  -O3 -g  compilation failed to produce
executable
FAIL: gfortran.dg/inline_sum_2.f90  -O3 -g  (internal compiler error)
FAIL: gfortran.dg/inline_sum_2.f90  -O3 -g  (test for excess errors)
UNRESOLVED: gfortran.dg/inline_sum_2.f90  -O3 -g  compilation failed to produce
executable

The patch at Comment #12 also fixes these failures.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (13 preceding siblings ...)
  2012-01-03 18:46 ` ubizjak at gmail dot com
@ 2012-01-03 18:59 ` ro at gcc dot gnu.org
  2012-01-03 20:56 ` rmansfield at qnx dot com
                   ` (5 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: ro at gcc dot gnu.org @ 2012-01-03 18:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

--- Comment #14 from Rainer Orth <ro at gcc dot gnu.org> 2012-01-03 18:58:14 UTC ---
Your additional fix also restores Go bootstrap on Solaris/SPARC, otherwise
the 64-bit libgo fails to build:

libtool: compile:  /var/gcc/regression/trunk/11-gcc/build/./gcc/gccgo
-B/var/gcc/regression/trunk/11-gcc/build/./gcc/
-B/vol/gcc/sparc-sun-solaris2.11/bin/ -B/vol/gcc/sparc-sun-solaris2.11/lib/
-isystem /vol/gcc/sparc-sun-solaris2.11/include -isystem
/vol/gcc/sparc-sun-solaris2.11/sys-include -m64 -g -O2 -I . -c
-fgo-prefix=libgo_html
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/attr.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/clone.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/content.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/context.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/css.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/doc.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/error.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/escape.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/html.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/js.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/template.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/transition.go
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/url.go  -fPIC -o
html/.libs/template.o
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/escape.go: In function
'template.escapeText.pN27_libgo_html.template.escaper':
/vol/gcc/src/hg/trunk/local/libgo/go/html/template/escape.go:637:1: internal
compiler error: Segmentation Fault

  Rainer


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (14 preceding siblings ...)
  2012-01-03 18:59 ` ro at gcc dot gnu.org
@ 2012-01-03 20:56 ` rmansfield at qnx dot com
  2012-01-03 20:58 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: rmansfield at qnx dot com @ 2012-01-03 20:56 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Ryan Mansfield <rmansfield at qnx dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rmansfield at qnx dot com

--- Comment #15 from Ryan Mansfield <rmansfield at qnx dot com> 2012-01-03 20:55:26 UTC ---
With Jakub's patch applied to rev182854 I'm still seeing a segfault on
arm-*-eabi. e.g.

#0  0x00000000005da326 in cselib_preserved_value_p (v=0x0)
    at ../../gcc/cselib.c:674
#1  0x0000000000a7542a in add_stores (loc=<optimized out>, 
    expr=0x7ffff6b78480, cuip=0x7fffffffbaf0) at ../../gcc/var-tracking.c:5522
#2  0x0000000000a73267 in add_with_sets (insn=0x7ffff6b711b0, 
    sets=<optimized out>, n_sets=<optimized out>)
    at ../../gcc/var-tracking.c:6049
#3  0x00000000005de161 in cselib_record_sets (insn=0x7ffff6b711b0)
    at ../../gcc/cselib.c:2476
#4  0x00000000005de5d0 in cselib_process_insn (insn=0x7ffff6b711b0)
    at ../../gcc/cselib.c:2568
#5  0x0000000000a79c92 in vt_initialize () at ../../gcc/var-tracking.c:9398
#6  0x0000000000a82527 in variable_tracking_main_1 ()
    at ../../gcc/var-tracking.c:9575
#7  variable_tracking_main () at ../../gcc/var-tracking.c:9627


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (15 preceding siblings ...)
  2012-01-03 20:56 ` rmansfield at qnx dot com
@ 2012-01-03 20:58 ` jakub at gcc dot gnu.org
  2012-01-03 21:02 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-03 20:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-03 20:57:33 UTC ---
Author: jakub
Date: Tue Jan  3 20:57:29 2012
New Revision: 182858

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182858
Log:
    PR bootstrap/51725
    * cselib.c (new_elt_loc_list): When moving locs from one
    cselib_val to its new canonical_cselib_val and the
    cselib_val was in first_containing_mem chain, but
    the canonical_cselib_val was not, add the latter into the
    chain.
    (cselib_invalidate_mem): Compare canonical_cselib_val of
    addr_list chain elt with v.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cselib.c


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (16 preceding siblings ...)
  2012-01-03 20:58 ` jakub at gcc dot gnu.org
@ 2012-01-03 21:02 ` jakub at gcc dot gnu.org
  2012-01-03 21:25 ` rmansfield at qnx dot com
                   ` (2 subsequent siblings)
  20 siblings, 0 replies; 22+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-03 21:02 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #17 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-03 21:02:07 UTC ---
(In reply to comment #15)
> With Jakub's patch applied to rev182854 I'm still seeing a segfault on
> arm-*-eabi. e.g.
> 
> #0  0x00000000005da326 in cselib_preserved_value_p (v=0x0)
>     at ../../gcc/cselib.c:674
> #1  0x0000000000a7542a in add_stores (loc=<optimized out>, 
>     expr=0x7ffff6b78480, cuip=0x7fffffffbaf0) at ../../gcc/var-tracking.c:5522
> #2  0x0000000000a73267 in add_with_sets (insn=0x7ffff6b711b0, 
>     sets=<optimized out>, n_sets=<optimized out>)
>     at ../../gcc/var-tracking.c:6049
> #3  0x00000000005de161 in cselib_record_sets (insn=0x7ffff6b711b0)
>     at ../../gcc/cselib.c:2476
> #4  0x00000000005de5d0 in cselib_process_insn (insn=0x7ffff6b711b0)
>     at ../../gcc/cselib.c:2568
> #5  0x0000000000a79c92 in vt_initialize () at ../../gcc/var-tracking.c:9398
> #6  0x0000000000a82527 in variable_tracking_main_1 ()
>     at ../../gcc/var-tracking.c:9575
> #7  variable_tracking_main () at ../../gcc/var-tracking.c:9627

That doesn't look related to this.  Can you open a PR for that, attach
preprocessed source and list gcc options, so that it can be analysed even with
a cross-compiler?  Thanks.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (17 preceding siblings ...)
  2012-01-03 21:02 ` jakub at gcc dot gnu.org
@ 2012-01-03 21:25 ` rmansfield at qnx dot com
  2012-01-03 21:46 ` mikpe at it dot uu.se
  2012-01-07 21:38 ` aoliva at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: rmansfield at qnx dot com @ 2012-01-03 21:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

--- Comment #18 from Ryan Mansfield <rmansfield at qnx dot com> 2012-01-03 21:24:18 UTC ---
(In reply to comment #17)
> (In reply to comment #15)
> That doesn't look related to this.  Can you open a PR for that, attach
> preprocessed source and list gcc options, so that it can be analysed even with
> a cross-compiler?  Thanks.

I thought it looked related as it started with rev182760 as well. I'll file a
new PR for it though.


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (18 preceding siblings ...)
  2012-01-03 21:25 ` rmansfield at qnx dot com
@ 2012-01-03 21:46 ` mikpe at it dot uu.se
  2012-01-07 21:38 ` aoliva at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: mikpe at it dot uu.se @ 2012-01-03 21:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|sparc64-linux,              |sparc64-linux,
                   |ia64-*-linux, alpha-linux   |ia64-*-linux, alpha-linux,
                   |                            |m68k-linux

--- Comment #19 from Mikael Pettersson <mikpe at it dot uu.se> 2012-01-03 21:45:28 UTC ---
For completeness, the initial broken commit r182760 also broke m68k-linux:

/mnt/scratch/gcc-4.7-20111231/gcc/ipa-inline-analysis.c: In function
'inline_node_duplication_hook':
/mnt/scratch/gcc-4.7-20111231/gcc/ipa-inline-analysis.c:1045:1: internal
compiler error: Segmentation fault

That's in stage 3, and it's reproducible with a cross.  Jakub's first fix in
r182819 fixes this one.  Resuming that bootstrap attempt...


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Bug bootstrap/51725] [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux
  2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
                   ` (19 preceding siblings ...)
  2012-01-03 21:46 ` mikpe at it dot uu.se
@ 2012-01-07 21:38 ` aoliva at gcc dot gnu.org
  20 siblings, 0 replies; 22+ messages in thread
From: aoliva at gcc dot gnu.org @ 2012-01-07 21:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51725

--- Comment #20 from Alexandre Oliva <aoliva at gcc dot gnu.org> 2012-01-07 21:37:20 UTC ---
Author: aoliva
Date: Sat Jan  7 21:37:15 2012
New Revision: 182982

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182982
Log:
PR bootstrap/51725
* cselib.c (new_elt_loc_list): Promote addr_list to canonical node.
Add canonical node to containing_mem chain after the non-canonical
one, even if there weren't any locs to propagate.
(remove_useless_values): Keep only canonical values.
(add_mem_for_addr, cselib_lookup_mem): Canonicalize addr.
(cselib_invalidate_mem): Likewise.  Ensure v is canonical, and
canonicalize mem_chain elements that are not discarded.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cselib.c


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2012-01-07 21:38 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-01 16:59 [Bug bootstrap/51725] New: [4.7 regression] segfault in stage 3 when compiling gcc/opts.c for sparc64-linux mikpe at it dot uu.se
2012-01-01 17:07 ` [Bug bootstrap/51725] " mikpe at it dot uu.se
2012-01-01 18:04 ` mikpe at it dot uu.se
2012-01-01 21:54 ` schwab@linux-m68k.org
2012-01-02 11:21 ` rguenth at gcc dot gnu.org
2012-01-02 13:48 ` jakub at gcc dot gnu.org
2012-01-02 13:53 ` jakub at gcc dot gnu.org
2012-01-02 14:59 ` jakub at gcc dot gnu.org
2012-01-02 22:17 ` jakub at gcc dot gnu.org
2012-01-02 22:20 ` jakub at gcc dot gnu.org
2012-01-03  8:56 ` krebbel at gcc dot gnu.org
2012-01-03 14:46 ` schwab@linux-m68k.org
2012-01-03 16:25 ` jakub at gcc dot gnu.org
2012-01-03 16:39 ` jakub at gcc dot gnu.org
2012-01-03 18:46 ` ubizjak at gmail dot com
2012-01-03 18:59 ` ro at gcc dot gnu.org
2012-01-03 20:56 ` rmansfield at qnx dot com
2012-01-03 20:58 ` jakub at gcc dot gnu.org
2012-01-03 21:02 ` jakub at gcc dot gnu.org
2012-01-03 21:25 ` rmansfield at qnx dot com
2012-01-03 21:46 ` mikpe at it dot uu.se
2012-01-07 21:38 ` aoliva at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).