https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |WAITING CC| |kargl at gcc dot gnu.org --- Comment #6 from kargl at gcc dot gnu.org --- The problem reported here seems to be fixed in 4.9.4, 5.2.1, and 6.0. No idea when or where it was fixed. The original testcase gives % gfc6 -w -c a3.f90 a3.f90:130:2: function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result( & 1 Error: Unclassifiable statement at (1) a3.f90:103:8: if (b1) then 1 Error: IF clause at (1) requires a scalar LOGICAL expression a3.f90:99:8: if (b) then 1 Error: IF clause at (1) requires a scalar LOGICAL expression Adding proper declarations for b and b1, then ends with % gfc6 -w -c a3.f90 a3.f90:132:2: function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result( & 1 Error: Unclassifiable statement at (1) Adding the missing 'retval) and 'end function', then yields something that compiles. Does the problem still exist?