User account creation filtered due to spam.

Bug 35872

Summary: [4.3 regression] incorrect code for 32bit multiplication by constant
Product: gcc Reporter: Andreas Kaiser <a.kaiser>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Severity: major CC: eric.weddington, gcc-bugs, jackie.rosen
Priority: P3 Keywords: wrong-code
Version: 4.3.0   
Target Milestone: 4.3.1   
Host: mingw Target: avr
Build: Known to work: 4.1.2 4.2.2
Known to fail: 4.3.0 Last reconfirmed: 2008-04-08 20:17:37
Bug Depends on: 35519    
Bug Blocks:    
Attachments: testcase
assembly output for tiny25
assembly output for mega16

Description Andreas Kaiser 2008-04-08 16:11:32 UTC
A 32bit multiplication by a constant results in incorrect code when compiled for some AVR models (probably those having a hardware multiplier).

  avr-gcc -mmcu=attiny25 -Os -S t1.c      (correct)
  avr-gcc -mmcu=atmega16 -Os -S t1.c      (incorrect)
Comment 1 Andreas Kaiser 2008-04-08 16:12:08 UTC
Created attachment 15447 [details]
Comment 2 Andreas Kaiser 2008-04-08 16:12:32 UTC
Created attachment 15448 [details]
assembly output for tiny25
Comment 3 Andreas Kaiser 2008-04-08 16:13:01 UTC
Created attachment 15449 [details]
assembly output for mega16
Comment 4 Eric Weddington 2008-04-08 18:06:58 UTC
Works for 4.2.2 (WinAVR 20071221)
Comment 5 Eric Weddington 2008-04-08 18:16:03 UTC
Confirmed on WinAVR 20080407 (gcc 4.3.0 plus patches).
Comment 6 Eric Weddington 2008-04-08 20:38:27 UTC
Andy's combine.c patch for bug #35519 fixes this bug. This means that 4.3.0 is useless for the avr port until that patch is backported.
Comment 7 Andy Hutchinson 2008-04-12 15:28:07 UTC
Fixed 4.3 and 4.4
Comment 8 Jackie Rosen 2014-02-16 13:15:59 UTC Comment hidden (spam)