avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] reproducable gcc error: unrecognizable insn


From: Oliver Kasten
Subject: [avr-gcc-list] reproducable gcc error: unrecognizable insn
Date: Fri, 06 Sep 2002 12:07:59 +0200

i get the following reproducable error:

avr-gcc -mmcu=atmega128 -O6 -Wall -c insn.c 
insn.c: In function `foo':
insn.c:18: unrecognizable insn:
(insn 11 9 13 (set (reg:QI 42)
        (const_int 129 [0x81])) -1 (nil)
    (expr_list:REG_EQUAL (const_int 129 [0x81])
        (nil)))
insn.c:18: Internal compiler error in extract_insn, at recog.c:2148

when compiling the following piece of code with optimizations on
(without optimization it compiles just fine).

--- snip ---

#include <string.h>

void foo();

typedef struct {
  unsigned char a;
  void* b;
} array_el_t;

static array_el_t array[43];

void foo() {
  memset( array, 0, sizeof(array) );
}
--- snip ---

the problem is memset(). curiously, when reducing the array to 42 (or
less) elements, it works fine.

i am currently using the tool versions below, but the same error
occurred with avr-gcc-3.3-20020905-experimental.

are there any recommendations regarding optimization on the avr
platform? my observation from previous experiments was, that with higher
optimization levels RAM consumption actually decreases. 

best,
olli*

> avr-ld -v
GNU ld version 2.13
> avr-gcc -v
Reading specs from /usr/local/avr/lib/gcc-lib/avr/3.2/specs
Configured with: ./configure --program-prefix=avr- --target=avr
--enable-languages=c --prefix=/usr/local/avr
Thread model: single
gcc version 3.2

libc is avr-libc-20020904 (yesterdays cvs snapshot)




-- 
Oliver Kasten                                phone: +41/ 1/ 63-2 06 63
ETH-Zurich                                     fax: +41/ 1/ 63-2 16 59
Haldeneggsteig 4, IFW D48.1           email: address@hidden
CH-8092 Zuerich, Switzerland           http://www.inf.ethz.ch/~kasten/
avr-gcc-list at http://avr1.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]