]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Darwin, testsuite, backport fix for cpp0x/alignas4.C
authorIain Sandoe <iain@sandoe.co.uk>
Sun, 4 Aug 2019 11:57:41 +0000 (11:57 +0000)
committerIain Sandoe <iains@gcc.gnu.org>
Sun, 4 Aug 2019 11:57:41 +0000 (11:57 +0000)
Darwin produces aligned zerofill directives for the objects represented.
We can scan for these using lp64 and ilp32 to catch operation on both
X86 and PowerPC ports (the test is for the alignment which is the trailing
value in the zerofill directive, as a power of two).

2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>

Backport from mainline.
2019-06-06  Iain Sandoe  <iain@sandoe.co.uk>

* g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax
on Darwin.

From-SVN: r274074

gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/cpp0x/alignas4.C

index 51050299ad3b00b47f488b9039f6c92bba96a1c6..14dae42ce37fcd4fbb199fc23f7e781873e64aed 100644 (file)
@@ -1,3 +1,11 @@
+2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>
+
+       Backport from mainline.
+       2019-06-06  Iain Sandoe  <iain@sandoe.co.uk>
+
+       * g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax
+       on Darwin.
+
 2019-08-04  Iain Sandoe  <iain@sandoe.co.uk>
 
        Backport from mainline.
index b66fa651bc2ce915cb7af97fdc0f6855ef207aea..1ef48707586844c90d337581722a37a58c29ba01 100644 (file)
@@ -1,7 +1,13 @@
 // PR c++/59012
 // { dg-do compile { target c++11 } }
 // { dg-final { scan-assembler "align 8" { target { { i?86-*-* x86_64-*-* } && { { ! ia32 } && { ! *-*-darwin* } } } } } }
-// { dg-final { scan-assembler "align 4" { target ia32 } } }
+// { dg-final { scan-assembler "align 4" { target { ia32 && { ! *-*-darwin* } } } } }
+
+// Darwin produces aligned .zerofill directives for these.
+// { dg-final { scan-assembler {zerofill[^\n\r]+_a,4,2} { target { ilp32 && *-*-darwin* } } } }
+// { dg-final { scan-assembler {zerofill[^\n\r]+_a,8,3} { target { lp64 && *-*-darwin* } } } }
+// { dg-final { scan-assembler {zerofill[^\n\r]+_a2,4,2} { target { ilp32 && *-*-darwin* } } } }
+// { dg-final { scan-assembler {zerofill[^\n\r]+_a2,8,3} { target { lp64 && *-*-darwin* } } } }
 
 template <class... T>
 struct A