This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/71627] AVR error: unable to find a register to spill in class 'POINTER_X_REGS'


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71627

Khuong Nguyen Tan <khuongnguyen00331 at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |AVR
                 CC|                            |khuongnguyen00331 at gmail dot com
      Known to work|                            |4.7.2
               Host|                            |Linux Debian GNU/Linux
      Known to fail|                            |4.9.0, 4.9.2, 5.3.0, 6.1.0
              Build|                            |AVR

--- Comment #1 from Khuong Nguyen Tan <khuongnguyen00331 at gmail dot com> ---
/* { dg-do run } */

/*#include "exit-abort.h"*/
#include <stdio.h>
#define PROGMEM __attribute__((progmem))

const char strA[] PROGMEM = "%ld + %ld + %ld + %ld + %ld = %ld !\n";
//const char strB[] PROGMEM = "%d + %d + %d + %d + %d + %d = %ld !\n";
//const char strA[] PROGMEM = "%c + %c + %c= %c !\n";
//const char strc PROGMEM = 'c';

//volatile __memx const unsigned char s = 1, a='a',b='b',c='c';
//volatile __flash const unsigned char s = 1, a='a',b='b',c='c';
volatile __memx const long  a=24, b=26, c=50, d=23, e=40, f=43;

volatile  long result;
int main()
{
   //char result = 'e'; 
   //printf_P(strB, a, b);
   //printf_P(strC, a);
   result = a + b + c + d + e + f;
   printf_P(strA, a,b,c,d,e,f, result);

   //printf_P("\n==>%c", strc);
   //printf("\nString: %s\n", "End");
   return 0;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]