Commit b3c4918f by Andrew Pinski Committed by Andrew Pinski

re PR c++/30168 (C++ constructors can cause invalid gimple to happen with complex typed variables)

2006-12-21  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30168
        * optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.

2006-12-21  Andrew Pinski  <pinskia@gmail.com>

        PR C++/30168
        * g++.dg/opt/complex6.C: New test.

From-SVN: r120144
parent bc0ebe76
2006-12-21 Andrew Pinski <pinskia@gmail.com>
PR C++/30168
* optimize.c (update_cloned_parm): Copy DECL_GIMPLE_REG_P also.
2006-12-22 Kazu Hirata <kazu@codesourcery.com> 2006-12-22 Kazu Hirata <kazu@codesourcery.com>
* decl.c: Fix a coment typo. * decl.c: Fix a coment typo.
......
...@@ -69,6 +69,8 @@ update_cloned_parm (tree parm, tree cloned_parm, bool first) ...@@ -69,6 +69,8 @@ update_cloned_parm (tree parm, tree cloned_parm, bool first)
DECL_NAME (cloned_parm) = DECL_NAME (parm); DECL_NAME (cloned_parm) = DECL_NAME (parm);
DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm); DECL_SOURCE_LOCATION (cloned_parm) = DECL_SOURCE_LOCATION (parm);
TREE_TYPE (cloned_parm) = TREE_TYPE (parm); TREE_TYPE (cloned_parm) = TREE_TYPE (parm);
DECL_GIMPLE_REG_P (cloned_parm) = DECL_GIMPLE_REG_P (parm);
} }
/* FN is a function that has a complete body. Clone the body as /* FN is a function that has a complete body. Clone the body as
......
2006-12-21 Andrew Pinski <pinskia@gmail.com>
PR C++/30168
* g++.dg/opt/complex6.C: New test.
2006-12-22 Ben Elliston <bje@au.ibm.com> 2006-12-22 Ben Elliston <bje@au.ibm.com>
* lib/gcc-dg.exp (gcc-dg-prune): Return "::unsupported::memory * lib/gcc-dg.exp (gcc-dg-prune): Return "::unsupported::memory
// PR 30168
// { dg-do compile }
// { dg-options "-O2" }
struct aaa
{
aaa(_Complex float __z) ;
_Complex float _M_value;
};
aaa::aaa(_Complex float __z)
{
__z*=2.0f;
_M_value = __z;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment