From: George M. G. <gga...@co...> - 2004-06-27 15:21:47
|
I have a PIC18 program that is being ported from Microchip c18 to sdcc. Very low priority. Environment is Red Hat 9.0 with sdcc source date 20040615. The following routine fails compilation with: Processor: 18f8720 Caught signal 11: SIGSEGV 0 byte GetByte(byte index) 1 { 2 uint16 3 addr, compAddr; 4 byte 5 val, compVal; 6 7 addr = ConfigTbl[index].addr; 8 compAddr = ConfigTbl[index].addr + 1; 9 10 val = ReadLoc(addr); 11 compVal = ReadLoc(compAddr); 12 13 if ((val + compVal) != 0xFF) xxx(); 14 15 return(val); 16 } Moving line 8 to just before line 11 compiles correctly. Making the routine a standalone file also compiles without error. Moving it back allows 1 compilation without error, then errors. Perhaps an uninitialized variable? Regards, George |