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.]
Confirmed. Related to PR34937.
Subject: Bug 34962 Author: jason Date: Wed Feb 13 21:27:16 2008 New Revision: 132297 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=132297 Log: PR c++/34962, c++/34937, c++/34939 * decl2.c (is_late_template_attribute): Always defer attributes vector_size and weak. Added: trunk/gcc/testsuite/g++.dg/ext/tmplattr9.C Modified: trunk/gcc/cp/ChangeLog trunk/gcc/cp/decl2.c
*** This bug has been marked as a duplicate of 34937 ***