re PR tree-optimization/22356 (mis-match types in cplxlower)

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.

From-SVN: r101781
This commit is contained in:
Andrew Pinski 2005-07-08 18:05:04 +00:00 committed by Andrew Pinski
parent 08a3c5cdef
commit d5c7794157
4 changed files with 23 additions and 0 deletions

View 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,

View 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

View File

@ -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;
}

View 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));