This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
ICE on valid with class array
- From: Andrew Benson <abenson at its dot caltech dot edu>
- To: gfortran <fortran at gcc dot gnu dot org>
- Date: Mon, 09 Apr 2012 21:35:11 -0700
- Subject: ICE on valid with class array
I was finally able to make a reduced test case for the ICE on valid that I'm
seeing with class arrays. This occurs with gfortran 4.8 r186251:
module testMod
type, public :: nc
end type nc
type, public :: tn
class (nc), allocatable, dimension(:) :: cs
end type tn
contains
subroutine scl(self)
class(tn), intent(inout) :: self
select type (component => self%cs)
class is (nc)
end select
return
end subroutine scl
end module testMod
$ gfortran -v
Using built-in specs.
COLLECT_GCC=/home/abenson/gcc4.7/bin/gfortran
COLLECT_LTO_WRAPPER=/home/abenson/gcc4.7/libexec/gcc/x86_64-unknown-linux-
gnu/4.8.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc4.7/configure --prefix=/home/abenson/gcc4.7 --enable-
languages=c,c++,fortran --disable-multilib --with-gmp=/home/abenson/gcc4.7 --
with-mpc=/home/abenson/gcc4.7 --with-mpfr=/home/abenson/gcc4.7
Thread model: posix
gcc version 4.8.0 20120409 (experimental) (GCC)
$ gfortran -c test.F90 -o test.o
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
The ICE goes away if I remove the ", dimension(:)"
While creating this test case, using delta, I ran across a few ICE on invalids
- I'm not sure if these are related, but I'll post them below anyway:
--------
recursive function sg(self,instance,ac)
select type (self)
$ gfortran -c test.F90 -o test.o
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
---------
contains
select type (self)
subroutine scl(self,template)
$ gfortran -c test.F90 -o test.o
test.F90:2.22:
select type (self)
1
Error: Unexpected SELECT TYPE statement in CONTAINS section at (1)
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
----------
module gn
type, public :: tn
class (ncs), allocatable, dimension(:) :: cs
end type tn
class(tn), intent(inout), target :: self
select type (component => self%cs)
end module gn
$ gfortran -c test.F90 -o test.o
test.F90:3.46:
class (ncs), allocatable, dimension(:) :: cs
1
Error: Derived type at (1) has not been previously defined and so cannot
appear in a derived type definition
test.F90:6.38:
select type (component => self%cs)
1
Error: Unexpected SELECT TYPE statement in MODULE at (1)
f951: internal compiler error: in gfc_free_namespace, at fortran/symbol.c:3274
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
-----------
Thanks,
Andrew.
--
* Andrew Benson: http://www.tapir.caltech.edu/~abenson/contact.html
* Galacticus: http://sites.google.com/site/galacticusmodel