This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/62207] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in tsubst_copy, at cp/pt.c
- From: "pipcet at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 28 May 2016 17:43:03 +0000
- Subject: [Bug c++/62207] ICE: tree check: expected tree that contains 'decl minimal' structure, have 'overload' in tsubst_copy, at cp/pt.c
- Auto-submitted: auto-generated
- References: <bug-62207-4 at http dot gcc dot gnu dot org/bugzilla/>
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.