[flang-commits] [PATCH] D111832: [flang] Expunge bogus semantic check for ELEMENTAL without dummies

Peter Klausler via Phabricator via flang-commits flang-commits at lists.llvm.org
Thu Oct 14 14:33:43 PDT 2021


This revision was automatically updated to reflect the committed changes.
Closed by commit rG1062f989af23: [flang] Expunge bogus semantic check for ELEMENTAL without dummies (authored by klausler).
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111832

Files:
  flang/lib/Semantics/check-declarations.cpp
  flang/test/Semantics/elemental01.f90


Index: flang/test/Semantics/elemental01.f90
===================================================================
--- flang/test/Semantics/elemental01.f90
+++ flang/test/Semantics/elemental01.f90
@@ -1,11 +1,6 @@
 ! RUN: %python %S/test_errors.py %s %flang_fc1
 ! Tests ELEMENTAL subprogram constraints C15100-15102
 
-!ERROR: An ELEMENTAL subprogram must have at least one dummy argument
-elemental integer function noargs
-  noargs = 1
-end function
-
 !ERROR: An ELEMENTAL subroutine may not have an alternate return dummy argument
 elemental subroutine altret(*)
 end subroutine
Index: flang/lib/Semantics/check-declarations.cpp
===================================================================
--- flang/lib/Semantics/check-declarations.cpp
+++ flang/lib/Semantics/check-declarations.cpp
@@ -899,9 +899,6 @@
     // See comment on the similar check in CheckProcEntity()
     if (details.isDummy()) {
       messages_.Say("A dummy procedure may not be ELEMENTAL"_err_en_US);
-    } else if (details.dummyArgs().empty()) {
-      messages_.Say(
-          "An ELEMENTAL subprogram must have at least one dummy argument"_err_en_US);
     } else {
       for (const Symbol *dummy : details.dummyArgs()) {
         if (!dummy) { // C15100


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111832.379848.patch
Type: text/x-patch
Size: 1239 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/flang-commits/attachments/20211014/042bf351/attachment-0001.bin>


More information about the flang-commits mailing list