Rebase.
[official-gcc.git] / gcc / testsuite / gcc.dg / cproj-fails-with-broken-glibc.c
blobfc37faca225e84f824a95466e611166248285148
1 /* Copyright (C) 2010 Free Software Foundation.
3 Check the runtime behavior of the C library's cproj() function and
4 whether it follows the standard. Versions of GLIBC through 2.11.1
5 had an incorrect implementation which will conflict with GCC's
6 builtin cproj(). GLIBC 2.12+ should be okay.
8 Origin: Kaveh R. Ghazi, April 20, 2010. */
10 /* { dg-do run { xfail glibc_2_11_or_earlier } } */
11 /* { dg-options "-fno-builtin-cproj" } */
12 /* { dg-add-options c99_runtime } */
13 /* { dg-require-effective-target c99_runtime } */
15 extern void abort(void);
16 extern void exit(int);
17 double _Complex cproj(double _Complex);
19 int main (void)
21 if (cproj (2+3i) != 2+3i)
22 abort();
24 exit(0);