This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/71936] ICE in wide_int_to_tree, at tree.c:1487
- 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, 19 Jul 2016 19:19:18 +0000
- Subject: [Bug fortran/71936] ICE in wide_int_to_tree, at tree.c:1487
- Auto-submitted: auto-generated
- References: <bug-71936-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71936
--- Comment #2 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
To get the whole picture it's necessary to take a look at four
analogous cases with "type" instead of "class". They compile without
an error (v6/v7), but occationally run for a long time (y3/y4).
$ cat y1.f90
program p
type t
end type
type(t), allocatable :: x(:)
allocate (x, mold=f())
deallocate (x)
allocate (x, source=f())
contains
function f()
type(t), allocatable :: f(:)
end
end
$ cat y2.f90
program p
type t
end type
type(t), allocatable :: x(:)
allocate (x, mold=f())
deallocate (x)
allocate (x, source=f())
contains
function f()
type(t), pointer :: f(:)
end
end
$ cat y3.f90
program p
type t
end type
type(t), pointer :: x(:)
allocate (x, mold=f())
deallocate (x)
allocate (x, source=f())
contains
function f()
type(t), allocatable :: f(:)
end
end
$ cat y4.f90
program p
type t
end type
type(t), pointer :: x(:)
allocate (x, mold=f())
deallocate (x)
allocate (x, source=f())
contains
function f()
type(t), pointer :: f(:)
end
end
$ gfortran-5 y4.f90
y4.f90:5:13:
allocate (x, mold=f())
1
Error: Array specification required in ALLOCATE statement at (1)
y4.f90:7:13:
allocate (x, source=f())
1
Error: Array specification required in ALLOCATE statement at (1)
$
$ gfortran-7-20160717 y4.f90
$
$ time timeout 100.0 a.out
real 1m40.002s
user 1m40.046s
sys 0m0.003s