Bug 40894 - [4.4/4.5/4.6/4.7 Regression] bootstrap4-lean failed crtfastmath.o comparision
Summary: [4.4/4.5/4.6/4.7 Regression] bootstrap4-lean failed crtfastmath.o comparision
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.4.0
: P4 normal
Target Milestone: 4.4.7
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 18:36 UTC by Hin-Tak Leung
Modified: 2012-09-10 16:16 UTC (History)
2 users (show)

See Also:
Host: alphaev68-dec-osf5.1a
Target:
Build:
Known to work: 4.3.1, 4.3.3, 4.3.5, 4.3.6, 4.6.1, 4.7.1
Known to fail: 4.4.0, 4.4.1, 4.4.4, 4.4.5, 4.4.6, 4.4.7
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hin-Tak Leung 2009-07-28 18:36:47 UTC
make bootstrap4-lean failed with 4.4.0 and 4.4.1 with crtfastmath.o comparison. The last gcc version I can make bootstrap4-lean was 4.3.3 (and before that, 4.3.1) which was what I tried building 4.4.x with.

Strangely "make" (which I understand do a 3 stage boostrap) doesn't have this problem, but fails further down with path length problems (
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38251#c8 ).

objdump -Dxzs ./prev-gcc/crtfastmath.o > prev-gcc-crtfastmath-dump
objdump -Dxzs ./gcc/crtfastmath.o > gcc-crtfastmath-dump
objdump -Dxzs /usr/local/lib/gcc/alphaev68-dec-osf5.1a/4.3.3/crtfastmath.o \
   > gcc-4.3.3-crtfastmath-dump
-------------
# diff prev-gcc-crtfastmath-dump gcc-crtfastmath-dump
2,3c2,3
< ./prev-gcc/crtfastmath.o:     file format ecoff-littlealpha
< ./prev-gcc/crtfastmath.o
---
> ./gcc/crtfastmath.o:     file format ecoff-littlealpha
> ./gcc/crtfastmath.o
73c73
<  0030 31000000 02000204 00000000 00000000  1...............
---
>  0030 01000000 02000204 00000000 00000000  ................
103c103
<   30:	31 00 00 00 	call_pal	0x31
---
>   30:	01 00 00 00 	call_pal	0x1
--------------------

I also 'diff gcc-crtfastmath-dump gcc-4.3.3-crtfastmath-dump' - while I don't understand alpha assembler at all, the diff against with gcc 4.3.3 is mostly versioning, and gcc 4.3.3. also have call_pal	0x31. So it appears that bootstrap4-lean miscompile at the last stage? (i.e. prev-gcc/crtfastmath.o was correct, gcc/crtfastmath.o was wrong).

Anybody can suggest how to take this forward? I am currently on 4.3.3, but am keen to heep the alpha port of gcc alive for as long as is feasible...
Comment 1 Joseph S. Myers 2009-07-29 23:08:48 UTC
There is no indication in this bug report of whether the issue also
appears for 4.5.  If it does, please update the regression marker to
"4.4/4.5 Regression".
Comment 2 Hin-Tak Leung 2009-07-30 09:52:56 UTC
(In reply to comment #1)
> There is no indication in this bug report of whether the issue also
> appears for 4.5.  If it does, please update the regression marker to
> "4.4/4.5 Regression".


I downloaded and tried the gcc-4.5-20090723 snapshot tar ball with make bootstrap-lean - it finished the building and comparison of the C compiler but failed later in libstdc++-v3 . I hope this get fixed by 4.4.2 if there is one. Meanwhile I'll check and possibly file the libstdc++-v3 issue.
 
Comment 3 Hin-Tak Leung 2009-07-30 13:01:16 UTC
FYI, the libstdc++v3 issue with gcc 4.5 is filed as bug 40912 . So gcc 4.4/4.5 support are both a bit broken, just differently.
Comment 4 Hin-Tak Leung 2009-09-25 04:33:20 UTC
situation gone worse:

make[3]: Leaving directory `/home/htl10/tmp-build/ob-dir'
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
Bootstrap comparison failure!
gcc/java/win32-host.o differs
gcc/build/min-insn-modes.o differs
gcc/dummy-checksum.o differs
gcc/insn-peep.o differs
gcc/graphite-blocking.o differs
gcc/graphite-clast-to-gimple.o differs
gcc/graphite-dependences.o differs
gcc/graphite-interchange.o differs
gcc/graphite-poly.o differs
gcc/graphite-ppl.o differs
gcc/graphite-scop-detection.o differs
gcc/graphite-sese-to-poly.o differs
gcc/loop-doloop.o differs
gcc/version.o differs
gcc/vmsdbgout.o differs
gcc/xcoffout.o differs
gcc/host-default.o differs
gcc/gcc-options.o differs
gcc/collect2-aix.o differs
intl/osdep.o differs
libiberty/safe-ctype.o differs
make[2]: *** [compare] Error 1
make[2]: Leaving directory `/home/htl10/tmp-build/ob-dir'
make[1]: *** [stage3-bubble] Error 2
make[1]: Leaving directory `/home/htl10/tmp-build/ob-dir'
make: *** [bootstrap4-lean] Error 2
bash-2.05a# 
Comment 5 Hin-Tak Leung 2009-09-25 04:40:02 UTC
latest run was with svn-r152154 . also filed new bug 41465 , I just noticed I wrote 'bootstrap-lean' in comment 2 instead of 'bootstrap4-lean' - it is probably not important in light of the new bug and more extensive failures.
Comment 6 Hin-Tak Leung 2010-07-14 14:25:22 UTC
4.3.5 also bootstrap4-lean alright (hit bug 40947 later with libjava).
Comment 7 Hin-Tak Leung 2010-07-14 14:44:41 UTC
4.4.4 (built with 4.3.3) fails at stage 3 and 4 comparison.

Comparing stages 3 and 4
Bootstrap comparison failure!
./crtfastmath.o differs
make[2]: *** [compare3] Error 1
  objdump -Dxzs stage3-gcc/crtfastmath.o > stage3-dump
  objdump -Dxzs stage4-gcc/crtfastmath.o > stage4-dump
# diff -u  stage3-dump stage4-dump
--- stage3-dump	2010-07-14 15:30:13.000000000 +0100
+++ stage4-dump	2010-07-14 15:30:27.000000000 +0100
@@ -1,6 +1,6 @@
 
-stage3-gcc/crtfastmath.o:     file format ecoff-littlealpha
-stage3-gcc/crtfastmath.o
+stage4-gcc/crtfastmath.o:     file format ecoff-littlealpha
+stage4-gcc/crtfastmath.o
 architecture: alpha, flags 0x00000035:
 HAS_RELOC, HAS_LINENO, HAS_SYMS, HAS_LOCALS
 start address 0x00000000
@@ -70,7 +70,7 @@
  0010 00301f22 10807da7 00405b6b 0100ba27  .0."..}..@[k...'
  0020 2480bd23 00005ea7 1000de23 0180fa6b  $..#..^....#...k
 Contents of section .xdata:
- 0030 31000000 02000204 00000000 00000000  1...............
+ 0030 01000000 02000204 00000000 00000000  ................
 Contents of section .pdata:
  0040 00000000 ecffffff                    ........        
 Contents of section .lita:
@@ -100,7 +100,7 @@
 Disassembly of section .xdata:
 
 00000030 <.xdata>:
-  30:	31 00 00 00 	call_pal	0x31
+  30:	01 00 00 00 	call_pal	0x1
   34:	02 00 02 04 	.long 0x4020002
   38:	00 00 00 00 	halt
   3c:	00 00 00 00 	halt
Comment 8 Hin-Tak Leung 2010-12-15 05:17:11 UTC
Just try with 4.4.5, still fails at the same place:

make[2]: Entering directory `/home/htl10/tmp-build/gcc-445-obj'
make[3]: Entering directory `/home/htl10/tmp-build/gcc-445-obj'
rm -f stage_current
make[3]: Leaving directory `/home/htl10/tmp-build/gcc-445-obj'
Comparing stages 3 and 4
Bootstrap comparison failure!
./crtfastmath.o differs
make[2]: *** [compare3] Error 1
make[2]: Leaving directory `/home/htl10/tmp-build/gcc-445-obj'
make[1]: *** [stage4-bubble] Error 2
make[1]: Leaving directory `/home/htl10/tmp-build/gcc-445-obj'
make: *** [bootstrap4-lean] Error 2
bash-2.05a#  
bash-2.05a# objdump -Dxzs stage3-gcc/crtfastmath.o > stage3-dump
bash-2.05a# objdump -Dxzs stage4-gcc/crtfastmath.o > stage4-dump
bash-2.05a# diff -u  stage3-dump stage4-dump
--- stage3-dump	2010-12-15 05:03:03.000000000 +0000
+++ stage4-dump	2010-12-15 05:03:18.000000000 +0000
@@ -1,6 +1,6 @@
 
-stage3-gcc/crtfastmath.o:     file format ecoff-littlealpha
-stage3-gcc/crtfastmath.o
+stage4-gcc/crtfastmath.o:     file format ecoff-littlealpha
+stage4-gcc/crtfastmath.o
 architecture: alpha, flags 0x00000035:
 HAS_RELOC, HAS_LINENO, HAS_SYMS, HAS_LOCALS
 start address 0x00000000
@@ -70,7 +70,7 @@
  0010 00301f22 10807da7 00405b6b 0100ba27  .0."..}..@[k...'
  0020 2480bd23 00005ea7 1000de23 0180fa6b  $..#..^....#...k
 Contents of section .xdata:
- 0030 31000000 02000204 00000000 00000000  1...............
+ 0030 01000000 02000204 00000000 00000000  ................
 Contents of section .pdata:
  0040 00000000 ecffffff                    ........        
 Contents of section .lita:
@@ -100,7 +100,7 @@
 Disassembly of section .xdata:
 
 00000030 <.xdata>:
-  30:	31 00 00 00 	call_pal	0x31
+  30:	01 00 00 00 	call_pal	0x1
   34:	02 00 02 04 	.long 0x4020002
   38:	00 00 00 00 	halt
   3c:	00 00 00 00 	halt
bash-2.05a#
Comment 9 Hin-Tak Leung 2011-05-01 22:27:42 UTC
4.4.6 failed at same place.

make[2]: Entering directory `/home/htl10/tmp-build/gcc-446-obj-2'
make[3]: Entering directory `/home/htl10/tmp-build/gcc-446-obj-2'
rm -f stage_current
make[3]: Leaving directory `/home/htl10/tmp-build/gcc-446-obj-2'
Comparing stages 3 and 4
Bootstrap comparison failure!
./crtfastmath.o differs
make[2]: *** [compare3] Error 1
make[2]: Leaving directory `/home/htl10/tmp-build/gcc-446-obj-2'
make[1]: *** [stage4-bubble] Error 2
make[1]: Leaving directory `/home/htl10/tmp-build/gcc-446-obj-2'
make: *** [bootstrap4-lean] Error 2
bash-2.05a# objdump -Dxzs stage3-gcc/crtfastmath.o > stage3-dump
bash-2.05a# objdump -Dxzs stage4-gcc/crtfastmath.o > stage4-dump
bash-2.05a# diff -u  stage3-dump stage4-dump
--- stage3-dump	2011-05-01 23:14:28.000000000 +0100
+++ stage4-dump	2011-05-01 23:14:41.000000000 +0100
@@ -1,6 +1,6 @@
 
-stage3-gcc/crtfastmath.o:     file format ecoff-littlealpha
-stage3-gcc/crtfastmath.o
+stage4-gcc/crtfastmath.o:     file format ecoff-littlealpha
+stage4-gcc/crtfastmath.o
 architecture: alpha, flags 0x00000035:
 HAS_RELOC, HAS_LINENO, HAS_SYMS, HAS_LOCALS
 start address 0x00000000
@@ -70,7 +70,7 @@
  0010 00301f22 10807da7 00405b6b 0100ba27  .0."..}..@[k...'
  0020 2480bd23 00005ea7 1000de23 0180fa6b  $..#..^....#...k
 Contents of section .xdata:
- 0030 31000000 02000204 00000000 00000000  1...............
+ 0030 01000000 02000204 00000000 00000000  ................
 Contents of section .pdata:
  0040 00000000 ecffffff                    ........        
 Contents of section .lita:
@@ -100,7 +100,7 @@
 Disassembly of section .xdata:
 
 00000030 <.xdata>:
-  30:	31 00 00 00 	call_pal	0x31
+  30:	01 00 00 00 	call_pal	0x1
   34:	02 00 02 04 	.long 0x4020002
   38:	00 00 00 00 	halt
   3c:	00 00 00 00 	halt
bash-2.05a#
Comment 10 Hin-Tak Leung 2011-05-01 22:30:55 UTC
Could this be some kind of text<->num conversion bug? I can't help but thinking 0x31 is '1' in ascii character, which is 0x01 in value.
Comment 11 Hin-Tak Leung 2011-08-05 01:26:32 UTC
Tried 4.6.1:

CONFIG_SHELL=/usr/local/bin/bash /home/htl10/tmp-build/gcc-4.6.1/configure && CONFIG_SHELL=/usr/local/bin/bash /usr/local/bin/make bootstrap4-lean

and it worked.
Comment 12 Hin-Tak Leung 2011-08-05 05:43:18 UTC
4.6.1 worked. 4.5.x fails earlier with Bug 44959 .
Comment 13 Hin-Tak Leung 2012-09-10 16:07:49 UTC
re-testing due to doubts about http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44959#c30 - caveat STAGE2_CFLAGS, bootstrap4-lean goes beyond crtfastmath.o comparision for 4.7.1 , fails for 4.4.7, okay for 4.3.3 (fails later for libjava bug 40947) and okay for 4.6.1.
Comment 14 Hin-Tak Leung 2012-09-10 16:16:21 UTC
4.3.6 also okay.