Author: minz
Date: 2010-09-20 12:54:07 -0400 (Mon, 20 Sep 2010)
New Revision: 3348

Modified:
   trunk/osprey/wgen/wgen_decl.cxx
Log:
Fix for bug 600:

The gspin tree of the failing example has the following pattern:
...     
@gs_constructor_elts_value CONS<717520>
 GS_NOP_EXPR<715928> { ...
   @gs_tree_type LINK 34236
   @operand 0 GS_CONSTRUCTOR<716012>
...

Here, GS_ CONSTRUCTOR is the operand of a GS_NOP_EXPR. In wgen 
Traverse_Aggregate_Struct, it processes GS_CONSTRUCTOR, 
pointer-to-member-functions and others cases, while it does not skip 
the GS_NOP_EXPR.

The fix is to skip GS_NOP_EXPR before processing GS_CONSTRUCTOR, or others.

Code Review: Jian-Xin Lai




Modified: trunk/osprey/wgen/wgen_decl.cxx
===================================================================
--- trunk/osprey/wgen/wgen_decl.cxx     2010-09-20 16:33:11 UTC (rev 3347)
+++ trunk/osprey/wgen/wgen_decl.cxx     2010-09-20 16:54:07 UTC (rev 3348)
@@ -3332,6 +3332,9 @@
     }
 
     gs_t element_value = gs_constructor_elts_value(init_list, idx);
+    if (gs_tree_code(element_value) == GS_NOP_EXPR)
+        element_value = gs_tree_operand(element_value, 0);
+
     fld_ty = FLD_type(fld);
     if (gs_tree_code(element_value) == GS_CONSTRUCTOR) {
       // recursively process nested ARRAYs and STRUCTs


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Open64-devel mailing list
Open64-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/open64-devel

Reply via email to