public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/54167] New: excessive alignment
@ 2012-08-03 15:03 drepper.fsp at gmail dot com
2021-09-12 7:47 ` [Bug target/54167] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: drepper.fsp at gmail dot com @ 2012-08-03 15:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54167
Bug #: 54167
Summary: excessive alignment
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: drepper.fsp@gmail.com
Compile the following code:
struct c
{
int a, b;
/*constexpr*/ c() : a(1), b(2) { }
};
c v;
The variable v will be defined with:
.bss
.align 16
.type v, @object
.size v, 8
v:
.zero 8
The variable has alignment 16!
If you uncomment the constexpr and compile with -std=gnu++11 it can be seen
that the compiler does know what the correct alignment is:
.globl v
.data
.align 4
.type v, @object
.size v, 8
v:
.long 1
.long 2
This happens with the current svn version as well as with 4.7.0.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug target/54167] excessive alignment
2012-08-03 15:03 [Bug middle-end/54167] New: excessive alignment drepper.fsp at gmail dot com
@ 2021-09-12 7:47 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-12 7:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54167
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.4.7, 4.9.0
Target| |x86_64
Known to fail| |4.5.0, 4.8.5
Component|middle-end |target
Status|UNCONFIRMED |RESOLVED
Keywords| |missed-optimization
Resolution|--- |DUPLICATE
Target Milestone|--- |5.0
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
In GCC 4.9.0 we produce:
.align 4
.type v, @object
.size v, 8
v:
.zero 8
While in GCC 5+, GCC produces:
.align 8
.type v, @object
.size v, 8
v:
.zero 8
The GCC 4.9.0 change was r0-127682.
The GCC 5 change was r5-5887.
Which makes this a dup of bug 61296.
*** This bug has been marked as a duplicate of bug 61296 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-12 7:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-03 15:03 [Bug middle-end/54167] New: excessive alignment drepper.fsp at gmail dot com
2021-09-12 7:47 ` [Bug target/54167] " pinskia 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).