summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-08 18:05:04 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-07-08 18:05:04 +0000
commit1737b88ca8f5c70581394b5f0391b70ce5fbf39d (patch)
tree7edc035a3eacb5bdb81a0175686988f2f0a128b9
parent079133968d30f9ca5ea932e868a824bca3f56ee2 (diff)
downloadgcc-1737b88ca8f5c70581394b5f0391b70ce5fbf39d.tar.gz
2005-07-08 Andrew Pinski <pinskia@physics.uc.edu>
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
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/pr22356-1.c11
-rw-r--r--gcc/tree-complex.c1
4 files changed, 23 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index b4ae5cd05cf..88c127f9ed9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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,
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 8bfd32bbf0a..ac82940d427 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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
index 00000000000..118b0b2d3ae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr22356-1.c
@@ -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;
+}
diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index e32dd237be8..21e92456051 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -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));