[flang-commits] [flang] cbfc223 - [flang] Fix name of dummy argument to intrinsic NEW_LINE(A='')

Peter Klausler via flang-commits flang-commits at lists.llvm.org
Sat Jul 23 09:31:08 PDT 2022


Author: Peter Klausler
Date: 2022-07-23T09:30:56-07:00
New Revision: cbfc22392085924c39fbd239884c12a1b5294085

URL: https://github.com/llvm/llvm-project/commit/cbfc22392085924c39fbd239884c12a1b5294085
DIFF: https://github.com/llvm/llvm-project/commit/cbfc22392085924c39fbd239884c12a1b5294085.diff

LOG: [flang] Fix name of dummy argument to intrinsic NEW_LINE(A='')

It should be A= but I misspelled it in the intrinsics table as X=.

Differential Revision: https://reviews.llvm.org/D130382

Added: 
    

Modified: 
    flang/lib/Evaluate/intrinsics.cpp
    flang/test/Semantics/allocate04.f90

Removed: 
    


################################################################################
diff  --git a/flang/lib/Evaluate/intrinsics.cpp b/flang/lib/Evaluate/intrinsics.cpp
index d9a7084c52098..eb94f6eebaf9d 100644
--- a/flang/lib/Evaluate/intrinsics.cpp
+++ b/flang/lib/Evaluate/intrinsics.cpp
@@ -624,7 +624,7 @@ static const IntrinsicInterface genericIntrinsicFunction[]{
     {"modulo", {{"a", OperandIntOrReal}, {"p", OperandIntOrReal}},
         OperandIntOrReal},
     {"nearest", {{"x", SameReal}, {"s", AnyReal}}, SameReal},
-    {"new_line", {{"x", SameChar, Rank::anyOrAssumedRank}}, SameChar,
+    {"new_line", {{"a", SameChar, Rank::anyOrAssumedRank}}, SameChar,
         Rank::scalar, IntrinsicClass::inquiryFunction},
     {"nint", {{"a", AnyReal}, DefaultingKIND}, KINDInt},
     {"norm2", {{"x", SameReal, Rank::array}, OptionalDIM}, SameReal,

diff  --git a/flang/test/Semantics/allocate04.f90 b/flang/test/Semantics/allocate04.f90
index bcccdca6680d6..d32d2bd91b650 100644
--- a/flang/test/Semantics/allocate04.f90
+++ b/flang/test/Semantics/allocate04.f90
@@ -61,7 +61,7 @@ subroutine C933_b(n)
   allocate(u1, u2(2), MOLD = cos(5.+n))
   allocate(u1, u2(2), MOLD = molda)
   allocate(u1, u2(2), MOLD = n1)
-  allocate(u1, u2(2), MOLD = new_line("a"))
+  allocate(u1, u2(2), MOLD = new_line(a="a"))
   allocate(n1%whatever, MOLD = n2(1))
   allocate(p1, p2(2), MOLD = p3)
   allocate(p3%y, p4(2)%y, MOLD = B(5))


        


More information about the flang-commits mailing list