diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-12-05 23:35:34 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-12-10 23:26:23 +0100 |
| commit | f9b443940a8515132035435d3b4fec232a26c582 (patch) | |
| tree | 2edcc10307c116625e24b01c87358f8b57cbe84d /validation/eval | |
| parent | aa42d419661df95820ba8c28e93b0b1359e0f8d7 (diff) | |
| download | sparse-dev-f9b443940a8515132035435d3b4fec232a26c582.tar.gz | |
fix addressability marking in evaluate_addressof()
mark_addressable() is used to track if a symbol has its
address taken but does not take in account the fact that
a symbol can be accessed via one of its subfields.
A failure occurs in case like:
struct { int a; } s = { 3 };
...
def(&s.a);
return s.a;
where 's' is not marked as being addressable and so the
the initializer will be expanded and the return expression
will always be replaced by 3, while def() can redefine it.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/eval')
| -rw-r--r-- | validation/eval/addressable-complex.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/eval/addressable-complex.c b/validation/eval/addressable-complex.c index 62ab59f0..e3d4aca4 100644 --- a/validation/eval/addressable-complex.c +++ b/validation/eval/addressable-complex.c @@ -16,7 +16,6 @@ int use1(void) /* * check-name: eval/addressable-complex * check-command: test-linearize -Wno-decl -fdump-ir $file - * check-known-to-fail * * check-output-ignore * check-output-contains: load\\. |
