public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/39790]  New: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library
@ 2009-04-17  1:11 jingyu at google dot com
  2009-04-18 23:05 ` [Bug testsuite/39790] " hp at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jingyu at google dot com @ 2009-04-17  1:11 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug testsuite/39790] gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library
  2009-04-17  1:11 [Bug testsuite/39790] New: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library jingyu at google dot com
@ 2009-04-18 23:05 ` hp at gcc dot gnu dot org
  2009-04-18 23:08 ` hp at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hp at gcc dot gnu dot org @ 2009-04-18 23:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hp at gcc dot gnu dot org  2009-04-18 23:05 -------
Long description just barely missing that you can fix it by changing that
dg-line into:
/* { dg-require-effective-target tls_runtime } */
though strictly speaking it's not perfect; you'd want a predicate that checks
using a link-test, not a run-test.  But all in all, I don't think the
distinction is worthwhile.


-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug testsuite/39790] gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library
  2009-04-17  1:11 [Bug testsuite/39790] New: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library jingyu at google dot com
  2009-04-18 23:05 ` [Bug testsuite/39790] " hp at gcc dot gnu dot org
@ 2009-04-18 23:08 ` hp at gcc dot gnu dot org
  2009-04-28 20:39 ` jingyu at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hp at gcc dot gnu dot org @ 2009-04-18 23:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hp at gcc dot gnu dot org  2009-04-18 23:08 -------
(In reply to comment #1)
Bah, I missed the follow-up, as it wasn't in the audit trail.  Feel free to
ignore comment #1 and comment #2 (this ;)


-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug testsuite/39790] gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library
  2009-04-17  1:11 [Bug testsuite/39790] New: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library jingyu at google dot com
  2009-04-18 23:05 ` [Bug testsuite/39790] " hp at gcc dot gnu dot org
  2009-04-18 23:08 ` hp at gcc dot gnu dot org
@ 2009-04-28 20:39 ` jingyu at gcc dot gnu dot org
  2009-04-28 20:58 ` jingyu at gcc dot gnu dot org
  2009-04-28 20:58 ` jingyu at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jingyu at gcc dot gnu dot org @ 2009-04-28 20:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jingyu at gcc dot gnu dot org  2009-04-28 20:39 -------
Subject: Bug 39790

Author: jingyu
Date: Tue Apr 28 20:39:11 2009
New Revision: 146913

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146913
Log:
        PR testsuite/39790
        * lib/target-supports.exp (check_effective_target_tls): Remove
        comment of caching.
        (check_effective_target_tls_native): Likewise.
        (check_effective_target_tls_runtime): Likewise.
        * gcc.dg/tls/alias-1.c (dg-require-effective-target): Change target
        tls to tls_runtime.
        * gcc.dg/tls/opt-2.c: Add dg-require-effective-target tls_runtime.


Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tls/alias-1.c
    trunk/gcc/testsuite/gcc.dg/tls/opt-2.c
    trunk/gcc/testsuite/lib/target-supports.exp


-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug testsuite/39790] gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library
  2009-04-17  1:11 [Bug testsuite/39790] New: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library jingyu at google dot com
                   ` (2 preceding siblings ...)
  2009-04-28 20:39 ` jingyu at gcc dot gnu dot org
@ 2009-04-28 20:58 ` jingyu at gcc dot gnu dot org
  2009-04-28 20:58 ` jingyu at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jingyu at gcc dot gnu dot org @ 2009-04-28 20:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jingyu at gcc dot gnu dot org  2009-04-28 20:58 -------
Patch was committed to trunk and branch 4.4.


-- 

jingyu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Bug testsuite/39790] gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library
  2009-04-17  1:11 [Bug testsuite/39790] New: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library jingyu at google dot com
                   ` (3 preceding siblings ...)
  2009-04-28 20:58 ` jingyu at gcc dot gnu dot org
@ 2009-04-28 20:58 ` jingyu at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jingyu at gcc dot gnu dot org @ 2009-04-28 20:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jingyu at gcc dot gnu dot org  2009-04-28 20:57 -------
Subject: Bug 39790

Author: jingyu
Date: Tue Apr 28 20:57:42 2009
New Revision: 146914

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=146914
Log:
        Backport from mainline.
        PR testsuite/39790
        * lib/target-supports.exp (check_effective_target_tls): Remove
        comment of caching.
        (check_effective_target_tls_native): Likewise.
        (check_effective_target_tls_runtime): Likewise.
        * gcc.dg/tls/alias-1.c (dg-require-effective-target): Change target
        tls to tls_runtime.
        * gcc.dg/tls/opt-2.c: Add dg-require-effective-target tls_runtime.


Modified:
    branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/tls/alias-1.c
    branches/gcc-4_4-branch/gcc/testsuite/gcc.dg/tls/opt-2.c
    branches/gcc-4_4-branch/gcc/testsuite/lib/target-supports.exp


-- 


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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-04-28 20:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-17  1:11 [Bug testsuite/39790] New: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library jingyu at google dot com
2009-04-18 23:05 ` [Bug testsuite/39790] " hp at gcc dot gnu dot org
2009-04-18 23:08 ` hp at gcc dot gnu dot org
2009-04-28 20:39 ` jingyu at gcc dot gnu dot org
2009-04-28 20:58 ` jingyu at gcc dot gnu dot org
2009-04-28 20:58 ` jingyu at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).