Add _FloatN, _FloatNx tests for __builtin_fpclassify.
[official-gcc.git] / gcc / testsuite / gcc.dg / torture / pr71522.c
blob953c4c71100f72d7c302bc845eda69e37f93e715
1 /* { dg-do run } */
3 #if __SIZEOF_LONG_DOUBLE__ == 16
4 #define STR "AAAAAAAAAAAAAAA"
5 #elif __SIZEOF_LONG_DOUBLE__ == 12
6 #define STR "AAAAAAAAAAA"
7 #elif __SIZEOF_LONG_DOUBLE__ == 8
8 #define STR "AAAAAAA"
9 #elif __SIZEOF_LONG_DOUBLE__ == 4
10 #define STR "AAA"
11 #else
12 #define STR "A"
13 #endif
15 int main()
17 long double d;
18 char s[sizeof d];
20 __builtin_memcpy(&d, STR, sizeof d);
21 __builtin_memcpy(&s, &d, sizeof s);
23 if (__builtin_strncmp (s, STR, sizeof s) != 0)
24 __builtin_abort ();
26 return 0;