This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add missing VIEW_CONVERT_EXPR case in gimplifier


We have a proprietary testcase that causes the gimplifier to choke if 
--RTS=sjlj is passed to the Ada compiler, a regression from 3.x.  The
attached patch simply adds the missing VIEW_CONVERT_EXPR in the fb_none
case with side-effects in the gimplifier, mimicing the generic case:

        case ARRAY_REF:
        case ARRAY_RANGE_REF:
        case REALPART_EXPR:
        case IMAGPART_EXPR:
        case COMPONENT_REF:
        case VIEW_CONVERT_EXPR:
          ret = gimplify_compound_lval (expr_p, pre_p, post_p,
                                        fallback ? fallback : fb_rvalue);
          break;

Tested on i586-suse-linux, applied to mainline as obvious.


2006-06-12  Eric Botcazou  <ebotcazou@adacore.com>

	* gimplify.c (gimplify_expr): Treat VIEW_CONVERT_EXPR like other
	lvalues in the fb_none case with side-effects.


-- 
Eric Botcazou
Index: gimplify.c
===================================================================
--- gimplify.c	(revision 114575)
+++ gimplify.c	(working copy)
@@ -5718,7 +5718,9 @@ gimplify_expr (tree *expr_p, tree *pre_p
 	  switch (code)
 	    {
 	    case COMPONENT_REF:
-	    case REALPART_EXPR: case IMAGPART_EXPR:
+	    case REALPART_EXPR:
+	    case IMAGPART_EXPR:
+	    case VIEW_CONVERT_EXPR:
 	      gimplify_expr (&TREE_OPERAND (*expr_p, 0), pre_p, post_p,
 			     gimple_test_f, fallback);
 	      break;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]