summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/pr18241-3.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-08 18:31:39 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-08 18:31:39 +0000
commit52c2a30751c74e52a07a2905cd875994db2803a8 (patch)
tree0414cc3da4abf709fe841647da112fa2d898af87 /gcc/testsuite/gcc.dg/pr18241-3.c
parent5a0046ea4f29a9e700176205b0e5a6ac41417981 (diff)
downloadgcc-52c2a30751c74e52a07a2905cd875994db2803a8.tar.gz
2005-01-08 Jeff Law <law@redhat.com>
Diego Novillo <dnovillo@redhat.com> * tree-nrv.c (tree_nrv): Ignore volatile return values. * tree-ssa-dse.c (dse_optimize_stmt): Do not optimize statements with volatile operands. * tree-ssa-operands.c (add_stmt_operand): Do add volatile operands after marking a statement with has_volatile_ops. testsuite/ChangeLog: 2005-01-08 Diego Novillo <dnovillo@redhat.com> * gcc.dg/pr18241-1.c: New test. * gcc.dg/pr18241-2.c: New test. * gcc.dg/pr18241-3.c: New test. * gcc.dg/pr18241-4.c: New test. * gcc.dg/pr18241-5.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr18241-3.c')
-rw-r--r--gcc/testsuite/gcc.dg/pr18241-3.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr18241-3.c b/gcc/testsuite/gcc.dg/pr18241-3.c
new file mode 100644
index 00000000000..e2bc3d7ff43
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr18241-3.c
@@ -0,0 +1,31 @@
+/* { dg-do execute } */
+/* { dg-options "-O1" } */
+
+void abort (void);
+
+void radix_tree_tag_clear (int *node)
+{
+ int *path[2], **pathp = path, height;
+ volatile int *addr;
+
+ height = 1;
+ pathp[0] = node;
+
+ while (height > 0) {
+ pathp[1] = pathp[0];
+ pathp++;
+ height--;
+ }
+
+ addr = pathp[0];
+ *addr = 1;
+}
+
+int main ()
+{
+ int n;
+ radix_tree_tag_clear (&n);
+ if (n != 1)
+ abort ();
+ return 0;
+}