https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99853
Bug ID: 99853 Summary: ICE: Cannot convert 'LOGICAL(4)' to 'INTEGER(8)' (etc.) Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: gs...@t-online.de Target Milestone: --- With option -std=f95, -std=f2003, -std=f2008 or -std=f2018 : (affects versions down to at least r5) $ cat z1.f90 program p select case (.true.) case (1_8) end select end $ gfortran-11-20210328 -c z1.f90 z1.f90:2:16: 2 | select case (.true.) | 1 Warning: Extension: Conversion from LOGICAL(4) to INTEGER(8) at (1) $ gfortran-11-20210328 -c z1.f90 -std=f2008 z1.f90:2:16: 2 | select case (.true.) | 1 internal compiler error: Cannot convert 'LOGICAL(4)' to 'INTEGER(8)' at (1) 0x6c38d9 gfc_report_diagnostic ../../gcc/fortran/error.c:782 0x6c4ffa gfc_internal_error(char const*, ...) ../../gcc/fortran/error.c:1402 0x6e4808 gfc_convert_type_warn(gfc_expr*, gfc_typespec*, int, int, bool) ../../gcc/fortran/intrinsic.c:5397 0x72f277 resolve_select ../../gcc/fortran/resolve.c:8714 0x738b97 gfc_resolve_code(gfc_code*, gfc_namespace*) ../../gcc/fortran/resolve.c:12055 0x73a9f7 resolve_codes ../../gcc/fortran/resolve.c:17395 0x73aabe gfc_resolve(gfc_namespace*) ../../gcc/fortran/resolve.c:17430 0x723024 resolve_all_program_units ../../gcc/fortran/parse.c:6290 0x723024 gfc_parse_file() ../../gcc/fortran/parse.c:6542 0x7705ff gfc_be_parse_file ../../gcc/fortran/f95-lang.c:212