Hi! On Wed, Mar 12, 2025 at 08:31:27AM +0100, Jakub Jelinek wrote: > On Wed, Mar 12, 2025 at 12:04:52AM -0700, Andrew Pinski wrote: > > I think it would be useful to add the C testcase that fails during DOM > > from PR 119226 since that is another path to get the ICE. > > I've committed the patch already. > Feel free to commit the testcase for it (preferably a little bit cleaned > up, replacing the fancy identifiers in the test with something short and > __SIZE_TYPE__ as return type from strcspn prototype).
I went ahead and committed this as obvious: 2025-03-12 Jakub Jelinek <ja...@redhat.com> PR middle-end/119226 * gcc.c-torture/compile/pr119226.c: New test. --- gcc/testsuite/gcc.c-torture/compile/pr119226.c.jj 2025-03-12 10:32:12.600079450 +0100 +++ gcc/testsuite/gcc.c-torture/compile/pr119226.c 2025-03-12 10:31:51.832364744 +0100 @@ -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 (); +} Jakub