AVR Toolchain Bugs


AVR GNU Binutils Bugs

Bug # Status Description Patch Notes
#1038 ASSIGNED resolution of weak symbol not left for the linker if value is already known No The status is ASSIGNED, but there is no assignee.
#2378 NEW Incorrect opcode in __do_clear_bss if bss has more than 15 bytes No Not a bug, but documentation needs to be fixed. See comments.
#2626 FIXED Problems with LPM on attiny26 Yes Fixed in HEAD (future 2.19).
#5523 FIXED Confusing warning: "expression dangerous with linker stubs" No Fixed in HEAD (future 2.19).
#6019 FIXED [avr] avr-ld --relax requires --gc-sections Yes Fixed in HEAD (future 2.19).
#6449 NEW objdump -S and DOS-style line-endings Yes  
#11164 NEW [avr] EEPROM location wrong for XMEGA Yes Forward of WinAVR bug #2886068 which is now closed.

Open AVR GCC Bugs

Bug # Status Description Patch Notes
#3507 ASSIGNED appalling optimisation with sub/cmp on multiple targets No missed-optimization
#11180 NEW [avr-gcc] Optimization decrease performance of struct assignment. No missed-optimization
#17994 NEW avr-gcc does not output a dwarf2 .debug_frame section No  
#18065 NEW usual arithmetic conversion not applying correctly No missed-optimization
#18145 NEW Do not emit __do_copy_data or __do_clear_bss if .data or .bss is empty. Yes missed-optimization
#18989 See Note A few potentially ominous, and several likely harmless warnings during 4.0 build Yes One warning Fixed in 4.1.3, 4.2 branch, and >= 4.3.0. Another warning still needs to be fixed.
#19676 NEW Loop optimizer fails to reverse simple loop No missed-optimization
#19815 UNCONFIRMED Documentation change - GCC Internals MODES_TIEABLE_P No documentation change
#20296 NEW Speeding up small interrupts on avr No missed-optimization
#21018 NEW Initializing string literal data improperly marked frame-relative?, should be readonly static const. No  
#25722 UNCONFIRMED Stackpointer is not restored correct at end of function No Needs testing for 4.x
#26882 NEW [AVR][C++] ICE when using template function with memory attributes No C++. ice-on-valid-code.
#26883 NEW ICE when assigning memory attribute to class with simple constructor No C++. ice-on-valid-code.
#27663 NEW missed-optimization transforming a byte array to unsigned long No missed-optimization
#28718 UNCONFIRMED Call to -lgcc added prior to user libraries No C++
#29524 NEW [4.2/4.3 Regression] Too much RAM used: __clz_tab[] linked No 4.2/4.3 REGRESSION
#29560 NEW [avr] Poor optimization for byte shifts No missed-optimization
#30908 NEW tree cost for types which are > WORD_SIZE No About inline
#31528 NEW Inlining with -Os increases code size No Related to bug #30908.
#33049 NEW [avr] bit extraction non optimal, inversing logic solves problem No missed-optimization
#33050 NEW [avr] unnessary register save No missed-optimization
#33315 NEW If condition not getting eliminated No missed-optimization
#33970 NEW Missed optimization using unsigned char loop variable No missed-optimization.
#34040 NEW Support for DOUBLE_TYPE_SIZE != 64 targets No enhancement. Fortran
#34734 NEW attribute((progmem)) not handled properly in C++ for AVRs No  
#34737 NEW Scheduling of post-modified function arguments is not good No missed-optimization. Affects more than AVR target.
#34789 NEW [avr] sometimes the compiler keeps addresses in registers unnecessarily No missed-optimization.
#34791 UNCONFIRMED [avr] optimisation of 8-bit logic sometimes fails No missed-optimization.
#34792 UNCONFIRMED [avr] c++ worse than c compiler at 8-bit optimisations No missed-optimization.
#34888 UNCONFIRMED Stack patterns for AVR not optimal No missed-optimization.
#35073 NEW illegal opcode movw for mcu avr3 No AVR RTEMS
#35507 NEW [avr] 4.3.0: size of small funcion increases from 2 to 29 words No missed-optimization
#35634 NEW [4.1/4.2/4.3/4.4 Regression] operand of pre-/postin-/decrement not promoted No 4.3/4.4/4.5 REGRESSION. wrong-code. C front-end.
#35860 NEW [4.3 Regression] [avr] code bloat caused by -fsplit-wide-types No 4.3 REGRESSION. missed-optimization
#36467 NEW [avr] Missed optimization with pointer arithmetic and mul* No missed-optimization
#36561 NEW store using long array index not hoisted out of loop No Enhancement. alias, missed-optimization
#36571 UNCONFIRMED Default untyped return for AVR is byte register. No Test is XFAILed in >= 4.4.0.
#36598 NEW Failed optimisation of return of struct argment in memcpy-1.c No testsuite. Test is XFAILed in >= 4.4.0.
#36884 UNCONFIRMED ifcvt poor optimization No  
#37165 UNCONFIRMED [4.4 Regression] FAIL: gcc.dg/matrix/matrix-1.c scan-ipa-dump-times matrix-reorg "Flattened 3 dimensions" 1 No  
#37942 UNCONFIRMED [4.4/4.5 Regression] FAIL: gcc.c-torture/compile/930618-1.c No 4.4/4.5 REGRESSION
#38159 UNCONFIRMED [avr] ICE: gcc.c-torture/execute/pr38051.c compilation, -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions No ice-on-valid-code
#38342 NEW [4.3/4.4 Regression] __attribute__((__progmem__)) not propagated from typedef to data No 4.3 REGRESSION. C++
#38549 NEW [avr] eicall not properly set for > 128K program space No  
#38629 NEW target-specific parameters for inline heuristics not defined for AVR No enhancement
#39184 UNCONFIRMED ICE in tree_low_cst, at tree.c:4976 No RTEMS
#39212 NEW ice for AVR target: unable to find a register to spill in class 'POINTER_REGS' No  
#39250 ASSIGNED unsigned char times 64U produces long slow loop No missed-optimization
#39386 NEW [avr] different computation results for O1 and O0 executables No  
#39510 NEW [avr] missed optimisation with IO read and register variables No missed-optimization
#39621 NEW Delaying operation to end of function causes high stack usage No Affects multiple targets, including avr.
#39633 NEW [avr] loop bug No  
#39819 NEW [avr] Missed optimisation when setting 4-byte values No missed-optimization
#41738 NEW [4.3/4.4/4.5 Regression] optabs expands rotate using wrong mode No wrong-code. Fixed in 4.5.0. Waiting for 4.4 backport.
#41885 UNCONFIRMED AVR Rotate patterns do not correctly consider overlap. No  
#41894 NEW wrong code with -fno-split-wide-types No wrong-code. Fixed in 4.5.0
#42146 UNCONFIRMED ICE in tree_low_cst No  
#42149 UNCONFIRMED ICE:verify_gimple failed for avr target No ice-on-valid-code
#42204 UNCONFIRMED update_eliminables should be called in reload after something changes No  
#42210 NEW avr: optimizing assignment to a bit field No missed-optimization
#42240 UNCONFIRMED wrong epilogue on naked function No  
#42976 UNCONFIRMED Illegal translation for IF operator No  
#43088 UNCONFIRMED [avr] Suspect optimizer missed code in gcc 4.4.3.. No  
#43095 UNCONFIRMED [avr] GCC produces poor code for 4- and 8-byte values No  
#43104 UNCONFIRMED Incorrect code generation for target mcu ATMega164P No  
#43745 UNCONFIRMED [avr] g++ puts VTABLES in SRAM No Enhancement
#43746 UNCONFIRMED -fmerge-constants and -fmerge-all-constants don't work at AVR target No Enhancement

Closed AVR GCC Bugs

Bug # Status Description Patch Notes
#1078 FIXED Problems with attributes documentation Yes Fixed in HEAD (future 4.3)
#10768 FIXED ICEs on compilation of ada support library for avr Yes Fixed in HEAD (future 4.4).
#11074 FIXED libstdc++ fails to build due to gettext issue ? Fixed in >= 4.3.2.
#11259 FIXED [avr] gcc Double 'andi' missed optimization Yes Fixed in >= 4.4.0.
#12017 FIXED ICE: in spill_failure, at reload1.c:1862 with builtin_apply/builtin_return Yes Fixed in >= 4.2.1.
#16563 FIXED The compiler doesnt the necessary push/restore of r18/r19 No Fixed in >= 4.0.0.
#17993 FIXED Error in dwarf2 debug output of bitfield members No Fixed in >= 4.3.0.
#18251 FIXED unable to find a register to spill in class `POINTER_REGS' Yes Fixed in >= 4.3.0.
#18553 FIXED Annoying warning with -ffunction-sections -g Yes Fixed in 4.1.2, 4.2 branch, and 4.3 branch.
#19087 FIXED Overflowed address in dwarf debug line information Yes Fixed in 4.1.3, 4.2 branch, and >= 4.3.
#19154 FIXED miss-optimization of (x & pow2C) avr conditionals returning bool equivalent values No Fixed in >= 4.5.0.
#19636 FIXED [4.0/4.1/4.2 regression] Can't compile large switch statement No Fixed in >= 4.4.0.
#19684 FIXED avr wrong size in asm comment (peephole) No Fixed in >= 4.3.0.
#19959 FIXED [4.0/4.1/4.2 Regression] Can't compile gnattools for the cross targets No Fixed in >= 4.4.0.
#20222 FIXED Double load of volatile operand for abs builtin No Fixed in >= 4.3.0.
#20822 FIXED makeinfo cannot process gnat_ugn_unw.texi Yes Fixed in >= 4.4.0.
#21080 FIXED Excecution test failure for avr for pr17377 test case. Yes Fixed in >= 4.5.0.
#21107 FIXED [4.0/4.1/4.2 regression] internal compiler error: in expand_one_stack_var_at, at cfgexpand.c:476 No Fixed in 4.1.0
#23479 FIXED Implement binary constants with a "0b" prefix Yes Fixed in >= 4.3.0
#23726 FIXED Missed optimizations for divmod Yes Fixed in >= 4.5.0
#24894 FIXED ICE building newlib/libc/misc/init.c No Fixed in >= 4.4.0.
#25035 FIXED [4.1/4.2 regression] libssp causes a failure with cross compilers with unified trees No Fixed in >= 4.1.3 / 4.4.0.
#25448 FIXED [4.0/4.1/4.2 Regression] Unfounded warnings from the AVR backend Yes Fixed in 4.1.3, 4.2 branch, and >= 4.3.0.
#26504 FIXED [4.1/4.2 Regression] compute_frame_pointer_to_cfa_displacement error for avr target with --with-dwarf2 Yes Fixed in 4.1.2 and 4.2 branch.
#27192 FIXED call through function pointer goes to wrong address Yes Fixed in >= 4.5.0.
#27386 FIXED AVR: wrong code generated when passing three uint64_t arguments to function No Fixed in >= 4.4.0, >= 4.3.2.
#27593 FIXED [4.1/4.2 Regression][avr] bad code generation with -funroll-loops No Fixed in >= 4.3.0.
#28902 FIXED Fix for "alignment of XXX is greater than maximum object alignment" on AVR Yes Fixed in 4.2.1, and >= 4.3.0.
#29141 FIXED static constructors beyond 64k fail No Fixed in 4.4.0.
#29449 FIXED OBJECT_FORMAT_ELF not defined for the AVR target No Fixed in 4.1.2, 4.2 branch, and >= 4.3.0. Depends on GCC bug #18553.
#29932 FIXED avr-gcc wrongly optimizes bit sets/resets for IO register 0x20 Yes Works for 4.1.x. Fixed in 4.2 branch >= 4.3.0.
#30243 FIXED [4.1/4.2/4.3 Regression][avr] signbit() causes an internal compiler error Yes Fixed in >= 4.4.0, >= 4.3.2.
#30289 FIXED avr-gcc: builtin memset(): wrong code No Fixed in 4.1.3, 4.2 branch, and >= 4.3.0.
#30483 FIXED Internal compiler error with inline volatile assembly on AVR No Fixed in 4.1.3, 4.2 branch, and >= 4.3.0.
#30841 FIXED [4.3 regression] Missed optimizations for sbi/cbi instructions No Fixed in >= 4.3.0.
#31137 FIXED missing "break" in switch for MULT in avr_rtx_costs Yes Fixed in 4.1.3, 4.2 branch, and >= 4.3.0.
#31331 FIXED ICE on invalid function attribute syntax for main() Yes Fixed in 4.1.3, 4.2.1 and >= 4.3.0.
#31644 FIXED [avr] can't find a register in class 'BASE_POINTER_REGS' while reloading 'asm' Yes Fixed in >= 4.4.0.
#31786 FIXED [4.1/4.2/4.3 Regression][avr] error: unable to find a register to spill in class 'BASE_POINTER_REGS' Yes Fixed in >= 4.4.0.
#32335 FIXED libgcc build failure, ICE in cselib_record_set, at cselib.c:1508 No Fixed in >= 4.3.0.
#32901 FIXED [4.1 regression] bitfield constants with multiple bitfields take up space in .data No Fixed in >= 4.1.3 / 4.3.1 (?).
#33028 FIXED Missed optimizations in peephole2 pass Yes Fixed in >= 4.3.0.
#33200 FIXED install fails when trying to install fix-header since fix-header wasn't built No Fixed in >= 4.5.0.
#33782 FIXED FAIL: gcc.c-torture/compile/limits-stringlit.c (test for excess errors) No Fixed in >= 4.4.0.
#34210 FIXED ffs builtin calls undefined __ffshi2 Yes Fixed in HEAD (future 4.4).
#34299 FIXED [avr] ICE on function attribute syntax for main() No Fixed in >= 4.4.0.
#34412 FIXED ICE in extract_insn, at recog.c:1990 Yes Fixed in >= 4.3.0.
#34879 FIXED __builtin_setjmp / __builtin_longjmp fails stack frame address with O2, O3 and Os Yes Fixed in >= 4.4.0.
#34880 FIXED gcc.c-torture/execute/float-floor.c fails for targets with no 64-bit double type Yes Fixed in >= 4.4.0.
#34889 FIXED gcc.c-torture/execute/builtins/pr23484-chk.c fails on 16 bit integer platforms No Fixed in >= 4.4.0.
#34894 FIXED Some compile tests require trampolines even when the target sets no_trampolines Yes Fixed in >= 4.4.0.
#34916 FIXED [4.3 Regression] gcc.c-torture/execute/pr27364.c fails with -O1, -O2 and -Os Yes Fixed in >= 4.3.1 / 4.4.0.
#34932 FIXED [avr] ICE in reload No Fixed in >= 4.4.0, >= 4.3.2.
#35005 FIXED New testcase execute/20071211-1.c assumes 32 bit integers Yes Fixed in >= 4.4.0.
#35013 FIXED Incomplete check in RTL for "pm()" annotation Yes Fixed in >= 4.5.0.
#35509 FIXED [4.3/4.4 Regression] builtin isinf() mismatch to compile-time substitution No Fixed in >= 4.4.0.
#35519 FIXED COMBINE repeating same matches and can SEG fault Yes Fixed in >= 4.3.1 / 4.4.0.
#35542 FIXED fwprop only propagates one operand Yes Fixed in >= 4.3.2 / 4.4.0.
#35872 FIXED [4.3 regression] incorrect code for 32bit multiplication by constant No Fixed in >= 4.3.1 / 4.4.0.
#36212 FIXED Vector alignment overides Target alignment Yes Fixed in >= 4.4.0.
#36284 FIXED gcc.dg-struct-layout fails AVR target - multiple reasons No Fixed in >= 4.4.0.
#36285 FIXED gcc.dg/compat/struct-by-value-xxx improper test for AVR target No Fixed in >= 4.4.0.
#36336 FIXED ICE push_reload - psuedo reg_equiv_constant No Fixed in >= 4.3.2 / 4.4.0.
#36424 FIXED avr-gcc use don't saved registers in ISR with -O3 ('-frename-registers' ) optimization Yes Fixed in >= 4.4.0.
#36447 FIXED [4.4 Regression] simplify_subreg ICE with right shift more than length type AVR Yes Fixed in >= 4.4.0.
#36470 FIXED sizeof UTF-32 is 2 on AVR No Fixed in >= 4.5.0.
#36903 FIXED Generic vectorizarion test failures No Fixed in >= 4.5.0.
#37020 FIXED [4.4 Regression] [AVR] FAIL: gcc.dg/debug/dwarf2/dwarf-die3.c scan-assembler-not DW_AT_inline No Fixed in >= 4.4.0.
#37081 FIXED [avr] FAIL: gcc.dg/pr36998.c No Fixed in >= 4.5.0.
#37466 FIXED [AVR] avr-gcc generating incorrect assembly for expression with the long constant operands Yes Fixed in >= 4.3.3.
#38036 FIXED [4.4/4.5 Regression][AVR] FAIL: gcc.c-torture/execute/pr37573.c execution No Fixed in >= 4.4.3.
#38202 FIXED [avr] FAIL: gcc.dg/torture/pr37868.c No Fixed in >= 4.5.0.
#38558 FIXED [avr] ICE on function attribute syntax for __vectorN() No Fixed in >= 4.4.0. Duplicate of bug 34299
#39223 FIXED volatile bug on AVR No Fixed in >= 4.4.2.
#41440 FIXED SEG FAULT in CSE.C caused by bad RTL expansion Yes Fixed in >= 4.5.0.
#42457 FIXED [4.5 Regression] AVR fails to build with other than C family languages No Fixed in >= 4.5.0.
#42483 FIXED AVR fails all whopr/lto tests No Fixed in >= 4.5.0.

Host Specific Bugs Affecting Toolchain Distros

Bug # Status Description Patch Notes
#17621 FIXED Add option to have GCC not search $(prefix) Yes Fixed in HEAD (future 4.3).
#22133 FIXED In MinGW trailing forward slash not allowed in include path Yes Fixed in HEAD (future 4.3).
#30972 UNCONFIRMED Call to _access has invalid parameter when linked with msvcrt Yes Building the toolchain on Windows Vista

avr-libc Bugs

List here.

AVRDUDE Bugs

List here.

AVaRICE Bugs

List here.

AVR GDB Bugs

Bug # Status Description Patch Notes
#1948 OPEN remote_xfer_partial(): packet size probe fails when LENGTH and OFFSET are zero [target: avr] Yes GDB 6.3. This looks like it's fixed in 6.6, but needs retesting.
#2124 See Note gdb crashes when remote simulavrxx target branches to interrupt handler No Confirmed: Cannot reproduce with later tools. See comments in bug.

Last updated: $Date: 2010/04/14 20:00:48 $