diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-12-05 03:36:57 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-12-10 23:26:23 +0100 |
| commit | 706254f20d357735884c5e7b78c03d49bcad9cd3 (patch) | |
| tree | 8081897f6f9a7f59fe3e66f5e97d20b03442c3e6 /validation | |
| parent | c0123a2f917241e52c5844655abbd83f56ff1017 (diff) | |
| download | sparse-dev-706254f20d357735884c5e7b78c03d49bcad9cd3.tar.gz | |
fix expansion of initializer (default)
Currently, constant_symbol_value() is doing the expansion
of a constant initializer when an explicit one is found
but nothing is done if the initilizer is an implicit one.
Fix this by:
* adding an helper to lookup the corresponding type from
offset;
* using this helper to get the correct kind for the value:
- a 0-valued EXPR_VALUE for integers
- a 0.0-valued EXPR_FVALUE for floats.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/expand/default-init-struct.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/validation/expand/default-init-struct.c b/validation/expand/default-init-struct.c index c843a1ab..085dd2d6 100644 --- a/validation/expand/default-init-struct.c +++ b/validation/expand/default-init-struct.c @@ -15,7 +15,6 @@ int test_struct(void) /* * check-name: default-init-struct * check-command: test-linearize -Wno-decl -fdump-ir $file - * check-known-to-fail * * check-output-ignore * check-output-contains: phisrc\\..*return.*\\$0 |
