This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/17114] New: ColdFire ICE with illegal constraints
- From: "peter at the-baradas dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Aug 2004 05:12:56 -0000
- Subject: [Bug target/17114] New: ColdFire ICE with illegal constraints
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the testcase with:
m68k-elf-gcc -g -O2 -m528x -Wall -c -o ./bug4.o ./bug4.c
causes:
./bug4.c:231: error: insn does not satisfy its constraints:
(insn 154 471 155 6 ./bug4.c:203 (set (mem/s:HI (plus:SI (reg:SI 9 %a1)
(const_int 20 [0x14])) [4 <variable>.FAT_cnt+0 S2 A16])
(mem:HI (plus:SI (reg/f:SI 14 %a6)
(reg:SI 9 %a1)) [45 file_cnt+0 S4 A16])) 29 {*m68k.md:790} (nil)
(nil))
./bug4.c:231: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:378
Testcase is:
int printf_s( const char *,...);
typedef struct{
unsigned short record_type;
unsigned short record_lenght;
unsigned long record_owner;
unsigned char Name_Manuf[40];
unsigned long Name_Manuf123;
unsigned long Popis1;
unsigned char Popis2[10];
unsigned char Picture1[10];
unsigned char Picture2[10];
} tmodule_Manuf;
typedef struct{
unsigned short record_type;
unsigned short record_lenght;
unsigned long record_owner;
unsigned char Name_Car[40];
unsigned long Name_Car123;
unsigned long Popis1;
unsigned char Popis2[10];
unsigned char Picture1[10];
unsigned char Picture2[10];
unsigned char Cables[40];
unsigned char Years[20];
} tmodule_CarType;
typedef struct{
unsigned short record_type;
unsigned short record_lenght;
unsigned long record_owner;
unsigned char Name_ECU[40];
unsigned long Name_ECU123;
unsigned short Type_ECU;
unsigned short Mserial;
unsigned long Popis1;
unsigned char Popis2[10];
unsigned char Picture1[10];
unsigned char Picture2[10];
unsigned char Extend1[10];
unsigned char Extend2[10];
unsigned char VIVID1[10];
unsigned char VIVID2[10];
} tmodule_ECUType;
typedef struct{
unsigned short record_type;
unsigned short record_lenght;
unsigned short Mserial;
unsigned char name[14];
unsigned short FAT_cnt;
unsigned short Res0;
} tMserial_rec;
typedef struct {
char Magic[4];
unsigned int Mserial;
char MFullName[100];
void (*start_module)(unsigned int debug);
tmodule_Manuf *Array_Manuf;
tmodule_CarType *Array_Cars;
tmodule_ECUType *Array_ECUs;
unsigned long res0;
unsigned long res1;
char Mname[10];
int M_ID;
char Msubname[10];
char Mversion[10];
} tmodule_desc;
typedef tmodule_desc *pmodule_desc;
typedef struct {
unsigned short magic1;
unsigned short magic2;
pmodule_desc pm_desc;
}tmodule_header;
typedef tmodule_header *pmodule_header;
typedef struct tfunc4main_table {
int (*get_hw_info)(char *buf);
int (*ide_read_sector)(char *buf, unsigned long start, unsigned long num);
int (*ide_write_sector)(char *buf, unsigned long start, unsigned long num);
int (*get_ip_addr)(char *ip);
int (*set_ip_addr)(char *ip);
int (*get_serial_num)(char *sn);
int (*check_secure)(void);
int (*loader_start)(void);
void (*reset_system)(void);
int (*get_run_first)(int erase);
} tfunc4main_table;
typedef tfunc4main_table *tpfunc4main_table;
typedef struct tsimple_FAT {
unsigned char name[14];
unsigned long size;
unsigned long start_sec;
unsigned long end_sec;
unsigned short attrib;
unsigned long crc;
} tsimple_FAT;
typedef tsimple_FAT *tpsimple_FAT;
typedef struct tCF_config_sector {
unsigned long magic;
unsigned long crc;
unsigned short version;
unsigned short CF_sector_size;
unsigned long CF_num_bytes;
unsigned long CF_num_secs;
unsigned short FAT1_version;
unsigned long FAT1_start;
unsigned long FAT1_size;
unsigned long data1_start;
unsigned long data1_size;
unsigned short FAT2_version;
unsigned long FAT2_start;
unsigned long FAT2_size;
unsigned long data2_start;
unsigned long data2_size;
unsigned char CF_serial[20];
unsigned char TS02_serial[20];
unsigned char eth_mac[6];
unsigned char res1[1];
} tCF_config_sector;
int copy2(unsigned char *src,unsigned char *dst,unsigned int num);
int Generate_menu(char *menu_buffer)
{
pmodule_header hlav;
pmodule_desc pom_desc;
unsigned int i,j,cnt;
int r;
unsigned long Menu_real_size;
unsigned char buff_sect[512], *uch,*ucc;
unsigned char *buff_module;
tCF_config_sector boot;
unsigned int file_cnt;
tsimple_FAT jeden_FAT;
unsigned int change_flag;
tMserial_rec Pole_Mser[100], *pPole_Mser_tmp;
unsigned int Pole_Mser_cnt;
tmodule_Manuf Pole_Manuf[100],Pole_Manuf_tmp,*pPole_Manuf_tmp;
unsigned int Pole_Manuf_cnt;
tmodule_CarType Pole_CarType[1000], Pole_CarType_tmp, *pPole_CarType_tmp;
unsigned int Pole_CarType_cnt;
tmodule_ECUType Pole_ECUType[10000], Pole_ECUType_tmp, *pPole_ECUType_tmp;
unsigned int Pole_ECUType_cnt;
buff_module = ((char *)0x20080000L);
r = ((tpfunc4main_table)0x448)->ide_read_sector( buff_sect, 0, 1);
if(r < 0)return(-1);
uch = (unsigned char *)&boot;
for(i=0;i<sizeof(tCF_config_sector);i++) {uch[i] = buff_sect[i]; }
if(boot.magic != 0x55aac396UL)return(-1);
printf_s("\n Boot loaded;");
file_cnt = 0;
Pole_Mser_cnt = 0;
Pole_Manuf_cnt = 0;
Pole_CarType_cnt = 0;
Pole_ECUType_cnt = 0;
do{
if((hlav->magic1 == 0x25A4) && (hlav->magic2 == 0x4A52))
{
pom_desc = (pmodule_desc)( (unsigned long)hlav + ( ((unsigned
long)hlav->pm_desc) & ~0x80000000UL) );
printf_s("\n\r Module desc base=%lx, Name=%s,
ADR=%lx;",pom_desc,pom_desc->MFullName, pom_desc->start_module);
Pole_Mser[Pole_Mser_cnt].record_type = 4;
Pole_Mser[Pole_Mser_cnt].record_lenght = sizeof(tMserial_rec);
Pole_Mser[Pole_Mser_cnt].Mserial = pom_desc->Mserial;
Pole_Mser[Pole_Mser_cnt].FAT_cnt = file_cnt;
copy2(jeden_FAT.name,Pole_Mser[Pole_Mser_cnt].name,14);
Pole_Mser_cnt++;
Pole_Mser[Pole_Mser_cnt].record_type = 0;
i = 0;
do{
Pole_Manuf[Pole_Manuf_cnt] = pom_desc->Array_Manuf[i];
printf_s("\n Manufacturer %s;", Pole_Manuf[Pole_Manuf_cnt].Name_Manuf);
Pole_Manuf_cnt++;
Pole_Manuf[Pole_Manuf_cnt].record_type = 0;
}while(pom_desc->Array_Manuf[++i].record_type != 0);
}
file_cnt++;
}while(1);
return 0;
}
--
Summary: ColdFire ICE with illegal constraints
Product: gcc
Version: 3.4.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peter at the-baradas dot com
CC: gcc-bugs at gcc dot gnu dot org,peter at the-baradas dot
com
GCC target triplet: m68k-elf
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17114