From: SourceForge.net <no...@so...> - 2011-02-06 21:42:17
|
Bugs item #3150679, was opened at 2011-01-04 00:45 Message generated for change (Comment added) made by maartenbrock You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3150679&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: Icode generator >Group: fixed >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: DavidEGrayson () >Assigned to: Maarten Brock (maartenbrock) Summary: validateOpType failed in OP_DEFS(sym) Initial Comment: Hello. I've found another bug in SDCC that occurs when you try to cast an address to a pointer, then dereference the pointer and assign a value to it. Here is the code: unsigned char __data *p; void f() { while(1) { *((unsigned char __data *)0) = *p; } } The command I used to run SDCC was `sdcc -c test.c`. My SDCC version is: SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.1 #6092 (Dec 30 2010) (MINGW32) The error message I get is: Internal error: validateOpType failed in OP_DEFS(sym) @ /home/sdcc-builder/build /sdcc-build/orig/sdcc/src/SDCCloop.c:339: expected symbol, got value This bug also occurs for variables that are in other memory spaces like __xdata. One workaround for this bug is to declare the variable ahead of time, as a static variable with an __at() to put it at the right address. ---------------------------------------------------------------------- >Comment By: Maarten Brock (maartenbrock) Date: 2011-02-06 22:42 Message: Fixed in SDCC 3.0.1 #6213. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=100599&aid=3150679&group_id=599 |