Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1751 Internal error

closed-fixed
Maarten Brock
5
2013-05-25
2011-01-26
wek
No

The following snippet:

#include <stdint.h>
volatile uint8_t a;
void main(void) {
if ((* (uint8_t __xdata *)0xDF53)) {
a = 2;
}
}

compiled with plain "sdcc snippet.c" fails with

Internal error: validateLink failed in SPEC_CVAL(val->etype) @ /home/sdcc-builder/build/sdcc-build/orig/sdcc/src/SDCCval.c:1073: expected SPECIFIER, got null-link

Interestingly enough, if the condition is changed to
if (0 != (* (uint8_t __xdata *)0xDF53)) {
the snippet compiles correctly.

SDCC : mcs51/gbz80/z80/ds390/pic16/pic14/TININative/ds400/hc08 3.0.1 #6101 (Jan 12 2011) (MINGW32)

Discussion

  • Maarten Brock
    Maarten Brock
    2011-02-05

    Fixed in SDCC 3.0.1 #6208.

     
  • Maarten Brock
    Maarten Brock
    2011-02-05

    • labels: --> Icode generator
    • milestone: --> fixed
    • assigned_to: nobody --> maartenbrock
    • status: open --> closed-fixed