public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47120] New: -malign-double does not align doubles in function calls
@ 2010-12-29 15:54 pip88nl at gmail dot com
2010-12-29 16:07 ` [Bug target/47120] " rguenth at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: pip88nl at gmail dot com @ 2010-12-29 15:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47120
Summary: -malign-double does not align doubles in function
calls
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: pip88nl@gmail.com
According to the gcc manual, -malign-double creates object code with an ABI
that is incompatible to code that was not compiled with that switch. With this
switch, structs containing doubles are aligned correctly (according to double's
alignment requirements) but doubles passed to functions are not. E.g.:
void foo (int i, double d);
int main () {
foo (1, 2);
return 0;
}
On x86, this will emit code storing the double value of 2.0 to a word-aligned
stack location, not a double-word aligned location, as the manual implies.
I suppose the reason for not aligning doubles on a two word boundary in this
instance is that it would, in addition to the struct ABI, break the x86 calling
convention. However, not aligning the double correctly will make code fail that
requires aligned access.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/47120] -malign-double does not align doubles in function calls
2010-12-29 15:54 [Bug target/47120] New: -malign-double does not align doubles in function calls pip88nl at gmail dot com
@ 2010-12-29 16:07 ` rguenth at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-12-29 16:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47120
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target| |i?86-*-*
Status|UNCONFIRMED |RESOLVED
Resolution| |WONTFIX
--- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-12-29 16:06:54 UTC ---
We can't change this now.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-29 16:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-29 15:54 [Bug target/47120] New: -malign-double does not align doubles in function calls pip88nl at gmail dot com
2010-12-29 16:07 ` [Bug target/47120] " rguenth at gcc dot gnu.org
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).