]> gcc.gnu.org Git - gcc.git/commitdiff
* gcc.c-torture/compile/20010113-1.c: New test.
authorJoseph Myers <jsm28@cam.ac.uk>
Sat, 13 Jan 2001 23:27:06 +0000 (23:27 +0000)
committerJoseph Myers <jsm28@gcc.gnu.org>
Sat, 13 Jan 2001 23:27:06 +0000 (23:27 +0000)
From-SVN: r38997

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20010113-1.c [new file with mode: 0644]

index 030da1e77e832a27fa2cabbb4f33d6a33a3d36a5..edc4d7d142f4f3d3b5d72c9dc3f830984eba400a 100644 (file)
@@ -1,3 +1,7 @@
+2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
+
+       * gcc.c-torture/compile/20010113-1.c: New test.
+
 2001-01-13  Jakub Jelinek  <jakub@redhat.com>
 
        * gcc.c-torture/compile/20001212-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010113-1.c b/gcc/testsuite/gcc.c-torture/compile/20010113-1.c
new file mode 100644 (file)
index 0000000..35b7c1f
--- /dev/null
@@ -0,0 +1,15 @@
+/* Origin: PR c/364 from and@genesyslab.com, very much reduced to a
+   testcase by Joseph Myers <jsm28@cam.ac.uk>.
+
+   The initializer of z is a valid address constant, and GCC 2.95.2
+   accepts it as such.  CVS GCC as of 2001-01-13 rejects it, but accepts
+   it if y is changed to x in the initializer.  */
+
+struct {
+  struct {
+    int x;
+    int y;
+  } p;
+} v;
+
+int *z = &((&(v.p))->y);
This page took 0.093203 seconds and 5 git commands to generate.