http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56438
Bug #: 56438 Summary: [4.8 regression] ICE in value_dependent_expression_p, at cp/pt.c:19551 Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassig...@gcc.gnu.org ReportedBy: manisan...@gmail.com gcc version 4.8.0 20130220 (Red Hat 4.8.0-0.14) (GCC) g++ -c ice.cc ice.cc: In function ‘void foo()’: ice.cc:19:25: internal compiler error: in value_dependent_expression_p, at cp/pt.c:19551 a << bar(b.size(), C()); ^ ========== ice.cc ========== struct A { }; A& operator<<(A&, const char*); struct B { int size(); }; struct C { }; template <class S, class T> S bar(const S& s, const T& t) { return s; } template<class S, class T> void foo() { A a; B b; a << bar(b.size(), C()); } =========================== gcc version 4.7.2 20121109 (Red Hat 4.7.2-9) (GCC), gives get the expected result g++ -c ice.cc ice.cc: In function ‘void foo()’: ice.cc:19:25: error: no match for ‘operator<<’ in ‘a << bar(b.B::size(), C())’ ice.cc:19:25: note: candidate is: ice.cc:2:4: note: A& operator<<(A&, const char*) <near match> ice.cc:2:4: note: no known conversion for argument 2 from ‘int’ to ‘const char*’