Take the following code:
int f(int i)
{
int k = 0;
if (i == 0)
k = i == 0;
return k;
}
(reduced from c-parser.c)
VRP produces a missed matched types in the assignment of k:
t.c: In function 'f':
t.c:2: error: statement types mismatch
kD.1266_6 = 1;
intD.0
_BoolD.1063
--
Summary: VRP produces missed matched (non compatible) types in
MODIFY_EXPR
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pinskia at gcc dot gnu dot org
CC: dnovillo at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22329