Variables optimized out at -O0
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: gcc-help@xxxxxxxxxxx
- Subject: Variables optimized out at -O0
- From: Ryan Johnson <scovich@xxxxxxxxx>
- Date: Wed, 18 Oct 2017 08:14:55 -0600
- User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0
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]