2018-08-17 Sandra Loosemore <sandra@codesourcery.com>
[official-gcc.git] / gcc / testsuite / gcc.dg / c11-true_min-1.c
blob1fbf51485b8f5298e592085fcfc7d375fcc7eafb
1 /* { dg-do run } */
2 /* { dg-options "-std=c11" } */
3 /* { dg-xfail-run-if "PR58757 -mieee is required to compare denormals" { alpha*-*-* } } */
4 /* { dg-skip-if "No subnormal support" { csky-*-* } { "-mhard-float" } } */
6 /* Test that the smallest positive value is not 0. This needs to be true
7 even when denormals are not supported, so we do not pass any flag
8 like -mieee. */
10 #include <float.h>
12 int main(){
13 volatile float f = FLT_TRUE_MIN;
14 volatile double d = DBL_TRUE_MIN;
15 volatile long double l = LDBL_TRUE_MIN;
16 if (f == 0 || d == 0 || l == 0)
17 __builtin_abort ();
18 return 0;