From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32753 invoked by alias); 2 Jun 2013 08:54:39 -0000 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 Received: (qmail 32700 invoked by uid 48); 2 Jun 2013 08:54:34 -0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/57503] New: [4.7/4.8 Regression] Expand uses wrong multiply routine Date: Sun, 02 Jun 2013 08:54:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cf_gcctarget attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-06/txt/msg00043.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57503 Bug ID: 57503 Summary: [4.7/4.8 Regression] Expand uses wrong multiply routine Product: gcc Version: 4.7.2 Status: UNCONFIRMED Keywords: wrong-code Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: gjl at gcc dot gnu.org Target: avr Created attachment 30241 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30241&action=edit cecky.c == Test case == #include long __attribute__((__noinline__)) rot (unsigned char v) { unsigned vs = v * 255; return (long) vs * 254; } int main (void) { long r = rot (129); if (r != 8355330) abort(); exit (0); } This program hits abort if compiled with 4.7.2 or 4.8.0. == Command line == avr-gcc -mmcu=atmega168 cecky.c -Os -save-temps -dp -funsigned-char -o cecky.elf -fdump-rtl-expand-details == Configure == Configured with: ../../gcc.gnu.org/gcc-4_7-branch/configure --target=avr --prefix=/local/gnu/install/gcc-4.7 --enable-languages=c,c++ --disable-nls --disable-shared --with-dwarf2 --with-avrlibc=yes