validateOpType failed in OP_SYMBOL

  • wyse03br

    wyse03br - 2006-11-16

    I got this error message when I compile the following code:

    #define REG_ADDR 0x4
    volatile char at (REG_ADDR) REG;

    int main() {
    REG = 1;
    *(&REG) = 2;
    *((volatile char *)&REG) = 3; // This causes the error
    *((volatile char *)REG_ADDR) = 4; // This line runs fine!
    return 0;

    % sdcc -mhc08 at_error.c
    Internal error: validateOpType failed in OP_SYMBOL(IC_RESULT (ic)) @ SDCCcse.c:2168: expected symbol, got value

    I got a workaround by setting REG as a global symbol in the linker, but it is not a satisfatory solution - it is not feasible to pass the symbols  there are hundreds of symbols

    Does anybody know what this error means and how to fix it so that I can use the "at" vars?


    • Maarten Brock

      Maarten Brock - 2006-11-16

      It means a bug in the compiler. Please verify this still exists in the latest snapshot and if so file it as a bug report.


Log in to post a comment.