diff options
Diffstat (limited to 'validation/optim')
| -rw-r--r-- | validation/optim/load-converted.c | 1 | ||||
| -rw-r--r-- | validation/optim/load-semi-volatile.c | 25 |
2 files changed, 25 insertions, 1 deletions
diff --git a/validation/optim/load-converted.c b/validation/optim/load-converted.c index 010c6bc7..7cbb53cf 100644 --- a/validation/optim/load-converted.c +++ b/validation/optim/load-converted.c @@ -8,7 +8,6 @@ static int foo(int *p, int i) /* * check-name: load-converted * check-command: test-linearize -Wno-decl $file - * check-known-to-fail * * check-output-ignore * check-output-excludes: add\. diff --git a/validation/optim/load-semi-volatile.c b/validation/optim/load-semi-volatile.c new file mode 100644 index 00000000..0e266e17 --- /dev/null +++ b/validation/optim/load-semi-volatile.c @@ -0,0 +1,25 @@ +struct s { + volatile int a; +}; + +struct s s; + +void foo(void) +{ + s; + s.a; +} + +/* + * check-name: load-semi-volatile + * check-command: test-linearize -Wno-decl $file + * check-known-to-fail + * + * check-output-ignore + * check-output-pattern(1): load + * + * check-description: + * The load at line 9 must be removed. + * The load at line 10 is volatile and thus + * must not be removed. + */ |
