diff options
author | Jason Merrill <jason@redhat.com> | 2011-02-20 18:18:01 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2011-02-20 18:18:01 -0500 |
commit | 525c617d3b92c10f79d1ffc786fb87dbf0958f0b (patch) | |
tree | 8a590edbc03e46894ebeec789e1172f529bcb970 /gcc/testsuite | |
parent | ceccaacf4f6bb19faa219ceeefde81e582267a1e (diff) | |
download | gcc-525c617d3b92c10f79d1ffc786fb87dbf0958f0b.zip gcc-525c617d3b92c10f79d1ffc786fb87dbf0958f0b.tar.gz gcc-525c617d3b92c10f79d1ffc786fb87dbf0958f0b.tar.bz2 |
re PR c++/46472 ([C++0X] constexpr is not constexpr)
PR c++/46472
* method.c (process_subob_fn): Instantiate constexpr templates.
* optimize.c (maybe_clone_body): Propagate DECL_DECLARED_CONSTEXPR_P.
From-SVN: r170348
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C | 14 |
2 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7078fdb..9eff5ff 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2011-02-20 Jason Merrill <jason@redhat.com> + + * g++.dg/cpp0x/constexpr-synth1.C: New. + 2011-02-20 Nicola Pero <nicola.pero@meta-innovation.com> * objc.dg/layout-2.m: New. diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C new file mode 100644 index 0000000..9830939 --- /dev/null +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C @@ -0,0 +1,14 @@ +// PR c++/46472 +// { dg-options -std=c++0x } + +template<class T> struct A { + T t; + constexpr A(){} +}; + +struct B +{ + A<int> a; +}; + +B b; |