Summary: | [4.0 Regression] dependent type (references) and calling a function method | ||
---|---|---|---|
Product: | gcc | Reporter: | Ralf W. Grosse-Kunstleve <RWGrosse-Kunstleve> |
Component: | c++ | Assignee: | Nathan Sidwell <nathan> |
Status: | RESOLVED FIXED | ||
Severity: | critical | CC: | gcc-bugs, pinskia |
Priority: | P1 | Keywords: | diagnostic, rejects-valid |
Version: | 4.0.0 | ||
Target Milestone: | 4.0.0 | ||
Host: | i686-pc-linux-gnu | Target: | i686-pc-linux-gnu |
Build: | i686-pc-linux-gnu | Known to work: | |
Known to fail: | Last reconfirmed: | 2005-01-07 12:57:22 | |
Attachments: |
Preprocessed source code
a little more reduced With removed (mostly) iostreams and some other |
Description
Ralf W. Grosse-Kunstleve
2005-01-06 19:48:36 UTC
Created attachment 7886 [details]
Preprocessed source code
Date: Thu, 06 Jan 2005 14:24:06 -0500 From: David Abrahams Ralf W. Grosse-Kunstleve wrote: > Hi David, > > To ensure that Boost.Python will work with gcc 4 I've checked out the > latest gcc cvs today, along with the latest boost cvs. There are lots > of errors when compiling the Boost.Python tests, but as far as I can > tell only two types of errors. One is an internal compiler error, i.e. > there is no question that I have to file a bug report for this one. > However, I am not sure about the second one. Could you please have a > look? > > Raw error message: > http://cci.lbl.gov/~rwgk/bugs/gcc_cvs_head_20050106/error_which_is_of_non_ class_type > > Same but processed with gSTLFilt.pl: > http://cci.lbl.gov/~rwgk/bugs/gcc_cvs_head_20050106/error_which_is_of_non_ class_type_stlfilt That's not much help, is it!? > If you think it is a gcc 4 problem rather than a boost problem > I'll file a bug report. Well, let's see. I think you can do this analysis yourself, FWIW: /net/legless/scratch1/rwgk/hot/boost/boost/python/object/make_instance.hpp:63: error: request for member M-CM-"M-bM-^BM-,M-KM-^\get_class_objectM-CM-"M-bM-^B M-,M-bM-^DM-" in M-CM-"M-bM-^BM-,M-KM-^\boost::python::converter::detail::registered_base<const v olatile Y&>::convertersM-CM-"M-bM-^BM-,M-bM-^DM-", which is of non-class type M-CM-"M-b M-^BM-,M-KM-^\const boost::python::converter::registration&M-CM-"M-bM-^BM-,M-bM-^DM-" It seems to be claiming that the static registration const& member named "converters" of registered_base<Y const volatile&> Doesn't have class type. Clearly wrong. I mean, it's a reference to an object of class type, but for all purposes other than initialization you can do the same things with that as you can do with a class instance. > Thanks! > Ralf > > BTW: Do you know what to make of the strange characters (e.g. M-CM-"M-bM-^BM-, M-bM-^DM-")? GCC bug? (In reply to comment #2) > > BTW: Do you know what to make of the strange characters (e.g. M-CM-"M-bM-^BM-, > M-bM-^DM-")? > > GCC bug? No, just using UTF-8 for the quotes because your LC/LANG includes UTF-8 in there. if you don't want them, don't lie to the compiler about supporting UTF-8 :). I will try to reduce this also. Created attachment 7887 [details]
a little more reduced
This is as far as I getting, not much but a start, someone else wants to start
reducing it?
Created attachment 7890 [details]
With removed (mostly) iostreams and some other
I decided to take a different method to reducing this testcase by using the old style copy and paste method which is better sometimes at reducing testcases (in fact much better and faster with C++ code): struct t { void f() const; }; template <typename _Tp> struct A { static t const& c; }; template <typename _Tp> void g(void) { A<_Tp>::c.f(); } void h(void) { g<int>(); } It worked with 4.0.0 20041124 so this is a new regression :(. 2005-01-07 Nathan Sidwell <nathan@codesourcery.com> PR c++/19298 * pt.c (tsubst_qualified_id): Call convert_from_reference. Subject: Bug 19298 CVSROOT: /cvs/gcc Module name: gcc Changes by: nathan@gcc.gnu.org 2005-01-07 17:09:16 Modified files: gcc/cp : ChangeLog pt.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/template: ref2.C Log message: cp: PR c++/19298 * pt.c (tsubst_qualified_id): Call convert_from_reference. testsuite: PR c++/19298 * g++.dg/template/ref2.C: New. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4572&r2=1.4573 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/pt.c.diff?cvsroot=gcc&r1=1.965&r2=1.966 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4865&r2=1.4866 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/ref2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1 |