re PR rtl-optimization/56992 (building Wine with -Og causes GCC to seg fault)
authorJakub Jelinek <jakub@redhat.com>
Thu, 18 Apr 2013 06:29:35 +0000 (08:29 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 18 Apr 2013 06:29:35 +0000 (08:29 +0200)
PR rtl-optimization/56992
* gcc.dg/pr56992.c: New test.

From-SVN: r198046

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

index c10ffdc..61d7a82 100644 (file)
@@ -1,3 +1,8 @@
+2013-04-18  Jakub Jelinek  <jakub@redhat.com>
+
+       PR rtl-optimization/56992
+       * gcc.dg/pr56992.c: New test.
+
 2013-04-17  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/56814
diff --git a/gcc/testsuite/gcc.dg/pr56992.c b/gcc/testsuite/gcc.dg/pr56992.c
new file mode 100644 (file)
index 0000000..e945a18
--- /dev/null
@@ -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;
+}