diff --git a/assemble.c b/assemble.c index 4c8415fd..a1aef1cd 100644 --- a/assemble.c +++ b/assemble.c @@ -1178,6 +1178,9 @@ static int64_t calcsize(int32_t segment, int64_t offset, int bits, if (ins->oprs[0].segment != NO_SEG) nasm_error(ERR_NONFATAL, "attempt to reserve non-constant" " quantity of BSS space"); + else if (ins->oprs[0].opflags & OPFLAG_FORWARD) + nasm_error(ERR_WARNING | ERR_PASS1, + "forward reference in RESx can result in unpredictable results"); else length += ins->oprs[0].offset; break;