https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97224
--- Comment #9 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I think the two attached patches are not pertinent: both tests use independent
translation units, so they should compile.
If I couple the TUs as in
SUBROUTINE AIMPAC(ACO,AIC,EXPON,ICENT,ITYPE,OE,OCCNO)
END
COMMON /INTRFC/ FRIEND,AIMPAC,RPAC,PLTORB,MOLPLT
call AIMPAC(ACO,AIC,EXPON,ICENT,ITYPE,OE,OCCNO)
END
or
module AIMPAC ! { dg-error "cannot appear" }
integer x
END
use AIMPAC
COMMON /INTRFC/ FRIEND,AIMPAC,RPAC,PLTORB,MOLPLT ! { dg-error "cannot appear"
}
END
I get
8 | call AIMPAC(ACO,AIC,EXPON,ICENT,ITYPE,OE,OCCNO)
| 1
Error: PROCEDURE attribute conflicts with COMMON attribute in 'aimpac' at (1)
for the first case and
5 | use AIMPAC
|
internal compiler error: in gfc_typenode_for_spec, at
fortran/trans-types.c:1120
for the second one.