Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 366913 - incorrectly identified syntax error when "in" is used in variable declaration
Summary: incorrectly identified syntax error when "in" is used in variable declaration
Status: CLOSED FIXED
Alias: None
Product: PTP
Classification: Tools
Component: Photran.Parser (show other bugs)
Version: 7.0   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P2 normal (vote)
Target Milestone: 9.1   Edit
Assignee: Jeffrey Overbey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-15 22:53 EST by Bill Sacks CLA
Modified: 2015-05-21 10:54 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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