I ran into a similar issue a long time ago, with the GNU assembler in "intel_syntax noprefix" mode. It has an issue where there's syntactic ambiguity that makes it possible to interpret a forward-referenced named constant immediate as a reference to an unknown symbol, if in an instruction that could accept either an immediate or a memory address. The net result is assembling the instruction to have a placeholder memory address (expected to be filled in by the relocated address of the symbol when linked) rather than the expected immediate. Painful to debug.
TASM IDEAL mode resolves that ambiguity and should've been the standard syntax for x86 Asm in contrast to MASM, and RosAsm syntax is pretty nice too, but GNU as (and its default syntax) is in a wholly different category of insanity that's nearly comparable to HLA.