This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch RFA middle-end] Fix PR middle-end/49220


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.

--- 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];
+}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]