diff options
author | Mark Mitchell <mmitchel@gcc.gnu.org> | 1998-08-03 09:58:34 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1998-08-03 09:58:34 +0000 |
commit | 35fce3ceb224573662197f067f5e6e13d3a43f5d (patch) | |
tree | cd31b75d184aa09170b39792596647cce6f8967a /gcc | |
parent | 9471ad135d4e2238fb57b462d920feaa5272da58 (diff) | |
download | gcc-35fce3ceb224573662197f067f5e6e13d3a43f5d.zip gcc-35fce3ceb224573662197f067f5e6e13d3a43f5d.tar.gz gcc-35fce3ceb224573662197f067f5e6e13d3a43f5d.tar.bz2 |
decl2.c (grokfield): Don't mangle the name of a TYPE_DECL is it uses template parameters.
* decl2.c (grokfield): Don't mangle the name of a TYPE_DECL is it
uses template parameters.
From-SVN: r21548
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/decl2.c | 5 | ||||
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.pt/crash17.C | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 3aa5d73..998b346 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -1642,8 +1642,9 @@ grokfield (declarator, declspecs, init, asmspec_tree, attrlist) /* Now that we've updated the context, we need to remangle the name for this TYPE_DECL. */ DECL_ASSEMBLER_NAME (value) = DECL_NAME (value); - DECL_ASSEMBLER_NAME (value) = - get_identifier (build_overload_name (TREE_TYPE (value), 1, 1)); + if (!uses_template_parms (value)) + DECL_ASSEMBLER_NAME (value) = + get_identifier (build_overload_name (TREE_TYPE (value), 1, 1)); pushdecl_class_level (value); return value; diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash17.C b/gcc/testsuite/g++.old-deja/g++.pt/crash17.C new file mode 100644 index 0000000..c4dd969 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.pt/crash17.C @@ -0,0 +1,10 @@ +// Build don't link: + +template <int B> +class foo; + +template <class U> +class bar +{ + typedef foo<(U::id > 0)> foobar; +}; |