Commit c645999e by Nathan Sidwell

re PR c++/17149 (ICE: tree check: expected record_type or union_type or…

re PR c++/17149 (ICE: tree check: expected record_type or union_type or qual_union_type, have template_type_parm in check_accessibility_of_qualified_id, at cp/semantics.c:1388)

cp:
        PR c++/17149
        * semantics.c (check_accessibility_of_qualified_id): Defer check
        if qualifying_type is a template parameter.
testsuite:
        PR c++/17149
        * g++.dg/template/access15.C: New.

From-SVN: r86472
parent d46cd2be
2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/17149
* semantics.c (check_accessibility_of_qualified_id): Defer check
if qualifying_type is a template parameter.
2004-08-23 Mark Mitchell <mark@codesourcery.com> 2004-08-23 Mark Mitchell <mark@codesourcery.com>
PR c++/17163 PR c++/17163
...@@ -11,7 +17,7 @@ ...@@ -11,7 +17,7 @@
Revert: Revert:
2004-08-22 Andrew Pinski <apinski@apple.com> 2004-08-22 Andrew Pinski <apinski@apple.com>
PR c++/14029 PR c++/14029
* typeck.c (build_unary_op): Use &a.b if the foldded lowered * typeck.c (build_unary_op): Use &a.b if the folded lowered
expression is not constant. expression is not constant.
2004-08-23 Nathan Sidwell <nathan@codesourcery.com> 2004-08-23 Nathan Sidwell <nathan@codesourcery.com>
...@@ -23,7 +29,7 @@ ...@@ -23,7 +29,7 @@
2004-08-22 Andrew Pinski <apinski@apple.com> 2004-08-22 Andrew Pinski <apinski@apple.com>
PR c++/14029 PR c++/14029
* typeck.c (build_unary_op): Use &a.b if the foldded lowered * typeck.c (build_unary_op): Use &a.b if the folded lowered
expression is not constant. expression is not constant.
2004-08-20 Mark Mitchell <mark@codesourcery.com> 2004-08-20 Mark Mitchell <mark@codesourcery.com>
......
...@@ -1384,7 +1384,9 @@ check_accessibility_of_qualified_id (tree decl, ...@@ -1384,7 +1384,9 @@ check_accessibility_of_qualified_id (tree decl,
its bases. */ its bases. */
qualifying_type = currently_open_derived_class (scope); qualifying_type = currently_open_derived_class (scope);
if (qualifying_type) 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. */
perform_or_defer_access_check (TYPE_BINFO (qualifying_type), decl); perform_or_defer_access_check (TYPE_BINFO (qualifying_type), decl);
} }
......
2004-08-24 Nathan Sidwell <nathan@codesourcery.com>
PR c++/17149
* g++.dg/template/access15.C: New.
2004-08-23 Mark Mitchell <mark@codesourcery.com> 2004-08-23 Mark Mitchell <mark@codesourcery.com>
PR c++/17163 PR c++/17163
......
// { dg-do compile }
// Copyright (C) 2004 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 23 Aug 2004 <nathan@codesourcery.com>
// Origin: stefaandr@hotmail.com
// Bug 17149: ICE with TEMPLATE_TYPE_PARM
template <class super,
int (super::tdata::*member)() const = &super::tdata::operator()>
struct x {};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment