OSDN Git Service

PR c/12553
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Oct 2003 22:02:17 +0000 (22:02 +0000)
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 20 Oct 2003 22:02:17 +0000 (22:02 +0000)
        * tree.c (build1) <ADDR_EXPR>: Set TREE_SIDE_EFFECTS
        appropriately.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72726 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/gcc.dg/volatile1.c [new file with mode: 0644]

diff --git a/gcc/testsuite/gcc.dg/volatile1.c b/gcc/testsuite/gcc.dg/volatile1.c
new file mode 100644 (file)
index 0000000..61a3979
--- /dev/null
@@ -0,0 +1,9 @@
+/* PR c/12553: we were erroneously setting TREE_SIDE_EFFECTS on &y, which
+   confused tree-ssa.  */
+
+void f()
+{
+  int x;
+  volatile int y;
+  &x == &y;
+}