Patchwork [1/5] Add testcase for PR20742.

login
register
mail settings
Submitter Sebastian Pop
Date July 20, 2010, 8:23 p.m.
Message ID <1279657422-17300-1-git-send-email-sebpop@gmail.com>
Download mbox | patch
Permalink /patch/59364/
State New
Headers show

Comments

Sebastian Pop - July 20, 2010, 8:23 p.m.
2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>

	* gcc.dg/tree-ssa/pr20742.c: New.
---
 gcc/ChangeLog.graphite                  |    4 ++++
 gcc/testsuite/gcc.dg/tree-ssa/pr20742.c |   18 ++++++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)
 create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr20742.c
Richard Guenther - July 21, 2010, 8:25 a.m.
On Tue, Jul 20, 2010 at 10:23 PM, Sebastian Pop <sebpop@gmail.com> wrote:
> 2010-07-20  Sebastian Pop  <sebastian.pop@amd.com>
>
>        * gcc.dg/tree-ssa/pr20742.c: New.

Ok.

Thanks,
Richard.

> ---
>  gcc/ChangeLog.graphite                  |    4 ++++
>  gcc/testsuite/gcc.dg/tree-ssa/pr20742.c |   18 ++++++++++++++++++
>  2 files changed, 22 insertions(+), 0 deletions(-)
>  create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr20742.c
>
> diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
> index 1cf50f3..6f2ea96 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/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;
> +}
> --
> 1.7.0.4
>
>

Patch

diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index 1cf50f3..6f2ea96 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/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;
+}