aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorGeorg-Johann Lay <avr@gjlay.de>2011-12-08 12:38:35 +0000
committerGeorg-Johann Lay <gjl@gcc.gnu.org>2011-12-08 12:38:35 +0000
commitcffef825957253ae4845acff731398f51a461aa6 (patch)
treed6151e104bc037e52c18e7c2751aeb480e1e86c9 /gcc
parent4341f26129d04fe3b6b92e8c19ddaad14593f22d (diff)
downloadgcc-cffef825957253ae4845acff731398f51a461aa6.zip
gcc-cffef825957253ae4845acff731398f51a461aa6.tar.gz
gcc-cffef825957253ae4845acff731398f51a461aa6.tar.bz2
re PR tree-optimization/51315 (unaligned memory accesses generated with -ftree-sra)
PR tree-optimization/51315 * gcc.c-torture/execute/20111208-1.c: Fix wrong assumption sizeof(int)==4. From-SVN: r182109
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20111208-1.c18
2 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7cc3500..930f3b9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2011-12-08 Georg-Johann Lay <avr@gjlay.de>
+
+ PR tree-optimization/51315
+ * gcc.c-torture/execute/20111208-1.c: Fix wrong assumption
+ sizeof(int)==4.
+
2011-12-08 Richard Guenther <rguenther@suse.de>
PR lto/50747
diff --git a/gcc/testsuite/gcc.c-torture/execute/20111208-1.c b/gcc/testsuite/gcc.c-torture/execute/20111208-1.c
index 8bcb10a..31426a3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20111208-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20111208-1.c
@@ -10,8 +10,26 @@ extern void *memcpy (void *__restrict __dest,
extern size_t strlen (__const char *__s)
__attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
+#if __SIZEOF_SHORT__ == 2
typedef short int int16_t;
+#elif __SIZEOF_INT__ == 2
+typedef int int16_t;
+#elif __SIZEOF_LONG__ == 2
+typedef long int16_t;
+#else
+#error Fix this
+#endif
+
+
+#if __SIZEOF_INT__ == 4
typedef int int32_t;
+#elif __SIZEOF_LONG__ == 4
+typedef long int32_t;
+#elif __SIZEOF_SHORT__ == 4
+typedef short int32_t;
+#else
+#error Fix this
+#endif
extern void abort (void);