Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface specs interfering with intrinsic tag identification #249

Open
ccotter opened this issue Nov 5, 2022 · 2 comments
Open

Interface specs interfering with intrinsic tag identification #249

ccotter opened this issue Nov 5, 2022 · 2 comments

Comments

@ccotter
Copy link

ccotter commented Nov 5, 2022

      subroutine intrinsics_misidentified
          interface
            subroutine calc(len, max)
              implicit none
              integer*4 len
              integer*4 max
            end
          end interface

          character*10 c10
          integer*4 i,j
          i = len(c10) ! (ValVariable "len")
          i = max(i,j) ! (ValVariable "max")
      end

      subroutine intrinsics_correctly_identified
          character*10 c10
          integer*4 i,j
          i = len(c10) ! (ValIntrinsic "len")
          i = max(i,j) ! (ValIntrinsic "max")
      end

Passing this program through fortran-src -v f77l -a parse intrinsics_bug.f incorrectly classifies the function call names len and max as ValVariables instead of ValIntrinsics. It looks like the interface spec's parameter names are confusing the parser.

@dorchard
Copy link
Member

Thanks! We will look into this.

@raehik
Copy link
Collaborator

raehik commented Jan 12, 2023

Looks like we might not support parsing interfaces in our Fortran 77 parser (or the fixed-form lexer).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants