summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/tree-ssa/pr16721.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-22 23:33:20 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-09-22 23:33:20 +0000
commit5a49b0e17f1e9aa8cae4e69f93cc19d6824bdf7c (patch)
treed729fab0bca584700b3abb9898aff081a36e46f9 /gcc/testsuite/gcc.dg/tree-ssa/pr16721.c
parentf77b9d3c8bd42fcf3a74aec63627d72be2282fe4 (diff)
downloadgcc-5a49b0e17f1e9aa8cae4e69f93cc19d6824bdf7c.tar.gz
PR tree-optimization/16721
* tree-dfa.c (dump_variable): Show TREE_THIS_VOLATILE. * tree-ssa-alias.c (create_memory_tag): Move setting of TREE_THIS_VOLATILE ... (get_tmt_for): ... here. testsuite/ChangeLog PR tree-optimization/16721 * testsuite/gcc.dg/tree-ssa/pr16721.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@87895 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/tree-ssa/pr16721.c')
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr16721.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr16721.c b/gcc/testsuite/gcc.dg/tree-ssa/pr16721.c
new file mode 100644
index 00000000000..869ab96497e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr16721.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-strict-aliasing -fdump-tree-optimized" } */
+
+struct data {
+ volatile unsigned long *addr;
+} *p;
+
+int test()
+{
+ *p->addr;
+ return 0;
+}
+
+/* The load from p->addr should not disappear. */
+/* { dg-final { scan-tree-dump-times "\->addr" 1 "optimized"} } */