Skip to content

[Flang] how to link derf? #82576

Open
Open
@ye-luo

Description

@ye-luo
program ab
  implicit none
  real*8 a,b,derf
  b=2.d0
  a=derf(dsqrt(b))
end program
$ flang-new main.f90 
/usr/bin/ld: /tmp/main-3d7c8c.o: in function `_QQmain':
FIRModule:(.text+0x28): undefined reference to `derf_'
flang-new: error: linker command failed with exit code 1 (use -v to see invocation)

It seems to be a GNU extension but GNU/INTEL/NVFortran all work.

erf is available in libm so probably just need a wrapper?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions