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

            Bug ID: 77942
           Summary: ICE: Floating point exception, in gfc_simplify_cshift,
                    at fortran/simplify.c:1845
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fort...@t-online.de
  Target Milestone: ---

Affects version 6 and 7, works with 5 and below.


$ cat z1.f90
program p
   character, parameter :: c(2) = 'a'
   print *, cshift(c(2:1), 1)
end


$ cat z3.f90
program p
   character, parameter :: c(*) = [character ::]
   print *, cshift(c, 1)
end


$ gfortran-7-20161009 z1.f90
f951: internal compiler error: Floating point exception
0xc2a7cf crash_signal
        ../../gcc/toplev.c:337
0x703c5f gfc_simplify_cshift(gfc_expr*, gfc_expr*, gfc_expr*)
        ../../gcc/fortran/simplify.c:1845
0x69beb1 do_simplify
        ../../gcc/fortran/intrinsic.c:4269
0x6a5c9c gfc_intrinsic_func_interface(gfc_expr*, int)
        ../../gcc/fortran/intrinsic.c:4618
0x6ebc71 resolve_unknown_f
        ../../gcc/fortran/resolve.c:2718
0x6ebc71 resolve_function
        ../../gcc/fortran/resolve.c:3020
0x6ebc71 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:6356
0x6f0a31 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:10580
0x6f06f7 gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:9629
0x6f0b3e gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.c:10570
0x6f33b2 resolve_codes
        ../../gcc/fortran/resolve.c:15739
0x6f34ae gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:15774
0x6ddfca resolve_all_program_units
        ../../gcc/fortran/parse.c:5879
0x6ddfca gfc_parse_file()
        ../../gcc/fortran/parse.c:6131
0x720e22 gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:198

Reply via email to