aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <ubizjak@gmail.com>2019-04-27 15:38:19 +0200
committerUros Bizjak <uros@gcc.gnu.org>2019-04-27 15:38:19 +0200
commitf8b906a2de3044f1dea753b182c244a1a560d40e (patch)
tree4b0e59bb96aeefc5ff2c1a4b6eb53f3adce2049d /gcc
parent23ab63504249add3ac588fe44a4214d36812eeeb (diff)
downloadgcc-f8b906a2de3044f1dea753b182c244a1a560d40e.zip
gcc-f8b906a2de3044f1dea753b182c244a1a560d40e.tar.gz
gcc-f8b906a2de3044f1dea753b182c244a1a560d40e.tar.bz2
re PR target/89261 (ix86_data_alignment has wrong argument type)
PR target/89261 * config/i386/i386-protos.h (ix86_data_alignment): Change the second argument type to unsigned int. * config/i386/i386.c (ix86_data_alignment): Change "align" argument type to unsigned int. testsuite/ChangeLog: PR target/89261 * gcc.target/i386/pr89261.c: New test. From-SVN: r270623
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/i386/i386-protos.h2
-rw-r--r--gcc/config/i386/i386.c6
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr89261.c9
5 files changed, 26 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5d5f03c..c1adf69 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2019-04-27 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/89261
+ * config/i386/i386-protos.h (ix86_data_alignment): Change
+ the second argument type to unsigned int.
+ * config/i386/i386.c (ix86_data_alignment): Change "align"
+ argument type to unsigned int.
+
2019-04-27 Martin Liska <mliska@suse.cz>
PR middle-end/90258
diff --git a/gcc/config/i386/i386-protos.h b/gcc/config/i386/i386-protos.h
index 83645e8..f080ec3 100644
--- a/gcc/config/i386/i386-protos.h
+++ b/gcc/config/i386/i386-protos.h
@@ -207,7 +207,7 @@ extern void init_cumulative_args (CUMULATIVE_ARGS *, tree, rtx, tree, int);
#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,
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 8a1ffd3..d191e8c 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -29802,7 +29802,7 @@ iamcu_alignment (tree type, int align)
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
@@ -29810,14 +29810,14 @@ ix86_data_alignment (tree type, int align, bool opt)
those compilers, ensure we don't decrease alignment from what we
used to assume. */
- int max_align_compat = MIN (256, MAX_OFILE_ALIGNMENT);
+ unsigned int max_align_compat = MIN (256, MAX_OFILE_ALIGNMENT);
/* A data structure, equal or greater than the size of a cache line
(64 bytes in the Pentium 4 and other recent Intel processors, including
processors based on Intel Core microarchitecture) should be aligned
so that its base address is a multiple of a cache line size. */
- int max_align
+ unsigned int max_align
= MIN ((unsigned) ix86_tune_cost->prefetch_block * 8, MAX_OFILE_ALIGNMENT);
if (max_align < BITS_PER_WORD)
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 6a52a9b..15b3e13f2 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2019-04-27 Uroš Bizjak <ubizjak@gmail.com>
+
+ PR target/89261
+ * gcc.target/i386/pr89261.c: New test.
+
2019-04-27 Martin Liska <mliska@suse.cz>
PR middle-end/90258
diff --git a/gcc/testsuite/gcc.target/i386/pr89261.c b/gcc/testsuite/gcc.target/i386/pr89261.c
new file mode 100644
index 0000000..63882c0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr89261.c
@@ -0,0 +1,9 @@
+/* PR target/89261 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef double __v2df __attribute__ ((vector_size (16), aligned (1 << 28)));
+
+__v2df foo = { 1.0, 2.0 };
+
+/* { dg-final { scan-assembler "\.align\[ \t]+268435456" } } */