When the new regression test gte/pr35163.c is enabled in cases/Makefile.in, it fails. Apparently the comparison, which is done at compile time gives the wrong result.
Looks like the bug gets introduced at the optimizeCastCast in SDCCopt.c, line 3262 (in between the RAW1 and the CSE dump) (wrong type introduced for cast, then subsequent CSE optimizes out stuff incorrectly).
I can still reproduce this using sdcc from current svn.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Looks like the bug gets introduced at the optimizeCastCast in SDCCopt.c, line 3262 (in between the RAW1 and the CSE dump) (wrong type introduced for cast, then subsequent CSE optimizes out stuff incorrectly).
I can still reproduce this using sdcc from current svn.
Fixed in [r13830].
Related
Commit: [r13830]