aboutsummaryrefslogtreecommitdiff
path: root/gcc
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
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')
-rw-r--r--gcc/testsuite/ChangeLog13
-rw-r--r--gcc/testsuite/gcc.dg/cpp/inc/pr20348-aux.h1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/inc/pr20348.h9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/inc/pr20356-aux.h1
-rw-r--r--gcc/testsuite/gcc.dg/cpp/inc/pr20356.h6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr20348.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr20348.h9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr20356.c14
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr20356.h5
9 files changed, 74 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 2476872..05e68f5 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,16 @@
+2005-08-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/20348
+ PR preprocessor/20356
+ * 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.
+
2005-08-29 Jerry DeLisle <jvdelisle@verizon.net>
* gfortran.fortran-torture/execute/intrinsic_count.f90:
diff --git a/gcc/testsuite/gcc.dg/cpp/inc/pr20348-aux.h b/gcc/testsuite/gcc.dg/cpp/inc/pr20348-aux.h
new file mode 100644
index 0000000..1f04c75
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/inc/pr20348-aux.h
@@ -0,0 +1 @@
+#include "pr20348.h"
diff --git a/gcc/testsuite/gcc.dg/cpp/inc/pr20348.h b/gcc/testsuite/gcc.dg/cpp/inc/pr20348.h
new file mode 100644
index 0000000..810bb36
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/inc/pr20348.h
@@ -0,0 +1,9 @@
+#ifndef MIDDLE
+# ifndef INC_PR20348_H_SEEN
+# define INC_PR20348_H_SEEN
+# else
+# error inc/pr20348.h included twice before MIDDLE definition
+# endif
+#else
+# error inc/pr20348.h included after MIDDLE definition
+#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/inc/pr20356-aux.h b/gcc/testsuite/gcc.dg/cpp/inc/pr20356-aux.h
new file mode 100644
index 0000000..3f4a67f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/inc/pr20356-aux.h
@@ -0,0 +1 @@
+#include "pr20356.h"
diff --git a/gcc/testsuite/gcc.dg/cpp/inc/pr20356.h b/gcc/testsuite/gcc.dg/cpp/inc/pr20356.h
new file mode 100644
index 0000000..5829257
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/inc/pr20356.h
@@ -0,0 +1,6 @@
+#ifndef INC_PR20356_H
+# define INC_PR20356_H
+#endif
+#ifndef PR20356_H
+# include_next <pr20356.h>
+#endif
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;
diff --git a/gcc/testsuite/gcc.dg/cpp/pr20348.h b/gcc/testsuite/gcc.dg/cpp/pr20348.h
new file mode 100644
index 0000000..97ef80e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr20348.h
@@ -0,0 +1,9 @@
+#ifdef MIDDLE
+# ifndef PR20348_H_SEEN
+# define PR20348_H_SEEN
+# else
+# error pr20348.h included twice after MIDDLE definition
+# endif
+#else
+# error pr20348.h included before MIDDLE definition
+#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/pr20356.c b/gcc/testsuite/gcc.dg/cpp/pr20356.c
new file mode 100644
index 0000000..469ab0c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr20356.c
@@ -0,0 +1,14 @@
+/* PR preprocessor/20356 */
+/* { dg-do compile } */
+/* { dg-options "-I$srcdir/gcc.dg/cpp -I$srcdir/gcc.dg/cpp/inc" } */
+
+#include <pr20356-aux.h>
+
+#ifndef PR20356_H
+# error PR20356_H not defined
+#endif
+#ifndef INC_PR20356_H
+# error INC_PR20356_H not defined
+#endif
+
+int i;
diff --git a/gcc/testsuite/gcc.dg/cpp/pr20356.h b/gcc/testsuite/gcc.dg/cpp/pr20356.h
new file mode 100644
index 0000000..a3f2891
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/pr20356.h
@@ -0,0 +1,5 @@
+#ifndef PR20356_H
+# define PR20356_H
+#else
+# include_next <pr20356.h>
+#endif