aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cpp.exp8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/escape-3.i16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr36674.i2
3 files changed, 21 insertions, 5 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/cpp.exp b/gcc/testsuite/gcc.dg/cpp/cpp.exp
index 7a359c0..754ffeb 100644
--- a/gcc/testsuite/gcc.dg/cpp/cpp.exp
+++ b/gcc/testsuite/gcc.dg/cpp/cpp.exp
@@ -4,12 +4,12 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
-#
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GCC; see the file COPYING3. If not see
# <http://www.gnu.org/licenses/>.
@@ -36,11 +36,11 @@ if ![info exists DEFAULT_CFLAGS] then {
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,S} ]] \
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.{c,S,i} ]] \
"" $DEFAULT_CFLAGS
# C/C++ common tests.
-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cpp/*.{c,S} ]] \
+dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cpp/*.{c,S,i} ]] \
" -Wc++-compat " ""
diff --git a/gcc/testsuite/gcc.dg/cpp/escape-3.i b/gcc/testsuite/gcc.dg/cpp/escape-3.i
new file mode 100644
index 0000000..6eb7dc4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/escape-3.i
@@ -0,0 +1,16 @@
+# 0 "escape-3.c"
+# 0 "/some\\directory//"
+# 0 "<built-in>"
+# 0 "<command-line>"
+# 1 "escape-3.c"
+
+/* { dg-do compile } */
+/* { dg-options "-g1" } */
+
+int foo (int a, int b)
+{
+ return a + b;
+}
+
+/* Test for "/some\\directory" instead of "/some\\\\directory" */
+/* { dg-final { scan-assembler { "/some\\\\directory" } } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/pr36674.i b/gcc/testsuite/gcc.dg/cpp/pr36674.i
index 9362d5a..f436287 100644
--- a/gcc/testsuite/gcc.dg/cpp/pr36674.i
+++ b/gcc/testsuite/gcc.dg/cpp/pr36674.i
@@ -1,6 +1,6 @@
/* PR cpp/36674 #include location is offset by one row in errors from preprocessed files */
/* { dg-do compile } */
-/* { dg-options "-fshow-column" } */
+/* { dg-options "-fshow-column -Wno-implicit-int" } */
# 1 "gcc/testsuite/gcc.dg/pr36674.c"
# 1 "<built-in>"
# 1 "<command-line>"