diff options
author | Mark Mitchell <mark@codesourcery.com> | 2006-10-02 04:12:30 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2006-10-02 04:12:30 +0000 |
commit | 297d410513c658b50550f02b0e7cd914b0551630 (patch) | |
tree | 03124add25248e8e09b1e5d0815b2a0a9d459009 | |
parent | 3af947c66a46ac5b36c1b2dceb55de145df26e1b (diff) | |
download | gcc-297d410513c658b50550f02b0e7cd914b0551630.zip gcc-297d410513c658b50550f02b0e7cd914b0551630.tar.gz gcc-297d410513c658b50550f02b0e7cd914b0551630.tar.bz2 |
re PR c++/29080 (Multiple-inheritance with template method function code triggers "internal compiler error: in build_base_path, at cp/class.c:273")
PR c++/29080
* parser.c (cp_parser_postfix_dot_deref_expression): Use
BASELINK_ACCESS_BINFO as the qualifying scope when calling
adjust_result_of_qualified_name_lookup.
PR c++/29080
* g++.dg/template/member7.C: New test.
From-SVN: r117360
-rw-r--r-- | gcc/cp/ChangeLog | 12 | ||||
-rw-r--r-- | gcc/cp/parser.c | 2 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/template/member7.C | 15 |
4 files changed, 37 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 46bfeb8..d21bf43 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,15 @@ +2006-10-01 Mark Mitchell <mark@codesourcery.com> + + PR c++/29105 + * pt.c (tsubst_baselink): Substituteinto the qualifying scope. + * semantics.c (baselink_for_fns): Build a baselink, even when + processing a template. + + PR c++/29080 + * parser.c (cp_parser_postfix_dot_deref_expression): Use + BASELINK_ACCESS_BINFO as the qualifying scope when calling + adjust_result_of_qualified_name_lookup. + 2006-09-25 Lee Millward <lee.millward@codesourcery.com> PR c++/27329 diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 0b7dd3c..7b66ea3 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -4593,7 +4593,7 @@ cp_parser_postfix_dot_deref_expression (cp_parser *parser, } if (scope && name && BASELINK_P (name)) adjust_result_of_qualified_name_lookup - (name, BINFO_TYPE (BASELINK_BINFO (name)), scope); + (name, BINFO_TYPE (BASELINK_ACCESS_BINFO (name)), scope); postfix_expression = finish_class_member_access_expr (postfix_expression, name, template_p); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 51599a7..696d0ab 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2006-10-01 Mark Mitchell <mark@codesourcery.com> + + PR c++/29105 + * g++.dg/template/member6.C: New test. + * g++.dg/parse/typename7.C: Adjust error markers. + + PR c++/29080 + * g++.dg/template/member7.C: New test. + 2006-09-30 Joseph S. Myers <joseph@codesourcery.com> PR c/24010 diff --git a/gcc/testsuite/g++.dg/template/member7.C b/gcc/testsuite/g++.dg/template/member7.C new file mode 100644 index 0000000..1c75e49 --- /dev/null +++ b/gcc/testsuite/g++.dg/template/member7.C @@ -0,0 +1,15 @@ +// PR c++/29080 + +struct Base { + template<class C> void method() { } +}; + +struct Left : public Base { }; +struct Right : public Base { }; +struct Join : public Left, public Right { }; + +void function() +{ + Join join; + join.Left::method<int>(); +} |