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



--- Comment #7 from Tobias Burnus <burnus at gcc dot gnu.org> 2013-05-02 
21:08:36 UTC ---

The problem is the following in gimplify.c:



In gimplify_cond_expr, one has:



  /* If this COND_EXPR has a value, copy the values into a temporary within

     the arms.  */

  if (!VOID_TYPE_P (type))

      ...      

      /* If either an rvalue is ok or we do not require an lvalue, create the

     temporary.  But we cannot do that if the type is addressable.  */

      if (((fallback & fb_rvalue) || !(fallback & fb_lvalue))

      && !TREE_ADDRESSABLE (type))

          ...

      tmp = create_tmp_var (type, "iftmp");

      result = tmp;



This is then used in the then_ and else_ branches, e.g.



 <modify_expr 0x7ffff67f2e38

    type <real_type 0x7ffff66f5e70 real(kind=4) SF

    arg 0 <var_decl 0x7ffff67ea850 iftmp.1 type <real_type ... real(kind=4)>

    arg 1 <real_cst 0x7ffff67f32a0 type <real_type ... real(kind=4)>

        constant 1.0e+0>>



That's passed to gimplify_modify_expr, where one runs into the assert:



  if (gimplify_ctxp->into_ssa && is_gimple_reg (*to_p))

    {

      /* We should have got an SSA name from the start.  */

      gcc_assert (TREE_CODE (*to_p) == SSA_NAME);

    }



which fails as the TREE_CODE of "iftmp.1" is VAR_DECL.

Reply via email to