Patchwork [46/65] Add testcase for PR20742.

login
register
mail settings
Submitter Sebastian Pop
Date Aug. 2, 2010, 8:20 p.m.
Message ID <1280780438-17543-47-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/60643/
State New
Headers show

Comments

Sebastian Pop - Aug. 2, 2010, 8:20 p.m.
From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>

	* gcc.dg/tree-ssa/pr20742.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@162350 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog.graphite                  |    4 ++++
 gcc/testsuite/ChangeLog                 |    4 ++++
 gcc/testsuite/gcc.dg/tree-ssa/pr20742.c |   18 ++++++++++++++++++
 3 files changed, 26 insertions(+), 0 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr20742.c

Patch

diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index d929c9a..5e36bc3 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,7 @@ 
+2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* gcc.dg/tree-ssa/pr20742.c: New.
+
 2010-07-15  Sebastian Pop  <sebastian.pop@amd.com>
 
 	* sese.c (rename_uses): Call unshare_expr before force_gimple_operand.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 69e8a4c..9177c57 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,5 +1,9 @@ 
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* gcc.dg/tree-ssa/pr20742.c: New.
+
+2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* gcc.dg/graphite/id-23.c: New.
 
 2010-08-02  Sebastian Pop  <sebastian.pop@amd.com>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr20742.c b/gcc/testsuite/gcc.dg/tree-ssa/pr20742.c
new file mode 100644
index 0000000..21d6eb6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr20742.c
@@ -0,0 +1,18 @@ 
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define TEN(x) x x x x x x x x x x
+#define THOUSAND(x) TEN (TEN (TEN (x)))
+
+int
+foo (int x, int y)
+{
+  register int a = y + 57;
+  register int b = y + 31;
+
+  while (x-- > 0)
+    {
+      THOUSAND (a += b; b -= a;)
+    }
+  return a + b;
+}