aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090107-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090107-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090107-1.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090107-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090107-1.c
new file mode 100644
index 000000000..b5d4c1a44
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20090107-1.c
@@ -0,0 +1,25 @@
+/* Verify that we don't ICE by forming invalid addresses for unaligned
+ doubleword loads (originally for PPC64). */
+
+struct a
+{
+ unsigned int x;
+ unsigned short y;
+} __attribute__((packed));
+
+struct b {
+ struct a rep;
+ unsigned long long seq;
+} __attribute__((packed));
+
+struct c {
+ int x;
+ struct a a[5460];
+ struct b b;
+};
+
+extern void use_ull(unsigned long long);
+extern void f(struct c *i) {
+ use_ull(i->b.seq);
+ return;
+}