diff mbox series

add powerpc_vsx_ok requirement to undef-bool tests

Message ID or5z2ex0um.fsf@lxoliva.fsfla.org
State New
Headers show
Series add powerpc_vsx_ok requirement to undef-bool tests | expand

Commit Message

Alexandre Oliva Feb. 26, 2021, 4:14 p.m. UTC
These tests use -mvsx in their dg-options list, so they are only
applicable if the -mvsx option is supported by the compiler.

Tested with target ppc64-vx7r2, configured to force altivec disabled,
and thus to reject vsx.  Ok to install?


From: Joel Brobecker <brobecker@adacore.com>
gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/undef-bool-2.c: Add
	dg-require-effective-target powerpc_vsx_ok directive.
	* g++.dg/ext/undef-bool-1.C: Add dg-require-effective-target
	powerpc_vsx_ok directive.
---
 gcc/testsuite/g++.dg/ext/undef-bool-1.C         |    1 +
 gcc/testsuite/gcc.target/powerpc/undef-bool-2.c |    1 +
 2 files changed, 2 insertions(+)

Comments

David Edelsohn Feb. 26, 2021, 5:32 p.m. UTC | #1
On Fri, Feb 26, 2021 at 11:14 AM Alexandre Oliva <oliva@adacore.com> wrote:
>
> These tests use -mvsx in their dg-options list, so they are only
> applicable if the -mvsx option is supported by the compiler.
>
> Tested with target ppc64-vx7r2, configured to force altivec disabled,
> and thus to reject vsx.  Ok to install?

This patch is okay.

Thanks, David

>
>
> From: Joel Brobecker <brobecker@adacore.com>
> gcc/testsuite/ChangeLog:
>
>         * gcc.target/powerpc/undef-bool-2.c: Add
>         dg-require-effective-target powerpc_vsx_ok directive.
>         * g++.dg/ext/undef-bool-1.C: Add dg-require-effective-target
>         powerpc_vsx_ok directive.
> ---
>  gcc/testsuite/g++.dg/ext/undef-bool-1.C         |    1 +
>  gcc/testsuite/gcc.target/powerpc/undef-bool-2.c |    1 +
>  2 files changed, 2 insertions(+)
>
> diff --git a/gcc/testsuite/g++.dg/ext/undef-bool-1.C b/gcc/testsuite/g++.dg/ext/undef-bool-1.C
> index 716e06c1ce413..9cc1cd8726098 100644
> --- a/gcc/testsuite/g++.dg/ext/undef-bool-1.C
> +++ b/gcc/testsuite/g++.dg/ext/undef-bool-1.C
> @@ -1,6 +1,7 @@
>  /* { dg-do compile { target { powerpc*-*-* } } } */
>  /* { dg-options "-O2 -DNO_WARN_X86_INTRINSICS -mvsx" } */
>  /* { dg-require-effective-target lp64 } */
> +/* { dg-require-effective-target powerpc_vsx_ok } */
>
>  /* Test to ensure that "bool" gets undef'd in xmmintrin.h when
>     we require strict ANSI.  */
> diff --git a/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c b/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c
> index d4944ab1ca6c7..7bc5d18484039 100644
> --- a/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c
> +++ b/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c
> @@ -1,6 +1,7 @@
>  /* { dg-do compile } */
>  /* { dg-options "-O2 -std=c11 -DNO_WARN_X86_INTRINSICS -mvsx" } */
>  /* { dg-require-effective-target lp64 } */
> +/* { dg-require-effective-target powerpc_vsx_ok } */
>
>  /* Test to ensure that "bool" gets undef'd in xmmintrin.h when
>     we require strict ANSI.  Subsequent use of bool needs stdbool.h.
>
>
> --
> Alexandre Oliva, happy hacker  https://FSFLA.org/blogs/lxo/
>    Free Software Activist         GNU Toolchain Engineer
>         Vim, Vi, Voltei pro Emacs -- GNUlius Caesar
Alexandre Oliva March 9, 2021, 3:18 a.m. UTC | #2
On Feb 26, 2021, David Edelsohn <dje.gcc@gmail.com> wrote:

> This patch is okay.

Thanks, I've finally checked it in.

>> From: Joel Brobecker <brobecker@adacore.com>
>> gcc/testsuite/ChangeLog:
>> 
>> * gcc.target/powerpc/undef-bool-2.c: Add
>> dg-require-effective-target powerpc_vsx_ok directive.
>> * g++.dg/ext/undef-bool-1.C: Add dg-require-effective-target
>> powerpc_vsx_ok directive.
diff mbox series

Patch

diff --git a/gcc/testsuite/g++.dg/ext/undef-bool-1.C b/gcc/testsuite/g++.dg/ext/undef-bool-1.C
index 716e06c1ce413..9cc1cd8726098 100644
--- a/gcc/testsuite/g++.dg/ext/undef-bool-1.C
+++ b/gcc/testsuite/g++.dg/ext/undef-bool-1.C
@@ -1,6 +1,7 @@ 
 /* { dg-do compile { target { powerpc*-*-* } } } */
 /* { dg-options "-O2 -DNO_WARN_X86_INTRINSICS -mvsx" } */
 /* { dg-require-effective-target lp64 } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
 
 /* Test to ensure that "bool" gets undef'd in xmmintrin.h when
    we require strict ANSI.  */
diff --git a/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c b/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c
index d4944ab1ca6c7..7bc5d18484039 100644
--- a/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c
@@ -1,6 +1,7 @@ 
 /* { dg-do compile } */
 /* { dg-options "-O2 -std=c11 -DNO_WARN_X86_INTRINSICS -mvsx" } */
 /* { dg-require-effective-target lp64 } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
 
 /* Test to ensure that "bool" gets undef'd in xmmintrin.h when
    we require strict ANSI.  Subsequent use of bool needs stdbool.h.