[Patch, Fortran] PR fortran/37749 ICE on array section with vector subscript

Mikael Morin mikael.morin@tele2.fr
Thu Oct 30 23:02:00 GMT 2008


Hello,

here comes the e-mail version of my patch posted on bugzilla:
with a ChangeLog entry and the testcase.

As a reminder, this patch looks for a NULL loop->to[n] before setting
the temporary descriptor to check whether we are using a
callee-allocated array or not.
This prevents setting the descriptor with a NULL size (which segfaults).

I didn't take the run-time check from the original testcase, as it is
just a compilation failure.

regression tested on x86_64-unknown-linux-gnu.

Mikael


2008-10-30  Mikael Morin  <mikael.morin@tele2.fr>

	PR fortran/37749
	* trans-array.c (gfc_trans_create_temp_array): Check whether
	there is one NULL loop->to[n] before setting the descriptor
	with the loop bounds.

2008-10-30  Mikael Morin  <mikael.morin@tele2.fr>

	PR fortran/37749
	* gfortran.dg/vector_subscript_4.f90: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr37749_06.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20081030/86547a24/attachment.ksh>


More information about the Fortran mailing list