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
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;
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>
--- /dev/null
+// { 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;;);
+}
+