mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 23:29:27 +00:00
Fix mis-optimization of "expression && non-zero constant" operations with 32-bit type.
The previous code may have been intended to convert this to a "!=0" test, which would have been valid if correctly implemented, but with the current code generator that actually yields worse code than the original version, so for now I just removed the optimization for this case. This problem could lead to crashes in code like the following (derived from a csmith-generated test case): #pragma optimize 1 int main(int argc, char *argv[]){ long l_57 = argc; return (4 ^ l_57) && 6; }
This commit is contained in:
parent
db98f7842d
commit
7f94876fa8
Loading…
Reference in New Issue
Block a user