diff options
Diffstat (limited to 'gcc/testsuite/c-c++-common/spellcheck-missing-option.c')
-rw-r--r-- | gcc/testsuite/c-c++-common/spellcheck-missing-option.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/c-c++-common/spellcheck-missing-option.c b/gcc/testsuite/c-c++-common/spellcheck-missing-option.c new file mode 100644 index 0000000..d7dbb2e --- /dev/null +++ b/gcc/testsuite/c-c++-common/spellcheck-missing-option.c @@ -0,0 +1,15 @@ +void +test_fopenacc () +{ + __builtin_printf ("_OPENACC = %d\n", _OPENACC); /* { dg-error "'_OPENACC' undeclared" "" { target c } } */ + /* { dg-error "'_OPENACC' was not declared in this scope" "" { target c++ } .-1 } */ + /* { dg-message "'_OPENACC' is defined when using option '-fopenacc'" "" { target *-*-* } .-2 } */ +} + +void +test_fopenmp () +{ + __builtin_printf ("_OPENMP = %d\n", _OPENMP); /* { dg-error "'_OPENMP' undeclared" "" { target c } } */ + /* { dg-error "'_OPENMP' was not declared in this scope" "" { target c++ } .-1 } */ + /* { dg-message "'_OPENMP' is defined when using option '-fopenmp'" "" { target *-*-* } .-2 } */ +} |