[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c/8081] ICE with variably sized types returned from nested functions



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

--- Comment #28 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-01-13 11:21:34 UTC ---
> OTOH as GIMPLE cannot deal with VLAs on the LHS of a CALL when not applying RSO
> the above is correct anyway.

Right, gimplify_return_expr already has a similar provision:

  else if (aggregate_value_p (result_decl, TREE_TYPE (current_function_decl)))
    {
      if (TREE_CODE (DECL_SIZE (result_decl)) != INTEGER_CST)
    {
      if (!TYPE_SIZES_GIMPLIFIED (TREE_TYPE (result_decl)))
        gimplify_type_sizes (TREE_TYPE (result_decl), pre_p);
      /* Note that we don't use gimplify_vla_decl because the RESULT_DECL
         should be effectively allocated by the caller, i.e. all calls to
         this function must be subject to the Return Slot Optimization.  */
      gimplify_one_sizepos (&DECL_SIZE (result_decl), pre_p);
      gimplify_one_sizepos (&DECL_SIZE_UNIT (result_decl), pre_p);
    }
      result = result_decl;
    }

-- 
Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


Reply to: