From: SourceForge.net <no...@so...> - 2010-01-13 00:36:48
|
Bugs item #2755364, was opened at 2009-04-12 03:58 Message generated for change (Comment added) made by arcanum You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=2755364&group_id=68108 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: GCC Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: SprinterSB (sprintersb) Assigned to: Nobody/Anonymous (nobody) Summary: Wrong shift/bitfield extract in WinAVR-20090313/-20081205 Initial Comment: The following testcase will generate wrong code compilerd as avr-gcc -O -S foo.c char bug (unsigned x) { return x >> 12; } bug: swap r24 andi r24,lo8(15) ret both in WinAVR-20090313 and WinAVR-20081205 The same is true for >> 13, >> 14 and respective bitfield extractions. The bug is introduced by 41-gcc-4.3.2-bug-11259_v3.patch which defines erroneous define_insn_and_split "*lshrqi3_const4", "*lshrqi3_const5", "*lshrqi3_const6". The bug can be suppressed by -fno-split-wide-types or by disabling optimization. For a discussion see http://lists.gnu.org/archive/html/avr-gcc-list/2009-04/msg00005.html Georg-Johann ---------------------------------------------------------------------- Comment By: Eric Weddington (arcanum) Date: 2010-01-12 17:36 Message: This needs to be reported to the GCC project at: http://gcc.gnu.org/bugzilla/ This is not a WinAVR bug. The WinAVR User Manual states that any potential bugs in the GCC compiler must be reported to the GCC project and not here. Closed as "Won't Fix." ---------------------------------------------------------------------- Comment By: Anatoly Sokolov (aesok) Date: 2009-04-18 06:35 Message: Hi Georg-Johann. Please, more clearly describe why you are seeing this bug. The GCC HEAD generate this code for 'bug' function: avr-gcc -std=gnu99 -gdwarf-2 -Wall -Os -mmcu=atmega128 -D F_CPU=4000000UL -save- temps -c -o main.o main.c .global bug .type bug, @function bug: .LFB0: .LM1: .LVL0: /* prologue: function */ /* frame size = 0 */ .LM2: mov r24,r25 .LVL1: swap r24 andi r24,lo8(15) /* epilogue start */ ret .LFE0: .size bug, .-bug Anatoly. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=520074&aid=2755364&group_id=68108 |