mirror of git://gcc.gnu.org/git/gcc.git
mangle.c (decl_is_template_id): The template itself counts as a template-id.
* mangle.c (decl_is_template_id): The template itself counts as a template-id. From-SVN: r234879
This commit is contained in:
parent
8433cb91f4
commit
a9c2f3d9af
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-04-11 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* mangle.c (decl_is_template_id): The template itself counts as a
|
||||||
|
template-id.
|
||||||
|
|
||||||
2016-04-08 Patrick Palka <ppalka@gcc.gnu.org>
|
2016-04-08 Patrick Palka <ppalka@gcc.gnu.org>
|
||||||
|
|
||||||
PR c++/70590
|
PR c++/70590
|
||||||
|
|
|
||||||
|
|
@ -264,9 +264,9 @@ static void write_java_integer_type_codes (const tree);
|
||||||
#define write_unsigned_number(NUMBER) \
|
#define write_unsigned_number(NUMBER) \
|
||||||
write_number ((NUMBER), /*unsigned_p=*/1, 10)
|
write_number ((NUMBER), /*unsigned_p=*/1, 10)
|
||||||
|
|
||||||
/* If DECL is a template instance, return nonzero and, if
|
/* If DECL is a template instance (including the uninstantiated template
|
||||||
TEMPLATE_INFO is non-NULL, set *TEMPLATE_INFO to its template info.
|
itself), return nonzero and, if TEMPLATE_INFO is non-NULL, set
|
||||||
Otherwise return zero. */
|
*TEMPLATE_INFO to its template info. Otherwise return zero. */
|
||||||
|
|
||||||
static int
|
static int
|
||||||
decl_is_template_id (const tree decl, tree* const template_info)
|
decl_is_template_id (const tree decl, tree* const template_info)
|
||||||
|
|
@ -290,7 +290,8 @@ decl_is_template_id (const tree decl, tree* const template_info)
|
||||||
{
|
{
|
||||||
/* Check if this is a primary template. */
|
/* Check if this is a primary template. */
|
||||||
if (DECL_LANG_SPECIFIC (decl) != NULL
|
if (DECL_LANG_SPECIFIC (decl) != NULL
|
||||||
&& DECL_USE_TEMPLATE (decl)
|
&& VAR_OR_FUNCTION_DECL_P (decl)
|
||||||
|
&& DECL_TEMPLATE_INFO (decl)
|
||||||
&& PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (decl))
|
&& PRIMARY_TEMPLATE_P (DECL_TI_TEMPLATE (decl))
|
||||||
&& TREE_CODE (decl) != TEMPLATE_DECL)
|
&& TREE_CODE (decl) != TEMPLATE_DECL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
// { dg-do compile { target c++11 } }
|
||||||
|
// { dg-final { scan-assembler "_ZN1B1gIcEEN7__cxx111XEv" } }
|
||||||
|
|
||||||
|
inline namespace __cxx11 __attribute__((__abi_tag__ ("ABI_TAG"))) {
|
||||||
|
class X {};
|
||||||
|
}
|
||||||
|
struct B {
|
||||||
|
X f();
|
||||||
|
template <class U> X g();
|
||||||
|
};
|
||||||
|
int main() {
|
||||||
|
B b;
|
||||||
|
b.g<char>();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue