diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-06 10:10:59 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-11-10 13:54:22 +0100 |
commit | 0544ea39ce67fed029b101251516e429a994a885 (patch) | |
tree | 6cf1484d6758c3ded762e685b62a5165cf840fc8 | |
parent | c2bf4dc16bece957f6e8d044121477d69069df3d (diff) | |
download | sparse-0544ea39ce67fed029b101251516e429a994a885.tar.gz |
typeof: add a test for unexamined typeof
The base type of pointers are not examined when the pointer is.
It needs to be done later when looked at.
This may be a problem when show_typename() is used on a pointer
which has not yet been 'deep-examined' and, for example, has a
SYM_TYPEOF as its base type.
Add a test case showing the problem.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | validation/eval/typeof0.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/validation/eval/typeof0.c b/validation/eval/typeof0.c new file mode 100644 index 00000000..abef6386 --- /dev/null +++ b/validation/eval/typeof0.c @@ -0,0 +1,11 @@ +static int i; +static typeof(i) *ptr; + +/* + * check-name: eval-typeof0 + * check-command: test-show-type $file + * check-known-to-fail + * + * check-output-ignore + * check-output-excludes: unknown type + */ |