https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89261

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-02-10
     Ever confirmed|0                           |1

--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
Following patch:

--cut here--
Index: config/i386/i386-protos.h
===================================================================
--- config/i386/i386-protos.h   (revision 268670)
+++ config/i386/i386-protos.h   (working copy)
@@ -207,7 +207,7 @@
 #endif /* RTX_CODE  */

 #ifdef TREE_CODE
-extern int ix86_data_alignment (tree, int, bool);
+extern int ix86_data_alignment (tree, unsigned int, bool);
 extern unsigned int ix86_local_alignment (tree, machine_mode,
                                          unsigned int);
 extern unsigned int ix86_minimum_alignment (tree, machine_mode,
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c  (revision 268670)
+++ config/i386/i386.c  (working copy)
@@ -29620,7 +29616,7 @@
    instead of that alignment to align the object.  */

 int
-ix86_data_alignment (tree type, int align, bool opt)
+ix86_data_alignment (tree type, unsigned int align, bool opt)
 {
   /* GCC 4.8 and earlier used to incorrectly assume this alignment even
      for symbols from other compilation units or symbols that don't need
--cut here--

fixes the testcase:

        .file   "align.c"
        .text
        .globl  foo
        .data
        .align 268435456
        .type   foo, @object
        .size   foo, 16
foo:
        .long   0
        .long   1072693248
        .long   0
        .long   1073741824
        .ident  "GCC: (GNU) 9.0.1 20190208 (experimental) [trunk revision
268670]"
        .section        .note.GNU-stack,"",@progbits

Reply via email to