diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2015-08-04 17:22:05 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2015-08-04 17:22:05 +0000 |
commit | 9cf0c4205031d4955baed6147b3b65d0f6a18ec6 (patch) | |
tree | 2741d7e376b48adc0057c7becddb58c61153fbd1 /gcc | |
parent | d318517df81e3d9afa44dadc8f81aa4a566af392 (diff) | |
download | gcc-9cf0c4205031d4955baed6147b3b65d0f6a18ec6.zip gcc-9cf0c4205031d4955baed6147b3b65d0f6a18ec6.tar.gz gcc-9cf0c4205031d4955baed6147b3b65d0f6a18ec6.tar.bz2 |
re PR c++/66197 (c++1z generic function wrong type for auto)
2015-08-04 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/66197
* g++.dg/cpp1z/abbrev2.C: New.
2015-08-04 Paolo Carlini <paolo.carlini@oracle.com>
* g++.dg/cpp1z/static_assert-nomsg.C: Fix DejaGnu directive.
From-SVN: r226591
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/abbrev2.C | 17 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp1z/static_assert-nomsg.C | 2 |
3 files changed, 27 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7f44285..8471c04 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,5 +1,14 @@ 2015-08-04 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/66197 + * g++.dg/cpp1z/abbrev2.C: New. + +2015-08-04 Paolo Carlini <paolo.carlini@oracle.com> + + * g++.dg/cpp1z/static_assert-nomsg.C: Fix DejaGnu directive. + +2015-08-04 Paolo Carlini <paolo.carlini@oracle.com> + PR c++/66392 * g++.dg/init/explicit4.C: New. diff --git a/gcc/testsuite/g++.dg/cpp1z/abbrev2.C b/gcc/testsuite/g++.dg/cpp1z/abbrev2.C new file mode 100644 index 0000000..41d4bb1 --- /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 3d12e18..8a2054e 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<typename T> struct is_float |