diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/20090107-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20090107-1.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/compile/20090107-1.c b/gcc/testsuite/gcc.c-torture/compile/20090107-1.c new file mode 100644 index 000000000..b5d4c1a44 --- /dev/null +++ b/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; +} |