Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Test for "invalid" exceptions from __float128 comparisons. */ /* { dg-do run } */ /* { dg-options "" } */ /* { dg-require-effective-target __float128 } */ /* { dg-require-effective-target base_quadfloat_support } */ /* { dg-require-effective-target fenv_exceptions } */ /* { dg-add-options __float128 } */ #include <fenv.h> #include <stdlib.h> int main (void) { volatile __float128 a = __builtin_nanq (""), b = 0.0q; volatile int r = a < b; if (!fetestexcept (FE_INVALID)) abort (); if (r) abort (); exit (0); }