public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/98922] New: -fstack-usage not working with -flto
@ 2021-02-01 17:08 Visda.vokhshoori at microchip dot com
  2021-02-02  8:20 ` [Bug lto/98922] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Visda.vokhshoori at microchip dot com @ 2021-02-01 17:08 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98922

            Bug ID: 98922
           Summary: -fstack-usage not working with -flto
           Product: gcc
           Version: 8.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Visda.vokhshoori at microchip dot com
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

With link time optimization, -flto, the compiler doesn't print the stack usage
information to auxname.su file. 

With -flto, the compiler dumps the stack usage of each function in
sourcfile/auxname.ltrans0.ltrans.su file. 

However, maybe_unlink() in lto_wrapper.c removes all trans files, unless
--save-temps is specified.

To reproduce:  
You can modify "gcc.dg/stack-usage-1.c": test case source to call foo() in
main(), and compile and link with flto and fstack-usage options, and scan for {
dg-final { scan-stack-usage "foo\t\(0\)\tstatic" } } 

The scan will fail.

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

end of thread, other threads:[~2021-02-04 14:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-01 17:08 [Bug lto/98922] New: -fstack-usage not working with -flto Visda.vokhshoori at microchip dot com
2021-02-02  8:20 ` [Bug lto/98922] " rguenth at gcc dot gnu.org
2021-02-02 13:11 ` marxin at gcc dot gnu.org
2021-02-04 14:42 ` Visda.vokhshoori at microchip dot com

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).