Bug 48371 - g++ slow compile times
Summary: g++ slow compile times
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-07-10 14:53 UTC by Need Real Name
Modified: 2010-06-14 14:20 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-06-14 14:20:11 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2001-07-10 14:53:21 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.72 [en] (X11; U; Linux 2.2.14-5.0 i586)

Description of problem:
Compiles with g++ take significantly (4 times or more) longer than under RH
6.2.  The current gcc related patches in thesupport section of the RH web
site do not fix this bug.
Our experience seems to match those discussed in: 
http://gcc.gnu.org/ml/gcc-bugs/2000-08/msg00688.html
I see what may be a patch posted at:
http://www.geocrawler.com/mail/msg.php3?msg_id=4291993&list=356
Will RedHat be posting a patch for this bug soon?

How reproducible:
Always

Steps to Reproduce:
1.  On RH 6.2, g++ -c bug2.cpp.  Returns almost immediately (under 2
seconds).
2. On RH 7.1 (with faster cpu), g++ -c bug2.cpp.  Takes about 22 seconds.
3

Actual Results:  On RH 6.2, the compile finishes in under 2 seconds on an
AMD K6 400MHz system.
On RH 7.1, the compiles takes about 22 seconds on an AMD K6 400MHz system.
We can repeat a major compile time difference on systems with faster
processors also.
No compiler error is generated.

Expected Results:  We expected no difference in compile times.

Additional info:

Our "bug2" program is:
int main()
{
int var1, var2, var3, var4, var5, var6, var7, var8, var9, var10, var11;

var1 =
        ( (1 * (var2 == 1)) |
        (( (1 * (var3 == 4)) |
        (2 * (var3 == 5)) |
        (4 * (var3 == 1)) |
        (4 * (var3 == 3)) |
        (4 * (var3 == 2))) * (var2 == 2 )) |
        (1 * (var4 == 3)) |
        (1 * (var4 == 1)) |
        (1 * (var4 == 2)) |
        (1 * (var4 == 3)) |
        (3 * (var5 == 3 )) |
        (3 * (var6 == 1 )) |
        (3 * (var6 == 2 )) |
        (3 * (var6 == 3 )));

var7 =
        ( (1 * (var8 == 1 )) |
        (4 * (var8 == 4 )) |
        (( (1 * (var9 == 4)) |
        (2 * (var10 == 1)) |
        (3 * (var10 == 2)) |
        (4 * (var10 == 3))) * (var11 == 4)));
}

Comment 1 Matthew Miller 2007-04-10 19:06:48 UTC
I'm just going through and checking on old bugs -- if you still have interest,
could you recheck against the latest Fedora Core release? Thanks.

Comment 2 Jakub Jelinek 2010-06-14 14:20:11 UTC
Compiles immediately with g++ 4.4.


Note You need to log in before you can comment on or make changes to this bug.