[patch, fortran] PR34495 - accepts invalid init-expr with TRANSFER

Daniel Franke franke.daniel@gmail.com
Tue Dec 18 17:43:00 GMT 2007


On Tuesday 18 December 2007 15:01:16 Tobias Burnus wrote:
> Daniel Franke wrote:
> > On Tuesday 18 December 2007 11:39:14 Daniel Franke wrote:
> >> 2007-12-18  Daniel Franke  <franke.daniel@gmail.com>
> >>
> >> 	PR fortran/34495
> >> 	* transfer_simplify_2.f90: Fixed invalid initialization expressions.
> >> 	* transfer_simplify_7.f90: New test.
>
> Nice patch, but it gives now an ICE for the following invalid program:
>
>   implicit none
>   dimension :: i1(5)
>   integer :: i1 = transfer([1,2,3,4,5], i1)
>   end

Good point.

Attached, updated, patch adds a check for explicit arrays in 
check_init_expr(). This should be save as otherwise the gcc_unreachable() 
would have triggered before now. Further, the above testcase (and related 
ones) are now included in transfer_simplify_7.f90.

Currently regtesting. Assuming no further problems, ok for trunk?


Regards
	Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr34495.diff
Type: text/x-diff
Size: 4199 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20071218/f9af1593/attachment.bin>


More information about the Gcc-patches mailing list