This patch looks fine to me. Please check it in.

2010/9/16 Min Zhao <mzhao...@gmail.com>

> Hi,
>
> Would a gatekeeper please review my fix for bug600:
>
> https://bugs.open64.net/show_bug.cgi?id=600
>
>
> Please check the bug report for the failing example (since it is long to
> show).
> 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>
>
> ...
>
>
>
> We see that the 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. But it does not skip the
> GS_NOP_EXPR.
>
>
>
> My fix is to skip GS_NOP_EXPR before processing GS_CONSTRUCTOR, or others.
>
> Another thought, I see in wgen there are many places to skip GS_NOP_EXPR
> during processing. Is it better to remove GS_NOP_EXPR at a common place,
> e.g., gcc FE, or gspin?
>
>
> Thanks,
>
>
>
> Min
>
>
>
> Index: wgen_decl.cxx
>
> ===================================================================
>
> --- wgen_decl.cxx       (revision 3336)
>
> +++ wgen_decl.cxx       (working copy)
>
> @@ -3327,6 +3327,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
>
>


-- 
Regards,
Lai Jian-Xin
------------------------------------------------------------------------------
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