aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr47473.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/torture/pr47473.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/torture/pr47473.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr47473.c b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr47473.c
new file mode 100644
index 000000000..92f2b872e
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/torture/pr47473.c
@@ -0,0 +1,14 @@
+/* PR c/47473 */
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+
+int
+main (void)
+{
+ long double _Complex w = 0.2L - 0.3iL;
+ w = w * (0.3L - (0.0F + 1.0iF) * 0.9L);
+ if (__builtin_fabsl (__real__ w + 0.21L) > 0.001L
+ || __builtin_fabsl (__imag__ w + 0.27L) > 0.001L)
+ __builtin_abort ();
+ return 0;
+}