[Bug fortran/67451] New: ICE with sourced allocation from coarray.
ian_harvey at bigpond dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 4 13:21:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67451
Bug ID: 67451
Summary: ICE with sourced allocation from coarray.
Product: gcc
Version: 6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: ian_harvey at bigpond dot com
Target Milestone: ---
The following, when compiled with trunk r227476, results in a ICE:
program main
implicit none
type foo
integer :: bar = 99
end type
class(foo), allocatable :: foobar[:]
class(foo), allocatable :: some_local_object
allocate(foobar[*])
allocate(some_local_object, source=foobar)
end program
The ICE is associated with the use of a coarray or coindexed object in the
source expression of the allocate statement.
$ gfortran -v -fcoarray=lib 2015-09-04\ sourced-alloc.f90
Driving: gfortran -v -fcoarray=lib 2015-09-04 sourced-alloc.f90 -l gfortran -l
m -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/home/MEGMS2/ian/usr/gcc-6.0.0/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: .././src/configure --prefix=/home/MEGMS2/ian/usr/gcc-6.0.0
--enable-languages=c,c++,fortran --enable-libgomp --enable-checking=release
Thread model: posix
gcc version 6.0.0 20150903 (experimental) (GCC)
COLLECT_GCC_OPTIONS='-v' '-fcoarray=lib' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
/home/MEGMS2/ian/usr/gcc-6.0.0/libexec/gcc/x86_64-pc-linux-gnu/6.0.0/f951
2015-09-04 sourced-alloc.f90 -quiet -dumpbase 2015-09-04 sourced-alloc.f90
-mtune=generic -march=x86-64 -auxbase 2015-09-04 sourced-alloc -version
-fcoarray=lib -fintrinsic-modules-path
/home/MEGMS2/ian/usr/gcc-6.0.0/lib/gcc/x86_64-pc-linux-gnu/6.0.0/finclude -o
/tmp/ccX5BIwU.s
GNU Fortran (GCC) version 6.0.0 20150903 (experimental) (x86_64-pc-linux-gnu)
compiled by GNU C version 6.0.0 20150903 (experimental), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (GCC) version 6.0.0 20150903 (experimental)
(x86_64-pc-linux-gnu)
compiled by GNU C version 6.0.0 20150903 (experimental), GMP version
6.0.0, MPFR version 3.1.2, MPC version 1.0.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
2015-09-04 sourced-alloc.f90:9:0:
allocate(some_local_object, source=foobar)
1
internal compiler error: Segmentation fault
0xa1271f crash_signal
../.././src/gcc/toplev.c:352
0x690f9e gfc_class_vptr_get(tree_node*)
../.././src/gcc/fortran/trans-expr.c:153
0x694155 class_vtab_field_get
../.././src/gcc/fortran/trans-expr.c:201
0x694155 gfc_class_vtab_copy_get(tree_node*)
../.././src/gcc/fortran/trans-expr.c:223
0x694155 gfc_copy_class_to_class(tree_node*, tree_node*, tree_node*, bool)
../.././src/gcc/fortran/trans-expr.c:1084
0x6cd11b gfc_trans_allocate(gfc_code*)
../.././src/gcc/fortran/trans-stmt.c:5725
0x66a7e7 trans_code
../.././src/gcc/fortran/trans.c:1798
0x68d6f3 gfc_generate_function_code(gfc_namespace*)
../.././src/gcc/fortran/trans-decl.c:5900
0x627210 translate_all_program_units
../.././src/gcc/fortran/parse.c:5526
0x627210 gfc_parse_file()
../.././src/gcc/fortran/parse.c:5731
0x667ba2 gfc_be_parse_file
../.././src/gcc/fortran/f95-lang.c:209
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
More information about the Gcc-bugs
mailing list