https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85896

            Bug ID: 85896
           Summary: ICE in gfc_convert_constant(): Unexpected type
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gs...@t-online.de
  Target Milestone: ---

Affects versions down to at least 4.8 :


$ cat z1.f90
program p
   integer :: min
   print *, min('a','b')
end


$ cat z2.f90
program p
   real :: max
   print *, max('a','b')
end


$ gfortran-9-20180520 -c z1.f90
f951: internal compiler error: gfc_convert_constant(): Unexpected type
0x6a723f gfc_internal_error(char const*, ...)
        ../../gcc/fortran/error.c:1358
0x732a3b gfc_convert_constant(gfc_expr*, bt, int)
        ../../gcc/fortran/simplify.c:8009
0x6b9e87 do_simplify
        ../../gcc/fortran/intrinsic.c:4370
0x6c441c gfc_intrinsic_func_interface(gfc_expr*, int)
        ../../gcc/fortran/intrinsic.c:4798
0x70e425 resolve_unknown_f
        ../../gcc/fortran/resolve.c:2870
0x70e425 resolve_function
        ../../gcc/fortran/resolve.c:3179
0x70e54a gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:6719
0x714db2 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11096
0x714a87 gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:10141
0x714ebb gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:11086
0x71786a resolve_codes
        ../../gcc/fortran/resolve.c:16544
0x71796e gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:16579
0x7010ca resolve_all_program_units
        ../../gcc/fortran/parse.c:6060
0x7010ca gfc_parse_file()
        ../../gcc/fortran/parse.c:6310
0x74809f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:204

Reply via email to