From: SourceForge.net <no...@so...> - 2006-03-15 22:51:10
|
Bugs item #1450796, was opened at 2006-03-15 17:51 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1450796&group_id=599 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: pic16 target Group: None Status: Open Resolution: None Priority: 5 Submitted By: Alexander R. Enzmann (xan-der) Assigned to: Nobody/Anonymous (nobody) Summary: SIGSEGV Compiling pointer offset Initial Comment: SDCC : pic16/pic14 2.5.5 #1226 (Mar 15 2006) (MSVC) sdcc crashes when compiling an offset to a pointer. Compiling the following code will cause the problem: typedef struct _BDT { char Stat; char Cnt; unsigned int ADDR; } BDT; //Buffer Descriptor Table char *inPtr; char x; BDT at 0x0400 ep0Bo; static void SetFeature(char e) { char endpointNum = e; inPtr = (char *)&ep0Bo + (endpointNum * 8); } Command line used to do the compile: sdcc -mpic16 -c badptr1.c Output is: Caught signal 11: SIGSEGV Note that if you replace "ep0Bo" by "x" in the function SetFeature(), sdcc will compile. Eliminating the "at 0x0400" from the declaration of ep0Bo will also result in compilation. Appears the use of a fixed address in the variable declaration leads to the problem. This problem was not in build 1209 so it was introduced somewhere between 1209 and 1226. Xander ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1450796&group_id=599 |