From: Jason Merrill Date: Wed, 17 Sep 2014 17:34:01 +0000 (-0400) Subject: Minor cleanup, don't run tests for which compilation is enough. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=621d5431a2241bae0dfb6d508f2c8d1ee8eb282f;p=gcc.git Minor cleanup, don't run tests for which compilation is enough. * g++.dg/g++.dg/cpp1y/var-templ1.C: Change return to static_assert, compile instead of running. * g++.dg/g++.dg/cpp1y/var-templ3.C: Likewise. * g++.dg/g++.dg/cpp1y/var-templ4.C: Likewise. * g++.dg/g++.dg/cpp1y/var-templ5.C: Likewise. From-SVN: r215329 --- diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ1.C b/gcc/testsuite/g++.dg/cpp1y/var-templ1.C index 856198a1097..89b3c8f3122 100644 --- a/gcc/testsuite/g++.dg/cpp1y/var-templ1.C +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ1.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++14 } } +// { dg-do compile { target c++14 } } template struct S1 @@ -12,10 +12,7 @@ template int main () { - int v = var>/2; - return !( - var> == v - && var> == var>>> - && var> != 222 - ); + static_assert(var> == var>/2 + && var> == var>>> + && var> != 222, ""); } diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ3.C b/gcc/testsuite/g++.dg/cpp1y/var-templ3.C index 52ef6688a73..254f388acee 100644 --- a/gcc/testsuite/g++.dg/cpp1y/var-templ3.C +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ3.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++14 } } +// { dg-do compile { target c++14 } } template constexpr int var = sizeof (T); @@ -12,7 +12,5 @@ template int main () { - return !( - var + var == S1::a - ); + static_assert(var + var == S1::a, ""); } diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ4.C b/gcc/testsuite/g++.dg/cpp1y/var-templ4.C index 4ad7be68c5c..3cd84a892c3 100644 --- a/gcc/testsuite/g++.dg/cpp1y/var-templ4.C +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ4.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++14 } } +// { dg-do compile { target c++14 } } template constexpr int var = sizeof (T); @@ -8,8 +8,5 @@ template<> int main () { - return !( - var == 100000 - && var == sizeof(char) - ); + static_assert(var == 100000 && var == sizeof(char), ""); } diff --git a/gcc/testsuite/g++.dg/cpp1y/var-templ5.C b/gcc/testsuite/g++.dg/cpp1y/var-templ5.C index a10f3888b6e..a8bc7f69b07 100644 --- a/gcc/testsuite/g++.dg/cpp1y/var-templ5.C +++ b/gcc/testsuite/g++.dg/cpp1y/var-templ5.C @@ -1,4 +1,4 @@ -// { dg-do run { target c++14 } } +// { dg-do compile { target c++14 } } template struct S1 @@ -15,7 +15,5 @@ template class T, int A> int main () { - return !( - var2 == 120 - ); + static_assert(var2 == 120, ""); }