[Bug c/52181] New: [4.7 Regression] merge_decls doesn't handle DECL_USER_ALIGN properly

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Feb 9 08:31:00 GMT 2012


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.



More information about the Gcc-bugs mailing list