OSDN Git Service

2005-07-08 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Jul 2005 18:05:04 +0000 (18:05 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 8 Jul 2005 18:05:04 +0000 (18:05 +0000)
        PR tree-opt/22356
        * testsuite/gcc.dg/pr22356-1.c: New test.

2005-07-08  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/22356
        * tree-complex.c (expand_complex_libcall): Produce
        REALPART_EXPR/IMAGPART_EXPR with the correct type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101781 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr22356-1.c [new file with mode: 0644]
gcc/tree-complex.c

index b4ae5cd..88c127f 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-08  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR tree-opt/22356
+       * tree-complex.c (expand_complex_libcall): Produce
+       REALPART_EXPR/IMAGPART_EXPR with the correct type.
+
 2005-07-08  Kenneth Zadeck <zadeck@naturalbridge.com>
 
        * bitmap.c (bitmap_and, bitmap_and_into, bitmap_and_compl,
index 8bfd32b..ac82940 100644 (file)
@@ -1,3 +1,8 @@
+2005-07-08  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR tree-opt/22356
+       * testsuite/gcc.dg/pr22356-1.c: New test.
+
 2005-07-08  Nathan Sidwell  <nathan@codesourcery.com>
 
        PR c++/21799
diff --git a/gcc/testsuite/gcc.dg/pr22356-1.c b/gcc/testsuite/gcc.dg/pr22356-1.c
new file mode 100644 (file)
index 0000000..118b0b2
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -std=gnu99" } */
+typedef _Complex float GFC_COMPLEX_4;
+void product_c4 (GFC_COMPLEX_4 *src, GFC_COMPLEX_4 *dest, int len)
+{
+  int n;
+  GFC_COMPLEX_4 result;
+  for (n = 0; n < len; n++, src += 1)
+    result *= *src;
+  *dest = result;
+}
index e32dd23..21e9245 100644 (file)
@@ -833,6 +833,7 @@ expand_complex_libcall (block_stmt_iterator *bsi, tree ar, tree ai,
   if (in_ssa_p)
     {
       tree lhs = TREE_OPERAND (stmt, 0);
+      type = TREE_TYPE (type);
       update_complex_components (bsi, stmt,
                                 build1 (REALPART_EXPR, type, lhs),
                                 build1 (IMAGPART_EXPR, type, lhs));