https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117598
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |WAITING Last reconfirmed| |2024-11-14 Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- >"/usr/bin/g++ -g -fstack-usage -flto -o main.cpp.o -c main.cpp" doesn't create >a main.cpp.su file. This won't create a stack usage file as the default is thin LTO files and are not fully compiled yet. It is only fully compiled when linked. Can you provide the full steps you are doing? because this is what I just did and get a .su file out of it: ``` [apinski@xeond2 trt]$ cat main.cc int main() {} [apinski@xeond2 trt]$ ~/upstream-gcc/bin/gcc -g -fstack-usage -flto -o main.cc.o -c main.cc [apinski@xeond2 trt]$ ~/upstream-gcc/bin/gcc -g -fstack-usage -flto main.cc.o [apinski@xeond2 trt]$ ls -altr total 76 drwxr-xr-x. 14 apinski apinski 32768 Nov 14 14:32 .. -rw-r--r--. 1 apinski apinski 15 Nov 14 14:32 main.cc -rw-r--r--. 1 apinski apinski 4688 Nov 14 14:32 main.cc.o drwxr-xr-x. 2 apinski apinski 4096 Nov 14 14:32 . -rw-r--r--. 1 apinski apinski 27 Nov 14 14:32 a.ltrans0.ltrans.su -rwxr-xr-x. 1 apinski apinski 18816 Nov 14 14:32 a.out ``` Do you expect a .su when using -c and -flto? When you can't. it will only be in the final link for LTO.