------- Additional Comments From steven at gcc dot gnu dot org  2005-06-11 
09:11 -------
Problem seems to be that the C front end assumes something without 
a DECL_NAME is not yet in the unexpanded variables list.  Don't ask 
me why :-/ 
 
Hack: 
 
Index: c-gimplify.c 
=================================================================== 
RCS file: /cvs/gcc/gcc/gcc/c-gimplify.c,v 
retrieving revision 2.30 
diff -u -3 -p -r2.30 c-gimplify.c 
--- c-gimplify.c        1 Jun 2005 02:50:51 -0000       2.30 
+++ c-gimplify.c        11 Jun 2005 09:10:51 -0000 
@@ -185,9 +185,11 @@ gimplify_compound_literal_expr (tree *ex 
   tree decl = DECL_EXPR_DECL (decl_s); 
 
   /* This decl isn't mentioned in the enclosing block, so add it to the 
-     list of temps.  FIXME it seems a bit of a kludge to say that 
-     anonymous artificial vars aren't pushed, but everything else is.  */ 
-  if (DECL_NAME (decl) == NULL_TREE) 
+     list of temps if it is not already in that list. 
+     FIXME it seems a bit of a kludge to say that anonymous artificial 
+     vars aren't pushed, but everything else is.  */ 
+  if (DECL_NAME (decl) == NULL_TREE 
+      && !DECL_SEEN_IN_BIND_EXPR_P (decl)) 
     gimple_add_tmp_var (decl); 
 
   gimplify_and_add (decl_s, pre_p); 
 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-11 09:11:54
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22013

Reply via email to