This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/71764] compiler internal error: segmentation fault
- From: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 05 Jul 2016 20:12:38 +0000
- Subject: [Bug fortran/71764] compiler internal error: segmentation fault
- Auto-submitted: auto-generated
- References: <bug-71764-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71764
Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gerhard.steinmetz.fortran@t
| |-online.de
--- Comment #4 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Multiple usage of iso_c_binding rings a bell - if one item is repeatedly
included via use only in a module chain or in one program unit alone.
$ cat z1.f90
module m
use iso_c_binding, only: c_funptr
use iso_c_binding, only: c_null_funptr, c_funptr
contains
subroutine s
type(c_funptr) :: to_cb
to_cb = c_null_funptr
end subroutine
end module
$ cat z2.f90
program p
use iso_c_binding, only: c_funptr
use iso_c_binding, only: c_null_funptr, c_funptr
contains
subroutine s
type(c_funptr) :: to_cb
to_cb = c_null_funptr
end subroutine
end program
$ cat z3.f90
program p
use iso_c_binding, only: c_funptr
use iso_c_binding, only: c_null_funptr, c_funptr
type(c_funptr) :: to_cb
to_cb = c_null_funptr
end program
$ gfortran-7 z2.f90
z2.f90:7:0:
to_cb = c_null_funptr
internal compiler error: Segmentation fault
0xc0dd2f crash_signal
../../gcc/toplev.c:335
0x75e442 gfc_trans_structure_assign(tree_node*, gfc_expr*, bool)
../../gcc/fortran/trans-expr.c:7361
0x7601a2 gfc_conv_structure(gfc_se*, gfc_expr*, int)
../../gcc/fortran/trans-expr.c:7420
0x75977c gfc_conv_expr(gfc_se*, gfc_expr*)
../../gcc/fortran/trans-expr.c:7603
0x7616d6 gfc_trans_assignment_1
../../gcc/fortran/trans-expr.c:9317
0x71b551 trans_code
../../gcc/fortran/trans.c:1678
0x749f98 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6171
0x749de7 gfc_generate_contained_functions
../../gcc/fortran/trans-decl.c:5161
0x749de7 gfc_generate_function_code(gfc_namespace*)
../../gcc/fortran/trans-decl.c:6100
0x6d5d10 translate_all_program_units
../../gcc/fortran/parse.c:5886
0x6d5d10 gfc_parse_file()
../../gcc/fortran/parse.c:6092
0x718022 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:198