From 0c0ebddfbde362e5c9de5c62843cd29695aaa628 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 5 Sep 2001 08:39:33 +0000 Subject: * gcc.c-torture/execute/20010904-1.c: New test. * gcc.c-torture/execute/20010904-2.c: New test. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@45404 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.c-torture/execute/20010904-1.c | 11 +++++++++++ gcc/testsuite/gcc.c-torture/execute/20010904-2.c | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20010904-1.c create mode 100644 gcc/testsuite/gcc.c-torture/execute/20010904-2.c diff --git a/gcc/testsuite/gcc.c-torture/execute/20010904-1.c b/gcc/testsuite/gcc.c-torture/execute/20010904-1.c new file mode 100644 index 00000000000..92b258b5202 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20010904-1.c @@ -0,0 +1,11 @@ +typedef struct x { int a; int b; } __attribute__((aligned(32))) X; +typedef struct y { X x[32]; int c; } Y; + +Y y[2]; + +int main(void) +{ + if (((char *)&y[1] - (char *)&y[0]) & 31) + abort (); + exit (0); +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20010904-2.c b/gcc/testsuite/gcc.c-torture/execute/20010904-2.c new file mode 100644 index 00000000000..cbe49806c60 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20010904-2.c @@ -0,0 +1,11 @@ +typedef struct x { int a; int b; } __attribute__((aligned(32))) X; +typedef struct y { X x; X y[31]; int c; } Y; + +Y y[2]; + +int main(void) +{ + if (((char *)&y[1] - (char *)&y[0]) & 31) + abort (); + exit (0); +} -- cgit v1.2.3