[Bug driver/66657] Feature request - assembly output from lto compiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66657 --- Comment #6 from Andrew Pinski --- (In reply to Kenneth Almquist from comment #3) > (In reply to Andrew Pinski from comment #2) > > What are you trying to do with the assembly after the fact? > > In this particular case, I wanted to look at it for two reasons: > > 1) To determine which functions were being inlined. For recent compilers you can use -fopt-info option which should supply this; if it does not then we should improve it to supply what you need. > > 2) To identify errant calls to printf and puts. When compiled to run in > background mode, my program should send all messages to the log rather than > stdout/stderr, so calls to printf/puts that the compiler doesn't discard as > unreachable represent program bugs. For this, as mentioned you can use post tools like objdump/nm/etc. and even the you can use a GNU linker option to warn at link time.
[Bug driver/66657] Feature request - assembly output from lto compiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66657 --- Comment #4 from Andrew Pinski --- You can use -save-temps and look at the .s files.
[Bug driver/66657] Feature request - assembly output from lto compiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66657 --- Comment #5 from Andrew Pinski --- You can use -save-temps and look at the .s files. >To identify errant calls to printf and puts. For this you can also do use the attribute warning and do it at compile time rather than assembly time. There are other tricks too.
[Bug driver/66657] Feature request - assembly output from lto compiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66657 --- Comment #3 from Kenneth Almquist kalmquist1 at hotmail dot com --- (In reply to Andrew Pinski from comment #2) What are you trying to do with the assembly after the fact? In this particular case, I wanted to look at it for two reasons: 1) To determine which functions were being inlined. 2) To identify errant calls to printf and puts. When compiled to run in background mode, my program should send all messages to the log rather than stdout/stderr, so calls to printf/puts that the compiler doesn't discard as unreachable represent program bugs. Gcc has had the -S option for essentially forever, and I've probably used it more times and for more reasons than I can remember at this point.
[Bug driver/66657] Feature request - assembly output from lto compiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66657 --- Comment #2 from Andrew Pinski pinskia at gcc dot gnu.org --- What are you trying to do with the assembly after the fact?
[Bug driver/66657] Feature request - assembly output from lto compiler
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66657 --- Comment #1 from Andrew Pinski pinskia at gcc dot gnu.org --- There should be a gcc command line option to generate the assembly language output of the lto compiler. Use -save-temps.