Skip to content

Commit 01b52f7

Browse files
committed
[flang] Fix argument keyword names in some specific intrinsics
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. Differential Revision: https://reviews.llvm.org/D118721
1 parent e1f7edb commit 01b52f7

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

flang/lib/Evaluate/intrinsics.cpp

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -922,22 +922,22 @@ static const SpecificIntrinsicInterface specificIntrinsicFunction[]{
922922
TypePattern{IntType, KindCode::exactKind, 1}},
923923
"abs"},
924924
{{"cabs", {{"a", DefaultComplex}}, DefaultReal}, "abs"},
925-
{{"ccos", {{"a", DefaultComplex}}, DefaultComplex}, "cos"},
925+
{{"ccos", {{"x", DefaultComplex}}, DefaultComplex}, "cos"},
926926
{{"cdabs", {{"a", DoublePrecisionComplex}}, DoublePrecision}, "abs"},
927-
{{"cdcos", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex}, "cos"},
928-
{{"cdexp", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex}, "exp"},
929-
{{"cdlog", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex}, "log"},
930-
{{"cdsin", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex}, "sin"},
931-
{{"cdsqrt", {{"a", DoublePrecisionComplex}}, DoublePrecisionComplex},
927+
{{"cdcos", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex}, "cos"},
928+
{{"cdexp", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex}, "exp"},
929+
{{"cdlog", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex}, "log"},
930+
{{"cdsin", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex}, "sin"},
931+
{{"cdsqrt", {{"x", DoublePrecisionComplex}}, DoublePrecisionComplex},
932932
"sqrt"},
933-
{{"cexp", {{"a", DefaultComplex}}, DefaultComplex}, "exp"},
934-
{{"clog", {{"a", DefaultComplex}}, DefaultComplex}, "log"},
935-
{{"conjg", {{"a", DefaultComplex}}, DefaultComplex}},
933+
{{"cexp", {{"x", DefaultComplex}}, DefaultComplex}, "exp"},
934+
{{"clog", {{"x", DefaultComplex}}, DefaultComplex}, "log"},
935+
{{"conjg", {{"z", DefaultComplex}}, DefaultComplex}},
936936
{{"cos", {{"x", DefaultReal}}, DefaultReal}},
937937
{{"cosh", {{"x", DefaultReal}}, DefaultReal}},
938-
{{"csin", {{"a", DefaultComplex}}, DefaultComplex}, "sin"},
939-
{{"csqrt", {{"a", DefaultComplex}}, DefaultComplex}, "sqrt"},
940-
{{"ctan", {{"a", DefaultComplex}}, DefaultComplex}, "tan"},
938+
{{"csin", {{"x", DefaultComplex}}, DefaultComplex}, "sin"},
939+
{{"csqrt", {{"x", DefaultComplex}}, DefaultComplex}, "sqrt"},
940+
{{"ctan", {{"x", DefaultComplex}}, DefaultComplex}, "tan"},
941941
{{"dabs", {{"a", DoublePrecision}}, DoublePrecision}, "abs"},
942942
{{"dacos", {{"x", DoublePrecision}}, DoublePrecision}, "acos"},
943943
{{"dasin", {{"x", DoublePrecision}}, DoublePrecision}, "asin"},
@@ -951,16 +951,16 @@ static const SpecificIntrinsicInterface specificIntrinsicFunction[]{
951951
{"y", AnyIntOrReal, Rank::elementalOrBOZ, Optionality::optional}},
952952
DoublePrecisionComplex},
953953
"cmplx", true},
954-
{{"dconjg", {{"a", AnyComplex}}, DoublePrecisionComplex}, "conjg"},
954+
{{"dconjg", {{"z", AnyComplex}}, DoublePrecisionComplex}, "conjg"},
955955
{{"dcos", {{"x", DoublePrecision}}, DoublePrecision}, "cos"},
956956
{{"dcosh", {{"x", DoublePrecision}}, DoublePrecision}, "cosh"},
957957
{{"ddim", {{"x", DoublePrecision}, {"y", DoublePrecision}},
958958
DoublePrecision},
959959
"dim"},
960960
{{"dexp", {{"x", DoublePrecision}}, DoublePrecision}, "exp"},
961-
{{"dfloat", {{"i", AnyInt}}, DoublePrecision}, "real", true},
961+
{{"dfloat", {{"a", AnyInt}}, DoublePrecision}, "real", true},
962962
{{"dim", {{"x", DefaultReal}, {"y", DefaultReal}}, DefaultReal}},
963-
{{"dimag", {{"a", AnyComplex}}, DoublePrecision}, "aimag"},
963+
{{"dimag", {{"z", AnyComplex}}, DoublePrecision}, "aimag"},
964964
{{"dint", {{"a", DoublePrecision}}, DoublePrecision}, "aint"},
965965
{{"dlog", {{"x", DoublePrecision}}, DoublePrecision}, "log"},
966966
{{"dlog10", {{"x", DoublePrecision}}, DoublePrecision}, "log10"},
@@ -989,7 +989,7 @@ static const SpecificIntrinsicInterface specificIntrinsicFunction[]{
989989
{{"dtan", {{"x", DoublePrecision}}, DoublePrecision}, "tan"},
990990
{{"dtanh", {{"x", DoublePrecision}}, DoublePrecision}, "tanh"},
991991
{{"exp", {{"x", DefaultReal}}, DefaultReal}},
992-
{{"float", {{"i", AnyInt}}, DefaultReal}, "real", true},
992+
{{"float", {{"a", AnyInt}}, DefaultReal}, "real", true},
993993
{{"iabs", {{"a", DefaultInt}}, DefaultInt}, "abs"},
994994
{{"idim", {{"x", DefaultInt}, {"y", DefaultInt}}, DefaultInt}, "dim"},
995995
{{"idint", {{"a", AnyReal}}, DefaultInt}, "int", true},

0 commit comments

Comments
 (0)