unterumarmung added a comment.

@ekieri, hello! Thank you for the comment, it is really helpful!
It turns out that I've researched the issue poorly.

Actually, `nvfortran` compiler forbids to use `INTENT` attribute on local 
variables, even though a "mod" file can be generated. It generates a severe 
error like the one below and there's no way to ignore the severe errors, if I 
understand correctly.

  NVFORTRAN-S-0134-Illegal attribute - intent specified for nondummy argument 
bar2 (test.f90: 3)

But the reason why I filed the patch was that `nvfortran` allows to use any 
kind of `INTENT` attribute for a local variable that marked as `RESULT` one for 
a function:

  function foo() result(bar)
      integer, intent(out) :: bar
  end function foo

`nvfortran` does not generate any message for this code, not even a warning. 
So, it looks like a bug in the compiler, not a feature or extension and this 
should not be supported in flang, I think.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123113

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to