https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108192
Bug ID: 108192 Summary: g++.dg/cet-notrack-1.C searching for wrong function on mingw Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: nightstrike at gmail dot com Target Milestone: --- Created attachment 54139 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54139&action=edit cet-notrack-1.s g++.dg/cet-notrack-1.C Tries to find 'call puts()' in the asm after calling printf() on the c++ side. On Mingw, we do magic things with converting printf() into __mingw_ variants to support MS style printf and other things. So the assembler dump on mingw results in a call to __mingw_vfprintf in this particular case. It would likely be possible to fix the testcase by searching for "call __mingw_*printf" or something, but I'm curious if this is really a case of a missed optimization. The strings in question are simple string literals, so we don't care about mingw or ms special versions of printf, and a call to puts should be fine. I don't know if this testcase is specifically trying to validate that optimization, but it at least indirectly revealed it. Asm attached.