diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/missing-header-1.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/missing-header-2.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/missing-header-3.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/c-c++-common/missing-header-4.c | 8 |
5 files changed, 39 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2082fff..9c54022 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,12 @@ 2016-06-22 David Malcolm <dmalcolm@redhat.com> + * c-c++-common/missing-header-1.c: New test case. + * c-c++-common/missing-header-2.c: New test case. + * c-c++-common/missing-header-3.c: New test case. + * c-c++-common/missing-header-4.c: New test case. + +2016-06-22 David Malcolm <dmalcolm@redhat.com> + PR c/70339 * c-c++-common/attributes-1.c: Update dg-prune-output to include hint. diff --git a/gcc/testsuite/c-c++-common/missing-header-1.c b/gcc/testsuite/c-c++-common/missing-header-1.c new file mode 100644 index 0000000..30e92ad --- /dev/null +++ b/gcc/testsuite/c-c++-common/missing-header-1.c @@ -0,0 +1,8 @@ +/* { dg-options "-fdiagnostics-show-caret" } */ +#include "this-file-does-not-exist.h" /* { dg-error "10: this-file-does-not-exist.h: No such file or directory" } */ + +/* { dg-begin-multiline-output "" } + #include "this-file-does-not-exist.h" + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. + { dg-end-multiline-output "" } */ diff --git a/gcc/testsuite/c-c++-common/missing-header-2.c b/gcc/testsuite/c-c++-common/missing-header-2.c new file mode 100644 index 0000000..a634703 --- /dev/null +++ b/gcc/testsuite/c-c++-common/missing-header-2.c @@ -0,0 +1,8 @@ +/* { dg-options "-fdiagnostics-show-caret" } */ +#include <this-file-does-not-exist.h> /* { dg-error "10: this-file-does-not-exist.h: No such file or directory" } */ + +/* { dg-begin-multiline-output "" } + #include <this-file-does-not-exist.h> + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. + { dg-end-multiline-output "" } */ diff --git a/gcc/testsuite/c-c++-common/missing-header-3.c b/gcc/testsuite/c-c++-common/missing-header-3.c new file mode 100644 index 0000000..4147367 --- /dev/null +++ b/gcc/testsuite/c-c++-common/missing-header-3.c @@ -0,0 +1,8 @@ +/* { dg-options "-fdiagnostics-show-caret -Wno-deprecated" } */ +#import <this-file-does-not-exist.h> /* { dg-error "9: this-file-does-not-exist.h: No such file or directory" } */ + +/* { dg-begin-multiline-output "" } + #import <this-file-does-not-exist.h> + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. + { dg-end-multiline-output "" } */ diff --git a/gcc/testsuite/c-c++-common/missing-header-4.c b/gcc/testsuite/c-c++-common/missing-header-4.c new file mode 100644 index 0000000..d528d0d --- /dev/null +++ b/gcc/testsuite/c-c++-common/missing-header-4.c @@ -0,0 +1,8 @@ +/* { dg-options "-fdiagnostics-show-caret -Wno-deprecated" } */ +#import "this-file-does-not-exist.h" /* { dg-error "9: this-file-does-not-exist.h: No such file or directory" } */ + +/* { dg-begin-multiline-output "" } + #import "this-file-does-not-exist.h" + ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +compilation terminated. + { dg-end-multiline-output "" } */ |