Commit ab1caa6e by Martin Sebor Committed by Martin Sebor

PR c++/58281 - Problem with explicitly instantiated constexpr template

PR c++/58281 - Problem with explicitly instantiated constexpr template
	functions

gcc/testsuite/ChangeLog:
2016-03-15  Martin Sebor  <msebor@redhat.com>

	PR c++/58281
	* g++.dg/cpp1y/constexpr-instantiate.C: Add new test.

From-SVN: r234246
parent 960fcebd
2016-03-15 Martin Sebor <msebor@redhat.com>
PR c++/58281
* g++.dg/cpp1y/constexpr-instantiate.C: Add new test.
2016-03-15 John David Anglin <danglin@gcc.gnu.org>
* gcc.c-torture/execute/pr68532.c: Add -fno-common option on
......
// PR c++/58281 - Problem with explicitly instantiated constexpr template
// functions
// { dg-do compile { target c++11 } }
// { do-additional-options "-fdump-tree-optimized" }
template <typename T>
constexpr bool f (T a)
{
return a == 3;
}
extern template bool f<int>(int);
bool g (int x) { return f (x); }
template bool f<int>(int);
// Verify that the defintions of both f() and g() are emitted.
// { dg-final { scan-tree-dump "bool \[fg\](" "optimized" } }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment