troogle> gfortran -v -c n22.f95 Reading specs from /OPT/32/gcc-2004-06-09/lib/gcc/hppa2.0w-hp-hpux11.11/3.5. 0/specs Configured with: ../configure --enable-languages=c,f95 --prefix=/opt32/gcc-2004-06-09 --with-gmp=/opt32/gmp --with-gnu-as --with-as=/opt32/binutils/bin/as --enable-threads --disable-shared --disable-nls Thread model: posix gcc version 3.5.0 20040611 (experimental) /OPT/32/gcc-2004-06-09/libexec/gcc/hppa2.0w-hp-hpux11.11/3.5.0/f951 n22.f95 -quiet -dumpbase n22.f95 -auxbase n22 -version -o /var/tmp//ccMNlkkT.s GNU F95 version 3.5.0 20040611 (experimental) (hppa2.0w-hp-hpux11.11) compiled by GNU C version 3.5.0 20040611 (experimental). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 n22.f95: In function `pm_get': n22.f95:11: internal compiler error: in gfc_conv_array_initializer, at fortran/trans-array.c:2726 module propmats type prm real, pointer :: par(:) => null() end type prm type(prm), save, target :: pm(20) contains subroutine pm_get(w) implicit none character(*), intent(in) :: w type(prm), pointer :: z z => pm(1) end subroutine pm_get end module propmats
Confirmed.
Removed bogus dependency.
This now gives a bogus error: In file pr15975.f90:3 type prm 1 Error: Pointer assignment target is neither TARGET nor POINTER at (1) This is the same bug as in PR16606, therefore the added dependency.
Patch posted to mailinglist: http://gcc.gnu.org/ml/gcc-patches/2005-09/msg01032.html
Subject: Bug 15975 CVSROOT: /cvs/gcc Module name: gcc Changes by: pault@gcc.gnu.org 2005-09-18 05:50:15 Modified files: gcc/fortran : resolve.c ChangeLog gcc/testsuite : ChangeLog Added files: gcc/testsuite/gfortran.dg: der_pointer_2.f90 Log message: 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi> PR fortran/15975 * resolve.c (resolve_symbol): Don't assign default initializer to pointers. 2005-09-18 Erik Edelmann <erik.edelmann@iki.fi> PR fortran/15975 * gfortran.dg/der_pointer_2.f90: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&r1=1.53&r2=1.54 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&r1=1.558&r2=1.559 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/der_pointer_2.f90.diff?cvsroot=gcc&r1=NONE&r2=1.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6075&r2=1.6076
All of these are fixed in 4.1.0. Since 4.0.2 is the last 4.0 release before a 4.1.0 release will be made, 4.0.2 and 4.0.1 were special releases for gfrotran. 4.0.3 should be a normal release for GCC and gfortran in that regressions are the only changes.
*** Bug 16606 has been marked as a duplicate of this bug. ***
Subject: Bug 15975 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: eedelman@gcc.gnu.org 2005-10-23 18:36:26 Modified files: gcc/fortran : ChangeLog resolve.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/gfortran.dg: der_pointer_2.f90 Log message: 2005-10-23 Erik Edelmann <erik.edelmann@iki.fi> PR fortran/15975 * resolve.c (resolve_symbol): Don't assign default initializer to pointers. 2005-10-23 Erik Edelmann <erik.edelmann@iki.fi> PR fortran/15975 * gfortran.dg/der_pointer_2.f90: New test. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.335.2.134&r2=1.335.2.135 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/fortran/resolve.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.34.2.20&r2=1.34.2.21 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.481&r2=1.5084.2.482 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gfortran.dg/der_pointer_2.f90.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.16.1
Fixed also in 4.0.3.