]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
pr49220.c: New test.
authorKaz Kojima <kkojima@gcc.gnu.org>
Wed, 7 Nov 2012 10:50:22 +0000 (10:50 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Wed, 7 Nov 2012 10:50:22 +0000 (10:50 +0000)
* gcc.c-torture/compile/pr49220.c: New test.

From-SVN: r193290

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr49220.c [new file with mode: 0644]

index 5f10e41a877f96831367b184be746f2d14d38c1e..1ba75afceccaafb73d07360d204373fc5b89ea1a 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-07  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * gcc.c-torture/compile/pr49220.c: New test.
+
 2012-11-07  Florian Weimer  <fweimer@redhat.com>
 
        * g++.dg/init/new40.C: New.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49220.c b/gcc/testsuite/gcc.c-torture/compile/pr49220.c
new file mode 100644 (file)
index 0000000..b8285ce
--- /dev/null
@@ -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];
+}