https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106916
Bug ID: 106916 Summary: ICE/segfault during parsing with modules and invalid code in gfc_free_namespace when using the same symbol twice Product: gcc Version: 13.0 Status: UNCONFIRMED Keywords: ice-on-invalid-code Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: burnus at gcc dot gnu.org Target Milestone: --- f951: internal compiler error: in gfc_free_namespace, at fortran/symbol.cc:4039 0x686c77 gfc_free_namespace(gfc_namespace*&) ../../repos/gcc/gcc/fortran/symbol.cc:4039 0xa29daf gfc_free_symbol(gfc_symbol*&) ../../repos/gcc/gcc/fortran/symbol.cc:3085 0xa29e85 gfc_release_symbol(gfc_symbol*&) ../../repos/gcc/gcc/fortran/symbol.cc:3127 for the invalid attached testcase. -fopenmp is in theory required. There are two issues: * The same symbol is used twice, once use associated and once newly defined in an interface block. * There is a tailing '::' module omp_lib_target use omp_lib implicit none (type, external) interface logical function omp_target_is_present(ptr, device_num) type(*), dimension(..) :: end function omp_target_is_present end interface end module omp_lib_target