diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-11-20 02:56:43 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-11-20 03:21:59 +0100 |
| commit | af0c939354599110285978dbeb2cbb65acc537be (patch) | |
| tree | d0520bfdf56c4742699f198d7a6445b345de9dba /validation/expand | |
| parent | 06a45458a3618da69385eeda55bd8b64d6dd547f (diff) | |
| download | sparse-dev-af0c939354599110285978dbeb2cbb65acc537be.tar.gz | |
add testcase for missing function designator expansion
Add a testcase showing function designator are not expanded.
References: https://lore.kernel.org/lkml/1542623503-3755-1-git-send-email-yamada.masahi>
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/expand')
| -rw-r--r-- | validation/expand/function-pointer.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/validation/expand/function-pointer.c b/validation/expand/function-pointer.c new file mode 100644 index 00000000..45aace16 --- /dev/null +++ b/validation/expand/function-pointer.c @@ -0,0 +1,23 @@ +struct s { + int (*fun)(void); +}; + +inline struct s *inl(struct s *p) +{ + 1 + 0; + return p; +} + +static void tst(struct s *s) +{ + inl(s)->fun(); +} + +/* + * check-name: function-pointer + * check-command: test-linearize -fdump-ir $file + * check-known-to-fail + * + * check-output-ignore + * check-output-excludes: add\\.32.*\\$1, \\$0 + */ |
