aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020411-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020411-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020411-1.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020411-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020411-1.c
new file mode 100644
index 000000000..89e2bae70
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20020411-1.c
@@ -0,0 +1,25 @@
+/* PR optimization/6177
+ This testcase ICEd because expr.c did not expect to see a CONCAT
+ as array rtl. */
+
+extern void abort (void);
+extern void exit (int);
+
+__complex__ float foo (void)
+{
+ __complex__ float f[1];
+ __real__ f[0] = 1.0;
+ __imag__ f[0] = 1.0;
+ f[0] = __builtin_conjf (f[0]);
+ return f[0];
+}
+
+int main (void)
+{
+ __complex__ double d[1];
+ d[0] = foo ();
+ if (__real__ d[0] != 1.0
+ || __imag__ d[0] != -1.0)
+ abort ();
+ exit (0);
+}