Bug 37395 - [4.4 Regression] Bootstrap fails in stage 2 due to segfault compiling c-parser
Summary: [4.4 Regression] Bootstrap fails in stage 2 due to segfault compiling c-parser
Status: RESOLVED DUPLICATE of bug 37483
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.4.0
: P3 normal
Target Milestone: 4.4.0
Assignee: Adam Nemet
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: ice-on-valid-code
Depends on:
Blocks: 37483
  Show dependency treegraph
 
Reported: 2008-09-06 11:07 UTC by Martin Michlmayr
Modified: 2008-09-12 14:26 UTC (History)
5 users (show)

See Also:
Host: mips-linux-gnu
Target: mips-linux-gnu
Build: mips-linux-gnu
Known to work:
Known to fail:
Last reconfirmed: 2008-09-11 21:00:14


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Michlmayr 2008-09-06 11:07:59 UTC
With current trunk (revision 140056) I see the following bootstrap error
on mips:

/home/tbm/build/gcc-snapshot-20080906/build/./prev-gcc/xgcc -B/home/tbm/build/gcc-snapshot-20080906/build/./prev-gcc/ -B/usr/lib/gcc-snapshot/mips-linux-gnu/bin/ -c  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../src/gcc -I../../src/gcc/. -I../../src/gcc/../include -I../../src/gcc/../libcpp/include  -I../../src/gcc/../libdecnumber -I../../src/gcc/../libdecnumber/dpd -I../libdecnumber    ../../src/gcc/cfg.c -o cfg.o
../../src/gcc/c-parser.c: In function 'c_parser_direct_declarator_inner':
../../src/gcc/c-parser.c:2424: internal compiler error: Segmentation fault
Please submit a full bug report,
Comment 1 Martin Michlmayr 2008-09-06 11:08:50 UTC
Configured with:

--enable-languages=c,c++ --enable-shared --with-system-zlib --disable-nls --enable-clocale=gnu --enable-libstdcxx-debug --disable-libssp --disable-werror --build=mips-linux-gnu --host=mips-linux-gnu --target=mips-linux-gnu
Comment 2 David Daney 2008-09-06 17:50:26 UTC
140035 seems OK:

http://gcc.gnu.org/ml/gcc-testresults/2008-09/msg00503.html

I am now trying 140069.
Comment 3 David Daney 2008-09-07 17:30:29 UTC
It is also working on r140069


http://gcc.gnu.org/ml/gcc-testresults/2008-09/msg00612.html
Comment 4 Martin Michlmayr 2008-09-09 19:23:53 UTC
I still see the segfault (with 140156).  I'll give you an account on the machine
tomorrow.
Comment 5 Andrew Pinski 2008-09-09 19:28:34 UTC
Maybe related to PR 37424 and all the other IRA ones.
Comment 6 Martin Michlmayr 2008-09-11 15:36:29 UTC
Adding Adam Nemet since I see the segfault on a Cavium Octeon based
machine (from Movidis).

Comment 7 Adam Nemet 2008-09-11 21:00:14 UTC
I was able to reproduce this with 140295.  Assigning to myself.
Comment 8 Adam Nemet 2008-09-11 21:46:01 UTC
It's caused by this http://gcc.gnu.org/ml/gcc-patches/2008-08/msg02376.html.  In this hunk:

@@ -1901,7 +1904,8 @@ noce_try_sign_mask (struct noce_if_info  
      INSN_B which can happen for e.g. conditional stores to memory.  */ 
   b_unconditional = (if_info->insn_b == NULL_RTX 
                     || BLOCK_FOR_INSN (if_info->insn_b) == if_info->test_bb); 
-  if (rtx_cost (t, SET) >= COSTS_N_INSNS (2) 
+  if (rtx_cost (t, SET, optimize_bb_for_speed_p (BLOCK_FOR_INSN (if_info->insn_b))) 
+      >= COSTS_N_INSNS (2) 
       && (!b_unconditional 
           || t != if_info->b)) 
     return FALSE; 

if_info->insn_b is allowed to be null.
Comment 9 Andrew Pinski 2008-09-11 21:48:00 UTC
I think this is the same bug as PR 37483.
Comment 10 Jakub Jelinek 2008-09-12 14:26:02 UTC

*** This bug has been marked as a duplicate of 37483 ***