re PR middle-end/24362 (internal compiler error: in extract_component, at tree-complex.c:68)

2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/24362
        * g++.dg/opt/complex4.C: New test.
2005-10-28  Andrew Pinski  <pinskia@physics.uc.edu>

        PR middle-end/24362
        * tree-complex.c (extract_component): Treat RESULT_DECL
        like the rest of the decls.

From-SVN: r105930
This commit is contained in:
Andrew Pinski 2005-10-28 14:26:36 +00:00 committed by Andrew Pinski
parent d3e5a995ec
commit f35a986c64
4 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* tree-complex.c (extract_component): Treat RESULT_DECL
like the rest of the decls.
2005-10-25 Eric Botcazou <ebotcazou@adacore.com>
* config/ia64/ia64.c (ia64_output_function_profiler): Emit an

View File

@ -1,3 +1,8 @@
2005-10-28 Andrew Pinski <pinskia@physics.uc.edu>
PR middle-end/24362
* g++.dg/opt/complex4.C: New test.
2005-10-25 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/nested-func-4.c: New test.

View File

@ -0,0 +1,16 @@
// PR 24362
// { dg-do compile }
// { dg-options "-O2" }
typedef __complex__ double cdouble;
cdouble elt_zero();
const cdouble *pointer();
cdouble trace(void)
{
cdouble output = elt_zero();
const cdouble *data = pointer();
output += data[1];
return output;
}

View File

@ -558,6 +558,7 @@ extract_component (block_stmt_iterator *bsi, tree t, bool imagpart_p,
return TREE_OPERAND (t, imagpart_p);
case VAR_DECL:
case RESULT_DECL:
case PARM_DECL:
case INDIRECT_REF:
case COMPONENT_REF: