[Flang-dev] fastmath GH_TARGET [ __fmth_i_dmod __fmth_i_amod ]

Stephen Scalpone sscalpone at nvidia.com
Sun Sep 2 12:19:15 EDT 2018


Others have hit this.

https://github.com/flang-compiler/flang/issues/491

From: flang-dev <flang-dev-bounces at lists.flang-compiler.org> on behalf of blubee blubeeme <gurenchan at gmail.com>
Date: Sunday, September 2, 2018 at 5:43 AM
To: "flang-dev at lists.flang-compiler.org" <flang-dev at lists.flang-compiler.org>
Subject: [Flang-dev] fastmath GH_TARGET [ __fmth_i_dmod __fmth_i_amod ]

I am running this Fortran test suite: https://www.itl.nist.gov/div897/ctg/fortran_form.htm

Most of the tests that actually build do pass so that's great news. I am running into a few issues though.

I am getting undefined symbols for:
__fmth_i_amod and __fmth_i_dmod

I use this script to setenv before running the flang command
-------------------------------------
FLANG_LFS="-L/usr/local/bluflang/lib -lflang -lflangmain -lflangrti -lomptarget -lompstub -lomp -lpgmath -lgomp -liomp5 -lexecinfo -lmp"
FLANG_RELAXED="-frelaxed-math"

exec /usr/local/bluflang/bin/flang $FLANG_RPATH $FLANG_RELAXED $FLANG_LFS $FLANG_CFS $@
-------------------------------------

Am I missing something? The only thing that I notice is looking at the source code and I is #ifdef GH_TARGET; I am not sure if I need to define that somewhere or what's the problem?

/usr/bin/ld: error: undefined symbol: __fmth_i_amod
>>> referenced by FM097.FOR:334 (/home/blubee/Downloads/test/fcvs21_tar_Z/FM097.FOR:334)
>>>               /tmp/FM097-5931d1.o:(MAIN_)

/usr/bin/ld: error: undefined symbol: __fmth_i_amod
>>> referenced by FM097.FOR:356 (/home/blubee/Downloads/test/fcvs21_tar_Z/FM097.FOR:356)
>>>               /tmp/FM097-5931d1.o:(MAIN_)
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)


/usr/bin/ld: error: undefined symbol: __fmth_i_dmod
>>> referenced by FM833.FOR:201 (/home/blubee/Downloads/test/fcvs21_tar_Z/FM833.FOR:201)
>>>               /tmp/FM833-bf1392.o:(MAIN_)

/usr/bin/ld: error: undefined symbol: __fmth_i_dmod
>>> referenced by FM833.FOR:201 (/home/blubee/Downloads/test/fcvs21_tar_Z/FM833.FOR:201)
>>>               /tmp/FM833-bf1392.o:(MAIN_)
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld: error: undefined symbol: __fmth_i_dmod
>>> referenced by FM834.FOR:167 (/home/blubee/Downloads/test/fcvs21_tar_Z/FM834.FOR:167)
>>>               /tmp/FM834-f74910.o:(MAIN_)
clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation)
F90-S-0070-Incorrect sequence of statements  (/home/blubee/Downloads/test/fcvs21_tar_Z/FM517.FOR: 3)
  0 inform,   0 warnings,   1 severes, 0 fatal for fm517


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.flang-compiler.org/pipermail/flang-dev_lists.flang-compiler.org/attachments/20180902/5dcfa029/attachment.html>


More information about the flang-dev mailing list