public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly
@ 2012-02-09 8:31 jakub at gcc dot gnu.org
2012-02-09 8:32 ` [Bug c/52181] " jakub at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-09 8:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52181
Bug #: 52181
Summary: [4.7 Regression] merge_decls doesn't handle
DECL_USER_ALIGN properly
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: c
AssignedTo: jakub@gcc.gnu.org
ReportedBy: jakub@gcc.gnu.org
extern const int v1[];
const int __attribute__((aligned(16))) v1[] = { 0 };
extern const int __attribute__((aligned(16))) v2[];
const int v2[] = { 0 };
extern const int __attribute__((aligned(16))) v3[];
const int __attribute__((aligned(16))) v3[] = { 0 };
const int __attribute__((aligned(16))) v4[] = { 0 };
int test[(__alignof__ (v4) != __alignof__ (v1)/* { dg-bogus "is negative" } */
|| __alignof__ (v4) != __alignof__ (v2)
|| __alignof__ (v4) != __alignof__ (v3)) ? -1 : 0];
fails with gcc 4.7, worked with 4.6, but it looks like the actual bug is of an
earlier date, when DECL_USER_ALIGN bit has been moved from tree_decl_common
etc.
down into tree_base.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/52181] [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly
2012-02-09 8:31 [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly jakub at gcc dot gnu.org
@ 2012-02-09 8:32 ` jakub at gcc dot gnu.org
2012-02-09 9:07 ` jakub at gcc dot gnu.org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-09 8:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52181
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2012-02-09
Known to work| |4.6.3
Target Milestone|--- |4.7.0
Ever Confirmed|0 |1
Known to fail| |4.7.0
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/52181] [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly
2012-02-09 8:31 [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly jakub at gcc dot gnu.org
2012-02-09 8:32 ` [Bug c/52181] " jakub at gcc dot gnu.org
@ 2012-02-09 9:07 ` jakub at gcc dot gnu.org
2012-02-09 18:33 ` uweigand at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-09 9:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52181
--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-09 09:07:20 UTC ---
Created attachment 26621
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26621
gcc47-pr52181.patch
Untested fix. The testcase shows that the C++ FE has a similar bug, but in the
other direction, when olddecl has aligned attribute and newdecl doesn't.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/52181] [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly
2012-02-09 8:31 [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly jakub at gcc dot gnu.org
2012-02-09 8:32 ` [Bug c/52181] " jakub at gcc dot gnu.org
2012-02-09 9:07 ` jakub at gcc dot gnu.org
@ 2012-02-09 18:33 ` uweigand at gcc dot gnu.org
2012-02-14 6:16 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: uweigand at gcc dot gnu.org @ 2012-02-09 18:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52181
Ulrich Weigand <uweigand at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |uweigand at gcc dot gnu.org
--- Comment #2 from Ulrich Weigand <uweigand at gcc dot gnu.org> 2012-02-09 18:33:12 UTC ---
The regression is present on tip of 4.6 branch as well, exposed by recent
backports from mainline.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/52181] [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly
2012-02-09 8:31 [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly jakub at gcc dot gnu.org
` (2 preceding siblings ...)
2012-02-09 18:33 ` uweigand at gcc dot gnu.org
@ 2012-02-14 6:16 ` jakub at gcc dot gnu.org
2012-02-14 9:48 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-14 6:16 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52181
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 06:15:42 UTC ---
Author: jakub
Date: Tue Feb 14 06:15:35 2012
New Revision: 184193
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184193
Log:
PR c/52181
* c-decl.c (merge_decls): Copy DECL_USER_ALIGN bit from olddecl to
newdecl.
* decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
* c-c++-common/pr52181.c: New test.
Added:
trunk/gcc/testsuite/c-c++-common/pr52181.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/c-decl.c
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/52181] [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly
2012-02-09 8:31 [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly jakub at gcc dot gnu.org
` (3 preceding siblings ...)
2012-02-14 6:16 ` jakub at gcc dot gnu.org
@ 2012-02-14 9:48 ` jakub at gcc dot gnu.org
2012-02-14 17:22 ` uweigand at gcc dot gnu.org
2012-02-14 23:35 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-14 9:48 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52181
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 09:47:59 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/52181] [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly
2012-02-09 8:31 [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly jakub at gcc dot gnu.org
` (4 preceding siblings ...)
2012-02-14 9:48 ` jakub at gcc dot gnu.org
@ 2012-02-14 17:22 ` uweigand at gcc dot gnu.org
2012-02-14 23:35 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: uweigand at gcc dot gnu.org @ 2012-02-14 17:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52181
--- Comment #5 from Ulrich Weigand <uweigand at gcc dot gnu.org> 2012-02-14 17:22:23 UTC ---
Thanks for the quick fix! Are you planning to backport to 4.6 as well?
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c/52181] [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly
2012-02-09 8:31 [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly jakub at gcc dot gnu.org
` (5 preceding siblings ...)
2012-02-14 17:22 ` uweigand at gcc dot gnu.org
@ 2012-02-14 23:35 ` jakub at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-14 23:35 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52181
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-14 23:34:40 UTC ---
Author: jakub
Date: Tue Feb 14 23:34:34 2012
New Revision: 184242
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184242
Log:
Backported from mainline
2012-02-14 Jakub Jelinek <jakub@redhat.com>
PR c/52181
* c-decl.c (merge_decls): Copy DECL_USER_ALIGN bit from olddecl to
newdecl.
* decl.c (duplicate_decls): If olddecl has bigger DECL_ALIGN than
newdecl, copy DECL_ALIGN to newdecl and or DECL_USER_ALIGN bits.
* c-c++-common/pr52181.c: New test.
Added:
branches/gcc-4_6-branch/gcc/testsuite/c-c++-common/pr52181.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/c-decl.c
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/decl.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-02-14 23:35 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-09 8:31 [Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly jakub at gcc dot gnu.org
2012-02-09 8:32 ` [Bug c/52181] " jakub at gcc dot gnu.org
2012-02-09 9:07 ` jakub at gcc dot gnu.org
2012-02-09 18:33 ` uweigand at gcc dot gnu.org
2012-02-14 6:16 ` jakub at gcc dot gnu.org
2012-02-14 9:48 ` jakub at gcc dot gnu.org
2012-02-14 17:22 ` uweigand at gcc dot gnu.org
2012-02-14 23:35 ` jakub 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).