https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102156

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
            Summary|`cannot call constructor`   |[9/10/11/12 Regression]
                   |error during member access  |`cannot call constructor`
                   |                            |error during member access
   Target Milestone|---                         |9.5
      Known to work|                            |4.4.7
   Last reconfirmed|                            |2021-09-01
             Status|UNCONFIRMED                 |NEW
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=11764
           Keywords|                            |rejects-valid
      Known to fail|                            |4.5.4

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> There was an C++ old defect report about B::B being the name of the
> constructor or the class name.

But it looks like it is GCC getting confused because of that defect report
(PR11764).

And here is a testcase which makes this a regression from GCC 4.4.0 (valid
C++98)

struct C{int tt;};
template<class T >
struct B :T { int t;};
struct A :B<C>
{
};

int main()
{
    A t;
    return t.B<C>::B<C>::tt;
}

Reply via email to