From: Jakub Jelinek Date: Wed, 5 Sep 2001 08:39:33 +0000 (+0200) Subject: 20010904-1.c: New test. X-Git-Tag: prereleases/libstdc++-3.0.95~2253 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d4fbd953e8930cc804537cc028dc6c5eef9b57dd;p=thirdparty%2Fgcc.git 20010904-1.c: New test. * gcc.c-torture/execute/20010904-1.c: New test. * gcc.c-torture/execute/20010904-2.c: New test. From-SVN: r45404 --- 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 000000000000..92b258b52025 --- /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 000000000000..cbe49806c603 --- /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); +}