[Bug c++/39077] New: GCSE-optimization causes enormous binary size increase (~20 times !)

comer352l at googlemail dot com gcc-bugzilla@gcc.gnu.org
Mon Feb 2 16:18:00 GMT 2009


The example attached is a simple data-container-class. The data is stored as
Qt4-QStringLists.
Everything was fine with gcc 4.1 (330KB). 4.2 already caused a significant
increase. With 4.3, the binary size increased enormously again (6.7MB !).

When I disable GCSE-optimization using the additional flag "-fnogcse", I get
normal binary sizes (360KB with 4.3.2).


Command line use for compilation:
g++ -c -pipe -O2 -march=i586 -mtune=i686 -fmessage-length=0 -O2 -Wall
-D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables
-fasynchronous-unwind-tables -g -Wall -W -D_REENTRANT -DQT_NO_DEBUG
-DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/share/qt4/mkspecs/default -I.
-I/usr/include/QtCore -I/usr/include/QtCore -I/usr/include/QtGui
-I/usr/include/QtGui -I/usr/include -I. -Isrc -Isrc/linux -I. -I. -o
SSMprotocol_def_en.o src/SSMprotocol_def_en.cpp

=> no errors or warnings


GCC-info (Output of 'g++ -v'):

Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info
--mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib
--enable-languages=c,c++,objc,fortran,obj-c++,java,ada
--enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3
--enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/
--with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap
--with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit
--enable-libstdcxx-allocator=new --disable-libstdcxx-pch
--enable-version-specific-runtime-libs --program-suffix=-4.3
--enable-linux-futex --without-system-libunwind --with-cpu=generic
--build=i586-suse-linux
Thread model: posix
gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux)


-- 
           Summary: GCSE-optimization causes enormous binary size increase
                    (~20 times !)
           Product: gcc
           Version: 4.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: comer352l at googlemail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39077



More information about the Gcc-bugs mailing list