public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls
@ 2010-10-22 14:37 ro at gcc dot gnu.org
2010-10-22 14:37 ` [Bug middle-end/46131] " ro at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-22 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
Summary: Some TLS execution tests fail on Tru64 UNIX with
emutls
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ro@gcc.gnu.org
CC: rth@gcc.gnu.org
Host: alpha-dec-osf5.1b
Target: alpha-dec-osf5.1b
Build: alpha-dec-osf5.1b
Created attachment 22121
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22121
preprocessed input
Some TLS execution tests fail on Tru64 UNIX V5.1B. The platform has no native
TLS support, so emutls is in use:
FAIL: g++.dg/tls/diag-1.C (internal compiler error)
FAIL: g++.dg/tls/diag-1.C (test for excess errors)
FAIL: g++.dg/tls/static-1.C execution test
FAIL: gcc.dg/tls/opt-11.c execution test
FAIL: gcc.dg/tls/opt-12.c execution test
FAIL: gcc.dg/tls/thr-init-2.c execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -O0 execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -O1 execution test
FAIL: gcc.dg/torture/tls/thr-init-2.c -Os execution test
FAIL: objc.dg/torture/tls/thr-init-2.m -O0 execution test
FAIL: objc.dg/torture/tls/thr-init-2.m -O1 execution test
FAIL: objc.dg/torture/tls/thr-init-2.m -Os execution test
FAIL: objc.dg/torture/tls/thr-init.m -O0 execution test
FAIL: objc.dg/torture/tls/thr-init.m -O1 execution test
FAIL: objc.dg/torture/tls/thr-init.m -Os execution test
As an example, I've looked at the gcc.dg/tls/thr-init-2.c case: it aborts.
With
the abort replaced by a printf, I find:
$ gcc -o thr-init-2.exe thr-init-2.c
$ ./thr-init-2.exe
a = 2 fstat = 1
The test fails at -O0 and -O1, but passes at -O3 and higher.
I'm attaching the preprocessed source and assembler output for investigation.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
@ 2010-10-22 14:37 ` ro at gcc dot gnu.org
2010-10-22 14:38 ` ro at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-22 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-22 14:37:37 UTC ---
Created attachment 22122
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22122
assembler output
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
2010-10-22 14:37 ` [Bug middle-end/46131] " ro at gcc dot gnu.org
@ 2010-10-22 14:38 ` ro at gcc dot gnu.org
2010-10-22 14:52 ` rth at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-22 14:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
--- Comment #2 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-22 14:38:17 UTC ---
Btw, this might be the root cause for PR target/45693.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
2010-10-22 14:37 ` [Bug middle-end/46131] " ro at gcc dot gnu.org
2010-10-22 14:38 ` ro at gcc dot gnu.org
@ 2010-10-22 14:52 ` rth at gcc dot gnu.org
2010-10-22 14:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rth at gcc dot gnu.org @ 2010-10-22 14:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
--- Comment #3 from Richard Henderson <rth at gcc dot gnu.org> 2010-10-22 14:51:59 UTC ---
I don't see anything wrong in the assembler code for
the test case. I think you'll need to debug the libgcc
routines to see what's going wrong in between there and
the system thread library.
Of course this test passes at -O3 because in that
case we inline the function and simplify everything
away entirely.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug middle-end/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
` (2 preceding siblings ...)
2010-10-22 14:52 ` rth at gcc dot gnu.org
@ 2010-10-22 14:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-10-28 14:26 ` [Bug target/46131] " ro at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2010-10-22 14:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2010-10-22 14:59:32 UTC ---
> --- Comment #3 from Richard Henderson <rth at gcc dot gnu.org> 2010-10-22 14:51:59 UTC ---
> I don't see anything wrong in the assembler code for
> the test case. I think you'll need to debug the libgcc
> routines to see what's going wrong in between there and
> the system thread library.
Ok, I'll have a look. This will have to wait for a couple of days since
I'll be away on a short vacation in a few minutes.
Rainer
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
` (3 preceding siblings ...)
2010-10-22 14:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2010-10-28 14:26 ` ro at gcc dot gnu.org
2010-10-28 14:43 ` ro at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-28 14:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|wrong-code |
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2010.10.28 14:26:38
Component|middle-end |target
AssignedTo|unassigned at gcc dot |ro at gcc dot gnu.org
|gnu.org |
Ever Confirmed|0 |1
--- Comment #5 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-28 14:26:38 UTC ---
On second (or third) thought, the problem became obvious: emutls relies on a
couple of libpthread functions. Since the OSF/1 linker doesn't support weak
definitions, libgcc contains dummy definitions for them. For the TLS tests
(and C++ EH, cf. PR target/46131) to work, the respective programs need to be
linked with -pthread so the real functions are used instead.
Manual testing indicated that this fixes the problem. I'll submit a proper
patch shortly.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
` (4 preceding siblings ...)
2010-10-28 14:26 ` [Bug target/46131] " ro at gcc dot gnu.org
@ 2010-10-28 14:43 ` ro at gcc dot gnu.org
2010-11-02 16:07 ` ro at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-10-28 14:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2010-10/msg02410.htm
| |l
--- Comment #6 from Rainer Orth <ro at gcc dot gnu.org> 2010-10-28 14:43:29 UTC ---
Proposed patch.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
` (5 preceding siblings ...)
2010-10-28 14:43 ` ro at gcc dot gnu.org
@ 2010-11-02 16:07 ` ro at gcc dot gnu.org
2010-11-02 16:12 ` ro at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-11-02 16:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
--- Comment #7 from Rainer Orth <ro at gcc dot gnu.org> 2010-11-02 16:07:11 UTC ---
Author: ro
Date: Tue Nov 2 16:07:04 2010
New Revision: 166198
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166198
Log:
PR target/46131
* lib/target-supports.exp (add_options_for_tls): Pass -pthread for
*-*-osf*.
Modified:
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/lib/target-supports.exp
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
` (6 preceding siblings ...)
2010-11-02 16:07 ` ro at gcc dot gnu.org
@ 2010-11-02 16:12 ` ro at gcc dot gnu.org
2010-11-02 16:23 ` ro at gcc dot gnu.org
2010-12-06 17:28 ` ro at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-11-02 16:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.6.0
--- Comment #8 from Rainer Orth <ro at gcc dot gnu.org> 2010-11-02 16:12:43 UTC ---
Fixed for 4.6.0.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
` (7 preceding siblings ...)
2010-11-02 16:12 ` ro at gcc dot gnu.org
@ 2010-11-02 16:23 ` ro at gcc dot gnu.org
2010-12-06 17:28 ` ro at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-11-02 16:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #9 from Rainer Orth <ro at gcc dot gnu.org> 2010-11-02 16:22:58 UTC ---
Mark as resolved.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug target/46131] Some TLS execution tests fail on Tru64 UNIX with emutls
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
` (8 preceding siblings ...)
2010-11-02 16:23 ` ro at gcc dot gnu.org
@ 2010-12-06 17:28 ` ro at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: ro at gcc dot gnu.org @ 2010-12-06 17:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46131
--- Comment #10 from Rainer Orth <ro at gcc dot gnu.org> 2010-12-06 17:28:43 UTC ---
Author: ro
Date: Mon Dec 6 17:28:38 2010
New Revision: 167507
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167507
Log:
gcc:
Backport from mainline:
2010-07-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* doc/sourcebuild.texi (Add Options): Document tls.
gcc/testsuite:
Backport from mainline:
2010-07-23 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* lib/target-supports.exp (add_options_for_tls): New proc.
* g++.dg/tls/static-1.C: Use dg-add-options tls.
* g++.dg/tls/static-1a.cc: Likewise.
* gcc.dg/tls/emutls-1.c: Likewise.
* gcc.dg/tls/opt-11.c: Likewise.
* gcc.dg/tls/opt-12.c: Likewise.
* gcc.dg/tls/pr24428-2.c: Likewise.
* gcc.dg/tls/pr24428.c: Likewise.
2010-11-02 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR target/46131
* lib/target-supports.exp (add_options_for_tls): Pass -pthread for
*-*-osf*.
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/doc/sourcebuild.texi
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
branches/gcc-4_5-branch/gcc/testsuite/g++.dg/tls/static-1.C
branches/gcc-4_5-branch/gcc/testsuite/g++.dg/tls/static-1a.cc
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tls/emutls-1.c
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tls/opt-11.c
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tls/opt-12.c
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tls/pr24428-2.c
branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tls/pr24428.c
branches/gcc-4_5-branch/gcc/testsuite/lib/target-supports.exp
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2010-12-06 17:28 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-22 14:37 [Bug middle-end/46131] New: Some TLS execution tests fail on Tru64 UNIX with emutls ro at gcc dot gnu.org
2010-10-22 14:37 ` [Bug middle-end/46131] " ro at gcc dot gnu.org
2010-10-22 14:38 ` ro at gcc dot gnu.org
2010-10-22 14:52 ` rth at gcc dot gnu.org
2010-10-22 14:59 ` ro at CeBiTec dot Uni-Bielefeld.DE
2010-10-28 14:26 ` [Bug target/46131] " ro at gcc dot gnu.org
2010-10-28 14:43 ` ro at gcc dot gnu.org
2010-11-02 16:07 ` ro at gcc dot gnu.org
2010-11-02 16:12 ` ro at gcc dot gnu.org
2010-11-02 16:23 ` ro at gcc dot gnu.org
2010-12-06 17:28 ` ro at gcc dot gnu.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).