pet_expr_is_scalar_access: do not consider scalar fields as scalars
commit16986a82bfdee30ee4765fed2193e200efd0017a
authorSven Verdoolaege <skimo@kotnet.org>
Thu, 6 Feb 2014 08:52:16 +0000 (6 09:52 +0100)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 24 Mar 2014 16:08:34 +0000 (24 17:08 +0100)
tree96dd874c173e153dcfb2243c50804bb540fc8662
parent5cb2a5d1ff35701394a74127dcac7ce8be39f107
pet_expr_is_scalar_access: do not consider scalar fields as scalars

pet_expr_is_scalar_access is used to check whether a value assigned
to a variable should be stored in assigned_value.  If this variable
is the field of a struct, then the value will actually end up being
assigned to the entire struct.  This does not cause any problems
in the current implementation because the value of a struct is
never retrieved from assigned_value.
In future commits, we will be changing the way we keep track
of assigned values, so we need to make sure this will not
cause any problems then.  We therefore no longer consider scalar
members as scalars.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
expr.c
tests/struct11.c [new file with mode: 0644]
tests/struct11.scop [new file with mode: 0644]