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

2017-01-12 Thread khuongnguyen00331 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71627

--- Comment #6 from Khuong Nguyen Tan  ---
(In reply to Senthil Kumar Selvaraj from comment #5)
> Fixed in trunk (7.0)

Thanks Senthil Kumar Selvaraj.
It was worked !!

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

2016-06-22 Thread khuongnguyen00331 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71627

Bug ID: 71627
   Summary: AVR error: unable to find a register to spill in class
'POINTER_X_REGS'
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: khuongnguyen00331 at gmail dot com
  Target Milestone: ---

Created attachment 38751
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38751&action=edit
test memx-space

avr-gcc  -mmcu=atmega128 -fdump-rtl-all -o avr.s  -O1 avr.c
avr.c: In function ‘main’:
avr.c:28:1: error: unable to find a register to spill in class ‘POINTER_X_REGS’
 }
 ^
avr.c:28:1: error: this is the insn:
(insn 108 107 109 2 (set (reg:QI 21 r21)
(subreg:QI (reg/f:PSI 61) 2)) avr.c:22 71 {movqi_insn}
 (nil))
avr.c:28: confused by earlier errors, bailing out

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

2016-06-22 Thread khuongnguyen00331 at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71627

Khuong Nguyen Tan  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  ---
/* { dg-do run } */

/*#include "exit-abort.h"*/
#include 
#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;
}