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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2012-06-11
                 CC|                            |rguenth at gcc dot gnu.org
     Ever Confirmed|0                           |1

--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2012-06-11 
10:15:22 UTC ---
The gimplifier marks 'result' as DECL_GIMPLE_REG_P here:

/* Gimplify a BIND_EXPR.  Just voidify and recurse.  */

static enum gimplify_status
gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
{
...
      /* Preliminarily mark non-addressed complex variables as eligible
         for promotion to gimple registers.  We'll transform their uses
         as we find them.  */
      if ((TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE
           || TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE)
          && !TREE_THIS_VOLATILE (t)
          && (TREE_CODE (t) == VAR_DECL && !DECL_HARD_REGISTER (t))
          && !needs_to_live_in_memory (t))
        DECL_GIMPLE_REG_P (t) = 1;

which means it expects the Frontends to have marked 'result' as
TREE_ADDRESSABLE
if they assign to it in this way.  GENERIC from the frontend looks like

Ssa_View.Test_View_Ssa_Lhs (const ssa_view__fpt x0, const ssa_view__fpt x1)
{
  ssa_view__vec result;

    ssa_view__vec result;
  VIEW_CONVERT_EXPR<ssa_view__fpt[2]>(result)[0] = (ssa_view__fpt) x0;
  return result;
}

another possibility is, as the comment explains, that this is supposed to
be done for COMPLEX_TYPE only, as only component-accesses to those are
"transformed" properly.  But note that an access like the above, via
a VIEW_CONVERTed type are not necessarily handled.

Well.  Confirmed.

Reply via email to