https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107266
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #2 from kargl at gcc dot gnu.org --- (In reply to Tobias Burnus from comment #1) > Better example: > > character(kind=4) function f(x) bind(C) > character(kind=4), value :: x > end > > > Has the dump: > > __attribute__((fn spec (". w "))) > character(kind=1) f (character(kind=1) x) > { > (void) 0; > } > > > Note the change to kind=1 So, you want gfortran to reject the function. It gets real ugly with function f(x) bind(C) result(a) character(kind=4) a character(kind=4), value :: x a = x end leading to __attribute__((fn spec (". w "))) character(kind=1) f (character(kind=1) x) { character(kind=1) a; *(character(kind=4) *) &a = *(character(kind=4) *) &x; return a; }