This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Run-time seg fault on automatic allocation of array
- From: "Rouson, Damian" <rouson at sandia dot gov>
- To: "'burnus at net-b dot de'" <burnus at net-b dot de>
- Cc: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>
- Date: Mon, 8 Nov 2010 08:50:46 -0700
- Subject: Re: Run-time seg fault on automatic allocation of array
Nice work - I look forward to testing the patch once it hits the trunk (and becomes available via macports).
Damian
----- Original Message -----
From: Tobias Burnus [mailto:burnus@net-b.de]
Sent: Monday, November 08, 2010 12:39 AM
To: Rouson, Damian
Cc: fortran@gcc.gnu.org <fortran@gcc.gnu.org>
Subject: Re: Run-time seg fault on automatic allocation of array
On 11/08/2010 05:48 AM, Rouson, Damian wrote:
> Given the code below, Gfortran 4.6.0 20100925 produces an executable that
> generates a seg fault. Presumably this stems from the ongoing work on
> automatic (re)allocation of arrays. Interestingly, IBM XL Fortran 13.1
> produces the correct output (" array = 0 0")
Well, in terms of the GCC trunk, 'ongoing' is exaggerated: Except of
those few cases covered in TR 15581 ('allocatable components'; supported
since GCC 4.2), gfortran does not support (re)allocate on assignment.
However, you are right about the on-going efforts. Using the patch at
http://gcc.gnu.org/ml/fortran/2010-11/msg00056.html, the result is:
seg fault occurs after this line
seg fault occurs before this line
array = 0 0
There are still some issues with that patch, but I think a patch
supporting automatic (re)allocation during intrinsic assignment will be
committed in the next days; if we are lucky even this evening :-)
Tobias