This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/37930] gfortran error and ICE at automatic type conversion with transfer intrinsic



------- Comment #9 from deji_aking at yahoo dot ca  2008-10-28 15:47 -------
(In reply to comment #7)
> > What does ... print?
> 
> NaN on both ppc/intel-Darwin9.
> 
> > My patch simply fixes the ICE in gfortran.
> 
> I think the conversion of NaN to int is buggy since the behavior is
> platform/option dependent. Your patch just prevents to reach the bug. It always
> make me nervous when a bug is hidden without being understood.
> 
When I run

      program test
      integer i
      i = transfer(-1,1.0)
      print *, i
      end

I get -2147483648 with gcc-4.2, ifort, and pgf90 on x86_64 Linux, and same
value with xlf on AIX with power5.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37930


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