User account creation filtered due to spam.

Bug 28326 - [4.1 regression] profiledbootstrap will produce an ICE with "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS
Summary: [4.1 regression] profiledbootstrap will produce an ICE with "-mtune=power3 -m...
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.1.1
: P2 major
Target Milestone: 4.1.3
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-09 20:20 UTC by Markus Rothe
Modified: 2008-02-13 13:06 UTC (History)
2 users (show)

See Also:
Host: powerpc64-unknown-linux-gnu
Target: powerpc64-unknown-linux-gnu
Build: powerpc64-unknown-linux-gnu
Known to work: 3.4.6 4.0.3 4.2.0
Known to fail: 4.1.1
Last reconfirmed: 2008-01-13 21:06:20


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Rothe 2006-07-09 20:20:51 UTC
If I try to bootstrap on ppc64 and try to use BOOT_CFLAGS="-m64 -O2
-pipe -mtune=power3 -mcpu=power3" I get an ICE. If I leave out "-mtune=power3 -mcpu=power3" the bootstrap finishes. So one of the optimizations is causing this.

here are the steps I followed some while ago. see http://bugs.gentoo.org/show_bug.cgi?id=126960 (gcc 4.1.1 has the same result)

$ mkdir gcc-4.1.0-temp
$ cd gcc-4.1.0-temp/
$ tar xfj /usr/portage/distfiles/gcc-4.1.0.tar.bz2
$ mkdir build
$ cd build/
$ ../gcc-4.1.0/configure --prefix=/usr
--bindir=/usr/powerpc64-unknown-linux-gnu/gcc-bin/4.1.0
--includedir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/include
--datadir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0
--mandir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0/man
--infodir=/usr/share/gcc-data/powerpc64-unknown-linux-gnu/4.1.0/info
--with-gxx-include-dir=/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0/include/g++-v4
--host=powerpc64-unknown-linux-gnu --build=powerpc64-unknown-linux-gnu
--disable-altivec --enable-nls --without-included-gettext --with-system-zlib
--disable-checking --disable-werror --disable-libunwind-exceptions
--disable-multilib --disable-libmudflap --disable-libssp --disable-libgcj
--enable-languages=c,c++,fortran --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu
[...]
$ make LDFLAGS="" STAGE1_CFLAGS="-O"
LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.0" BOOT_CFLAGS="-m64 -O2
-pipe -mtune=power3 -mcpu=power3" profiledbootstrap

[...]
make[4]: Entering directory `/root/gcc-4.1.0-temp/build/gcc'
make[4]: `crtend.o' is up to date.
make[4]: `crtbeginS.o' is up to date.
make[4]: `crtendS.o' is up to date.
make[4]: `crtbeginT.o' is up to date.
make[4]: `ecrti.o' is up to date.
make[4]: `ecrtn.o' is up to date.
make[4]: `ncrti.o' is up to date.
make[4]: `ncrtn.o' is up to date.
make[4]: `crtsavres.o' is up to date.
make[4]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc'
./xgcc -B./ -B/usr/powerpc64-unknown-linux-gnu/bin/ -isystem
/usr/powerpc64-unknown-linux-gnu/include -isystem
/usr/powerpc64-unknown-linux-gnu/sys-include
-L/root/gcc-4.1.0-temp/build/gcc/../ld -O2  -O2 -O2 -pipe -mtune=power3
-mcpu=power3  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC
-specs=ldblspecs -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc-4.1.0/gcc -I../../gcc-4.1.0/gcc/.
-I../../gcc-4.1.0/gcc/../include -I../../gcc-4.1.0/gcc/../libcpp/include  -fPIC
-mstrict-align -DL_muldi3  -c ../../gcc-4.1.0/gcc/libgcc2.c -o
libgcc/./_muldi3.o
{standard input}: Assembler messages:
{standard input}:85: Warning: Unary operator - ignored because bad operand
follows
{standard input}:85: Warning: zero assumed for missing expression
{standard input}:86: Error: Unrecognized opcode: `m'
{standard input}:96: Error: Unrecognized opcode: `m'
{standard input}:1199: Error: unassigned file number 2
make[3]: *** [libgcc/./_muldi3.o] Error 1
make[3]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc'
make[1]: *** [stageprofile_build] Error 2
make[1]: Leaving directory `/root/gcc-4.1.0-temp/build/gcc'
make: *** [profiledbootstrap] Error 2
Comment 1 Andrew Pinski 2006-07-09 20:23:59 UTC
Can you try without STAGE1_CFLAGS="-O"?
And can you try bootstrap instead of profiledbootstrap ?
Comment 2 Markus Rothe 2006-07-10 17:41:13 UTC
I tried this:

$ make LDFLAGS="" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.1" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" profiledbootstrap
[...]
make[4]: Entering directory `/root/gcc-4.1.1-temp/build/gcc'
make[4]: `crtend.o' is up to date.
make[4]: `crtbeginS.o' is up to date.
make[4]: `crtendS.o' is up to date.
make[4]: `crtbeginT.o' is up to date.
make[4]: `ecrti.o' is up to date.
make[4]: `ecrtn.o' is up to date.
make[4]: `ncrti.o' is up to date.
make[4]: `ncrtn.o' is up to date.
make[4]: `crtsavres.o' is up to date.
make[4]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc'
./xgcc -B./ -B/usr/powerpc64-unknown-linux-gnu/bin/ -isystem /usr/powerpc64-unknown-linux-gnu/include -isystem /usr/powerpc64-unknown-linux-gnu/sys-include -L/root/gcc-4.1.1-temp/build/gcc/../ld -O2  -O2 -g -O2  -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -specs=ldblspecs -mno-minimal-toc -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc-4.1.1/gcc -I../../gcc-4.1.1/gcc/. -I../../gcc-4.1.1/gcc/../include -I../../gcc-4.1.1/gcc/../libcpp/include  -fPIC -mstrict-align -DL_muldi3  -c ../../gcc-4.1.1/gcc/libgcc2.c -o libgcc/./_muldi3.o
/tmp/ccCAOUnw.s: Assembler messages:
/tmp/ccCAOUnw.s:71: Warning: Unary operator - ignored because bad operand follows
/tmp/ccCAOUnw.s:71: Warning: zero assumed for missing expression
/tmp/ccCAOUnw.s:72: Error: Unrecognized opcode: `f'
/tmp/ccCAOUnw.s:76: Error: Unrecognized opcode: `f'
/tmp/ccCAOUnw.s:1160: Error: unassigned file number 2
make[3]: *** [libgcc/./_muldi3.o] Error 1
make[3]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc'
make[2]: *** [stmp-multilib] Error 2
make[2]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc'
make[1]: *** [stageprofile_build] Error 2
make[1]: Leaving directory `/root/gcc-4.1.1-temp/build/gcc'
make: *** [profiledbootstrap] Error 2


and this:
$ make LDFLAGS="" LIBPATH="/usr/lib/gcc/powerpc64-unknown-linux-gnu/4.1.1" BOOT_CFLAGS="-m64 -O2 -pipe -mtune=power3 -mcpu=power3" bootstrap

last command builds fine. this is a regression then? gcc-3.4 used to build fine using profiledbootstrap. I have not tried gcc 4.0 IIRC.
Comment 3 Markus Rothe 2006-07-11 20:17:24 UTC
I did some testing and this are the results:

gcc versions 3.4.6, 4.0.3 and 4.2-20060708 do all _not_ fail with profiledbootstrap and "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS.

which information do you need to get this fixed?
Comment 4 Markus Rothe 2006-09-06 13:02:11 UTC
any news about this?
Comment 5 Richard Biener 2008-01-13 14:37:45 UTC
Does this work on the current 4.1 branch now?
Comment 6 Markus Rothe 2008-01-13 19:13:26 UTC
still failing with the 4.1-20080107 snapshot
Comment 7 Uroš Bizjak 2008-02-11 07:04:52 UTC
(In reply to comment #3)
> I did some testing and this are the results:
> 
> gcc versions 3.4.6, 4.0.3 and 4.2-20060708 do all _not_ fail with
> profiledbootstrap and "-mtune=power3 -mcpu=power3" in BOOT_CFLAGS.
> 
> which information do you need to get this fixed?

*.s asm file, produced by adding -save-temps to the compile flags (Comment #0) for _muldi.o compile. A skilled ppc person can check failed asm instruction and eventually fix assembler template of the insn description.

However, gcc-4.1 is a bit old now...

Comment 8 Markus Rothe 2008-02-13 13:06:56 UTC
(In reply to comment #7)
> However, gcc-4.1 is a bit old now...

I'm marking this bug as WONTFIX then.