This test was fine with revision 130991 but broken with mainline now. This is what I get now : [~]> gcc pr26943-2.c -lgomp [~]> ./a.out zsh: abort ./a.out Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../configure --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc/4.3.0 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include --datadir=/usr/share/gcc/i686-pc-linux-gnu/4.3.0 --mandir=/usr/share/gcc/i686-pc-linux-gnu/4.3.0/man --infodir=/usr/share/gcc/i686-pc-linux-gnu/4.3.0/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.3.0/include/g++-v3 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-libgcj --disable-libssp --disable-multilib --disable-nls --disable-werror --disable-mudflap --disable-libmudflap --enable-checking=release --enable-clocale=gnu --enable-__cxa_atexit --enable-languages=c,c++,fortran,objc --enable-libstdcxx-allocator=new --enable-shared --enable-ssp --enable-threads=posix --enable-version-specific-runtime-libs --without-included-gettext --without-system-libunwind --with-system-zlib --with-cpu=generic --with-pkgversion='Pardus Linux' --with-bugurl=http://bugs.pardus.org.tr Thread model: posix gcc version 4.3.0 20071217 [trunk revision 131010] (Pardus Linux)
This test relies on being compiled wit -fopenmp (as a bunch of other tests do). Why are you compiling it without it?
I was testing outside of the testsuite to see why it failed. I see this in log : PASS: libgomp.c/pr26943-2.c (test for excess errors) Setting LD_LIBRARY_PATH to .:/var/pisi/gcc-4.3_pre20071218-31/work/gcc-4.3-20071218/build-default-i686-pc-linux-gnu/i686-pc-linux-gnu/./libgomp/.libs:/var/pisi/gcc-4.3_pre20071218-31/work/gcc-4.3-20071218/build-default-i686-pc-linux-gnu/gcc:.:/var/pisi/gcc-4.3_pre20071218-31/work/gcc-4.3-20071218/build-default-i686-pc-linux-gnu/i686-pc-linux-gnu/./libgomp/.libs:/var/pisi/gcc-4.3_pre20071218-31/work/gcc-4.3-20071218/build-default-i686-pc-linux-gnu/gcc:/var/pisi/gcc-4.3_pre20071218-31/work/gcc-4.3-20071218/build-default-i686-pc-linux-gnu/i686-pc-linux-gnu/libstdc++-v3/.libs:/var/pisi/gcc-4.3_pre20071218-31/work/gcc-4.3-20071218/build-default-i686-pc-linux-gnu/i686-pc-linux-gnu/libgomp/.libs:/var/pisi/gcc-4.3_pre20071218-31/work/gcc-4.3-20071218/build-default-i686-pc-linux-gnu/./gcc:/var/pisi/gcc-4.3_pre20071218-31/work/gcc-4.3-20071218/build-default-i686-pc-linux-gnu/./prev-gcc FAIL: libgomp.c/pr26943-2.c execution test I can't seem to compile the testcase by hand with -fopenmp : [~]> gcc -fopenmp pr26943-2.c -lgomp /tmp/ccaOHasa.o: In function `main.omp_fn.0': pr26943-2.c:(.text+0x179): undefined reference to `__sync_fetch_and_add_4' pr26943-2.c:(.text+0x2c7): undefined reference to `__sync_fetch_and_add_4' collect2: ld returned 1 exit status
On i386 you need also -march=i486 or higher, i386 doesn't have instructions for atomic stuff.
[~]> gcc -fopenmp -march=i486 pr26943-2.c -lgomp [~]> ./a.out [~]> works fine like this, I don't know why it fails in the tests. Hmm wonder if --with-cpu=generic could affect this? This is a 4 CPU Xeon machine btw.
Re-tested with no problems now, but machine was under %300 load when this test failed. Interestingly rest of the regtests passed fine. Anyway this is invalid. Thanks for the attention.