aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Sandoe <iain@sandoe.co.uk>2019-06-06 19:16:31 +0000
committerIain Sandoe <iains@gcc.gnu.org>2019-06-06 19:16:31 +0000
commit89ce70d636643fd839871787b301795600dd5364 (patch)
tree6ae8ebb6c35efed237e5589bce806b2bc3e64f0f
parent34a4a9c2b5d4feb349d19eb9453947bfbb8cc5f1 (diff)
downloadgcc-89ce70d636643fd839871787b301795600dd5364.zip
gcc-89ce70d636643fd839871787b301795600dd5364.tar.gz
gcc-89ce70d636643fd839871787b301795600dd5364.tar.bz2
Darwin, c++, testsuite - adjust alignas4.C for Darwin's asm syntax.
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). gcc/testsuite/ChangeLog: 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: r272018
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alignas4.C8
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index d2f25fc..b348a50 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-06-06 Iain Sandoe <iain@sandoe.co.uk>
+
+ * g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax
+ on Darwin.
+
2019-06-06 Martin Jambor <mjambor@suse.cz>
* gcc.dg/tree-ssa/alias-access-path-1.c: Remove -fno-tree-sra option.
diff --git a/gcc/testsuite/g++.dg/cpp0x/alignas4.C b/gcc/testsuite/g++.dg/cpp0x/alignas4.C
index b66fa65..1ef4870 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alignas4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alignas4.C
@@ -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