diff options
Diffstat (limited to 'validation')
| -rw-r--r-- | validation/discarded-label-statement.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/validation/discarded-label-statement.c b/validation/discarded-label-statement.c new file mode 100644 index 00000000..b4e58ac6 --- /dev/null +++ b/validation/discarded-label-statement.c @@ -0,0 +1,24 @@ +/* + * Verify that the statement following an unused label + * is not discarded with the label. + */ + +static int bad(int a, int b) +{ + int r = 0; + +start: + r += a; + r += b; + + return r; +} + +/* + * check-name: discarded-label-statement + * check-command: test-linearize $file + * + * check-output-ignore + * check-output-contains: add + * check-output-contains: %arg1 + */ |
