diff options
author | Christopher <sparse@chrisli.org> | 2010-07-13 01:05:10 -0700 |
---|---|---|
committer | Christopher <sparse@chrisli.org> | 2010-07-13 01:06:19 -0700 |
commit | e461ed2a9fabede15a9c65aa87ca19f8c3a0b264 (patch) | |
tree | 108a2459fc36201cf7d169047320fd0ef32dc978 | |
parent | parser: fix and simplify support of asm goto (diff) | |
download | sparse-e461ed2a9fabede15a9c65aa87ca19f8c3a0b264.tar.gz sparse-e461ed2a9fabede15a9c65aa87ca19f8c3a0b264.tar.bz2 sparse-e461ed2a9fabede15a9c65aa87ca19f8c3a0b264.zip |
Add test case for builtin_unreachable()
The test case is taken from gcc documents.
Signed-off-by: Christopher <sparse@chrisli.org>
-rw-r--r-- | validation/builtin_unreachable.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/validation/builtin_unreachable.c b/validation/builtin_unreachable.c new file mode 100644 index 0000000..29799b5 --- /dev/null +++ b/validation/builtin_unreachable.c @@ -0,0 +1,15 @@ +/* example from gcc documents */ + +void function_that_never_returns (void); + +static int g (int c) +{ + if (c) + return 1; + function_that_never_returns (); + __builtin_unreachable (); +} + +/* + * check-name: __builtin_unreachable() + */ |