From: Iain Sandoe Date: Mon, 20 May 2019 12:28:18 +0000 (+0000) Subject: darwin, testsuite - fix PR58321 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab904df5f9063cf3075ae20b97cf4df9e6612cc1;p=gcc.git darwin, testsuite - fix PR58321 Darwin doesn't emit a .file directive by default and one of the scan-asm hits for ELF targets comes from this directive. Adjust for Darwin and explain. 2019-05-20 Iain Sandoe PR testsuite/58321 * gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and add a comment as to the reason for the difference. * gcc.target/i386/memset-strategy-1.c: Likewise. From-SVN: r271415 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 36db11bb183..3efb1f24136 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2019-05-20 Iain Sandoe + + PR testsuite/58321 + * gcc.target/i386/memcpy-strategy-3.c: Adjust count for Darwin and + add a comment as to the reason for the difference. + * gcc.target/i386/memset-strategy-1.c: Likewise. + 2019-05-20 Jonathan Wakely PR c++/90532 Ensure __is_constructible(T[]) is false diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c index ddd1ef7c0b2..11687e8c9b5 100644 --- a/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c +++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c @@ -1,6 +1,9 @@ /* { dg-do compile } */ /* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:2000:align,libcall:-1:align" } */ -/* { dg-final { scan-assembler-times "memcpy" 2 } } */ +/* On ELF platforms, one hit comes from the .file directive. */ +/* { dg-final { scan-assembler-times "memcpy" 2 { target { ! *-*-darwin* } } } } */ +/* But not on Darwin, which doesn't have a .file directive by default. */ +/* { dg-final { scan-assembler-times "_memcpy" 1 { target *-*-darwin* } } } */ char a[2048]; char b[2048]; diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-1.c b/gcc/testsuite/gcc.target/i386/memset-strategy-1.c index d1b97c5df10..b4b8e2cfa6f 100644 --- a/gcc/testsuite/gcc.target/i386/memset-strategy-1.c +++ b/gcc/testsuite/gcc.target/i386/memset-strategy-1.c @@ -1,10 +1,12 @@ /* { dg-do compile } */ /* { dg-options "-O2 -march=atom -mmemset-strategy=libcall:-1:align" } */ -/* { dg-final { scan-assembler-times "memset" 2 } } */ +/* On ELF platforms, one hit comes from the .file directive. */ +/* { dg-final { scan-assembler-times "memset" 2 { target { ! *-*-darwin* } } } } */ +/* But not on Darwin, which doesn't have a .file directive by default. */ +/* { dg-final { scan-assembler-times "_memset" 1 { target *-*-darwin* } } } */ char a[2048]; void t (void) { __builtin_memset (a, 1, 2048); } -