https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119968
Sam James <sjames at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |needs-source, wrong-code --- Comment #1 from Sam James <sjames at gcc dot gnu.org> --- (In reply to Urs Janßen from comment #0) > Created attachment 61215 [details] > miscompiled with gcc-16 -O2 > > The reproducer needs to be linked against libpcre2 (-lpcre2-8). > It gives the correct result if compiled with -O0 and miscompiles with >= O1. > Can you try to remove the libpcre2 dependency? It should be simple (just stub them out, use [[gnu::noipa]] on the stubs, have them return the same results that the library calls do)?