http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52622
--- Comment #3 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-03-21 15:56:46 UTC --- On x86_64-apple-darwin10, compiling the test with 4.6.3, 4.7.0RC2, or trunk gives the follwoing errors pr52622.f90:130.2: function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result( & 1 Error: Unclassifiable statement at (1) pr52622.f90:103.8: if (b1) then 1 Error: IF clause at (1) requires a scalar LOGICAL expression pr52622.f90:99.8: if (b) then 1 Error: IF clause at (1) requires a scalar LOGICAL expression but no ICE (w/wo -w). Fixing the errors with --- pr52622.f90 2012-03-19 17:58:14.000000000 +0100 +++ pr52622_db.f90 2012-03-19 18:07:37.000000000 +0100 @@ -96,10 +96,12 @@ module Args_Basic_Impl end type Args_Basic_impl_t contains function passinbool_impl(self, b, exception) result(retval) + logical :: b if (b) then endif end function passinbool_impl function passeverywherebool_impl(self, b1, b2, b3, exception) result(retval) + logical :: b1 if (b1) then endif end function passeverywherebool_impl @@ -128,7 +130,10 @@ contains retval) end function passeverywheredouble_impl function passeverywherefcomplex_impl(self, c1, c2, c3, exception) result( & + retval) complex (kind=sidl_fcomplex), intent(in) :: c1 + end function passeverywherefcomplex_impl function passindcomplex_impl(self, c, exception) result(retval) end function passindcomplex_impl end module Args_Basic_Impl +end the code is compiled without error.