This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[committed] Add testcase from PR56992
- From: Jakub Jelinek <jakub at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 18 Apr 2013 08:32:29 +0200
- Subject: [committed] Add testcase from PR56992
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
Hi!
This is a testcase that got fixed already by Andreas'
http://gcc.gnu.org/r197839 resp. r197840 commits, but as it lacked a
testcase, I'm adding one that reproduces it on 4.8 branch on x86_64-linux.
Committed as obvious.
2013-04-18 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/56992
* gcc.dg/pr56992.c: New test.
--- gcc/testsuite/gcc.dg/pr56992.c.jj 2013-04-18 08:23:22.817099346 +0200
+++ gcc/testsuite/gcc.dg/pr56992.c 2013-04-18 08:25:56.353255131 +0200
@@ -0,0 +1,18 @@
+/* PR rtl-optimization/56992 */
+/* { dg-do compile } */
+/* { dg-options "-Og -g" } */
+
+inline int
+foo (const char *x)
+{
+ return __builtin_strlen (x);
+}
+
+int
+bar (const char *x, unsigned int *y)
+{
+ unsigned int l = foo (x);
+ if (l > 15)
+ l = 15;
+ *y = l;
+}
Jakub