drh / lcc

The lcc retargetable ANSI C compiler
https://drh.github.io/lcc/
2.03k stars 441 forks source link

Non-lvalue can be assigned after simplifying the shift operation #32

Open huangguiyang opened 7 years ago

huangguiyang commented 7 years ago
(i >> 0) = j;

After the simplify at simp.c, the expression 'i >> 0' will be simplified to 'i' which is an INDIR tree, thus the assignment check will be OK.

The same problem can be found in other identity simplification.