diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2015-07-09 09:28:19 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2015-07-09 02:28:19 -0700 |
commit | e9c9e772e22cd76f57154167b6cda9113323cf31 (patch) | |
tree | 13e970f8d142f754c4289c95ef87468637d777ed /gcc | |
parent | 661c8707bf0629bb1b69efa14dfc3d8e89e61706 (diff) | |
download | gcc-e9c9e772e22cd76f57154167b6cda9113323cf31.zip gcc-e9c9e772e22cd76f57154167b6cda9113323cf31.tar.gz gcc-e9c9e772e22cd76f57154167b6cda9113323cf31.tar.bz2 |
Define ATTRIBUTE_ALIGNED_VALUE to 32 for IA MCU
attribute ((aligned)) should align to the minimum of BIGGEST_ALIGNMENT,
which is 4 bytes for -miamcu.
gcc/
PR target/66818
* config/i386/i386.h (ATTRIBUTE_ALIGNED_VALUE): Defined to 32
for IA MCU.
gcc/testsuite/
PR target/66818
* gcc.target/i386/pr66818.c: New test.
From-SVN: r225606
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/i386/i386.h | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/i386/pr66818.c | 5 |
4 files changed, 17 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 78cc6f9..e7f7dac 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2015-07-09 H.J. Lu <hongjiu.lu@intel.com> + PR target/66818 + * config/i386/i386.h (ATTRIBUTE_ALIGNED_VALUE): Defined to 32 + for IA MCU. + +2015-07-09 H.J. Lu <hongjiu.lu@intel.com> + PR target/66817 * config/i386/i386.c (ix86_return_in_memory): Return true if int_size_in_bytes returns negative for IA MCU. diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h index f357e79..74334ff 100644 --- a/gcc/config/i386/i386.h +++ b/gcc/config/i386/i386.h @@ -811,7 +811,7 @@ extern const char *host_detect_local_cpu (int argc, const char **argv); /* Alignment value for attribute ((aligned)). It is a constant since it is the part of the ABI. We shouldn't change it with -mavx. */ -#define ATTRIBUTE_ALIGNED_VALUE 128 +#define ATTRIBUTE_ALIGNED_VALUE (TARGET_IAMCU ? 32 : 128) /* Decide whether a variable of mode MODE should be 128 bit aligned. */ #define ALIGN_MODE_128(MODE) \ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 42b6203..49d6f2b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2015-07-09 H.J. Lu <hongjiu.lu@intel.com> + PR target/66818 + * gcc.target/i386/pr66818.c: New test. + +2015-07-09 H.J. Lu <hongjiu.lu@intel.com> + PR target/66817 * gcc.target/i386/pr66817.c: New test. diff --git a/gcc/testsuite/gcc.target/i386/pr66818.c b/gcc/testsuite/gcc.target/i386/pr66818.c new file mode 100644 index 0000000..d90394c --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/pr66818.c @@ -0,0 +1,5 @@ +/* { dg-do compile { target ia32 } } */ +/* { dg-options "-O2 -mno-sse -mno-mmx -miamcu" } */ + +struct dummy { int x __attribute__((aligned)); }; +int array[__alignof__(struct dummy) == 4 ? 1 : -1]; |