[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-gcc-list] Compiler bug ?
From: |
E. Weddington |
Subject: |
Re: [avr-gcc-list] Compiler bug ? |
Date: |
Wed, 16 Apr 2003 17:23:30 -0600 |
On 16 Apr 2003 at 15:14, Larry Barello wrote:
> avr-gcc -S -Os -fno-reorder-blocks -Wall -g -mmcu=attiny26 foo.c -o
> foo.s foo.c: In function `DoDeadBand': foo.c:21: error: unable to
> generate reloads for: (insn:QI 31 28 32 2 006B7390 (set (cc0)
> (compare (sign_extend:HI (reg/v:QI 24 r24 [42]))
> (const_int -20 [0xffffffec]))) 94 {*cmpqi_sign_extend}
> (nil)
> (nil))
> foo.c:21: internal compiler error: in find_reloads, at
> gcc/reload.c:3636
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
> make: *** [foo.s] Error 1
>
>
> ---- Winavr Version -----
>
> Reading specs from c:\WinAVR\bin\..\lib\gcc-lib\avr\3.3\specs
> Configured with:
> ../configure --prefix=/e/avrdev/install --target=avr --enable-language
> s=c,c++ --disable-nls Thread model: single gcc version 3.3 20030310
> (prerelease)
>
> --- foo.c ---
>
> #define DEADBAND_LOW (20) // +/-20 us
>
> char DoDeadBand(char raw)
> {
> char deadband;
>
> deadband = DEADBAND_LOW;
>
> if (raw > deadband)
> {
> return raw - deadband;
> }
> else if (raw < -deadband)
> {
> return raw + deadband;
> }
> else
> {
> return 0;
> }
> }
>
I was able to reproduce it here, even with specifying -
mmcu=atmega128.
However, the error goes away if you specify
-funsigned-char.
I'm trying to get a new WinAVR release out this week to address
another compiler bug that was reported on avr-gcc-list earlier. This
new release of WinAVR is just to upgrade GCC and avr-libc only,
however.
Eric Weddington
Re: [avr-gcc-list] Compiler bug ?, E. Weddington, 2003/04/16