Bug 79274 - FAIL: g++.dg/tls/pr77285-2.C -std=c++11 scan-assembler _ZTH4var1B3tag
Summary: FAIL: g++.dg/tls/pr77285-2.C -std=c++11 scan-assembler _ZTH4var1B3tag
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 7.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: testsuite-fail, xfail
Depends on:
Blocks:
 
Reported: 2017-01-29 21:19 UTC by John David Anglin
Modified: 2021-12-20 08:23 UTC (History)
3 users (show)

See Also:
Host: hppa2.0w-hp-hpux11.11,*-*-darwin*
Target: hppa2.0w-hp-hpux11.11,*-*-darwin*
Build: hppa2.0w-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed: 2019-10-30 00:00:00


Attachments
.s file (556 bytes, text/plain)
2017-01-29 21:19 UTC, John David Anglin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2017-01-29 21:19:45 UTC
Created attachment 40618 [details]
.s file

spawn /test/gnu/gcc/objdir/gcc/testsuite/g++/../../xg++ -B/test/gnu/gcc/objdir/gcc/testsuite/g++/../../ /test/gnu/gcc/gcc/gcc/testsuite/g++.dg/tls/pr77285-2.C -fno-diagnostics-show-caret -fdiagnostics-color=never -nostdinc++ -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include/hppa2.0w-hp-hpux11.11 -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/libstdc++-v3/include -I/test/gnu/gcc/gcc/libstdc++-v3/libsupc++ -I/test/gnu/gcc/gcc/libstdc++-v3/include/backward -I/test/gnu/gcc/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++11 -pedantic-errors -Wno-long-long -S -o pr77285-2.sPASS: g++.dg/tls/pr77285-2.C  -std=c++11 (test for excess errors)PASS: g++.dg/tls/pr77285-2.C  -std=c++11  scan-assembler _Z4var1B3tagPASS: g++.dg/tls/pr77285-2.C  -std=c++11  scan-assembler _Z4var2B3tagFAIL: g++.dg/tls/pr77285-2.C  -std=c++11  scan-assembler _ZTH4var1B3tag
PASS: g++.dg/tls/pr77285-2.C  -std=c++11  scan-assembler _ZTW4var1B3tag

Think this is a result of emutls.
Comment 1 Iain Sandoe 2019-10-30 14:12:36 UTC
the test was changed to require tls_native (from gcc 9+).

I see the same issue on Darwin on gcc8/7

when you say "Think this is a result of emutls." - you mean that hppa is also (Darwin does) using emuTLS?

AFAIR, [with emuTLS] there's no proper init of global TLS vars when they are in a different TU from the one referencing - which is what the _ZTH4/_ZTW4var1B3tag symbols are about.

(It's on my [very long] TODO to see if there's a way of doing the same thing for emuTLS - that is done for the native case).

I'd say we just need to back-port the require native_tls [or xfail] to the earlier branches (if that's permitted).
Comment 2 dave.anglin 2019-10-30 14:49:53 UTC
On 2019-10-30 10:12 a.m., iains at gcc dot gnu.org wrote:
> when you say "Think this is a result of emutls." - you mean that hppa is also
> (Darwin does) using emuTLS?
hppa uses emutls on hpux.
Comment 3 Iain Sandoe 2019-11-03 08:00:04 UTC
Author: iains
Date: Sun Nov  3 07:59:32 2019
New Revision: 277750

URL: https://gcc.gnu.org/viewcvs?rev=277750&root=gcc&view=rev
Log:
[Darwin, testsuite] Fix PR 79274

The solution for initialising global TLS variables does not apply
to platforms using emulated TLS.  XFAIL the test for this on Darwin.

2019-11-03  Iain Sandoe  <iain@sandoe.co.uk>

	PR c++/79274
	* g++.dg/tls/pr77285-2.C: XFAIL test for Darwin.


Modified:
    branches/gcc-8-branch/gcc/testsuite/ChangeLog
    branches/gcc-8-branch/gcc/testsuite/g++.dg/tls/pr77285-2.C
Comment 4 Iain Sandoe 2019-11-03 08:24:04 UTC
Author: iains
Date: Sun Nov  3 08:23:33 2019
New Revision: 277751

URL: https://gcc.gnu.org/viewcvs?rev=277751&root=gcc&view=rev
Log:
[Darwin, testsuite] Fix PR 79274

The solution for initialising global TLS variables does not apply
to platforms using emulated TLS.  XFAIL the test for this on Darwin.

2019-11-03  Iain Sandoe  <iain@sandoe.co.uk>

	PR c++/79274
	* g++.dg/tls/pr77285-2.C: XFAIL test for Darwin.


Modified:
    branches/gcc-7-branch/gcc/testsuite/ChangeLog
    branches/gcc-7-branch/gcc/testsuite/g++.dg/tls/pr77285-2.C
Comment 5 Eric Gallager 2019-11-18 05:20:06 UTC
(In reply to Iain Sandoe from comment #1)
> the test was changed to require tls_native (from gcc 9+).
> 
> I see the same issue on Darwin on gcc8/7
> 
> when you say "Think this is a result of emutls." - you mean that hppa is
> also (Darwin does) using emuTLS?
> 
> AFAIR, [with emuTLS] there's no proper init of global TLS vars when they are
> in a different TU from the one referencing - which is what the
> _ZTH4/_ZTW4var1B3tag symbols are about.
> 
> (It's on my [very long] TODO to see if there's a way of doing the same thing
> for emuTLS - that is done for the native case).
> 
> I'd say we just need to back-port the require native_tls [or xfail] to the
> earlier branches (if that's permitted).

The bug for native TLS support on Darwin is bug 52268, for reference.
Comment 6 Eric Gallager 2021-12-20 08:23:06 UTC
Oops I just realized I made a typo the last time I was editing the "See Also" field; hopefully this fixes it...