[Bug fortran/85797] New: ICE in gfc_element_size, at fortran/target-memory.c:126
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Tue May 15 19:16:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85797
Bug ID: 85797
Summary: ICE in gfc_element_size, at
fortran/target-memory.c:126
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
With option -Wsurprising or -Wall, down to at least 4.8 :
$ cat z1.f90
subroutine a
c = transfer(a, b)
end
$ cat z2.f90
subroutine a
c = transfer(a, a)
end
$ cat z3.f90
subroutine a
c = transfer(b, a)
end
$ cat z4.f90
recursive subroutine a
c = transfer(a, b)
end
$ gfortran-9-20180513 -c z4.f90
$
$ gfortran-9-20180513 -c z1.f90
z1.f90:2:16:
c = transfer(a, b)
1
Warning: Non-RECURSIVE procedure 'a' at (1) is possibly calling itself
recursively. Declare it RECURSIVE or use '-frecursive'
$ gfortran-9-20180513 -c z4.f90 -Wsurprising
f951: internal compiler error: Invalid expression in gfc_element_size.
0x6a7d3f gfc_internal_error(char const*, ...)
../../gcc/fortran/error.c:1358
0x73cdbb gfc_element_size(gfc_expr*)
../../gcc/fortran/target-memory.c:126
0x73ce01 gfc_target_expr_size(gfc_expr*)
../../gcc/fortran/target-memory.c:152
0x684a23 gfc_calculate_transfer_sizes(gfc_expr*, gfc_expr*, gfc_expr*, unsigned
long*, unsigned long*, unsigned long*)
../../gcc/fortran/check.c:5408
0x684b88 gfc_check_transfer(gfc_expr*, gfc_expr*, gfc_expr*)
../../gcc/fortran/check.c:5472
0x6baf24 check_specific
../../gcc/fortran/intrinsic.c:4545
0x6c4ee4 gfc_intrinsic_func_interface(gfc_expr*, int)
../../gcc/fortran/intrinsic.c:4781
0x70ee65 resolve_unknown_f
../../gcc/fortran/resolve.c:2870
0x70ee65 resolve_function
../../gcc/fortran/resolve.c:3179
0x70ef8a gfc_resolve_expr(gfc_expr*)
../../gcc/fortran/resolve.c:6719
0x715810 gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:11100
0x7182aa resolve_codes
../../gcc/fortran/resolve.c:16537
0x7183ae gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.c:16572
0x701b6a resolve_all_program_units
../../gcc/fortran/parse.c:6060
0x701b6a gfc_parse_file()
../../gcc/fortran/parse.c:6310
0x748adf gfc_be_parse_file
../../gcc/fortran/f95-lang.c:204
More information about the Gcc-bugs
mailing list