mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-26 17:00:58 +08:00
re PR c++/46058 (gcc crashes with lvalue error on the following Code)
PR c++/46058 * tree.c (lvalue_kind) [SCOPE_REF]: Handle non-dependent case. From-SVN: r167435
This commit is contained in:
parent
fac6806566
commit
3ee353e956
@ -1,3 +1,8 @@
|
||||
2010-12-03 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/46058
|
||||
* tree.c (lvalue_kind) [SCOPE_REF]: Handle non-dependent case.
|
||||
|
||||
2010-12-03 Richard Guenther <rguenther@suse.de>
|
||||
|
||||
PR c/46745
|
||||
|
@ -146,9 +146,12 @@ lvalue_kind (const_tree ref)
|
||||
return clk_ordinary;
|
||||
break;
|
||||
|
||||
/* A currently unresolved scope ref. */
|
||||
/* A scope ref in a template, left as SCOPE_REF to support later
|
||||
access checking. */
|
||||
case SCOPE_REF:
|
||||
gcc_unreachable ();
|
||||
gcc_assert (!type_dependent_expression_p (CONST_CAST_TREE(ref)));
|
||||
return lvalue_kind (TREE_OPERAND (ref, 1));
|
||||
|
||||
case MAX_EXPR:
|
||||
case MIN_EXPR:
|
||||
/* Disallow <? and >? as lvalues if either argument side-effects. */
|
||||
|
@ -1,3 +1,8 @@
|
||||
2010-12-03 Jason Merrill <jason@redhat.com>
|
||||
|
||||
PR c++/46058
|
||||
* g++.dg/template/scope4.C: New.
|
||||
|
||||
2010-12-03 Nathan Froyd <froydnj@codesourcery.com>
|
||||
|
||||
* gcc.target/arm/neon-offset-1.c: New test.
|
||||
|
15
gcc/testsuite/g++.dg/template/scope4.C
Normal file
15
gcc/testsuite/g++.dg/template/scope4.C
Normal file
@ -0,0 +1,15 @@
|
||||
// PR c++/46058
|
||||
|
||||
class StringLiterals {
|
||||
public:
|
||||
static const char dec[];
|
||||
};
|
||||
|
||||
template<class St, class Base, const char* name>
|
||||
class NoValueCommand : public Base {
|
||||
public:
|
||||
};
|
||||
|
||||
template<class St, class Base>
|
||||
class DecBasic : public NoValueCommand<St,Base,StringLiterals::dec> {
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user