[Bug fortran/17175] set_exponent breaks with integer*8 exponent

tobi at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Thu Aug 26 16:26:00 GMT 2004


------- Additional Comments From tobi at gcc dot gnu dot org  2004-08-26 16:26 -------
This problem also affects the scale intrinsic:
[tobi@marktplatz tests]$ cat setexp.f90
x = 1.
x = scale (x, 25_4)
x = scale (x, 25_8)
end
[tobi@marktplatz tests]$ gfortran setexp.f90 -fdump-parse-tree -S | grep scale_4
      ASSIGN x __scale_4_4[[((x) (25))]]
      ASSIGN x __scale_4_4[[((x) (25_8))]]
[tobi@marktplatz tests]$ grep scal setexp.s
        call    scalbnf ; here an int*4 argument is passed
        call    scalbnf ; here an int*8 argument is passed
[tobi@marktplatz tests]$

And ATAN2 has a problem WRT error reporting:
[tobi@marktplatz tests]$ cat setexp.f90
double precision y
x = 1.; y =1.
x = atan2 (x, y)
end
[tobi@marktplatz tests]$ gfortran setexp.f90
 In file setexp.f90:3

x = atan2 (x, y)
            1
Error: Type of argument 'x' in call to 'atan2' at (1) should be REAL(4), not REAL(8)
[tobi@marktplatz tests]$

AFAICT these are the only intrinsics that could possibly be affected by the same
bug.

-- 


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



More information about the Gcc-bugs mailing list