This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Failure of implicit real*8
On Sat, 19 Feb 2011 19:04:25 -0800, Steve Kargl wrote:
> On Sun, Feb 20, 2011 at 02:48:59AM +0000, Michael D. Berger wrote:
>> On Sat, 19 Feb 2011 18:22:57 -0800, Steve Kargl wrote:
>>
>> > On Sun, Feb 20, 2011 at 02:13:35AM +0000, Michael D. Berger wrote:
>> [...]
[...]
> Sigh, we need the entire specification portion of the actual code. You
> showed us
>
> subroutine orderRows(mx, idxSort, nrows, ncols)
> dimension idxSort(nrows),mx(nrows,ncols),tmp(nrows,ncols)
do 20 ii = 1,nrows
kk = idxSort(ii)
do 21 jj = 1,ncols
21 tmp(ii,jj) = mx(kk,jj)
20 continue
do 22 ii = 1,nrows
do 23 jj = 1,ncols
23 mx(ii,jj) = tmp(ii,jj)
22 continue
return
end
Here is the rest of the subroutine. What do you think? BTW, I
printed idxSort -- it's ok.
> Well, in the above mx has the type INTEGER from the implicit typing
> rules.
Yes, I neglected that. Surprising that one of the routines works at all!
>
> and
>
> subroutine orderRows(mx, idxSort, nrows, ncols) dimension
> idxSort(nrows)
> real mx(nrows,ncols),tmp(nrows,ncols)
>
> Here, you have type REAL, which can be promoted by the option.
>
> PS: I'm the person that got -fdefault-real-8 working (others fixed a
> few minor bugs). One should think long and hard before using it.
Ok, I'll stop using it.
Mike.