------- Comment #5 from janus at gcc dot gnu dot org 2009-11-17 12:00 ------- (In reply to comment #3) > So inside MAIN__ we have: > static void setpointer (integer(kind=4) (*<T3af>) (integer(kind=4))); > setpointer (&ptype); > > That is wrong, unless I am missing a reference type somewhere.
Yes, indeed the 'static' line is wrong. However, it does not seem to have any consequences. > Plus inside setpointer I think: > p = (integer(kind=4) (*<T3af>) (integer(kind=4)) *) funpointer; > > is incorrect, it should be: > *p = funpointer; Right, this is corrected by my patch in comment #2. With that patch, the dump shows: setpointer (integer(kind=4) (*<T3d4>) (integer(kind=4)) * p) { *p = (integer(kind=4) (*<T3d4>) (integer(kind=4))) funpointer; } MAIN__ () { extern void (*<T62>) (void) funpointer; integer(kind=4) (*<T3d4>) (integer(kind=4)) ptype; integer(kind=4) (*<T3d4>) (integer(kind=4)) ptype2; static void setpointer (integer(kind=4) (*<T3d4>) (integer(kind=4))); Here the 'setpointer' routine is ok, but again the static declaration is wrong. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42072