The following code snippet triggers an ICE since GCC 4.1.0:
==========================================================
void foo(int i __attribute__((__weakref__ ("xyz"))));
==========================================================
bug.c:1: internal compiler error: tree check: expected tree that contains 'decl
with visibility' structure, have 'parm_decl' in handle_weakref_attribute, at
c-common.c:6162
Please submit a full bug report, [etc.]
Before GCC 4.1.0 the code was accepted with the following warning:
bug.c:1: warning: '__weakref__' attribute directive ignored
--
Summary: [4.2/4.3/4.4 regression] ICE with weakref attribute
Product: gcc
Version: 4.4.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=37645