public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: mark.dewing@intel.com To: gcc-gnats@gcc.gnu.org Subject: c/2583: A function declared __inline__ takes exponential compile time on IA64 Date: Wed, 18 Apr 2001 15:16:00 -0000 [thread overview] Message-ID: <20010418221047.13856.qmail@sourceware.cygnus.com> (raw) >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:
next reply other threads:[~2001-04-18 15:16 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-04-18 15:16 mark.dewing [this message] 2002-04-24 14:32 rth
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20010418221047.13856.qmail@sourceware.cygnus.com \ --to=mark.dewing@intel.com \ --cc=gcc-gnats@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).