diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 2010-04-21 06:26:22 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 2010-04-21 06:26:22 +0000 |
commit | d64427ff33f0521b2af8636a74422d52392141e3 (patch) | |
tree | 31b35cd34b401f863ccbd3b3f438ac93016b9611 /gcc | |
parent | 2d2d5a918acab15f113b4efaa0afd339cbbd4053 (diff) | |
download | gcc-d64427ff33f0521b2af8636a74422d52392141e3.zip gcc-d64427ff33f0521b2af8636a74422d52392141e3.tar.gz gcc-d64427ff33f0521b2af8636a74422d52392141e3.tar.bz2 |
builtin-cproj-3.c: New.
* gcc.dg/torture/builtin-cproj-3.c: New.
From-SVN: r158588
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/torture/builtin-cproj-3.c | 25 |
2 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9750baa..18bf9e1 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2010-04-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu> + + * gcc.dg/torture/builtin-cproj-3.c: New. + 2010-04-20 Jason Merrill <jason@redhat.com> PR c++/9335 diff --git a/gcc/testsuite/gcc.dg/torture/builtin-cproj-3.c b/gcc/testsuite/gcc.dg/torture/builtin-cproj-3.c new file mode 100644 index 0000000..fe143b9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/builtin-cproj-3.c @@ -0,0 +1,25 @@ +/* Copyright (C) 2010 Free Software Foundation. + + Check the runtime behavior of the C library's cproj() function and + whether it follows the standard. Versions of GLIBC through 2.11.1 + had an incorrect implementation which will conflict with GCC's + builtin cproj(). GLIBC 2.12+ should be okay. + + Origin: Kaveh R. Ghazi, April 20, 2010. */ + +/* { dg-do run } */ +/* { dg-options "-fno-builtin-cproj" } */ +/* { dg-add-options c99_runtime } */ +/* { dg-require-effective-target c99_runtime } */ + +extern void abort(void); +extern void exit(int); +double _Complex cproj(double _Complex); + +int main (void) +{ + if (cproj (2+3i) != 2+3i) + abort(); + + exit(0); +} |