public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: lloyd@acm.jhu.edu To: gcc-gnats@gcc.gnu.org Subject: optimization/7339: ICE on simple code with GCC 3.1 Date: Wed, 17 Jul 2002 07:36:00 -0000 [thread overview] Message-ID: <20020717142732.16141.qmail@sources.redhat.com> (raw) >Number: 7339 >Category: optimization >Synopsis: ICE on simple code with GCC 3.1 >Confidential: no >Severity: serious >Priority: low >Responsible: unassigned >State: open >Class: ice-on-illegal-code >Submitter-Id: net >Arrival-Date: Wed Jul 17 07:36:00 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Jack Lloyd >Release: GCC 3.1 >Organization: >Environment: RedHat Linux 7.3 on an Athlon. $ g++ -v Reading specs from /usr/local/gcc-3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs Configured with: ../gcc-3.1/configure --prefix=/usr/local/gcc-3.1 --enable-threads Thread model: posix gcc version 3.1 >Description: ICE on illegal code (it shifts 16 bit values >> 32). It only occurs with optimization. I haven't checked with 3.1.1 snapshots or HEAD. The attached code will compile with GCC 3.0.4 (with and without optimization). I'm compiling with g++ but I don't think there is anything C++-centric about the ICE. >How-To-Repeat: Compile the attached file with -O (or higher) with GCC 3.1 Here is what I get: $ g++ -O x.cpp x.cpp: In function `bool bigint_divcore(short unsigned int, short unsigned int, short unsigned int, short unsigned int, short unsigned int, short unsigned int)': x.cpp:26: warning: right shift count >= width of type x.cpp:28: warning: right shift count >= width of type x.cpp:37: Internal compiler error in simplify_subreg, at simplify-rtx.c:2452 Please submit a full bug report [...] >Fix: None known (except the obvious of compiling without optimization, or fixing the code). >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="x.cpp" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="x.cpp" LyoKICBXaXRoIEdDQyAzLjEgYW5kIC1PLCB0aGlzIGNvZGUgd2lsbCBkaWUgd2l0aCBhbiBpbnRl cm5hbCBjb21waWxlciBlcnJvciBvbgogIExp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Y3QgPj4gU0hJRlQpICYgTVBfV09SRF9NQVg7CgogICBpZihs YXN0ID4geDEpIHJldHVybiB0cnVlOwogICBpZihsYXN0IDwgeDEpIHJldHVybiBmYWxzZTsKICAg aWYoeV8xID4geDIpIHJldHVybiB0cnVlOwogICBpZih5XzEgPCB4MikgcmV0dXJuIGZhbHNlOwog ICBpZih5XzIgPiB4MykgcmV0dXJuIHRydWU7CiAgIGlmKHlfMiA8IHgzKSByZXR1cm4gZmFsc2U7 CiAgIHJldHVybiBmYWxzZTsKICAgfQo=
next reply other threads:[~2002-07-17 14:36 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-07-17 7:36 lloyd [this message] 2002-07-17 10:56 Graham Stott 2002-09-19 12:01 dalej
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=20020717142732.16141.qmail@sources.redhat.com \ --to=lloyd@acm.jhu.edu \ --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).