Bug 37733 - GCC Bootstrap fails in Stage 2 AIX 5.2
Summary: GCC Bootstrap fails in Stage 2 AIX 5.2
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-03 22:28 UTC by John F. Trudeau
Modified: 2012-05-05 19:16 UTC (History)
3 users (show)

See Also:
Host: powerpc-ibm-aix5.2.0.0
Target: powerpc-ibm-aix5.2.0.0
Build: powerpc-ibm-aix5.2.0.0
Known to work:
Known to fail:
Last reconfirmed: 2012-05-04 00:00:00


Attachments
Complete transcript of failed bootstrap (70.62 KB, text/plain)
2008-10-03 22:34 UTC, John F. Trudeau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John F. Trudeau 2008-10-03 22:28:11 UTC
build/genattr /mtg/arc/gcc-4.3.2/gcc/config/rs6000/rs6000.md \
	  insn-conditions.md > tmp-attr.h
/mtg/TOOL/powerpc-AIX5.2/bin/bash /mtg/arc/gcc-4.3.2/gcc/../move-if-change tmp-attr.h insn-attr.h
echo timestamp > s-attr
/mtg/arc/gcc-4.3.2-powerpc-AIX5.2/./prev-gcc/xgcc -B/mtg/arc/gcc-4.3.2-powerpc-AIX5.2/./prev-gcc/ -B/mtg/TOOL/gcc-4.3.2/powerpc-AIX5.2/powerpc-ibm-aix5.2.0.0/bin/ -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros 				     -Wno-overlength-strings    -DHAVE_CONFIG_H -I. -I. -I/mtg/arc/gcc-4.3.2/gcc -I/mtg/arc/gcc-4.3.2/gcc/. -I/mtg/arc/gcc-4.3.2/gcc/../include -I./../intl -I/mtg/arc/gcc-4.3.2/gcc/../libcpp/include -I/mtg/TOOL/powerpc-AIX5.2/include -I/mtg/TOOL/include -I/mtg/arc/gcc-4.3.2/gcc/../libdecnumber -I/mtg/arc/gcc-4.3.2/gcc/../libdecnumber/dpd -I../libdecnumber    insn-attrtab.c -o insn-attrtab.o
/mtg/arc/gcc-4.3.2/gcc/config/rs6000/rs6000.md: In function 'internal_dfa_insn_code':
/mtg/arc/gcc-4.3.2/gcc/config/rs6000/rs6000.md:148: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [insn-attrtab.o] Error 1
make[4]: Leaving directory `/mtg/arc/gcc-4.3.2-powerpc-AIX5.2/gcc'
make[3]: *** [all-stage2-gcc] Error 2
make[3]: Leaving directory `/mtg/arc/gcc-4.3.2-powerpc-AIX5.2'
make[2]: *** [stage2-bubble] Error 2
make[2]: Leaving directory `/mtg/arc/gcc-4.3.2-powerpc-AIX5.2'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/mtg/arc/gcc-4.3.2-powerpc-AIX5.2'

cd gcc-4.3.2-powerpc-AIX5.2
/mtg/TOOL/powerpc-AIX5.2/bin/bash /mtg/arc/gcc-4.3.2/configure --prefix=/mtg/TOOL/gcc-4.3.2 --exec-prefix=/mtg/TOOL/gcc-4.3.2/powerpc-AIX5.2 --with-gmp=/mtg/TOOL/powerpc-AIX5.2 --with-mpfr=/mtg/TOOL

After researching the problem on the internet I found some reports that indicated that this file was too large in some environments.  
  -rw-rw-r--  1 trudeajo fhaf    6278 2008-10-03 14:07 insn-attr.h
  -rw-rw-r--  1 trudeajo fhaf 1393534 2008-10-03 14:07 insn-attrtab.c
I attempted to reduce the size by removing some includes from rs6000.md:

--- gcc/config/rs6000/rs6000.md.~1~	2008-07-03 19:32:23.000000000 -0700
+++ gcc/config/rs6000/rs6000.md	2008-10-02 16:56:12.000000000 -0700
@@ -159,10 +159,6 @@
 (include "rios2.md")
 (include "rs64.md")
 (include "mpc.md")
-(include "40x.md")
-(include "440.md")
-(include "603.md")
-(include "6xx.md")
 (include "7xx.md")
 (include "7450.md")
 (include "8540.md")

This allowed insn-attrtab.c to compile, however the build failed on the very next compile:

build/genattr /mtg/arc/gcc-4.3.2/gcc/config/rs6000/rs6000.md \
	  insn-conditions.md > tmp-attr.h
/mtg/TOOL/powerpc-AIX5.2/bin/bash /mtg/arc/gcc-4.3.2/gcc/../move-if-change tmp-attr.h insn-attr.h
echo timestamp > s-attr
/mtg/arc/gcc-4.3.2-powerpc-AIX5.2/./prev-gcc/xgcc -B/mtg/arc/gcc-4.3.2-powerpc-AIX5.2/./prev-gcc/ -B/mtg/TOOL/gcc-4.3.2/powerpc-AIX5.2/powerpc-ibm-aix5.2.0.0/bin/ -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros 				     -Wno-overlength-strings    -DHAVE_CONFIG_H -I. -I. -I/mtg/arc/gcc-4.3.2/gcc -I/mtg/arc/gcc-4.3.2/gcc/. -I/mtg/arc/gcc-4.3.2/gcc/../include -I./../intl -I/mtg/arc/gcc-4.3.2/gcc/../libcpp/include -I/mtg/TOOL/powerpc-AIX5.2/include -I/mtg/TOOL/include -I/mtg/arc/gcc-4.3.2/gcc/../libdecnumber -I/mtg/arc/gcc-4.3.2/gcc/../libdecnumber/dpd -I../libdecnumber    insn-attrtab.c -o insn-attrtab.o
/mtg/arc/gcc-4.3.2-powerpc-AIX5.2/./prev-gcc/xgcc -B/mtg/arc/gcc-4.3.2-powerpc-AIX5.2/./prev-gcc/ -B/mtg/TOOL/gcc-4.3.2/powerpc-AIX5.2/powerpc-ibm-aix5.2.0.0/bin/ -c   -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros 				     -Wno-overlength-strings    -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I/mtg/arc/gcc-4.3.2/gcc -I/mtg/arc/gcc-4.3.2/gcc/build -I/mtg/arc/gcc-4.3.2/gcc/../include -I./../intl -I/mtg/arc/gcc-4.3.2/gcc/../libcpp/include -I/mtg/TOOL/powerpc-AIX5.2/include -I/mtg/TOOL/include -I/mtg/arc/gcc-4.3.2/gcc/../libdecnumber -I/mtg/arc/gcc-4.3.2/gcc/../libdecnumber/dpd -I../libdecnumber    -o build/genautomata.o /mtg/arc/gcc-4.3.2/gcc/genautomata.c
/mtg/arc/gcc-4.3.2/gcc/genautomata.c: In function 'create_automata':
/mtg/arc/gcc-4.3.2/gcc/genautomata.c:6534: internal compiler error: Illegal instruction
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
make[4]: *** [build/genautomata.o] Error 1
make[4]: Leaving directory `/mtg/arc/gcc-4.3.2-powerpc-AIX5.2/gcc'
make[3]: *** [all-stage2-gcc] Error 2
make[3]: Leaving directory `/mtg/arc/gcc-4.3.2-powerpc-AIX5.2'
make[2]: *** [stage2-bubble] Error 2
make[2]: Leaving directory `/mtg/arc/gcc-4.3.2-powerpc-AIX5.2'
make[1]: *** [bootstrap] Error 2
make[1]: Leaving directory `/mtg/arc/gcc-4.3.2-powerpc-AIX5.2'

I also tried the latest 4.3 snapshot with the same results.

GCC 4.2.4 bootstrap is successful on this host.
Comment 1 Andrew Pinski 2008-10-03 22:30:52 UTC
What is your stack size limit set to?
Comment 2 John F. Trudeau 2008-10-03 22:34:48 UTC
Created attachment 16460 [details]
Complete transcript of failed bootstrap
Comment 3 John F. Trudeau 2008-10-03 22:36:15 UTC
(In reply to comment #1)
> What is your stack size limit set to?
> 

/mtg/arc$ /usr/bin/ulimit -a
time(seconds)        unlimited
file(blocks)         unlimited
data(kbytes)         unlimited
stack(kbytes)        4194304
memory(kbytes)       unlimited
coredump(blocks)     unlimited
nofiles(descriptors) 8192
/mtg/arc$ 
Comment 4 David Edelsohn 2008-10-12 22:42:25 UTC
This probably is the data segment overflow that occurred on mainline with the additional dfa descriptions.  For some reason AIX 5.2 is hitting it sooner and on GCC itself.  You probably need to add -Wl,-bmaxdata:0x20000000 to LDFLAGS.
Comment 5 Steven Bosscher 2012-05-04 20:10:07 UTC
Is this issue a GCC bug? Or does comment #4 resolve the problem?
Comment 6 David Edelsohn 2012-05-05 19:16:14 UTC
No response and there are reports of GCC bootstrap on AIX 5.2, so this is fixed.