This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/26125] [4.1/4.2 Regression] g++.dg/opt/complex5.C:11: ICE: Segmentation fault
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Feb 2006 15:49:07 -0000
- Subject: [Bug tree-optimization/26125] [4.1/4.2 Regression] g++.dg/opt/complex5.C:11: ICE: Segmentation fault
- References: <bug-26125-276@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-02-08 15:49 -------
This patch works for me but I don't know if it is the correct one or not:
Index: tree-inline.c
===================================================================
--- tree-inline.c (revision 110756)
+++ tree-inline.c (working copy)
@@ -1211,7 +1211,7 @@ declare_return_variable (copy_body_data
/* If the callee cannot possibly modify MODIFY_DEST, then we can
reuse it as the result of the call directly. Don't do this if
it would promote MODIFY_DEST to addressable. */
- else if (TREE_ADDRESSABLE (result))
+ else if (TREE_ADDRESSABLE (result) || !DECL_COMPLEX_GIMPLE_REG_P
(result))
use_it = false;
else
{
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26125