Merge from mainline (167278:168000).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.dg / cproj-fails-with-broken-glibc.c
blobfe143b9ea5b76ffeee8f279697c52ee0db1c8018
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 } */
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);