Bug 11717 - [3.3 regression] [alpha] unrecognizable insn compiling for.c of kernel 2.4.22-pre8
Summary: [3.3 regression] [alpha] unrecognizable insn compiling for.c of kernel 2.4.22...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 3.3.1
: P1 critical
Target Milestone: 3.3.2
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 11732 12488 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-07-29 21:52 UTC by Debian GCC Maintainers
Modified: 2003-10-02 01:42 UTC (History)
2 users (show)

See Also:
Host: alpha-linux
Target: alpha-linux
Build: alpha-linux
Known to work:
Known to fail:
Last reconfirmed: 2003-08-20 00:52:40


Attachments
preprocessed source (59.81 KB, application/gzip)
2003-07-29 21:53 UTC, Debian GCC Maintainers
Details
Smaller testcase (derived from different example) (423 bytes, text/plain)
2003-08-11 22:03 UTC, Falk Hueffner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2003-07-29 21:52:32 UTC
[forwarded from http://bugs.debian.org/202762]

seen with 3.3 CVS 20030728, works with 3.2.3 and HEAD CVS 20030722.

trying to compile kernel 2.4.22-pre8 on alpha:

$ gcc -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe
-mno-fp-regs -ffixed-8 -mcpu=ev56 -Wa,-mev6 -c fork.i
fork.c: In function `dup_mmap':
fork.c:144: error: unrecognizable insn:
(insn 59 52 61 0 0x20000ce7760 (set (reg/f:DI 82)
        (symbol_ref:DI ("@Smmlist_nr"))) -1 (nil)
    (expr_list:REG_EQUAL (symbol_ref:DI ("@Smmlist_nr"))
            (nil)))
    fork.c:144: internal compiler error: in
    extract_insn, at recog.c:2175
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make[3]: *** [fork.o] Error 1
Comment 1 Debian GCC Maintainers 2003-07-29 21:53:11 UTC
Created attachment 4511 [details]
preprocessed source
Comment 2 Andrew Pinski 2003-07-29 23:52:22 UTC
With 3.3.1 (20030714), I do not get the ICE.  I will try a newer version now.
Comment 3 Andrew Pinski 2003-07-30 00:22:27 UTC
With a cross compiler from powerpc-apple-darwin6.6 and gcc 3.3.1 (20030728),
./cc1 -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -mno-fp-regs -ffixed-8 -
mcpu=ev56 pr11717.i
I do not get the ICE.
Is this a modified compiler?
Comment 4 Andrew Pinski 2003-07-30 00:33:48 UTC
Never I figured out I needed -mexplicit-relocs since I had no as so configure did not pick 
it up by default.

Comment 5 Andrew Pinski 2003-07-30 00:37:24 UTC
I now found option which makes gcc ice, it also ICEs in 3.3.1 20030714.
Comment 6 Andrew Pinski 2003-07-30 20:43:34 UTC
*** Bug 11732 has been marked as a duplicate of this bug. ***
Comment 7 Falk Hueffner 2003-08-11 22:03:46 UTC
Created attachment 4594 [details]
Smaller testcase (derived from different example)

This one doesn't require any extra options:

falk@juist:/tmp% gcc  -v -c mpeg.i 
Reading specs from /usr/lib/gcc-lib/alpha-linux/3.3.1/specs
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr
--mandir=/usr/share/man --infodir=/usr/share/info
--with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib
--enable-nls --without-included-gettext --enable-__cxa_atexit
--enable-clocale=gnu --enable-debug --enable-java-gc=boehm
--enable-java-awt=xlib --enable-objc-gc alpha-linux
Thread model: posix
gcc version 3.3.1 (Debian)
 /usr/lib/gcc-lib/alpha-linux/3.3.1/cc1 -fpreprocessed mpeg.i -quiet -dumpbase
mpeg.i -auxbase mpeg -version -o /tmp/ccrOtoGz.s
GNU C version 3.3.1 (Debian) (alpha-linux)
	compiled by GNU C version 3.3.1 (Debian).
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64064
mpeg.i: In function `mpeg_mux_init':
mpeg.i:23: error: unrecognizable insn:
(insn 17 16 18 0 0x20000354688 (set (reg/f:DI 73)
	(symbol_ref:DI ("@Smpeg1vcd_mux"))) -1 (nil)
    (expr_list:REG_EQUAL (symbol_ref:DI ("@Smpeg1vcd_mux"))
	(nil)))
mpeg.i:23: internal compiler error: in extract_insn, at recog.c:2175
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

Changing most anything makes the ICE go away, for example removing the ; within
{;}...
Comment 8 Mariusz Mazur 2003-08-17 11:57:47 UTC
I also have this bug with 3.3.1 on alpha. With 3.3 it didn't occur.
Comment 9 Eric Christopher 2003-08-18 23:30:18 UTC
I can't get mpeg.i to fail on gcc-3_3-branch for alpha-linux with any compile
option I could come up with easily. With or without -mno-explicit-relocs as well.

Can you still duplicate this with the branch?
Comment 10 Finn Thain 2003-08-19 15:38:29 UTC
I can reproduce this with alpha linux kernel 2.4.21 cross compiled under darwin using gcc 3.3.2-
200308. The cross compiler was built with Darwin's gcc 3.1, I haven't tried with Apple's recent 3.3 
update.

$ alpha-linux-gcc -D__KERNEL__ -I/Volumes/Linux/build/linux-2.4.21/include -Wall -Wstrict-
prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -
mno-fp-regs -ffixed-8 -mcpu=ev4 -Wa,-mev6   -nostdinc -iwithprefix include -
DKBUILD_BASENAME=fork  -c -o fork.o fork.c
fork.c: In function `dup_mmap':
fork.c:144: error: unrecognizable insn:
(insn 59 52 61 0 0xceaf80 (set (reg/f:DI 82)
        (symbol_ref:DI ("@Smmlist_nr"))) -1 (nil)
    (expr_list:REG_EQUAL (symbol_ref:DI ("@Smmlist_nr"))
        (nil)))
fork.c:144: internal compiler error: in extract_insn, at recog.c:2175
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
$ alpha-linux-gcc -v
Reading specs from /Users/fthain/xcompiler/alpha-linux-local/lib/gcc-lib/alpha-linux/3.3.2/
specs
Configured with: ../gcc-core-3.3-20030811/configure --prefix=/Users/fthain/xcompiler/alpha-
linux-local --target=alpha-linux --enable-languages=c --with-headers=/Users/fthain/
xcompiler/alpha-linux-local/alpha-linux/include --with-sysroot=/Users/fthain/xcompiler/alpha-
linux-local --disable-shared --enable-threads=single
Thread model: single
gcc version 3.3.2 20030811 (experimental)
Comment 11 Falk Hueffner 2003-08-19 20:20:01 UTC
I can still reproduce the ICE with 3.3.2 20030819 and both fork.i with the
mentioned options and mpeg.i without any options. Did you build a native compiler?
Maybe it doesn't occur with a cross compiler (although I couldn't think why).

Note mpeg.i is invalid, it declares mpeg1vcd_mux first as extern and then as
static. However, when removing the "static", it still ICEs.
Comment 12 Andrew Pinski 2003-08-20 00:52:39 UTC
Still a problem.
Maybe you using an old binutils which does not have the support for -mexplicit-relocs so 
it does not dect it at configure time.
Comment 13 Finn Thain 2003-08-20 06:03:21 UTC
Still get the same failure with gcc 3.3.2-20030818.

I built the cross compiler against glibc headers from the glibc CVS as at 20030811. I notice the 
original Debian bug report was using glibc 2.3.1-17, so I guess this may not be relevant.

$ alpha-linux-ld -v
GNU ld version 2.14.90.0.5 20030722

$ alpha-linux-gcc -v
Reading specs from /Users/fthain/xcompiler/alpha-linux-local/lib/gcc-lib/alpha-linux/3.3.2/
specs
Configured with: ../gcc-core-3.3-20030818/configure --prefix=/Users/fthain/xcompiler/alpha-
linux-local --target=alpha-linux --enable-languages=c --with-headers=/Users/fthain/
xcompiler/alpha-linux-local/alpha-linux/include --with-sysroot=/Users/fthain/xcompiler/alpha-
linux-local --disable-shared --enable-threads=single
Thread model: single
gcc version 3.3.2 20030818 (prerelease)
Comment 14 Finn Thain 2003-08-27 13:22:51 UTC
I'm afraid I still get exactly the same ICE with the current snapshot.

$ alpha-linux-gcc -v
Reading specs from /Users/fthain/xcompiler/alpha-linux-local/lib/gcc-lib/alpha-linux/3.3.2/
specs
Configured with: ../gcc-core-3.3-20030825/configure --prefix=/Users/fthain/xcompiler/alpha-
linux-local --target=alpha-linux --enable-languages=c --with-headers=/Users/fthain/
xcompiler/alpha-linux-local/alpha-linux/include --with-sysroot=/Users/fthain/xcompiler/alpha-
linux-local --disable-shared --enable-threads=single
Thread model: single
gcc version 3.3.2 20030825 (prerelease)
Comment 15 Richard Henderson 2003-09-26 06:22:24 UTC
2003-09-17  Richard Henderson  <rth@redhat.com>

        * config/alpha/alpha.c (alpha_expand_mov): Do gen_movdi_er_maybe_g
        always during initial code generation.
        * config/alpha/alpha.md (movdi_er_maybe_g): Don't conditionalize 
        on flag_inline_functions.
Comment 16 Andrew Pinski 2003-10-02 01:42:34 UTC
*** Bug 12488 has been marked as a duplicate of this bug. ***