I build the toolchain with newlib. gcc.dg/tls/alias-1.c and gcc.dg/tls/opt-2.c
fail because symbol '__aeabi_read_tp' is missing in newlib C.

These two tests should be marked unsupported instead of just letting them fail.

The test alias-1.c does linking, and requires test target tls
/* { dg-require-effective-target tls } */
However, the rule of tls is just checking whether a piece of code can be
compiled quietly. The rule does not check whether the code can be linked
quietly.

Similarly, the test opt-2.c does linking, and requires test target tls_native.
However, the rule of tls_native only checks compilation, not linking.

The failures of the two tests are also observed on test report on target
arm-unknown-elf: http://gcc.gnu.org/ml/gcc-testresults/2009-04/msg01691.html

Below is the failure message we get:
Executing on host: /usr/local/google/tmp/gcc4.4_dejagnu/obj/gcc-4.4/gcc/xgcc
-B/usr/local/google/tmp/gcc4.4_dejagnu/obj/gcc-4.4/gcc/
/usr/local/google/nightly/sources/arm_toolchain/gcc-4.4/gcc/testsuite/gcc.dg/tls/alias-1.c
gcc_tg.o    -ansi -pedantic-errors -DSTACK_SIZE=16384   
-L/usr/local/google/tmp/gcc4.4_dejagnu/obj/ld   -Wl,-wrap,exit -Wl,-wrap,_exit
-Wl,-wrap,main -Wl,-wrap,abort -lm   -o alias-1.exe    (timeout = 800)
/tmp/ccozOlBU.o: In function `main':
alias-1.c:(.text+0x10): undefined reference to `__aeabi_read_tp'
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/tmp/ccozOlBU.o: In function `main':
alias-1.c:(.text+0x10): undefined reference to `__aeabi_read_tp'
collect2: ld returned 1 exit status

FAIL: gcc.dg/tls/alias-1.c (test for excess errors)
Excess errors:
alias-1.c:(.text+0x10): undefined reference to `__aeabi_read_tp'

Executing on host: /usr/local/google/tmp/gcc4.4_dejagnu/obj/gcc-4.4/gcc/xgcc
-B/usr/local/google/tmp/gcc4.4_dejagnu/obj/gcc-4.4/gcc/
/usr/local/google/nightly/sources/arm_toolchain/gcc-4.4/gcc/testsuite/gcc.dg/tls/opt-2.c
gcc_tg.o   -O2 -ftls-model=initial-exec -DSTACK_SIZE=16384   
-L/usr/local/google/tmp/gcc4.4_dejagnu/obj/ld   -Wl,-wrap,exit -Wl,-wrap,_exit
-Wl,-wrap,main -Wl,-wrap,abort -lm -o opt-2.exe    (timeout = 800)
/tmp/ccKCVaB4.o: In function `foo':
opt-2.c:(.text+0x68): undefined reference to `__aeabi_read_tp'
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/tmp/ccKCVaB4.o: In function `foo':
opt-2.c:(.text+0x68): undefined reference to `__aeabi_read_tp'
collect2: ld returned 1 exit status

FAIL: gcc.dg/tls/opt-2.c (test for excess errors)
Excess errors:
opt-2.c:(.text+0x68): undefined reference to `__aeabi_read_tp'


Target: arm-eabi
Configured with:
/usr/local/google/nightly/sources/arm_toolchain/gcc-4.4/configure
--prefix=/usr/local/google/tmp/gcc4.4_dejagnu/install --target=arm-eabi
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--with-gmp=/usr/local/google/tmp/gcc4.4_dejagnu/install
--with-mpfr=/usr/local/google/tmp/gcc4.4_dejagnu/install --enable-multilib
--with-newlib --with-gnu-as --with-gnu-ld --enable-languages=c,c++
Thread model: single
gcc version 4.4.0 20090416 (prerelease) (GCC)


-- 
           Summary: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not
                    supported by C library
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jingyu at google dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: arm-unknown-eabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39790

Reply via email to