https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91962
Bug ID: 91962 Summary: ice in build_target_expr, at cp/tree.c:488 Product: gcc Version: 10.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For this C++ source code: template <typename a> class b { public: void c(const a &); }; class B { void d(); b<const int *> e; }; long f; void B::d() { e.c((int *)f); } on recent gcc trunk, produces this: /home/dcb/creduce/dcbTest/bug542.cc: In member function ‘void B::d()’: /home/dcb/creduce/dcbTest/bug542.cc:10:27: internal compiler error: in build_target_expr, at cp/tree.c:488 10 | void B::d() { e.c((int *)f); } | ^ 0x6700c2 build_target_expr ../../trunk/gcc/cp/tree.c:488 0x8ce7b3 convert_like_real ../../trunk/gcc/cp/call.c:7467 0x8d37f1 build_over_call ../../trunk/gcc/cp/call.c:8401 0x8cc2c7 build_new_method_call_1 ../../trunk/gcc/cp/call.c:9887 The problem first seems to occur sometime between revision 276250 and 276350.