https://gcc.gnu.org/g:bb83e83cada180cce650539ab6042aa57fed1caf

commit r15-7987-gbb83e83cada180cce650539ab6042aa57fed1caf
Author: Jakub Jelinek <ja...@redhat.com>
Date:   Wed Mar 12 10:48:31 2025 +0100

    testsuite: Add testcase for already fixed PR [PR119226]
    
    This was fixed in PR119219 r15-7981 commit.
    
    2025-03-12  Jakub Jelinek  <ja...@redhat.com>
    
            PR middle-end/119226
            * gcc.c-torture/compile/pr119226.c: New test.

Diff:
---
 gcc/testsuite/gcc.c-torture/compile/pr119226.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gcc/testsuite/gcc.c-torture/compile/pr119226.c 
b/gcc/testsuite/gcc.c-torture/compile/pr119226.c
new file mode 100644
index 000000000000..8eb98578e008
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr119226.c
@@ -0,0 +1,12 @@
+/* PR middle-end/119226 */
+
+char a[64];
+void bar (void);
+
+void
+foo (int x)
+{
+  char *b = a + __builtin_strcspn (a, x ? "" : "ab");
+  if (b[0])
+    bar ();
+}

Reply via email to