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

            Bug ID: 89516
           Summary: ICE in gfc_calculate_transfer_sizes at
                    gcc/fortran/check.c:5506
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

Apparently a very old surprise, test-case is simplified from:
gcc/testsuite/gfortran.dg/pr89266.f90:

$ cat ice.f90 
program test
  character(*), parameter :: n = ''
  character(*), parameter :: o = transfer ([''], n)
end program test

$ gfortran ice.f90 -c -Wsurprising
f951: internal compiler error: Segmentation fault
0xdd0caf crash_signal
        /home/marxin/Programming/gcc/gcc/toplev.c:326
0x7ffff7b79e0f ???
       
/usr/src/debug/glibc-2.29-2.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0x7b1daa gfc_calculate_transfer_sizes(gfc_expr*, gfc_expr*, gfc_expr*, unsigned
long*, unsigned long*, unsigned long*)
        /home/marxin/Programming/gcc/gcc/fortran/check.c:5506
0x7b1daa gfc_calculate_transfer_sizes(gfc_expr*, gfc_expr*, gfc_expr*, unsigned
long*, unsigned long*, unsigned long*)
        /home/marxin/Programming/gcc/gcc/fortran/check.c:5470
0x7b1e58 gfc_check_transfer(gfc_expr*, gfc_expr*, gfc_expr*)
        /home/marxin/Programming/gcc/gcc/fortran/check.c:5566
0x7eaa40 check_specific
        /home/marxin/Programming/gcc/gcc/fortran/intrinsic.c:4634
0x7f4c7d gfc_intrinsic_func_interface(gfc_expr*, int)
        /home/marxin/Programming/gcc/gcc/fortran/intrinsic.c:4870
0x84b7af resolve_unknown_f
        /home/marxin/Programming/gcc/gcc/fortran/resolve.c:2873
0x84b7af resolve_function
        /home/marxin/Programming/gcc/gcc/fortran/resolve.c:3211
0x84b7af gfc_resolve_expr(gfc_expr*)
        /home/marxin/Programming/gcc/gcc/fortran/resolve.c:6866
0x7db2af gfc_reduce_init_expr(gfc_expr*)
        /home/marxin/Programming/gcc/gcc/fortran/expr.c:2987
0x7de330 gfc_match_init_expr(gfc_expr**)
        /home/marxin/Programming/gcc/gcc/fortran/expr.c:3035
0x7c9169 variable_decl
        /home/marxin/Programming/gcc/gcc/fortran/decl.c:2788
0x7c9169 gfc_match_data_decl()
        /home/marxin/Programming/gcc/gcc/fortran/decl.c:6015
0x827eef match_word
        /home/marxin/Programming/gcc/gcc/fortran/parse.c:65
0x827eef decode_statement
        /home/marxin/Programming/gcc/gcc/fortran/parse.c:376
0x82b82e next_free
        /home/marxin/Programming/gcc/gcc/fortran/parse.c:1241
0x82b82e next_statement
        /home/marxin/Programming/gcc/gcc/fortran/parse.c:1473
0x82cedb parse_spec
        /home/marxin/Programming/gcc/gcc/fortran/parse.c:3865
0x82f87c parse_progunit
        /home/marxin/Programming/gcc/gcc/fortran/parse.c:5680

Reply via email to