8sa1-gcc/gcc/testsuite/g++.dg/gomp/tls-5.C
David Edelsohn 5f7c2d20b5 aix: revert TLS common change
GCC uses TLS common for both public common / BSS and local common / BSS.
This patch reverts to use .comm directive to allocate TLS
common / BSS.  This also changes the priority of section selection
to use BSS before data section.

gcc/ChangeLog:

	* config/rs6000/rs6000.c (rs6000_xcoff_select_section): Select
	TLS BSS before TLS data.
	* config/rs6000/xcoff.h (ASM_OUTPUT_TLS_COMMON): Use .comm.

gcc/testsuite/ChangeLog:

	* g++.dg/gomp/tls-5.C: Expect tbss failure on AIX.
2021-04-08 17:40:23 -04:00

15 lines
493 B
C

// The reference temp should be TLS, not normal data.
// { dg-require-effective-target c++11 }
// { dg-final { scan-assembler-not "\\.data" { target tls_native xfail powerpc-*-aix* } } }
// { dg-final { scan-assembler-symbol-section {^_?ir$} {^\.tbss} { target tls_native xfail powerpc-*-aix* } } }
// { dg-final { scan-assembler-symbol-section {^_?_ZGR2ir_$} {^\.tdata|\[TL\]} { target tls_native } } }
extern int&& ir;
#pragma omp threadprivate (ir)
int&& ir = 42;
void f()
{
ir = 24;
}