From: Jakub Jelinek Date: Tue, 19 Sep 2017 21:03:11 +0000 (+0200) Subject: pr31146-2.C: Only do scan-tree-dump for c++14_down. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=14a1a59f17a6d78640aaa81b6e22bbc96903d3f9;p=gcc.git pr31146-2.C: Only do scan-tree-dump for c++14_down. * g++.dg/tree-ssa/pr31146-2.C: Only do scan-tree-dump for c++14_down. * g++.dg/tree-ssa/pr41428.C: Likewise. * g++.dg/expr/bool1.C: Only do dg-do compile instead of dg-do run for c++17 and up. * g++.dg/expr/bool3.C: Likewise. * g++.dg/expr/bitfield5.C: Likewise. * g++.old-deja/g++.jason/bool5.C: Likewise. From-SVN: r252985 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 27fc7bad752..4362138d2ca 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,13 @@ +2017-09-19 Jakub Jelinek + + * g++.dg/tree-ssa/pr31146-2.C: Only do scan-tree-dump for c++14_down. + * g++.dg/tree-ssa/pr41428.C: Likewise. + * g++.dg/expr/bool1.C: Only do dg-do compile instead of dg-do run for + c++17 and up. + * g++.dg/expr/bool3.C: Likewise. + * g++.dg/expr/bitfield5.C: Likewise. + * g++.old-deja/g++.jason/bool5.C: Likewise. + 2017-09-18 Martin Sebor PR c/81854 diff --git a/gcc/testsuite/g++.dg/expr/bitfield5.C b/gcc/testsuite/g++.dg/expr/bitfield5.C index 9565828f698..1921b193d21 100644 --- a/gcc/testsuite/g++.dg/expr/bitfield5.C +++ b/gcc/testsuite/g++.dg/expr/bitfield5.C @@ -1,5 +1,6 @@ // PR c++/30274 -// { dg-do run } +// { dg-do run { target c++14_down } } +// { dg-do compile { target c++17 } } struct S { bool x : 4; diff --git a/gcc/testsuite/g++.dg/expr/bool1.C b/gcc/testsuite/g++.dg/expr/bool1.C index 98984d631c5..7b120e17739 100644 --- a/gcc/testsuite/g++.dg/expr/bool1.C +++ b/gcc/testsuite/g++.dg/expr/bool1.C @@ -1,5 +1,6 @@ -// { dg-do run } -// PR C++/29295 +// PR c++/29295 +// { dg-do run { target c++14_down } } +// { dg-do compile { target c++17 } } // make sure that a typedef for a bool will have the // the same results as a bool itself. diff --git a/gcc/testsuite/g++.dg/expr/bool3.C b/gcc/testsuite/g++.dg/expr/bool3.C index bff4b7bb86f..373c202b800 100644 --- a/gcc/testsuite/g++.dg/expr/bool3.C +++ b/gcc/testsuite/g++.dg/expr/bool3.C @@ -1,5 +1,6 @@ -// { dg-do run } -// PR C++/29295 +// PR c++/29295 +// { dg-do run { target c++14_down } } +// { dg-do compile { target c++17 } } // make sure that a typedef for a bool will have the // the same results as a bool itself. diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C b/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C index cf4ed33dd50..500d8b639ee 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr31146-2.C @@ -20,4 +20,6 @@ double foo (void) return v.a[2]; } -/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" } } */ +/* -std=c++17 and above doesn't emit operator new () != NULL, so there is + nothing to fold anymore. */ +/* { dg-final { scan-tree-dump "Replaced .* != 0B. with .1" "forwprop1" { target c++14_down } } } */ diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr41428.C b/gcc/testsuite/g++.dg/tree-ssa/pr41428.C index dd96dfc4355..c0a5eb627be 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/pr41428.C +++ b/gcc/testsuite/g++.dg/tree-ssa/pr41428.C @@ -11,4 +11,6 @@ int foo(void) return *(int *)&f; } -/* { dg-final { scan-tree-dump "Folded into: if \\\(1 != 0\\\)" "ccp1" } } */ +/* -std=c++17 and above doesn't emit operator new () != NULL, so there is + nothing to fold anymore. */ +/* { dg-final { scan-tree-dump "Folded into: if \\\(1 != 0\\\)" "ccp1" { target c++14_down } } } */ diff --git a/gcc/testsuite/g++.old-deja/g++.jason/bool5.C b/gcc/testsuite/g++.old-deja/g++.jason/bool5.C index ce57b0c5375..c64784bd426 100644 --- a/gcc/testsuite/g++.old-deja/g++.jason/bool5.C +++ b/gcc/testsuite/g++.old-deja/g++.jason/bool5.C @@ -1,4 +1,5 @@ -// { dg-do run } +// { dg-do run { target c++14_down } } +// { dg-do compile { target c++17 } } int main () { bool b = false;