Skip to content

Commit 125efa6

Browse files
committed
fix type pattern of 'status' in getcwd
1 parent 3ef423c commit 125efa6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flang/lib/Evaluate/intrinsics.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,7 @@ static const IntrinsicInterface genericIntrinsicFunction[]{
512512
{"getcwd",
513513
{{"c", DefaultChar, Rank::scalar, Optionality::required,
514514
common::Intent::Out}},
515-
DefaultInt},
515+
TypePattern{IntType, KindCode::greaterOrEqualToKind, 4}},
516516
{"getpid", {}, DefaultInt},
517517
{"huge",
518518
{{"x", SameIntOrReal, Rank::anyOrAssumedRank, Optionality::required,
@@ -1405,8 +1405,8 @@ static const IntrinsicInterface intrinsicSubroutine[]{
14051405
{"getcwd",
14061406
{{"c", DefaultChar, Rank::scalar, Optionality::required,
14071407
common::Intent::Out},
1408-
{"status", DefaultInt, Rank::scalar, Optionality::optional,
1409-
common::Intent::Out}},
1408+
{"status", TypePattern{IntType, KindCode::greaterOrEqualToKind, 4},
1409+
Rank::scalar, Optionality::optional, common::Intent::Out}},
14101410
{}, Rank::elemental, IntrinsicClass::impureSubroutine},
14111411
{"move_alloc",
14121412
{{"from", SameType, Rank::known, Optionality::required,

0 commit comments

Comments
 (0)