This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/62207] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in tsubst_copy, at cp/pt.c


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

pipcet at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pipcet at gmail dot com

--- Comment #4 from pipcet at gmail dot com ---
I believe this invalid code triggers the same bug, and might be easier to
analyze:

extern int fn();

template<class F>
class X {
public:
  template<F f> class Y {};
  template<F f> void y() {}
  X(F f)
  {
    Y<f> y;

    y.value();
  }
};

int main() { const X<decltype(&fn)> x(fn); }



In both cases, an identifier is used twice ("y" here, "ptr" in the original
example), and renaming one instance to avoid the name clash avoids the ICE.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]