public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/2583: A function declared __inline__ takes exponential compile time on IA64
@ 2002-04-24 14:32 rth
0 siblings, 0 replies; 2+ messages in thread
From: rth @ 2002-04-24 14:32 UTC (permalink / raw)
To: gcc-bugs, gcc-prs, mark.dewing, nobody
Synopsis: A function declared __inline__ takes exponential compile time on IA64
State-Changed-From-To: open->closed
State-Changed-By: rth
State-Changed-When: Wed Apr 24 14:32:35 2002
State-Changed-Why:
Fixed for gcc 3.1.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=2583
^ permalink raw reply [flat|nested] 2+ messages in thread
* c/2583: A function declared __inline__ takes exponential compile time on IA64
@ 2001-04-18 15:16 mark.dewing
0 siblings, 0 replies; 2+ messages in thread
From: mark.dewing @ 2001-04-18 15:16 UTC (permalink / raw)
To: gcc-gnats
>Number: 2583
>Category: c
>Synopsis: A function declared __inline__ takes exponential compile time on IA64
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Apr 18 15:16:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Mark Dewing
>Release: gcc version 3.0 20010402
>Organization:
>Environment:
IA64 Linux 2.4.0test10-001115-58smp
>Description:
A function with some integer arithmetic operations is declared with the __inline__ specifier. With -O or higher, it takes a long time to compile on IA64. In particular, it is exponential in the number of statements
(count *= 10;) in the function.
The x86 gcc (same 200010402 snapshot) does not have this behavior.
>How-To-Repeat:
// compile with -O or higher
int count = 1; // no problem with double
static __inline__ void
toobig(void ) {
count *= 10; // also depends on this value
count *= 10; // takes more time for larger values
// 2
count *= 10;
count *= 10;
// 4
count *= 10;
count *= 10;
// 6
count *= 10;
count *= 10;
// 8
count *= 10;
count *= 10;
// 10
count *= 10;
count *= 10;
// 12
count *= 10;
count *= 10;
// 14
count *= 10;
count *= 10;
// 16
count *= 10;
// 17
count *= 10;
// 18
count *= 10;
// 19
count *= 10;
// 20
count *= 10;
// 21
#if 0
count *= 2;
// 22
count *= 10;
// 23
count *= 10;
// 24
#endif
}
int main(){
toobig();
printf("count = %d\n",count);
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-24 21:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-24 14:32 c/2583: A function declared __inline__ takes exponential compile time on IA64 rth
-- strict thread matches above, loose matches on Subject: below --
2001-04-18 15:16 mark.dewing
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).