diff options
author | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-08 23:41:09 +0000 |
---|---|---|
committer | geoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-04-08 23:41:09 +0000 |
commit | a08be054061d45117d45148efbb5d4689302468e (patch) | |
tree | b710236520736bf983ada97e6a7351511798518e /gcc/testsuite/gcc.dg | |
parent | aa4a0945d04e016741b6cdb6661c73fe5a3161d3 (diff) | |
download | gcc-a08be054061d45117d45148efbb5d4689302468e.tar.gz |
2004-04-08 Geoffrey Keating <geoffk@apple.com>
PR pch/13419
PR pch/14137
Radar #: 3315288
* doc/invoke.texi (Precompiled Headers): Suggest -o
to put an output file in a particular place. Be more detailed
about which options affect PCH validity and which options
might not work.
* c-pch.c (pch_matching): New.
(MATCH_SIZE): New.
(struct c_pch_validity): New field 'match'.
(pch_init): Handle pch_matching.
(c_common_valid_pch): Check pch_matching.
Index: testsuite/ChangeLog
2004-04-08 Geoffrey Keating <geoffk@apple.com>
* gcc.dg/pch/valid-1.c, gcc.dg/pch/valid-2.c, gcc.dg/pch/valid-3.c,
gcc.dg/pch/valid-4.c, gcc.dg/pch/valid-5.c, gcc.dg/pch/valid-6.c,
gcc.dg/pch/valid-1.hs, gcc.dg/pch/valid-2.hs, gcc.dg/pch/valid-3.hs,
gcc.dg/pch/valid-4.hs, gcc.dg/pch/valid-5.hs, gcc.dg/pch/valid-6.hs:
New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@80531 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg')
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-1.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-1.hs | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-1b.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-1b.hs | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-2.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-2.hs | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-3.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-3.hs | 3 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-4.c | 6 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-4.hs | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-5.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-5.hs | 1 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-6.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/pch/valid-6.hs | 1 |
14 files changed, 49 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pch/valid-1.c b/gcc/testsuite/gcc.dg/pch/valid-1.c new file mode 100644 index 00000000000..ebfa85a9949 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-1.c @@ -0,0 +1,5 @@ +/* { dg-options "-I. -Winvalid-pch -g" } */ + +#include "valid-1.h"/* { dg-error "created with -gnone, but used with -g|No such file|they were invalid" } */ + +int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-1.hs b/gcc/testsuite/gcc.dg/pch/valid-1.hs new file mode 100644 index 00000000000..e1ed11df4cc --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-1.hs @@ -0,0 +1,3 @@ +/* { dg-options "-I. -Winvalid-pch -g0" } */ + +extern int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-1b.c b/gcc/testsuite/gcc.dg/pch/valid-1b.c new file mode 100644 index 00000000000..a2709967c07 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-1b.c @@ -0,0 +1,5 @@ +/* { dg-options "-I. -Winvalid-pch -g0" } */ + +#include "valid-1b.h" + +int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-1b.hs b/gcc/testsuite/gcc.dg/pch/valid-1b.hs new file mode 100644 index 00000000000..6dc358735a7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-1b.hs @@ -0,0 +1,3 @@ +/* { dg-options "-I. -Winvalid-pch -g" } */ + +extern int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-2.c b/gcc/testsuite/gcc.dg/pch/valid-2.c new file mode 100644 index 00000000000..52a2e35a441 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-2.c @@ -0,0 +1,5 @@ +/* { dg-options "-I. -Winvalid-pch -fexceptions" } */ + +#include "valid-2.h"/* { dg-error "settings for -fexceptions do not match|No such file|they were invalid" } */ + +int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-2.hs b/gcc/testsuite/gcc.dg/pch/valid-2.hs new file mode 100644 index 00000000000..2497af651c2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-2.hs @@ -0,0 +1 @@ +extern int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-3.c b/gcc/testsuite/gcc.dg/pch/valid-3.c new file mode 100644 index 00000000000..741a917df5d --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-3.c @@ -0,0 +1,5 @@ +/* { dg-options "-I. -Winvalid-pch -fno-unit-at-a-time" } */ + +#include "valid-3.h"/* { dg-error "settings for -funit-at-a-time do not match|No such file|they were invalid" } */ + +int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-3.hs b/gcc/testsuite/gcc.dg/pch/valid-3.hs new file mode 100644 index 00000000000..2a0af94c9f7 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-3.hs @@ -0,0 +1,3 @@ +/* { dg-options "-I. -Winvalid-pch -funit-at-a-time" } */ + +extern int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-4.c b/gcc/testsuite/gcc.dg/pch/valid-4.c new file mode 100644 index 00000000000..1249531ef67 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-4.c @@ -0,0 +1,6 @@ +/* { dg-options "-I. -Winvalid-pch -Wtrigraphs" } */ + +#include "valid-4.h" + +char * x = "??/"; /* { dg-error "trigraph" } */ + diff --git a/gcc/testsuite/gcc.dg/pch/valid-4.hs b/gcc/testsuite/gcc.dg/pch/valid-4.hs new file mode 100644 index 00000000000..051c720ee3f --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-4.hs @@ -0,0 +1 @@ +extern char * x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-5.c b/gcc/testsuite/gcc.dg/pch/valid-5.c new file mode 100644 index 00000000000..4022d0458f2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-5.c @@ -0,0 +1,5 @@ +/* { dg-options "-I. -Winvalid-pch -pedantic-errors" } */ + +#include "valid-5.h" + +int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-5.hs b/gcc/testsuite/gcc.dg/pch/valid-5.hs new file mode 100644 index 00000000000..2497af651c2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-5.hs @@ -0,0 +1 @@ +extern int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-6.c b/gcc/testsuite/gcc.dg/pch/valid-6.c new file mode 100644 index 00000000000..f111c31ae99 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-6.c @@ -0,0 +1,5 @@ +/* { dg-options "-I. -Winvalid-pch -dH -pipe -fcond-mismatch" } */ + +#include "valid-6.h" + +int x; diff --git a/gcc/testsuite/gcc.dg/pch/valid-6.hs b/gcc/testsuite/gcc.dg/pch/valid-6.hs new file mode 100644 index 00000000000..2497af651c2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pch/valid-6.hs @@ -0,0 +1 @@ +extern int x; |