When running make check on a build of current gcc trunk built for the x86_64-apple-darwin10 target, I discovered that the gcc.misc-tests/linkage.c link test is failing due to a flaw in the linkage,exp script. The test fails as follows...
Running /sw/src/fink.build/gcc44-4.3.999-20081129/gcc-4.4-20081129/gcc/testsuite/gcc.misc-tests/linkage.exp ... Executing on host: /sw/src/fink.build/gcc44-4.3.999-20081129/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.3.999-20081129/darwin_objdir/gcc/ "-w" -c -m32 -o linkage-x.o /sw/src/fink.build/gcc44-4.3.999-20081129/gcc-4.4-20081129/gcc/testsuite/gcc.misc-tests/linkage-x.c (timeout = 300) cc -c /sw/src/fink.build/gcc44-4.3.999-20081129/gcc-4.4-20081129/gcc/testsuite/gcc.misc-tests/linkage-y.c >&/dev/null Executing on host: /sw/src/fink.build/gcc44-4.3.999-20081129/darwin_objdir/gcc/xgcc -B/sw/src/fink.build/gcc44-4.3.999-20081129/darwin_objdir/gcc/ linkage-y.o linkage-x.o -lm -m32 -o linkage.exe (timeout = 300) ld: warning: in linkage-y.o, file is not of required architecture Undefined symbols: "_main", referenced from: start in crt1.10.5.o ld: symbol(s) not found collect2: ld returned 1 exit status compiler exited with status 1 output is: ld: warning: in linkage-y.o, file is not of required architecture Undefined symbols: "_main", referenced from: start in crt1.10.5.o ld: symbol(s) not found collect2: ld returned 1 exit status FAIL: gcc.misc-tests/linkage.c link It is obvious that the -m32 is being omitted for the compilation of linkage-y.o resulting in this incorrect failure. -- Summary: gcc/testsuite/gcc.misc-tests/linkage-y.c compiles wrong architecture Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: howarth at nitro dot med dot uc dot edu GCC build triplet: x86_64-apple-darwin10 GCC host triplet: x86_64-apple-darwin10 GCC target triplet: x86_64-apple-darwin10 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38321