From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5580 invoked by alias); 27 Oct 2008 13:54:31 -0000 Received: (qmail 5421 invoked by uid 48); 27 Oct 2008 13:53:10 -0000 Date: Mon, 27 Oct 2008 13:54:00 -0000 Message-ID: <20081027135310.5420.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug c/37924] [4.2/4.3/4.4 Regression] ice in smallest_mode_for_size, at stor-layout.c:219 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jakub at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-10/txt/msg01743.txt.bz2 ------- Comment #3 from jakub at gcc dot gnu dot org 2008-10-27 13:53 ------- I see at least 2 bugs. One is simplify_shift_const "optimizes" (lshiftrt:SI (xor:SI (ashiftrt:SI (ashift:SI (subreg:SI (mem/c/i:QI (symbol_ref:DI ("a") ) [0 a+0 S1 A8]) 0) (const_int 24 [0x18])) (const_int 24 [0x18])) (const_int -512 [0xfffffffffffffe00])) (const_int 9 [0x9])) into invalid: (and:SI (not:SI (ashiftrt:SI (ashift:SI (subreg:SI (mem/c/i:QI (symbol_ref:DI ("a") ) [0 a+0 S1 A8]) 0) (const_int 24 [0x18])) (const_int 33 [0x21]))) (const_int 8388607 [0x7fffff])) (it should IMHO never create a shift bigger than precision, as that has undefined behavior, while the original did not have one). The other bug is that make_compound_operation should && mode_width >= INTVAL (rhs), even if the user passes in undefined behavior code, GCC shouldn't ICE on it. -- jakub at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|NEW |ASSIGNED Last reconfirmed|2008-10-27 11:01:06 |2008-10-27 13:53:09 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37924