This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: compile time regression, when adding cerr usage
- From: James E Wilson <wilson at specifixinc dot com>
- To: andre maute <andre dot maute at gmx dot de>
- Cc: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Jul 2004 17:57:46 -0700
- Subject: Re: compile time regression, when adding cerr usage
- References: <200407172309.20106.andre.maute@gmx.de>
andre maute wrote:
when compiling the attached test file, you can see that the debugging test
needs
8 min! with g++-3.4.1
Every other test including g++-3.3.3 needs only some seconds.
We don't track bug reports sent to the gcc-bugs mailing list. If you
want something done about this, you should file a bug report into our
bugzilla bug database.
I took a quick look at this. You are using -O3 which enables
-finline-functions. The presense of the iostreams code causes gcc to
make different decisions about function inlining and optimization, and
the code size blows up. The .s file is almost 7 times as big when the
debugging code is included. So the file takes so much longer to compile
just because there is so much more code.
Part of the issue here might be that the debugging code is confusing the
gcc optimizer. It occurs between where the arrays are declared and
where they are used. Maybe there is an aliasing problem, or something,
that is causing some optimization to be missed, that ordinarily would
prevent the code size from blowing up. I didn't bother looking into
this though. All I did was reproduce the problem.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com