[flang-commits] [PATCH] D123947: [flang] Fix ICE for passing a label for non alternate return arguments

Kiran Chandramohan via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed Apr 20 03:08:13 PDT 2022


kiranchandramohan added a comment.

Thanks @unterumarmung for this patch. I have a couple of minor comments.

I have two questions in general. I. can understand if you would like to skip these questions.
-> Are these issues from some internal testsuite?
-> Is this hobby work or official contribution?



================
Comment at: flang/lib/Semantics/check-call.cpp:678-684
+            if (arg.isAlternateReturn()) {
+              auto restorer{messages.SetLocation(
+                  arg.sourceLocation().value_or(messages.at()))};
+              messages.Say("Label '%d' can't be associated with %s"_err_en_US,
+                  arg.GetLabel(), dummyName);
+              return;
+            }
----------------
Isn't this error applicable to DummyProcedure too?


================
Comment at: flang/lib/Semantics/check-call.cpp:681
+                  arg.sourceLocation().value_or(messages.at()))};
+              messages.Say("Label '%d' can't be associated with %s"_err_en_US,
+                  arg.GetLabel(), dummyName);
----------------
Nit: Should it be Alternate return label instead of label?


================
Comment at: flang/lib/Semantics/check-call.cpp:683
+                  arg.GetLabel(), dummyName);
+              return;
+            }
----------------
Nit: Sometimes we prefer not to use early returns. Please wait for another opinion.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123947/new/

https://reviews.llvm.org/D123947



More information about the flang-commits mailing list