This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch testsuite] add TLS checks to ObjC.
- From: IainS <developer at sandoe-acoustics dot co dot uk>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Janis Johnson <janis dot marie dot johnson at gmail dot com>, Mike Stump <mikestump at comcast dot net>
- Date: Mon, 5 Apr 2010 11:32:07 +0100
- Subject: [Patch testsuite] add TLS checks to ObjC.
Whilst looking at an emutls problem - I discovered that there are no
TLS tests in the Obj{C,C++} suite.
This is possibly because Darwin doesn't have TLS, and therefore its
interaction with ObjC isn't defined.
I've taken the view that, since ObjC is defined as a superset of C, it
should compile the same TLS code as the C testsuite..
... (and by implication ObjC++ should compile the g++ TLS tests).
To this, I added "tls-init-3.m" which includes both ObjC and TLS
syntax in the same file.
These have been regtested on {i686,powerpc}-apple-darwin9 and i686-pc-
linux.
===
I've also taken the liberty of adding a dg-torture sub-tree to objc.dg.
At least some of the TLS test should be run at differing optimizations..
... and dg-torture will allow us more finesse in controlling test
conditions as we move to OBJC1/2....
so this adds:
objc.dg/tls -- compile tests
objc.dg/torture/ dg-torture sub-tree
objc.dg/torture/tls/ a few tests to be checked at several
optimizations.
It also makes lib/objc.exp recognize dg-additional-sources so that we
can provide an "Object" implementation on Darwin >= 9 without
perturbing the test sources.
objc-obj-c++-shared/Object1.m is this.
------
* objc.dg/tls: New.
* objc.dg/tls/diag-3.m: New.
* objc.dg/tls/diag-4.m: New.
* objc.dg/tls/diag-5.m: New.
* objc.dg/tls/init-1.m: New.
* objc.dg/tls/init-2.m: New.
* objc.dg/tls/tls.exp: New.
* objc.dg/tls/diag-2.m: New.
* objc.dg/torture/tls/trivial.m: New.
* objc.dg/torture/tls/thr-init-2.m: New.
* objc.dg/torture/tls/thr-init-3.m: New.
* objc.dg/torture/tls/thr-init.m: New.
* objc.dg/torture/tls/diag-1.m: New.
* objc.dg/torture/tls/tls.exp: New.
* objc.dg/torture/trivial.m: New.
* objc.dg/torture/dg-torture.exp: New.
* objc-obj-c++-shared/Object1.m: New.
* objc.dg/dg.exp: Tidy source file selection.
* lib/objc.exp: Recognize dg-additional-sources.
Other than mentioned above, the tests are essentially copies of the
ones in g++.dg/tls etc.
Changelog and patch attached.
I will not post the ObjC++ version until PR23716 is cleared, because
that would cause fails at all optimizations > 0 on gnu-runtime (darwin
& linux).
Iain
======
Attachment:
157959-objc-tls-complete-diff.txt
Description: Text document
Attachment:
157959-testsuite-objc-tls-changelog.txt
Description: Text document