GCC Bugzilla – Bug 35872
[4.3 regression] incorrect code for 32bit multiplication by constant
Last modified: 2014-02-16 13:15:59 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)
Created attachment 15447 [details]
Created attachment 15448 [details]
assembly output for tiny25
Created attachment 15449 [details]
assembly output for mega16
Works for 4.2.2 (WinAVR 20071221)
Confirmed on WinAVR 20080407 (gcc 4.3.0 plus patches).
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.
Fixed 4.3 and 4.4
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.