Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 366913

Summary: incorrectly identified syntax error when "in" is used in variable declaration
Product: [Tools] PTP Reporter: Bill Sacks <wsacks>
Component: Photran.ParserAssignee: Jeffrey Overbey <com-eclipse-dot-org>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: com-eclipse-dot-org, wsacks
Version: 7.0   
Target Milestone: 9.1   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Bill Sacks CLA 2011-12-15 22:53:43 EST
Build Identifier: 20110615-0604

In code like the following:

program in_bug
    implicit none
    integer, parameter :: in = selected_int_kind(1)
    integer(in) :: i

    i = 4
    print *, i
end program

The photran syntax checker identifies an error in this line:

integer(in) :: i

However, I believe this use of the word "in" is valid Fortran (at least, it is accepted by a number of fortran 90 compilers that I have tested code like this on).

These incorrectly-identified syntax errors make it difficult for me to use photran with my project, since analysis of a file stops after each of these "errors".

Reproducible: Always

Steps to Reproduce:
1. Create a fortran project
2. Copy the above code into a new source file
3. Examine syntax errors in outline view
Comment 1 Jeffrey Overbey CLA 2015-05-21 10:54:12 EDT
Thanks for the bug report, Bill.  This is fixed for Eclipse Mars (Photran 9.1).

Commit b44cfbf