next up previous
Next: Construction of the Test Up: PCRC Fortran 90 and Previous: The Codes

Trouble-shooting

The test programs are annotated with comments flagging the first use within the current file of each syntax rule. These comments will often help in isolation of a compiler bug. For example when one Fortran 90 compiler was used to compile the program test1.f90 it produced the error message

  f90: Error: test1.f90, line 2017: Syntax error, found ','
        when expecting one of: <END-OF-STATEMENT> ; <IDENTIFIER>
              <INTEGER_KIND_CON> <INTEGER_CONSTANT> (
    doc3 : DO, var123 = 1, 2
  -----------^
Inspecting test1.f90 we find
                                                             2012
! do-stmt                       R818(b)                      2013
! nonlabel-do-stmt              R820(a)                      2014
! loop-control                  R821(c)                      2015
                                                             2016
  doc3 : DO, var123 = 1, 2                                   2017
    CONTINUE                                                 2018
  END DO doc3                                                2019
                                                             2020
The three comments on lines 2013-2015 specify the syntax rules which are used for the first time in the following statement, line 2017. These rule are given in full in the auxilliary file rsymbols (for Fortran 90 rules and hsymbols for HPF rules. For more discussion of the format of these files see section 3). Searching this file for the rules R818, R820 and R821 we find that the optional comma really is justified by the rule R821(c) for loop-control:
loop-control                    DONE
  R821(a)       , do-variable = scalar-numeric-expression, scalar-
numeric-expression, scalar-numeric-expression
  R821(b)       do-variable = scalar-numeric-expression, scalar-nu
meric-expression, scalar-numeric-expression
  R821(c)       , do-variable = scalar-numeric-expression, scalar-
numeric-expression
  R821(d)       do-variable = scalar-numeric-expression, scalar-nu
meric-expression
  R821(e)       , WHILE (scalar-logical-expr)
  R821(f)       WHILE (scalar-logical-expr)
For confirmation we can check rule R821 in appendix B of the Fortran 90 Handbook, and verify that there are no additional constraints forbidding the comma. Apparently this particular compiler does not handle this syntax rule correctly (at least in this context).



Bryan Carpenter 2002-07-12