summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/cpp
diff options
context:
space:
mode:
authordodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-30 11:43:29 +0000
committerdodji <dodji@138bc75d-0d04-0410-961f-82ee72b054a4>2012-04-30 11:43:29 +0000
commit053213c19e93889b0075ff1a4f586f11a3fb59da (patch)
treedfd182e7835b11147797ec58659bd0cdb81e372b /gcc/testsuite/gcc.dg/cpp
parentd98fd4a471919b0ce96c3424b1ef398c8b242a18 (diff)
downloadgcc-053213c19e93889b0075ff1a4f586f11a3fb59da.tar.gz
Adjust relevant test cases wrt -ftrack-macro-expansion=[0|2]
Even after all the patches I have already submitted, some test cases where errors happens on tokens that are defined in macros see their output change in an incompatible way, when you run them with or without -ftrack-macro-expansion. I think this is expected, because the (spelling) locus inside the definition of the macro pointed to with -ftrack-macro-expansion is different from the locus of the expansion point of the macro pointed to without -ftrack-macro-expansion. In those cases this patch either adjusts the test case and forces it be run either with -ftrack-macro-expansion, or it just forces it to be run without -ftrack-macro-expansion. There are so many libstdc++ tests that were failing because of that benign issue that I preferred to just run them with -ftrack-macro-expansion diabled, after inspecting each of them to be sure there was nothing more serious underneath. Boostrapped on x86_64-unknown-linux-gnu against trunk with and without -ftrack-macro-expansion turned on. gcc/testsuite/ * objc.dg/foreach-7.m: Force the test case to run without -ftrack-macro-expansion. * c-c++-common/tm/attrib-1.c: Likewise. * c-c++-common/warn-ommitted-condop.c: Likewise. * gcc.dg/assign-warn-1.c: Likewise. * gcc.dg/assign-warn-2.c: Likewise. * gcc.dg/attr-alloc_size.c: Likewise. * gcc.dg/builtin-stringop-chk-1.c: Likewise. * gcc.dg/builtin-stringop-chk-2.c: Likewise. * gcc.dg/builtin-strncat-chk-1.c: Likewise. * gcc.dg/c90-const-expr-9.c: Likewise. * gcc.dg/c99-const-expr-9.c: Likewise. * gcc.dg/cpp/direct2.c: Likewise. Adjust. * gcc.dg/cpp/direct2s.c: Likewise. * gcc/testsuite/gcc.dg/cpp/pr28709.c: Likewise. * gcc.dg/cpp/pragma-diagnostic-1.c: Likewise. * gcc.dg/dfp/composite-type.c: Likewise. * gcc.dg/uninit-6-O0.c: Adjust the test case and force it to run with -ftrack-macro-expansion * g++.dg/cpp0x/constexpr-ex3.C: Likewise. * g++.dg/cpp0x/constexpr-overflow.C: Likewise. * g++.dg/ext/cleanup-1.C: Likewise. * g++.dg/ext/gnu-inline-global-reject.C: Likewise. * g++.dg/template/sfinae10.C: Likewise. * g++.dg/tm/wrap-2.C: Likewise. * g++.dg/warn/Wconversion-real-integer.C: Likewise. * g++.dg/warn/Wsign-conversion.C: Likewise. * g++.dg/warn/multiple-overflow-warn-1.C: Likewise. * g++.old-deja/g++.mike/p10769b.C: Likewise. * g++.dg/warn/Wdouble-promotion.C: Adjust the test case and force it to run with -ftrack-macro-expansion. * libstdc++-v3/scripts/testsuite_flags.in: By default, run the test cases without -ftrack-macro-expansion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@186976 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/cpp')
-rw-r--r--gcc/testsuite/gcc.dg/cpp/direct2.c12
-rw-r--r--gcc/testsuite/gcc.dg/cpp/direct2s.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr28709.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c2
4 files changed, 14 insertions, 10 deletions
diff --git a/gcc/testsuite/gcc.dg/cpp/direct2.c b/gcc/testsuite/gcc.dg/cpp/direct2.c
index 858dec7f31e..1ce40bfb58f 100644
--- a/gcc/testsuite/gcc.dg/cpp/direct2.c
+++ b/gcc/testsuite/gcc.dg/cpp/direct2.c
@@ -4,18 +4,20 @@
/* Test of prohibition on directives which result from macro expansion.
See also direct2s.c */
-/* { dg-do compile } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile } */
#define HASH #
#define HASHDEFINE #define
#define HASHINCLUDE #include
HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/
-/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 13 }*/
-int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 13 }*/
+/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 15 }*/
+int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 15 }*/
HASHINCLUDE <somerandomfile> /*{ dg-error "stray|expected" "non-include 2" }*/
-/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 17 }*/
+/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 19 }*/
int resync_parser_2;
void g1 ()
@@ -43,4 +45,4 @@ void f ()
#define starslash *##/
slashstar starslash /* { dg-error "parse error|syntax error|expected" "not a comment" } */
-/* { dg-error "does not give" "paste warning(s)" { target *-*-* } 45 } */
+/* { dg-error "does not give" "paste warning(s)" { target *-*-* } 47 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/direct2s.c b/gcc/testsuite/gcc.dg/cpp/direct2s.c
index 9d0cc017df7..59232141944 100644
--- a/gcc/testsuite/gcc.dg/cpp/direct2s.c
+++ b/gcc/testsuite/gcc.dg/cpp/direct2s.c
@@ -6,7 +6,7 @@
should be identical. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -ansi -pedantic-errors" } */
+/* { dg-options "-save-temps -ansi -pedantic-errors -ftrack-macro-expansion=0" } */
#define HASH #
#define HASHDEFINE #define
diff --git a/gcc/testsuite/gcc.dg/cpp/pr28709.c b/gcc/testsuite/gcc.dg/cpp/pr28709.c
index 11cccbe8b5d..cb1755a34ab 100644
--- a/gcc/testsuite/gcc.dg/cpp/pr28709.c
+++ b/gcc/testsuite/gcc.dg/cpp/pr28709.c
@@ -1,8 +1,10 @@
/* Copyright (C) 2006 Free Software Foundation, Inc. */
/* PR preprocessor/28709 */
-/* { dg-do compile } */
+/* { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile } */
+
#define foo - ## >>
foo;
-/* { dg-error "expected identifier.*'-'" "" { target *-*-* } 6 } */
-/* { dg-error pasting "" { target *-*-* } 6 } */
+/* { dg-error "expected identifier.*'-'" "" { target *-*-* } 8 } */
+/* { dg-error pasting "" { target *-*-* } 8 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c
index 3a2f9da1fce..add7360c5f8 100644
--- a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c
@@ -1,5 +1,5 @@
/*
- { dg-options "-Wuninitialized" }
+ { dg-options "-Wuninitialized -ftrack-macro-expansion=0" }
{ dg-do compile }
*/