public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/44542] expand_one_stack_var_at may set DECL_ALIGN to a too high value
Date: Wed, 16 Jun 2010 06:56:00 -0000	[thread overview]
Message-ID: <20100616065559.29957.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44542-87@http.gcc.gnu.org/bugzilla/>



------- Comment #13 from jakub at gcc dot gnu dot org  2010-06-16 06:55 -------
This looks wrong.  The code in expand_one_stack_var_at (before dynamic stack
realignment) made perfect sense, if we gave a bigger alignment to some variable
(e.g. automatic array), it is useful to tell the expanders that we did.
And if it got a smaller than requested alignment, similarly it is better to
tell that to the expanders (the latter happens when the requested alignment is
larger than what can be supported for automatic vars).
>From the offset we don't know absolute alignment, unless we know how aligned is
virtual_stack_vars_rtx.  We should know that without dynamic stack realignment,
for dynamic stack realignment all we need to ensure is that the computed
alignment isn't larger than the one we are going to use.
E.g. replacing MAX_SUPPORTED_STACK_ALIGNMENT with
crtl->max_used_stack_slot_alignment (or crtl->stack_alignment_needed).
Or say MAX (crtl->max_used_stack_slot_alignment, PREFERRED_STACK_BOUNDARY)
or MAX (crtl->stack_alignment_needed, PREFERRED_STACK_BOUNDARY)?


-- 


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


  parent reply	other threads:[~2010-06-16  6:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-15 10:51 [Bug target/44542] New: " jakub at gcc dot gnu dot org
2010-06-15 11:19 ` [Bug target/44542] " matz at gcc dot gnu dot org
2010-06-15 11:37 ` jakub at gcc dot gnu dot org
2010-06-15 12:53 ` jakub at gcc dot gnu dot org
2010-06-15 13:41 ` matz at gcc dot gnu dot org
2010-06-15 13:51 ` matz at gcc dot gnu dot org
2010-06-15 14:47 ` hjl dot tools at gmail dot com
2010-06-15 14:56 ` matz at gcc dot gnu dot org
2010-06-15 15:39 ` hjl dot tools at gmail dot com
2010-06-15 16:46 ` jakub at gcc dot gnu dot org
2010-06-15 17:13 ` hjl dot tools at gmail dot com
2010-06-15 17:20 ` hjl dot tools at gmail dot com
2010-06-15 17:25 ` hjl dot tools at gmail dot com
2010-06-16  6:56 ` jakub at gcc dot gnu dot org [this message]
2010-06-16 14:36 ` hjl dot tools at gmail dot com
2010-06-16 14:58 ` jakub at gcc dot gnu dot org
2010-06-16 15:38 ` hjl dot tools at gmail dot com
2010-07-27 17:55 ` jakub at gcc dot gnu dot org
2010-07-27 18:00 ` jakub at gcc dot gnu dot org
2010-09-17 20:25 ` hjl dot tools at gmail dot com

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=20100616065559.29957.qmail@sourceware.org \
    --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).