The fix for PR 118845 introduced new checks, which in turn exposed
a case where the typespec information on a symbol generated symbol
was not set. This led to an apparent type of BT_UNKNOWN, and hence
an error. Fixed as obvoius and simple.
gcc/fortran/ChangeLog:
* frontend-passes.cc (check_externals_procedure): Copy
typespec from old to new symbol.
gcc/testsuite/ChangeLog:
* gfortran.dg/interface_54.f90: New test.
gcc_assert (new_sym);
new_sym->attr = sym->attr;
new_sym->attr.if_source = IFSRC_DECL;
+ new_sym->ts = sym->ts;
gfc_current_ns = gsym->ns;
gfc_get_formal_from_actual_arglist (new_sym, actual);
--- /dev/null
+! { dg-do compile }
+! PR 118884 - this used to be rejected due to confused interface
+! checking.
+
+subroutine cget24
+ external cslect
+ logical cslect
+
+ call cgeesx(cslect)
+ if( cslect() ) print *,"foo"
+ call cgeesx(cslect)
+end subroutine cget24