Patch testsuite/39790: gcc.dg/tls/alias-1.c,opt-2.c fail if TLS is not supported by C library

Jing Yu jingyu@google.com
Fri Apr 17 01:43:00 GMT 2009


This patch is to fix testsuite issue 39790.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39790

Basically, gcc.dg/tls/alias-1.c and gcc.dg/tls/opt-2.c fail because
symbol '__aeabi_read_tp' is missing in newlib C. I think we should
mark these two test cases unsupported instead of letting them fail.

gcc.dg/tls/alias-1.c does linking, and requires test 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 gcc.dg/tls/opt-2.c does linking, and requires test
target "tls_native".
However, the rule of "tls_native" only checks compilation, not linking.

My patch is adding a new effective target called "tls_link". The rule
"tls_link" tests whether a piece of code with __thread can be linked
quietly. For the tls tests that do linking, I add "tls_link" to their
target.

        PR testsuite/39790
        * lib/target-supports.exp: Add a new effective target tls_link.
        * gcc.dg/tls/alias-1.c (dg-require-effective-target): Change tls to
        tls_link.
        * gcc.dg/tls/opt-2.c: Add dg-require-effective-target tls_link.

I have tested the patch on arm target, these two test cases become
unsupported. Other test result does not change.

Welcome if you have other way of fixing the failures.

Thanks,
Jing
-------------- next part --------------
A non-text attachment was scrubbed...
Name: b39790.patch
Type: text/x-patch
Size: 1878 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20090417/12c8e22b/attachment.bin>


More information about the Gcc-patches mailing list