This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Regression with SUM intrinsic


On Sat, Aug 21, 2004 at 05:25:21PM -0700, Steve Kargl wrote:
> On Sat, Aug 21, 2004 at 05:16:59PM -0700, Steve Kargl wrote:
> > 
> > It looks like the guilty commit is 
> > 
> > 2004-08-19  Erik Schnetter  <schnetter@aei.mpg.de>
> > 
> >         PR fortran/16946
> >         * check.c (gfc_check_reduction): New function.
> >         (gfc_check_minval_maxval): Removed.
> >         (gfc_check_product): Removed.
> >         (gfc_check_sum): Removed.
> >         * intrinsic.h: Add/remove declarations for these.
> >         * gfortran.h: Add field f3red to union gfc_check_f.
> >         * intrinsic.c (add_sym_3red): New function.
> >         (add_functions): Register maxval, minval, product, and sum intrinsics
> >         through add_sym_3red.
> > 
> 
> The problem will happen for PRODUCT().
> 

confirmed.

kargl[222] cat hh.f90
program hh
   complex z(2)
   z(1) = (2.,2.)
   z(2) = (5.,3.)
   print *, product(z)
end program hh

kargl[223] f95 -o hh hh.f90
kargl[224] ./hh
 (4.0000000,16.0000000)
kargl[225] gfc -o hh hh.f90
 In file hh.f90:5

   print *, product(z)
                   1
Error: 'array' argument of 'product' intrinsic at (1) must be INTEGER or REAL


-- 
Steve


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]