Tool/software: TI C/C++ Compiler
The TI assembler (ARM CGT 16.9.6 LTS, in CCS 7.4.0) objects to the expression "1 << (121 % 32)" (the result of some macro expansions), claiming a value out of range. 121%32 is 25 = 0x19, which is certainly in range for a shift count, and indeed there is no problem with "1 << 25".
To investigate, I put ".word 121 % 32" in a place where I could find the result in the binary. What I see, both in CCS memory dump and in visual inspection of the SREC file, is 0x0000AC19 (!). No wonder it's out of range for a shift count... the bottom byte is the right value, but where is the "AC" in the next byte coming from? If I change 121 to 122, I get 0x0000B31A; 123 gives 0x0000BA1B.
The problem appears to be assembler-specific; the C compiler's % operator works correctly. The assembler's divide operator also works correctly.