public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ebotcazou at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/8081] ICE with variably sized types returned from nested functions
Date: Fri, 13 Jan 2012 11:37:00 -0000	[thread overview]
Message-ID: <bug-8081-4-euBS1F4Rox@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-8081-4@http.gcc.gnu.org/bugzilla/>

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;
    }


  parent reply	other threads:[~2012-01-13 11:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-8081-4@http.gcc.gnu.org/bugzilla/>
2012-01-11 15:56 ` [Bug middle-end/8081] ICE with variably sized types and " rguenth at gcc dot gnu.org
2012-01-11 15:58 ` [Bug c/8081] ICE with variably sized types returned from " rguenth at gcc dot gnu.org
2012-01-12 10:23 ` rguenth at gcc dot gnu.org
2012-01-13  8:55 ` ebotcazou at gcc dot gnu.org
2012-01-13  9:28 ` rguenther at suse dot de
2012-01-13 10:19 ` rguenth at gcc dot gnu.org
2012-01-13 11:37 ` ebotcazou at gcc dot gnu.org [this message]
2012-01-13 11:54 ` rguenth at gcc dot gnu.org
2012-01-13 12:08 ` rguenth at gcc dot gnu.org
2012-01-13 12:10 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-8081-4-euBS1F4Rox@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).