f951: internal compiler error: in gfc_simplify_expr, at fortran/expr.c:1923
Tilo Schwarz
tilo@tilo-schwarz.de
Sat Jan 12 23:16:00 GMT 2013
Hi,
thank you all for building such a great compiler!
Since the ICE sais it is in fortran/expr.c I thought I ask here first
before filing a general bug report (having never done that for gcc).
The program shown below gives an ICE:
% gfortran -v prg_abstract.f08
Driving: gfortran -v prg_abstract.f08 -l gfortran -l m -shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i486-linux-gnu/4.7/lto-wrapper
Target: i486-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-4'
--with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --enable-plugin --enable-objc-gc
--enable-targets=all --with-arch-32=i586 --with-tune=generic
--enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu
--target=i486-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-4)
COLLECT_GCC_OPTIONS='-v' '-shared-libgcc' '-mtune=generic' '-march=i586'
/usr/lib/gcc/i486-linux-gnu/4.7/f951 prg_abstract.f08 -quiet -dumpbase
prg_abstract.f08 -mtune=generic -march=i586 -auxbase prg_abstract -version
-fintrinsic-modules-path /usr/lib/gcc/i486-linux-gnu/4.7/finclude -o
/tmp/ccRWcAND.s
GNU Fortran (Debian 4.7.2-4) version 4.7.2 (i486-linux-gnu)
compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version
3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran (Debian 4.7.2-4) version 4.7.2 (i486-linux-gnu)
compiled by GNU C version 4.7.2, GMP version 5.0.5, MPFR version
3.1.0-p10, MPC version 0.9
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
f951: internal compiler error: in gfc_simplify_expr, at fortran/expr.c:1923
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.7/README.Bugs> for instructions.
% cat prg_abstract.f08
module pdfs
type, abstract :: pdf
integer dims
contains
procedure(getx), deferred :: getx
end type pdf
abstract interface
function getx(this)
import pdf
class(pdf), intent(in) :: this
real getx(this%dims)
end function getx
end interface
type point
real x, y
end type point
type, extends(pdf) :: pdf_point
type(point) p
contains
procedure :: getx => pdf_point_getx
end type pdf_point
contains
function pdf_point_getx(this)
class(pdf_point), intent(in) :: this
real pdf_point_getx(2)
pdf_point_getx(1) = this%p%x
pdf_point_getx(2) = this%p%y
end function pdf_point_getx
end module pdfs
program abstract
use pdfs
type(pdf_point) pp
namelist /nml_pp/ pp
print nml_pp
print pp%getx()
contains
end program abstract
If I change the wrong line
print pp%getx()
to
print *, pp%getx()
it compiles.
% cat /etc/debian_version
7.0
% uname -a
Linux dellschleppa 3.2.0-4-686-pae #1 SMP Debian 3.2.35-2 i686 GNU/Linux
Regards,
Tilo
More information about the Fortran
mailing list