From: Marek Polacek Date: Fri, 23 Sep 2016 14:40:16 +0000 (+0000) Subject: atomic-12.c: Skip for C++1z. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8f01b67af5b59df88ebda788404670d8ff329325;p=gcc.git atomic-12.c: Skip for C++1z. * c-c++-common/gomp/atomic-12.c: Skip for C++1z. * c-c++-common/gomp/atomic-13.c: Likewise. * c-c++-common/gomp/atomic-14.c: Likewise. * c-c++-common/pr60439.c: Remove invalid code. * g++.dg/expr/bitfield4.C: Robustify for C++1z. * g++.dg/expr/bitfield5.C: Likewise. * g++.dg/expr/bitfield6.C: Likewise. * g++.dg/expr/bool1.C: Likewise. * g++.dg/expr/bool3.C: Likewise. * g++.dg/expr/lval3.C: Likewise. * g++.dg/expr/lval4.C: Likewise. * g++.old-deja/g++.jason/bool5.C: Likewise. From-SVN: r240436 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 55bb6e6e759..48b56b4b2c0 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2016-09-23 Marek Polacek + + * c-c++-common/gomp/atomic-12.c: Skip for C++1z. + * c-c++-common/gomp/atomic-13.c: Likewise. + * c-c++-common/gomp/atomic-14.c: Likewise. + * c-c++-common/pr60439.c: Remove invalid code. + * g++.dg/expr/bitfield4.C: Robustify for C++1z. + * g++.dg/expr/bitfield5.C: Likewise. + * g++.dg/expr/bitfield6.C: Likewise. + * g++.dg/expr/bool1.C: Likewise. + * g++.dg/expr/bool3.C: Likewise. + * g++.dg/expr/lval3.C: Likewise. + * g++.dg/expr/lval4.C: Likewise. + * g++.old-deja/g++.jason/bool5.C: Likewise. + 2016-09-23 David Malcolm PR preprocessor/77672 diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-12.c b/gcc/testsuite/c-c++-common/gomp/atomic-12.c index e9ca6503cfe..07790d9c451 100644 --- a/gcc/testsuite/c-c++-common/gomp/atomic-12.c +++ b/gcc/testsuite/c-c++-common/gomp/atomic-12.c @@ -4,6 +4,7 @@ /* atomicvar should never be referenced in between the barrier and following #pragma omp atomic_load. */ /* { dg-final { scan-tree-dump-not "barrier\[^#\]*atomicvar" "gimple" } } */ +/* { dg-skip-if "invalid in C++1z" { c++1z } } */ #ifdef __cplusplus bool atomicvar, c; diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-13.c b/gcc/testsuite/c-c++-common/gomp/atomic-13.c index 7f4afcf63ad..83c6560761a 100644 --- a/gcc/testsuite/c-c++-common/gomp/atomic-13.c +++ b/gcc/testsuite/c-c++-common/gomp/atomic-13.c @@ -4,5 +4,6 @@ /* atomicvar should never be referenced in between the barrier and following #pragma omp atomic_load. */ /* { dg-final { scan-tree-dump-not "barrier\[^#\]*atomicvar" "gimple" } } */ +/* { dg-skip-if "invalid in C++1z" { c++1z } } */ #include "atomic-12.c" diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-14.c b/gcc/testsuite/c-c++-common/gomp/atomic-14.c index 7e2345387d4..f2dd9fcf89d 100644 --- a/gcc/testsuite/c-c++-common/gomp/atomic-14.c +++ b/gcc/testsuite/c-c++-common/gomp/atomic-14.c @@ -1,6 +1,7 @@ /* PR middle-end/45423 */ /* { dg-do compile } */ /* { dg-options "-fopenmp -Wno-deprecated" } */ +/* { dg-skip-if "invalid in C++1z" { c++1z } } */ #ifdef __cplusplus bool *baz (); diff --git a/gcc/testsuite/c-c++-common/pr60439.c b/gcc/testsuite/c-c++-common/pr60439.c index 71b397a1c7d..dc12d1fd272 100644 --- a/gcc/testsuite/c-c++-common/pr60439.c +++ b/gcc/testsuite/c-c++-common/pr60439.c @@ -131,12 +131,6 @@ f6 (bool b) case 3: break; } - switch (b++) /* { dg-warning "switch condition has" } */ - /* { dg-warning "is deprecated" "" { target c++ } 134 } */ - { - case 3: - break; - } } void diff --git a/gcc/testsuite/g++.dg/expr/bitfield4.C b/gcc/testsuite/g++.dg/expr/bitfield4.C index 7fae086b857..97a1fe9bef3 100644 --- a/gcc/testsuite/g++.dg/expr/bitfield4.C +++ b/gcc/testsuite/g++.dg/expr/bitfield4.C @@ -14,6 +14,8 @@ template <> void f(bool) {} int main() { - f(s.x++); // { dg-warning "deprecated" } - f(++s.x); // { dg-warning "deprecated" } + f(s.x++); // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 17 } + f(++s.x); // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 19 } } diff --git a/gcc/testsuite/g++.dg/expr/bitfield5.C b/gcc/testsuite/g++.dg/expr/bitfield5.C index 0a37f9f166b..bba35cbae19 100644 --- a/gcc/testsuite/g++.dg/expr/bitfield5.C +++ b/gcc/testsuite/g++.dg/expr/bitfield5.C @@ -8,10 +8,12 @@ struct S { S s; int main() { - s.x++; // { dg-warning "deprecated" } + s.x++; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 11 } if (s.x != 1) return 1; - ++s.x; // { dg-warning "deprecated" } + ++s.x; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 15 } if (s.x != 1) return 2; } diff --git a/gcc/testsuite/g++.dg/expr/bitfield6.C b/gcc/testsuite/g++.dg/expr/bitfield6.C index 8523866cd9d..202c2464358 100644 --- a/gcc/testsuite/g++.dg/expr/bitfield6.C +++ b/gcc/testsuite/g++.dg/expr/bitfield6.C @@ -7,5 +7,6 @@ struct S { S s; void f() { - ++s.x = false; // { dg-warning "deprecated" } + ++s.x = false; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 10 } } diff --git a/gcc/testsuite/g++.dg/expr/bool1.C b/gcc/testsuite/g++.dg/expr/bool1.C index 503e8b40c8c..4ecc6acb088 100644 --- a/gcc/testsuite/g++.dg/expr/bool1.C +++ b/gcc/testsuite/g++.dg/expr/bool1.C @@ -10,8 +10,10 @@ int main() my_bool b = false; int i; - b++; // { dg-warning "deprecated" } - b++; // { dg-warning "deprecated" } + b++; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 13 } + b++; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 15 } i = b; if (i != 1) abort (); diff --git a/gcc/testsuite/g++.dg/expr/bool3.C b/gcc/testsuite/g++.dg/expr/bool3.C index 1866ed47e9d..cfc9da3cc6d 100644 --- a/gcc/testsuite/g++.dg/expr/bool3.C +++ b/gcc/testsuite/g++.dg/expr/bool3.C @@ -10,8 +10,10 @@ int main() my_bool b = false; int i; - b++; // { dg-warning "deprecated" } - b++; // { dg-warning "deprecated" } + b++; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 13 } + b++; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 15 } i = b; if (i != 1) abort (); diff --git a/gcc/testsuite/g++.dg/expr/lval3.C b/gcc/testsuite/g++.dg/expr/lval3.C index 8e0aeade4b9..4011441494e 100644 --- a/gcc/testsuite/g++.dg/expr/lval3.C +++ b/gcc/testsuite/g++.dg/expr/lval3.C @@ -4,7 +4,5 @@ f() { bool i = 0; i++ = 3; // { dg-error "" } - // { dg-warning "deprecated" "" { target *-*-* } 6 } + // { dg-warning "deprecated" "" { target { ! c++1z } } 6 } } - - diff --git a/gcc/testsuite/g++.dg/expr/lval4.C b/gcc/testsuite/g++.dg/expr/lval4.C index b903ec8c39e..c012dd3844c 100644 --- a/gcc/testsuite/g++.dg/expr/lval4.C +++ b/gcc/testsuite/g++.dg/expr/lval4.C @@ -4,7 +4,6 @@ f() { bool i = 0; ++i = 3; - // { dg-warning "deprecated" "" { target *-*-* } 6 } + // { dg-warning "deprecated" "" { target { ! c++1z } } 6 } + // { dg-error "forbidden" "" { target c++1z } 6 } } - - diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool5.C b/gcc/testsuite/g++.old-deja/g++.jason/bool5.C index 0a16ccb16ac..49126acdd96 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool5.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/bool5.C @@ -2,10 +2,12 @@ int main () { bool b = false; - int i = b++; // { dg-warning "deprecated" } + int i = b++; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 5 } if (i != false || b != true) return 1; - i = b++; // { dg-warning "deprecated" } + i = b++; // { dg-warning "deprecated" "" { target { ! c++1z } } } + // { dg-error "forbidden" "" { target c++1z } 9 } if (i != true || b != true) return 1; }