public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Thomas Deselaers <thomas@deselaers.de> To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org Subject: c/7661: gcc-3.0 optimization bug on debian GNULinux on x86 with very simple program Date: Tue, 20 Aug 2002 10:16:00 -0000 [thread overview] Message-ID: <E17hCXO-0002ml-00@racker> (raw) >Number: 7661 >Category: c >Synopsis: gcc-3.0 optimization bug on debian GNU/Linux on x86 with very simple program >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: wrong-code >Submitter-Id: net >Arrival-Date: Tue Aug 20 10:16:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Thomas Deselaers >Release: 3.0.4 (Debian testing/unstable) >Organization: >Environment: System: Linux racker 2.4.19 #3 Tue Aug 6 23:01:23 CEST 2002 i686 unknown unknown GNU/Linux Architecture: i686 Dell Inspiron 8200, Pentium 4 mobile 1600 OS: Linux 2.4.19 unpatched host: i386-pc-linux-gnu build: i386-pc-linux-gnu target: i386-pc-linux-gnu configured with: ../src/configure -v --enable-languages=c,c++,java,f77,proto,objc --prefix=/usr --infodir=/share/info --mandir=/share/man --enable-shared --with-gnu-as --with-gnu-ld --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --disable-checking --enable-threads=posix --enable-java-gc=boehm --with-cpp-install-dir=bin --enable-objc-gc i386-linux >Description: OK, while playing around(together with Stefan Jacobs, he wanted to be mentioned) I found out, that this small programm: -------file:maxint.cc------------ main() { int i=0; int oldi=0;; while(++i>oldi) oldi=i; return oldi; } --------------------------------- does work absolutely fine, when compiled without any optimization, but does not terminate at all, when using any optimization-options: with "gcc -o maxint maxint.cc" the maxint-program works fine, but with "gcc -o maxint maxint.cc -O$X" with $X being nothing, or one of the numbers from 1 to 9, the maxint program does not terminate. >How-To-Repeat: copy the code-excerpt to a file and compile it >Fix: Workaround: not use -O$X >Release-Note: >Audit-Trail: >Unformatted:
next reply other threads:[~2002-08-20 17:16 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-08-20 10:16 Thomas Deselaers [this message] 2002-08-20 11:46 Andrew Pinski 2002-08-20 14:06 Martin Sebor 2002-08-20 18:06 Carlos O'Donell
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=E17hCXO-0002ml-00@racker \ --to=thomas@deselaers.de \ --cc=debian-gcc@lists.debian.org \ --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).