Bug 24514 - [4.0/4.1 Regression] ICE on bootstrap
Summary: [4.0/4.1 Regression] ICE on bootstrap
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.1.0
: P1 normal
Target Milestone: 4.0.3
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-10-25 08:12 UTC by Rainer Emrich
Modified: 2005-11-08 12:52 UTC (History)
5 users (show)

See Also:
Host:
Target: mips-*
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-11-01 18:30:21


Attachments
assembler output (88.89 KB, text/plain)
2005-11-01 09:46 UTC, Rainer Emrich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Emrich 2005-10-25 08:12:53 UTC
bootstrapping gives ICE in c-parser.o for gcc-4.1-20051022

stage1/xgcc -Bstage1/ -B/SCRATCH/gcc-build/IRIX64/mips-sgi-irix6.5/install/mips-sgi-irix6.5/bin/ -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmiss
ing-prototypes -pedantic -Wno-long-long -Wno-variadic-macros -Wold-style-definition -Wmissing-format-attribute -Werror -fno-common   -DHAVE_CONFIG_H -I. -I. -I/raid/tecosi
m/it/devel/projects/develtools/src/gcc-4.1-20051022/gcc -I/raid/tecosim/it/devel/projects/develtools/src/gcc-4.1-20051022/gcc/. -I/raid/tecosim/it/devel/projects/develtool
s/src/gcc-4.1-20051022/gcc/../include -I./../intl -I/raid/tecosim/it/devel/projects/develtools/src/gcc-4.1-20051022/gcc/../libcpp/include -I/appl/shared/gnu/IRIX64/mips-sg
i-irix6.5/include -I/appl/shared/gnu/IRIX64/mips-sgi-irix6.5/include    /raid/tecosim/it/devel/projects/develtools/src/gcc-4.1-20051022/gcc/c-parser.c -o c-parser.o
xgcc: Internal error: Trace/BPT/RangeErr/DivZero/Ovflow trap (program cc1)

configured with the following configure parameters:

configure --prefix=/SCRATCH/gcc-build/IRIX64/mips-sgi-irix6.5/install --with-gnu-as --with-as=/SCRATCH/gcc-
build/IRIX64/mips-sgi-irix6.5/install/bin/as --with-gnu-ld --with-ld=/SCRATCH/gcc-build/IRIX64/mips-sgi-irix6.5/install/bin/ld --disable-shared --enable-threads=posix --en
able-languages=c,ada,c++,fortran,objc,obj-c++ --with-gmp=/appl/shared/gnu/IRIX64/mips-sgi-irix6.5 --with-mpfr=/appl/shared/gnu/IRIX64/mips-sgi-irix6.5

using binutils 2.16.1

bootstrapping compiler gcc 4.0.2
Comment 1 Rainer Emrich 2005-10-31 17:37:40 UTC
same for gcc-4.1-20051029
Comment 2 Eric Christopher 2005-10-31 18:17:23 UTC
Since I don't have access to an irix box anymore I'd really need the instruction it fails on at the least, some annotated assembly would be a good start (compile the failing file with -dap and attach the .s output).
Comment 3 Rainer Emrich 2005-11-01 09:46:01 UTC
Created attachment 10097 [details]
assembler output

I compiled c-parser.c with the exact same commandline as in the bootstrap, except the added -S -dap switch. Output as attachment.
Additionally I tried to change the -O2 switch to -O1, wich failed too.
Compilation without optimization switch succeeds. If helpfull in any way, I may provide the output of these compilations too.
Comment 4 Rainer Emrich 2005-11-01 11:02:06 UTC
Also fails on at least tree-data-ref.c and tree-cfg.c with xgcc: Internal error: Trace/BPT/RangeErr/DivZero/Ovflow trap (program cc1)
Comment 5 Eric Christopher 2005-11-01 17:27:53 UTC
The patch to 23585 is likely the cause.
Comment 6 Andrew Pinski 2005-11-01 17:33:26 UTC
Maybe a testcase in:
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00028.html
Comment 7 Eric Christopher 2005-11-01 17:43:08 UTC
Changing to P1 since it's a regression that likely affects all mips (including primary platform mips-elf).
Comment 8 Andrew Pinski 2005-11-01 17:44:53 UTC
(In reply to comment #7)
> Changing to P1 since it's a regression that likely affects all mips (including
> primary platform mips-elf).

I don't know if it is allowed for someone to change the priority (except to P3 so that Mark can relook at the bug).
Comment 9 Eric Christopher 2005-11-01 18:06:07 UTC
Bringing down to P3 and letting Mark set the priority.
Comment 10 Mark Mitchell 2005-11-01 18:13:40 UTC
I'm going to make this a P2.  IRIX isn't a primary platform anymore.  Thanks, Eric.
Comment 11 Andrew Pinski 2005-11-01 18:18:08 UTC
Oh, this effects mips-elf also which is a primary target.
Comment 12 Andrew Pinski 2005-11-01 18:27:43 UTC
It is failing in:
285               return offset % GET_MODE_SIZE (mode) != 0;
mode is BLKmode which has a mode size of 0.
Comment 13 Andrew Pinski 2005-11-01 18:30:21 UTC
The RTL which is failing:
(set (reg:DI 2 $2 [197])
    (unspec:DI [
            (mem/s/c:BLK (plus:DI (reg/f:DI 29 $sp)
                    (const_int 8 [0x8])) [0+4 S8 A32])
            (mem/s/c:QI (plus:DI (reg/f:DI 29 $sp)
                    (const_int 8 [0x8])) [0+4 S1 A32])
        ] 18))


I don't even know what this instruction does but it is a MIPS specific issue.
Comment 14 Mark Mitchell 2005-11-02 00:52:54 UTC
Showstopper; bootstrap failure on primary target.
Comment 15 Andrew Pinski 2005-11-03 14:43:41 UTC
I think this is fixed now by:
        PR rtl-optimization/23585
        * rtlanal.c (rtx_addr_can_trap_p_1) <PLUS>: Return 0 for an address
        that can't trap plus a constant integer, if the mode has zero size.

Can you try again with today's compiler (or do you need to wait for a snapshot?)

Or you could try the patch in
http://gcc.gnu.org/ml/gcc-patches/2005-11/msg00103.html
Comment 16 Rainer Emrich 2005-11-03 16:38:02 UTC
(In reply to comment #15)
I'm trying the patch!
Result will follow.
Comment 17 Rainer Emrich 2005-11-07 16:25:08 UTC
Sorry, for the delay.
I had a machine fault on the weekend.
So, I'm trying the snapshot from 5th of november now!
Look's good so far, already in stage 2.
Comment 18 Rainer Emrich 2005-11-08 07:47:31 UTC
Bootstrap of gcc-4.1-20051105 succeeded for c,c++,objc,obj-c++.
Testsuite still in progress.
Comment 19 Andrew Pinski 2005-11-08 12:52:05 UTC
(In reply to comment #18)
> Bootstrap of gcc-4.1-20051105 succeeded for c,c++,objc,obj-c++.
> Testsuite still in progress.

This is good enough to close this as fixed.  Thanks.