summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp/inc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp/inc')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/inc/foo.h1
-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/inc/pragma-once-1a.h6
6 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/inc/foo.h b/gcc/testsuite/gcc.dg/cpp/inc/foo.h
new file mode 100644
index 000000000..ec770476c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/inc/foo.h
@@ -0,0 +1 @@
+extern int a;
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 000000000..1f04c7569
--- /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 000000000..810bb36d7
--- /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 000000000..3f4a67f8e
--- /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 000000000..582925739
--- /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/inc/pragma-once-1a.h b/gcc/testsuite/gcc.dg/cpp/inc/pragma-once-1a.h
new file mode 100644
index 000000000..7de641216
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/inc/pragma-once-1a.h
@@ -0,0 +1,6 @@
+#ifndef _A_H_
+#define _A_H_
+
+#include "../pragma-once-1b.h"
+
+#endif