Issue 178955
Summary [flang] NAMLIST group should not accept parameter variable
Labels flang
Assignees
Reporter Saldivarcher
    Here is an example of compilers emitting an error, while flang does not:
```
$ cat c3.f90
program p
  implicit none
  integer, parameter :: k = 3
  namelist /g/ k
end program

$ gfortran c3.f90
c3.f90:4:16:

    4 |   namelist /g/ k
      |                1
Error: PARAMETER attribute conflicts with NAMELIST attribute in ‘k’ at (1)

$ crayftn c3.f90

  namelist /g/ k
               ^ 
ftn-552 ftn: ERROR P, File = c3.f90, Line = 4, Column = 16 
  "K" has the PARAMETER attribute, therefore it must not be declared as a namelist-group-object.

Cray Fortran : 5 source lines
Cray Fortran : 1 errors, 0 warnings, 0 other messages, 0 ansi
Cray Fortran : "explain ftn-message number" gives more information about each message.

$ flang c3.f90
$ 
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to