aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranz Sirl <Franz.Sirl-kernel@lauterbach.com>2000-11-16 11:19:11 +0000
committerFranz Sirl <sirl@gcc.gnu.org>2000-11-16 11:19:11 +0000
commit4c8fb5714bd5ab8c6df3e1c122b25cb45a113826 (patch)
tree145365f1bfe513c86186163e9fa237cdd7603c38
parent35ef21d25668ceb5b8306d4207e35f1fca3ef02d (diff)
downloadgcc-4c8fb5714bd5ab8c6df3e1c122b25cb45a113826.zip
gcc-4c8fb5714bd5ab8c6df3e1c122b25cb45a113826.tar.gz
gcc-4c8fb5714bd5ab8c6df3e1c122b25cb45a113826.tar.bz2
20001115-1.c: New test.
2000-11-15 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> * gcc.c-torture/execute/20001115-1.c: New test. From-SVN: r37497
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20001115-1.c28
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;
+}