aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/undef-bool-2.c
blob: 9588176936a77ebaeb04571bbda0a2393306a31a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* { dg-do compile } */
/* { dg-options "-O2 -std=c11 -DNO_WARN_X86_INTRINSICS -mvsx" } */
/* { dg-require-effective-target lp64 } */
/* { dg-require-effective-target powerpc_vsx } */

/* Test to ensure that "bool" gets undef'd in xmmintrin.h when
   we require strict ANSI.  Subsequent use of bool needs stdbool.h.
   altivec.h should eventually avoid defining bool, vector, and
   pixel, following distro testing.  */

#include <xmmintrin.h>

bool foo (int x) /* { dg-error "unknown type name 'bool'" } */
{
  return x == 2;
}