[Bug testsuite/108192] New: g++.dg/cet-notrack-1.C searching for wrong function on mingw
nightstrike at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Dec 21 05:14:34 GMT 2022
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.
More information about the Gcc-bugs
mailing list