[Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array

2011-04-30 Thread Paul Richard Thomas
Fixed on 4.6 together with PR48746 in revision 173214. 2011-04-30 Paul Thomas PR fortran/48462 PR fortran/48746 * trans-expr.c ( arrayfunc_assign_needs_temporary): Need a temp if automatic reallocation on assignement is active, the lhs is a target and th

Re: [Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array + PR48746

2011-04-30 Thread Paul Richard Thomas
Committed revision 173213 as obvious (in fact it reverts to original treatment of bounds). 2011-04-30 Paul Thomas PR fortran/48746 * trans-expr.c (fcncall_realloc_result): Set the bounds and the offset so that the lbounds are one. (gfc_trans_arrayfunc_assign): A

Re: [Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array + PR48746

2011-04-30 Thread Paul Richard Thomas
Dear Thomas, > there's another point: The sizes are also not set correctly. Oh dear, oh dear! I am losing it in my old age. :-( Thanks Paul

Re: [Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array + PR48746

2011-04-29 Thread Thomas Koenig
Hello Paul, there's another point: The sizes are also not set correctly. ig25@linux-fd1f:~/Krempel/H> cat mm.f90 program main implicit none integer, parameter :: m=10, n=12, count=4 double precision :: a(m, count), b(count, n), c(m, n) double precision, dimension(:,:), allocatable :: tmp

Re: [Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array + PR48746

2011-04-29 Thread Thomas Koenig
Dear Paul, first, thanks for the patch. There is one thing it does not appear to do correctly: It should also set the dtype on the variable itself: ig25@linux-fd1f:~/Krempel/H> cat mm.f90 program main implicit none integer, parameter :: m=10, n=12, count=4 double precision :: a(m, count),

Re: [Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array + PR48746

2011-04-29 Thread Steve Kargl
On Fri, Apr 29, 2011 at 06:55:11PM +0200, Paul Richard Thomas wrote: > Dear All, > > These are both quite trivial fixes and can be understood from > ChangeLogs and comments in the patch. > > Bootstrapped and regtested on FC9/x86_64 - OK for trunk and 4.6? OK for both. -- Steve

[Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array + PR48746

2011-04-29 Thread Paul Richard Thomas
Dear All, These are both quite trivial fixes and can be understood from ChangeLogs and comments in the patch. Bootstrapped and regtested on FC9/x86_64 - OK for trunk and 4.6? Cheers Paul 2011-04-29 Paul Thomas PR fortran/48462 * trans-expr.c (arrayfunc_assign_needs_temporar

[Patch, fortran] PR48462 - [4.6/4.7 Regression] realloc on assignment: matmul Segmentation Fault with Allocatable Array

2011-04-17 Thread Paul Richard Thomas
This is the last of three regressions caused by my introduction of reallocation on assignment. The comments in the patch adequately explain what is being done. Bootstrapped and regtested on FC9/x86_64 - OK for trunk and 4.6? Paul 2011-04-17 Paul Thomas PR fortran/48462 * tra