OSDN Git Service

* gcc.c-torture/compile/20010113-1.c: New test.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Jan 2001 23:27:06 +0000 (23:27 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 13 Jan 2001 23:27:06 +0000 (23:27 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38997 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 030da1e..edc4d7d 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);