[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[microblaze-uclinux] mb-gcc internal compiler error
Hi,
I got an internal compiler error while using latest version of mb-gcc
(20051125)
---
mb-gcc (GCC) 3.4.1 ( Xilinx EDK 8.1 Build EDK_I.17 121005 )
Copyright (C) 2004 Free Software Foundation, Inc.
Here is the error log:
---
machine.c: In function `mach_early_init':
machine.c:160: warning: passing arg 1 of `get_romfs_len' from
incompatible pointer type
Un-supported call insn
machine.c: In function `machine_restart':
machine.c:259: internal compiler error: in final_scan_insn, at final.c:2404
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://support.xilinx.com> for instructions.
make[2]: *** [machine.o] Error 1
make[1]: *** [_dir_arch/microblaze/platform/uclinux-auto] Error 2
make: *** [linux] Error 1
And here is the file I was changing
machine.c
251 void machine_restart (char *__unused)
252 {
253 // machine_halt ();
254 void (*func_ptr)(void);
255
256 func_ptr = (void(*)(void))0;
257 // func_ptr = machine_halt;
258 (*func_ptr)();
259 }
This is a workaround:
void machine_restart (char *__unused)
{
void (*func_ptr)(void);
unsigned int *p = (unsigned int *)0;
func_ptr = (void(*)(void))p;
(*func_ptr)();
}
I was changing machine_restart to be able to make a reboot.
It seems that mb-gcc doesn't like a constant assigned to a function pointer.
The same code works fine on the bootloader compiled with mb-gcc of
Xilinx EDK 7.1.2
Regards,
Claudio Lanconelli
___________________________
microblaze-uclinux mailing list
microblaze-uclinux@xxxxxxxxxxxxxx
Project Home Page : http://www.itee.uq.edu.au/~jwilliams/mblaze-uclinux
Mailing List Archive : http://www.itee.uq.edu.au/~listarch/microblaze-uclinux/