From: Iain Sandoe Date: Thu, 6 Jun 2019 19:16:31 +0000 (+0000) Subject: Darwin, c++, testsuite - adjust alignas4.C for Darwin's asm syntax. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89ce70d636643fd839871787b301795600dd5364;p=gcc.git 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 * g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax on Darwin. From-SVN: r272018 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index d2f25fc4df3..b348a5097d2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-06-06 Iain Sandoe + + * g++.dg/cpp0x/alignas4.C: Amend test to check for zerofill syntax + on Darwin. + 2019-06-06 Martin Jambor * 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 b66fa651bc2..1ef48707586 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 struct A