* semantics.c (check_accessibility_of_qualified_id): Robustify.
PR c++/28048
* g++.dg/template/defarg9.C: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115579
138bc75d-0d04-0410-961f-
82ee72b054a4
2006-07-18 Mark Mitchell <mark@codesourcery.com>
+ PR c++/28048
+ * semantics.c (check_accessibility_of_qualified_id): Robustify.
+
PR c++/28235
* pt.c (tsubst_decl): Handling substitutions into a static data
member from within the scope of the tempalte itself.
its bases. */
qualifying_type = currently_open_derived_class (scope);
- if (qualifying_type && IS_AGGR_TYPE_CODE (TREE_CODE (qualifying_type)))
- /* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM
- or similar in a default argument value. */
+ if (qualifying_type
+ /* It is possible for qualifying type to be a TEMPLATE_TYPE_PARM
+ or similar in a default argument value. */
+ && CLASS_TYPE_P (qualifying_type)
+ && !dependent_type_p (qualifying_type))
perform_or_defer_access_check (TYPE_BINFO (qualifying_type), decl);
}
2006-07-18 Mark Mitchell <mark@codesourcery.com>
+ PR c++/28048
+ * g++.dg/template/defarg9.C: New test.
+
PR c++/28235
* g++.dg/template/static27.C: New test.
--- /dev/null
+// PR c++/28048
+
+template<typename T> struct Boom;
+
+template<typename T, bool D = Boom<T>::Internal::Value> // <--ICE
+ struct Foo
+ {
+ };
+
+template<typename T> struct Boom
+{
+ struct Internal
+ {
+ static const bool Value = false;
+ };
+};