Patchwork [RFA,middle-end] Fix PR middle-end/49220

login
register
mail settings
Submitter Kaz Kojima
Date Nov. 7, 2012, 10:53 a.m.
Message ID <20121107.195334.420788682.kkojima@rr.iij4u.or.jp>
Download mbox | patch
Permalink /patch/197646/
State New
Headers show

Comments

Kaz Kojima - Nov. 7, 2012, 10:53 a.m.
Uros Bizjak <ubizjak@gmail.com> wrote:
> Please also add the testcase from the PR to the testsuite.

For the record, I've committed the testcase below from the PR.

Regards,
	kaz
--
2012-11-07  Kaz Kojima  <kkojima@gcc.gnu.org>

	* gcc.c-torture/compile/pr49220.c: New test.

Patch

--- ORIG/trunk/gcc/testsuite/gcc.c-torture/compile/pr49220.c	1970-01-01 09:00:00.000000000 +0900
+++ trunk/gcc/testsuite/gcc.c-torture/compile/pr49220.c	2012-11-07 19:29:26.000000000 +0900
@@ -0,0 +1,25 @@ 
+int array[2];
+
+static int
+func1 (int b)
+{
+  return b;
+}
+
+static int
+func2 (int a, int b)
+{
+  return b == 0 ? a : b;
+}
+
+int
+func3 (int a)
+{
+}
+
+int *
+func4 (int *arg)
+{
+  *arg = func1 ((func2 (func3 (array[0]), *arg)) | array[0]);
+  return &array[1];
+}