aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorDodji Seketeli <dodji@redhat.com>2011-04-13 15:09:26 +0000
committerDodji Seketeli <dodji@gcc.gnu.org>2011-04-13 17:09:26 +0200
commit91d8b4bd7ad6acd3907cba2346c70c101c793e9f (patch)
treebfeedb41882a7eec47bc8d8ba31f40acaea8054e /gcc/cp/class.c
parentba9c349ec817c21ef7a72455a240cdc8f2c4926d (diff)
downloadgcc-91d8b4bd7ad6acd3907cba2346c70c101c793e9f.zip
gcc-91d8b4bd7ad6acd3907cba2346c70c101c793e9f.tar.gz
gcc-91d8b4bd7ad6acd3907cba2346c70c101c793e9f.tar.bz2
re PR c++/48574 (ICE)
Fix PR c++/48574 gcc/cp/ * class.c (fixed_type_or_null): We cannot determine the dynamic type of a reference variable if its initializer is dependent. gcc/testsuite/ * g++.dg/template/dependent-expr7.C: New test case. From-SVN: r172375
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index b6aebae..3216068 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -5939,6 +5939,7 @@ fixed_type_or_null (tree instance, int *nonnull, int *cdtorp)
itself. */
if (TREE_CODE (instance) == VAR_DECL
&& DECL_INITIAL (instance)
+ && !type_dependent_expression_p (DECL_INITIAL (instance))
&& !htab_find (ht, instance))
{
tree type;