This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/44542] expand_one_stack_var_at may set DECL_ALIGN to a too high value
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Jun 2010 15:38:14 -0000
- Subject: [Bug target/44542] expand_one_stack_var_at may set DECL_ALIGN to a too high value
- References: <bug-44542-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from hjl dot tools at gmail dot com 2010-06-16 15:38 -------
(In reply to comment #15)
> 2) even when get_decl_align_unit returns something small, the decl might still
> get a nicely aligned slot (say offset 64). If it is known at this point
> that virtual_stack_vars_rtx will be at least 32 byte aligned, we shouldn't hide
> that fact from the expanders.
>
I just pointed out where "expand_one_stack_var_at may set DECL_ALIGN to
a too high value" came from. To guarantee "virtual_stack_vars_rtx will
be at least 32 byte aligned", stack has to be aligned at 32byte to begin
with. Otherwise, you may not get 32byte alignment.
The current code looks correct to me if you want to use stack offset
as alignment.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44542