diff options
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20001115-1.c | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 27fcc8b..592217f 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-11-15 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> + + * gcc.c-torture/execute/20001115-1.c: New test. + 2000-11-15 Mark Mitchell <mark@codesourcery.com> * g++.old-deja/g++.abi/arraynew.C: Use `std' where necessary. diff --git a/gcc/testsuite/gcc.c-torture/execute/20001115-1.c b/gcc/testsuite/gcc.c-torture/execute/20001115-1.c new file mode 100644 index 0000000..0e34614 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20001115-1.c @@ -0,0 +1,28 @@ +extern void abort (void); +extern void exit (int); + +struct iso_directory_record { + unsigned char name_len [1]; + char name [0]; +} entry; + +void set(struct iso_directory_record *); + +int main (void) +{ + struct iso_directory_record *de; + + de = &entry; + set(de); + + if (de->name_len[0] == 1 && de->name[0] == 0) + exit (0); + else + abort (); +} + +void set (struct iso_directory_record *p) +{ + p->name_len[0] = 1; + return; +} |