aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/pr99708.c
blob: 5d2f435a746bdc4d0f2e4717da3c4ae500c5e06c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* { dg-do run } */
/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } } */
/* { dg-require-effective-target ppc_float128_sw } */
/* { dg-options "-O2 -mvsx -mfloat128" } */

/*
 * PR target/99708
 *
 * Verify that __SIZEOF_FLOAT128__ and __SIZEOF_IBM128__ are properly defined.
 */

#include <stdlib.h>

int main (void)
{
  if (__SIZEOF_FLOAT128__ != sizeof (__float128)
  /* FIXME: Once type __ibm128 gets supported with long-double-64,
     we shouldn't need this conditional #ifdef and xfail.  */
#ifdef __SIZEOF_IBM128__
      || __SIZEOF_IBM128__ != sizeof (__ibm128)
#else
      || 1
#endif
     )
    abort ();

  return 0;
}

/* { dg-xfail-run-if "unsupported type __ibm128 with long-double-64" { longdouble64 } } */