* gcc.c-torture/execute/990628-1.c: New test.
From-SVN: r27812
This commit is contained in:
parent
eca5590fb8
commit
da621fd225
2 changed files with 34 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Mon Jun 28 08:20:51 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* gcc.c-torture/execute/990628-1.c: New test.
|
||||
|
||||
Fri Jun 25 05:28:40 1999 Jeffrey A Law (law@cygnus.com)
|
||||
|
||||
* gcc.c-torture/compile/990625-2.c: New test.
|
||||
|
|
30
gcc/testsuite/gcc.c-torture/execute/990628-1.c
Normal file
30
gcc/testsuite/gcc.c-torture/execute/990628-1.c
Normal file
|
@ -0,0 +1,30 @@
|
|||
#define TP_BSIZE 64
|
||||
|
||||
char buf[2*TP_BSIZE];
|
||||
char (*nextblock)[TP_BSIZE] = (char (*)[TP_BSIZE]) buf;
|
||||
|
||||
union u_test {
|
||||
char dummy[TP_BSIZE];
|
||||
struct s_test {
|
||||
int a;
|
||||
int b;
|
||||
int c;
|
||||
} s_test;
|
||||
};
|
||||
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int i;
|
||||
char dp[TP_BSIZE];
|
||||
|
||||
for (i = 0; i < 2*TP_BSIZE; i++)
|
||||
buf[i] = '.';
|
||||
for (i = 0; i < TP_BSIZE; i++)
|
||||
dp[i] = 'a';
|
||||
|
||||
*(union u_test *)(*(nextblock)++) = *(union u_test *)dp;
|
||||
|
||||
for (i = 0; i < 2*TP_BSIZE; i++)
|
||||
printf("%c%s", buf[i], (i % 64) == 63 ? "\n" : "");
|
||||
exit(0);
|
||||
}
|
Loading…
Add table
Reference in a new issue