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

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

Re: [avr-gcc-list] Internal compiler error


From: Dmitry K.
Subject: Re: [avr-gcc-list] Internal compiler error
Date: Fri, 25 Mar 2005 16:03:59 +1000
User-agent: KMail/1.5

On Friday 25 March 2005 12:28, David Gesswein wrote:
...
> uint8_t data[65];
> register uint8_t *ndx asm("r4");
>
> int
> main (void)
> {
>    if (*ndx++)
>       PORTB |= _BV(PB0);
>    else
>       PORTB &= ~_BV(PB0);
>
>     return (0);
> }

I have try:

avr-gcc 3.3.4:  the same error.

avr-gcc 4.1.0 20050227:  no errors, good code:
        ...
   /* prologue end (size=4) */
        movw r30,r4
        ld r24,Z+
        movw r4,r30
        tst r24
        breq .L2
        sbi 56-0x20,0
        rjmp .L4
   .L2:
        cbi 56-0x20,0
   .L4:
        ldi r24,lo8(0)
        ldi r25,hi8(0)
   /* epilogue: frame size=0 */

Also avr-gcc 4.1 outputs good message after an attempt to reserve
'r5' for pointer:

   foo.c:2: error: register specified for 'ndx' isn't suitable \
      for data type





reply via email to

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