PR middle-end/47364
* gcc.dg/torture/pr47364-1.c: New.
+ * gcc.target/i386/pr47364-1.c: Likewise.
+ * gcc.target/i386/pr47364-2.c: Likewise.
2011-08-05 Thomas Koenig <tkoenig@gcc.gnu.org>
--- /dev/null
+/* { dg-do run } */
+
+char one[50] = "ijk";
+int
+main (void)
+{
+ return __builtin_strlen (one) != 3;
+}
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern __SIZE_TYPE__ strlen (const char *);
+void foo (char *, const char *);
+int bar (const char *prefix)
+{
+ char buff[256];
+ foo (buff, prefix);
+ return strlen(buff);
+}