AMDās compiler is pretty nice, and free to use.
Itās always nice to have multiple compilers to check our code with.
@aerosayan said āAMDās compiler is pretty nice, and free to use.ā I had never heard of it, so I downloaded it (instructions easier to follow than most) but I seem to have found a bug in it with my second test program. (The first one was hundreds of lines long but this one has 4 lines.)
program testhugeqp
integer,parameter::qp = selected_real_kind(30)
print "(ES45.35E4)",huge(1.0_qp)
end program testhugeqp
Output from AMD compiler (called flang) was
Inf
but gfortran and ifort both gave what I think is the correct output,
1.18973149535723176508575932662800702E+4932
FYI, flang (Classic, nvfortran, AOCC) does not currently support quadruple precision, if that is what you would like to try.
AOCC Fortran 4.1 for Linux amd64 does support 128-bit REAL type (KIND=16) but thereās obviously bugs in the implementation, as above.
I checked my notes. You are right. However, I note that AOCC Flang complains about āundefined symbol: āfort_rnumq_i8āā in my test with quadruple precision, although I do not have a minimal working example at hand.
Thank you @themos. I should have said in my original posting that I was using flang 4.1 in my Linux Ubuntu system. Should this topic be renamed as something like āAMD compiler problemsā? (I donāt know how) It seems to be moving away from where it started: a job advertisement in the AMD company.