[flang] Add support and documentation for DREAL.
authorSteve Scalpone <sscalpone@nvidia.com>
Mon, 2 Sep 2019 20:54:01 +0000 (13:54 -0700)
committerSteve Scalpone <sscalpone@nvidia.com>
Mon, 2 Sep 2019 20:54:01 +0000 (13:54 -0700)
Original-commit: flang-compiler/f18@5b6a2dc26ccd4faf56543ccb616a22d86812aa02
Reviewed-on: https://github.com/flang-compiler/f18/pull/705

flang/documentation/Extensions.md
flang/lib/evaluate/intrinsics.cc

index e849b29..0e34503 100644 (file)
@@ -94,7 +94,7 @@ Extensions, deletions, and legacy features supported by default
   we allow distinct types to be used, promoting
   the arguments as if they were operands to an intrinsic `+` operator,
   and defining the result type accordingly.
-* DOUBLE COMPLEX intrinsics DCMPLX, DCONJG and DIMAG.
+* DOUBLE COMPLEX intrinsics DREAL, DCMPLX, DCONJG and DIMAG.
 * INT_PTR_KIND intrinsic returns the kind of c_intptr_t.
 
 Extensions supported when enabled by options
index 0f8b1f2..6b56807 100644 (file)
@@ -778,6 +778,7 @@ static const SpecificIntrinsicInterface specificIntrinsicFunction[]{
              {"y", AnyIntOrReal, Rank::elementalOrBOZ, Optionality::optional}},
          DoublePrecisionComplex},
         "cmplx"},
+    {{"dreal", {{"a", DoublePrecisionComplex}}, DoublePrecision}, "real"},
     {{"dconjg", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex},
         "conjg"},
     {{"dcos", {{"x", DoublePrecision}}, DoublePrecision}, "cos"},