public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/108192] New: g++.dg/cet-notrack-1.C searching for wrong function on mingw
@ 2022-12-21  5:14 nightstrike at gmail dot com
  2022-12-21 18:06 ` [Bug testsuite/108192] " hjl.tools at gmail dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: nightstrike at gmail dot com @ 2022-12-21  5:14 UTC (permalink / raw)
  To: gcc-bugs

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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-02-18  2:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-21  5:14 [Bug testsuite/108192] New: g++.dg/cet-notrack-1.C searching for wrong function on mingw nightstrike at gmail dot com
2022-12-21 18:06 ` [Bug testsuite/108192] " hjl.tools at gmail dot com
2022-12-21 23:29 ` nightstrike at gmail dot com
2023-01-07 10:05 ` nightstrike at gmail dot com
2023-01-08  1:36 ` 10walls at gmail dot com
2023-01-08  1:38 ` pinskia at gcc dot gnu.org
2023-01-28 16:32 ` cvs-commit at gcc dot gnu.org
2024-02-18  2:20 ` jyong at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).