[flang-commits] [PATCH] D127034: [flang][runtime] Emit error message rather than crashing for MOD(ULO)(x, P=0)

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Fri Jun 3 16:11:06 PDT 2022


klausler created this revision.
klausler added a reviewer: vdonaldson.
klausler added a project: Flang.
Herald added a subscriber: jdoerfert.
Herald added a project: All.
klausler requested review of this revision.

Add extra arguments and checks to the runtime support library so that
a call to the intrinsic functions MOD and MODULO with "denominator"
argument P of zero will cause a crash with a source location rather
than an uninformative floating-point error or integer division by
zero signal.

Additional work is required in lowering to (1) pass source file path and
source line number arguments and (2) actually call these runtime
library APIs instead of emitting inline code for MOD &/or MODULO.


https://reviews.llvm.org/D127034

Files:
  flang/include/flang/Runtime/numeric.h
  flang/runtime/numeric.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127034.434194.patch
Type: text/x-patch
Size: 12948 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220603/7c177aa0/attachment-0001.bin>


More information about the flang-commits mailing list