OSDN Git Service

* gcc.dg/lto/ipacp_0.c: New test.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.dg / cproj-fails-with-broken-glibc.c
1 /* Copyright (C) 2010  Free Software Foundation.
2
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.
7
8    Origin: Kaveh R. Ghazi,  April 20, 2010.  */
9
10 /* { dg-do run } */
11 /* { dg-options "-fno-builtin-cproj" } */
12 /* { dg-add-options c99_runtime } */
13 /* { dg-require-effective-target c99_runtime } */
14
15 extern void abort(void);
16 extern void exit(int);
17 double _Complex cproj(double _Complex);
18
19 int main (void)
20 {
21   if (cproj (2+3i) != 2+3i)
22     abort();
23
24   exit(0);
25 }