[flang-commits] [PATCH] D118721: [flang] Fix argument keyword names in some specific intrinsics

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Tue Feb 1 11:59:27 PST 2022


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

Some entries in the specific intrinsic function table have the
wrong argument keyword names -- they should agree with the names
of the arguments on their corresponding generic intrinsic function.
Clean them up.


https://reviews.llvm.org/D118721

Files:
  flang/lib/Evaluate/intrinsics.cpp


Index: flang/lib/Evaluate/intrinsics.cpp
===================================================================
--- flang/lib/Evaluate/intrinsics.cpp
+++ flang/lib/Evaluate/intrinsics.cpp
@@ -922,22 +922,22 @@
          TypePattern{IntType, KindCode::exactKind, 1}},
         "abs"},
     {{"cabs", {{"a", DefaultComplex}}, DefaultReal}, "abs"},
-    {{"ccos", {{"a", DefaultComplex}}, DefaultComplex}, "cos"},
+    {{"ccos", {{"x", DefaultComplex}}, DefaultComplex}, "cos"},
     {{"cdabs", {{"a", DoublePrecisionComplex}}, DoublePrecision}, "abs"},
-    {{"cdcos", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex}, "cos"},
-    {{"cdexp", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex}, "exp"},
-    {{"cdlog", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex}, "log"},
-    {{"cdsin", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex}, "sin"},
-    {{"cdsqrt", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex},
+    {{"cdcos", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex}, "cos"},
+    {{"cdexp", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex}, "exp"},
+    {{"cdlog", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex}, "log"},
+    {{"cdsin", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex}, "sin"},
+    {{"cdsqrt", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex},
         "sqrt"},
-    {{"cexp", {{"a", DefaultComplex}}, DefaultComplex}, "exp"},
-    {{"clog", {{"a", DefaultComplex}}, DefaultComplex}, "log"},
-    {{"conjg", {{"a", DefaultComplex}}, DefaultComplex}},
+    {{"cexp", {{"x", DefaultComplex}}, DefaultComplex}, "exp"},
+    {{"clog", {{"x", DefaultComplex}}, DefaultComplex}, "log"},
+    {{"conjg", {{"z", DefaultComplex}}, DefaultComplex}},
     {{"cos", {{"x", DefaultReal}}, DefaultReal}},
     {{"cosh", {{"x", DefaultReal}}, DefaultReal}},
-    {{"csin", {{"a", DefaultComplex}}, DefaultComplex}, "sin"},
-    {{"csqrt", {{"a", DefaultComplex}}, DefaultComplex}, "sqrt"},
-    {{"ctan", {{"a", DefaultComplex}}, DefaultComplex}, "tan"},
+    {{"csin", {{"x", DefaultComplex}}, DefaultComplex}, "sin"},
+    {{"csqrt", {{"x", DefaultComplex}}, DefaultComplex}, "sqrt"},
+    {{"ctan", {{"x", DefaultComplex}}, DefaultComplex}, "tan"},
     {{"dabs", {{"a", DoublePrecision}}, DoublePrecision}, "abs"},
     {{"dacos", {{"x", DoublePrecision}}, DoublePrecision}, "acos"},
     {{"dasin", {{"x", DoublePrecision}}, DoublePrecision}, "asin"},
@@ -951,16 +951,16 @@
              {"y", AnyIntOrReal, Rank::elementalOrBOZ, Optionality::optional}},
          DoublePrecisionComplex},
         "cmplx", true},
-    {{"dconjg", {{"a", AnyComplex}}, DoublePrecisionComplex}, "conjg"},
+    {{"dconjg", {{"z", AnyComplex}}, DoublePrecisionComplex}, "conjg"},
     {{"dcos", {{"x", DoublePrecision}}, DoublePrecision}, "cos"},
     {{"dcosh", {{"x", DoublePrecision}}, DoublePrecision}, "cosh"},
     {{"ddim", {{"x", DoublePrecision}, {"y", DoublePrecision}},
          DoublePrecision},
         "dim"},
     {{"dexp", {{"x", DoublePrecision}}, DoublePrecision}, "exp"},
-    {{"dfloat", {{"i", AnyInt}}, DoublePrecision}, "real", true},
+    {{"dfloat", {{"a", AnyInt}}, DoublePrecision}, "real", true},
     {{"dim", {{"x", DefaultReal}, {"y", DefaultReal}}, DefaultReal}},
-    {{"dimag", {{"a", AnyComplex}}, DoublePrecision}, "aimag"},
+    {{"dimag", {{"z", AnyComplex}}, DoublePrecision}, "aimag"},
     {{"dint", {{"a", DoublePrecision}}, DoublePrecision}, "aint"},
     {{"dlog", {{"x", DoublePrecision}}, DoublePrecision}, "log"},
     {{"dlog10", {{"x", DoublePrecision}}, DoublePrecision}, "log10"},
@@ -989,7 +989,7 @@
     {{"dtan", {{"x", DoublePrecision}}, DoublePrecision}, "tan"},
     {{"dtanh", {{"x", DoublePrecision}}, DoublePrecision}, "tanh"},
     {{"exp", {{"x", DefaultReal}}, DefaultReal}},
-    {{"float", {{"i", AnyInt}}, DefaultReal}, "real", true},
+    {{"float", {{"a", AnyInt}}, DefaultReal}, "real", true},
     {{"iabs", {{"a", DefaultInt}}, DefaultInt}, "abs"},
     {{"idim", {{"x", DefaultInt}, {"y", DefaultInt}}, DefaultInt}, "dim"},
     {{"idint", {{"a", AnyReal}}, DefaultInt}, "int", true},


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118721.405028.patch
Type: text/x-patch
Size: 4140 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20220201/1c575adf/attachment.bin>


More information about the flang-commits mailing list