The following valid code snippet triggers an ICE since GCC 3.0:
============================================
template<int> void foo();
template<typename> struct A
{
friend void foo<0>() __attribute((weak));
};
============================================
bug.cc:6: internal compiler error: tree check: expected tree that contains
'decl non-common' structure, have 'overload' in decl_is_template_id, at
cp/mangle.c:325
Please submit a full bug report, [etc.]
--
Summary: [4.1/4.2/4.3 regression] ICE with friend and attribute
weak
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34939