diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7f442854815..8471c040c66 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2015-08-04 Paolo Carlini + + PR c++/66197 + * g++.dg/cpp1z/abbrev2.C: New. + +2015-08-04 Paolo Carlini + + * g++.dg/cpp1z/static_assert-nomsg.C: Fix DejaGnu directive. + 2015-08-04 Paolo Carlini PR c++/66392 diff --git a/gcc/testsuite/g++.dg/cpp1z/abbrev2.C b/gcc/testsuite/g++.dg/cpp1z/abbrev2.C new file mode 100644 index 00000000000..41d4bb14a2f --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp1z/abbrev2.C @@ -0,0 +1,17 @@ +// PR c++/66197 +// { dg-do run } +// { dg-options "-std=c++1z" } + +extern "C" void abort(); + +auto add_1(auto a, auto b) { return a + b; } +auto add_2 = [](auto a, auto b) { return a + b; }; + +int main() +{ + if (add_1(3.5, 4) != 7.5 + || add_1(3, 4.5) != 7.5 + || add_2(3.5, 4) != 7.5 + || add_2(3, 4.5) != 7.5) + abort(); +} diff --git a/gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C b/gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C index 3d12e184675..8a2054e2d6b 100644 --- a/gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C +++ b/gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++1z } } +// { dg-options "-std=c++1z" } template struct is_float