Add a testcase for PR tree-optimization/63835
authorH.J. Lu <hongjiu.lu@intel.com>
Wed, 12 Nov 2014 18:56:50 +0000 (18:56 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Wed, 12 Nov 2014 18:56:50 +0000 (10:56 -0800)
PR tree-optimization/63835
* gcc.dg/pr63835.c: New test.

From-SVN: r217441

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr63835.c [new file with mode: 0644]

index 5478e501010f53dce3af04afe8d4976070e47fe0..3c53939083b8c212297fde7ccaede48ee1de6539 100644 (file)
@@ -1,3 +1,8 @@
+2014-11-12  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR tree-optimization/63835
+       * gcc.dg/pr63835.c: New test.
+
 2014-11-12  Alan Lawrence  <alan.lawrence@arm.com>
 
          * gcc.target/aarch64/simd/vqdmlal_high_lane_s16_indices_1.c: New test.
diff --git a/gcc/testsuite/gcc.dg/pr63835.c b/gcc/testsuite/gcc.dg/pr63835.c
new file mode 100644 (file)
index 0000000..435966b
--- /dev/null
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+int a;
+
+int
+fn1 (int p)
+{
+  return -p;
+}
+
+void
+fn2 ()
+{
+  fn1 (-(unsigned int) a);
+}