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 #17 from deji_aking at yahoo dot ca  2008-10-31 04:27 -------
(In reply to comment #14)

> -----------------------------------
> 
> From comment 1:
> 
>       Adw_xabcd_8(1:n) = transfer(-1,1.0) ! Adw_xabcd_8 is REAL
> 
> That makes sense: One assigns NaN to a real variable (though a comment would be
> helpful). However
> 
Does this mean gfortran shouldn't give an error message on the first part (with
the real variable) of the bug report? It seems the patch to fix this only deals
with the integer variable assignment.


>       Adw_Fn_I (n) = transfer(-1,1.0) ! Adw_Fn_I is an INTEGER
> 
> does not make sense as there is no NaN for integers. Here, one could have used
> "-HUGE(Adw_Fn_I)" or similar. I think the programmer simply missed that
> Adw_Fn_I is no real variable; as long as compiler digest this number it does
> its purpose - initializing the variable with garbage, but syntactically it does
> not make sense - and a compiler has all rights to reject it.
> 


-- 


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]