diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-01-31 16:28:09 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2021-01-31 16:28:09 +0100 |
| commit | 60c1f2706e30eacc29296e6cb5d9327c85a01340 (patch) | |
| tree | 6f724e58a1433f09f80de327e7e016617e1e0999 /validation/linear | |
| parent | 455f7992c4c03030f0da9c260e067b36a556371a (diff) | |
| parent | 47336d48e3226903f320bb02f386322cf9e711fd (diff) | |
| download | sparse-dev-60c1f2706e30eacc29296e6cb5d9327c85a01340.tar.gz | |
Merge branch 'fix-join-cond'
* fix add_join_conditional() when one of the alternative is VOID
Diffstat (limited to 'validation/linear')
| -rw-r--r-- | validation/linear/join-cond-discard.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/validation/linear/join-cond-discard.c b/validation/linear/join-cond-discard.c new file mode 100644 index 00000000..9f07a7d4 --- /dev/null +++ b/validation/linear/join-cond-discard.c @@ -0,0 +1,19 @@ +void abort(void) __attribute__((noreturn)); + +int bar(int a) +{ + return a ? (abort(), 0) : 0; +} + +int qux(int a) +{ + return a ? (abort(), 0) : (abort(), 1); +} + +/* + * check-name: join-cond-discard + * check-command: test-linearize -Wno-decl $file + * + * check-output-ignore + * check-output-excludes: phisrc\\..*phi + */ |
