This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Code bloating
- From: denis campredon <denis dot campredon at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 11 Mar 2011 01:24:15 +0100
- Subject: Code bloating
- References: <AANLkTikD4uKf1G4oFhR++oT0Ue5t9JMtrvqT7TdB8dMB@mail.gmail.com>
Hi everybody,
I have a question about reduccing test :
- I found a program on the net, and tried to built it. But I find
something wrong in one file :
?when I built it with g++ -g -O0 the binary is about 1,2M.
?when I built it with g++ -g -Os the binary is about 33M. about 25M
for O1 O2, O3
?when I built it with clang++, the size is always about 1,4M
?without debug option, the file has about the same size with any
optimization flags
I tried to remove a few small functions, or pieces of code, but most
of the time, the code size moves for +/- 1 to 4M.
I don't know how do reduce the case, because the result is
unpredictable, and it takes 20s to compile with 01, the fastest.
So, if you could give me some advices.
P.S: I have gcc 4.4.5
Regards