mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-24 08:30:34 +08:00
re PR c++/11871 (Koenig lookup regression)
cp: PR c++/11871 * decl.c (push_class_level_binding): Correct old_decl value from my 2003-07-29 reorganization. testsuite: PR c++/11871 * c++.dg/lookup/crash1.C: New test. From-SVN: r70803
This commit is contained in:
parent
20b506726b
commit
6d9a0a36e5
@ -1,5 +1,9 @@
|
||||
2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
PR c++/11871
|
||||
* decl.c (push_class_level_binding): Correct old_decl value from
|
||||
my 2003-07-29 reorganization.
|
||||
|
||||
* call.c (build_call): Don't set TREE_SIDE_EFFECTS here.
|
||||
(build_new_method_call): Add goto finish.
|
||||
* semantics.c (simplify_aggr_init_exprs_r): Don't set
|
||||
|
@ -4282,11 +4282,13 @@ push_class_level_binding (tree name, tree x)
|
||||
if (TREE_CODE (bval) == TYPE_DECL && DECL_ARTIFICIAL (bval)
|
||||
&& !(TREE_CODE (x) == TYPE_DECL && DECL_ARTIFICIAL (x)))
|
||||
{
|
||||
old_decl = BINDING_TYPE (binding);
|
||||
BINDING_TYPE (binding) = bval;
|
||||
BINDING_VALUE (binding) = NULL_TREE;
|
||||
INHERITED_VALUE_BINDING_P (binding) = 0;
|
||||
}
|
||||
old_decl = bval;
|
||||
else
|
||||
old_decl = bval;
|
||||
}
|
||||
else if (TREE_CODE (x) == OVERLOAD && is_overloaded_fn (bval))
|
||||
old_decl = bval;
|
||||
|
@ -1,5 +1,8 @@
|
||||
2003-08-26 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
PR c++/11871
|
||||
* c++.dg/lookup/crash1.C: New test.
|
||||
|
||||
* c++.dg/warn/noeffect3.C: New test.
|
||||
|
||||
2003-08-25 Janis Johnson <janis187@us.ibm.com>
|
||||
|
31
gcc/testsuite/g++.dg/lookup/crash1.C
Normal file
31
gcc/testsuite/g++.dg/lookup/crash1.C
Normal file
@ -0,0 +1,31 @@
|
||||
// { dg-do compile }
|
||||
|
||||
// Copyright (C) 2003 Free Software Foundation, Inc.
|
||||
// Contributed by Nathan Sidwell 25 Aug 2003 <nathan@codesourcery.com>
|
||||
// Origin pr 11871 Dirk Mueller <mueller@kde.org>
|
||||
|
||||
// PR c++/11871 Regression
|
||||
|
||||
namespace std
|
||||
{
|
||||
class A
|
||||
{
|
||||
public:
|
||||
enum result
|
||||
{
|
||||
ok
|
||||
};
|
||||
};
|
||||
|
||||
template<typename T> class B : public A
|
||||
{
|
||||
public:
|
||||
typedef A::result result;
|
||||
};
|
||||
}
|
||||
|
||||
int main()
|
||||
{
|
||||
for(float result = 1.0;;);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user