aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/pr20348.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-08-30 08:28:21 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2005-08-30 08:28:21 +0200
commitf5eab47e103f6453d4b3f1390c0b855c43aa0210 (patch)
treeb922d7af91c80fb097921024929e5f478a487d86 /gcc/testsuite/gcc.dg/cpp/pr20348.c
parent4dc0796f75c62945c1a8ffbec1ab86875b35a45c (diff)
downloadgcc-f5eab47e103f6453d4b3f1390c0b855c43aa0210.zip
gcc-f5eab47e103f6453d4b3f1390c0b855c43aa0210.tar.gz
gcc-f5eab47e103f6453d4b3f1390c0b855c43aa0210.tar.bz2
re PR preprocessor/20348 (File not included when file with same name is included before)
PR preprocessor/20348 PR preprocessor/20356 * files.c (_cpp_find_file, search_cache): Revert 2004-06-26 and 2004-06-05 changes. * gcc.dg/cpp/pr20348.c: New test. * gcc.dg/cpp/pr20348.h: New file. * gcc.dg/cpp/inc/pr20348.h: New file. * gcc.dg/cpp/inc/pr20348-aux.h: New file. * gcc.dg/cpp/pr20356.c: New test. * gcc.dg/cpp/pr20356.h: New file. * gcc.dg/cpp/inc/pr20356.h: New file. * gcc.dg/cpp/inc/pr20356-aux.h: New file. From-SVN: r103629
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/pr20348.c')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr20348.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/pr20348.c b/gcc/testsuite/gcc.dg/cpp/pr20348.c
new file mode 100644
index 0000000..f75f142
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr20348.c
@@ -0,0 +1,16 @@
+/* PR preprocessor/20348 */
+/* { dg-do compile } */
+/* { dg-options "-I$srcdir/gcc.dg/cpp -I$srcdir/gcc.dg/cpp/inc" } */
+
+#include <pr20348-aux.h>
+#define MIDDLE
+#include <pr20348.h>
+
+#ifndef PR20348_H_SEEN
+# error pr20348.h not included after MIDDLE definition
+#endif
+#ifndef INC_PR20348_H_SEEN
+# error inc/pr20348.h not included before MIDDLE definition
+#endif
+
+int i;