aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/tree.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2013-02-05 23:24:18 -0500
committerJason Merrill <jason@gcc.gnu.org>2013-02-05 23:24:18 -0500
commitea48c8a0264d397509944ff69ec5d2289663243a (patch)
treef98d684ed96f2d3bd9320c4113d81afec7fff116 /gcc/cp/tree.c
parenta283c407619b032551995bec2a0732ea094a834c (diff)
downloadgcc-ea48c8a0264d397509944ff69ec5d2289663243a.zip
gcc-ea48c8a0264d397509944ff69ec5d2289663243a.tar.gz
gcc-ea48c8a0264d397509944ff69ec5d2289663243a.tar.bz2
re PR c++/54122 (segfault comparing enum class in lambda inside constructor of a templated class)
PR c++/54122 * tree.c (lvalue_kind) [INDIRECT_REF]: Don't check for METHOD_TYPE. From-SVN: r195781
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r--gcc/cp/tree.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c
index d1f14fc..18d9a98 100644
--- a/gcc/cp/tree.c
+++ b/gcc/cp/tree.c
@@ -143,9 +143,7 @@ lvalue_kind (const_tree ref)
case ARRAY_REF:
case PARM_DECL:
case RESULT_DECL:
- if (TREE_CODE (TREE_TYPE (ref)) != METHOD_TYPE)
- return clk_ordinary;
- break;
+ return clk_ordinary;
/* A scope ref in a template, left as SCOPE_REF to support later
access checking. */