https://bugs.llvm.org/show_bug.cgi?id=47425

            Bug ID: 47425
           Summary: return type for isnan instrinsic math function causes
                    problem in conditional
           Product: flang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedb...@nondot.org
          Reporter: narom...@anl.gov
                CC: david.tr...@arm.com, jper...@nvidia.com,
                    kirankuma...@gmail.com, llvm-bugs@lists.llvm.org,
                    sscalp...@nvidia.com

Created attachment 23930
  --> https://bugs.llvm.org/attachment.cgi?id=23930&action=edit
conditional on return value is isnan

Assuming isnan is a standard Fortran intrinsic math function, this short
program fails to compile with Flang. It compiles successfully with PGI, ifort,
and gfortran.

[naromero@naromero-desktop bugs]$
/nfs/gce/projects/naromero-workspace/llvm-master/bin/flang -c testisnan.F
testisnan.F:6:11: error: Must have LOGICAL type, but is INTEGER(4)
        if (isnan(dum)) write (*,*) 'dum is NaN'
            ^^^^^^^^^^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to