Variables optimized out at -O0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

My distribution (nixos 17.03) recently upgraded to gcc-5.4.0, and I find now that the distribution's gdb-7.12.1 very frequently reports variables as <optimized out> and inline functions as not available. I'm trying to isolate a small test case, but meanwhile I wanted to double check whether I'm doing something silly with my compile flags, or if this is a known/expected behavior. The compilation command (filtering out -D, -M and -W flags is):

g++ -o build/unoptimized/foo.o -c src/foo.cpp -fPIC -g -march=corei7 -std=c++11 -pthread -fwrapv  -O0 -fno-omit-frame-pointer

g++ -o install/unoptimized/lib/libFoo.so -shared -Wl,--no-copy-dt-needed-entries -g -pthread -fuse-ld=gold -rdynamic '-Wl,-rpath,$ORIGIN' '-Wl,-rpath,$ORIGIN/../lib' $OBJECT_FILES -Wl,-z,defs -Wl,-soname=libFoo.so

Sadly, I can't switch to a more recent version of gcc for this particular task...

Thoughts?
Ryan





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux