diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-04-10 12:13:39 +0200 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-05-21 17:27:45 +0200 |
commit | 0b6d161ed1cc0f2226482d64c56fe9dc89bc0ebf (patch) | |
tree | bcfcb7f781c82a6220ac18a3bdc9a9f9af1dfd2d | |
parent | aa42800cc4aca57bb29cdc90fcace6c352449078 (diff) | |
download | sparse-0b6d161ed1cc0f2226482d64c56fe9dc89bc0ebf.tar.gz |
bad-goto: add testcases for linearization of invalid labels
A goto to a reserved or a undeclared label will generate
an IR with a branch to a non-existing BB. Bad.
Add a testcase for these.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | validation/linear/invalid-labels0.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/validation/linear/invalid-labels0.c b/validation/linear/invalid-labels0.c new file mode 100644 index 00000000..ae3bf728 --- /dev/null +++ b/validation/linear/invalid-labels0.c @@ -0,0 +1,19 @@ +static void foo(void) +{ + goto return; +} + +void bar(void) +{ + goto neverland; +} + +/* + * check-name: invalid-labels0 + * check-command: test-linearize -Wno-decl $file + * check-known-to-fail + * + * check-output-ignore + * check-output-excludes: END + * check-error-ignore + */ |