Bug 15975 - [4.0 only] ICE in trans-array.c pointer array initialization stuff
Summary: [4.0 only] ICE in trans-array.c pointer array initialization stuff
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.3
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: diagnostic, patch, rejects-valid
: 16606 (view as bug list)
Depends on: 16606
Blocks:
  Show dependency treegraph
 
Reported: 2004-06-13 16:13 UTC by Mart Rentmeester
Modified: 2005-10-23 18:51 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-06-06 00:39:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Rentmeester 2004-06-13 16:13:26 UTC
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
Comment 1 Andrew Pinski 2004-06-13 18:02:19 UTC
Confirmed.
Comment 2 Tobias Schlüter 2004-08-25 22:51:46 UTC
Removed bogus dependency.
Comment 3 Tobias Schlüter 2004-09-27 15:19:09 UTC
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.

Comment 4 Erik Edelmann 2005-09-16 23:07:52 UTC
Patch posted to mailinglist:
http://gcc.gnu.org/ml/gcc-patches/2005-09/msg01032.html
Comment 5 GCC Commits 2005-09-18 05:50:30 UTC
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

Comment 6 Andrew Pinski 2005-09-18 20:26:56 UTC
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.
Comment 7 Volker Reichelt 2005-09-19 08:18:08 UTC
*** Bug 16606 has been marked as a duplicate of this bug. ***
Comment 8 GCC Commits 2005-10-23 18:36:32 UTC
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

Comment 9 Andrew Pinski 2005-10-23 18:51:34 UTC
Fixed also in 4.0.3.