The programme

program longint
  real x
  if (.true.) x = 12345678901
end program longint

contains an integer constant that does not fit into 32 bits.  The compiler
gives the following error message:

$ ~/gcc/bin/gfortran -Wall -c longint.f90 
 In file longint.f90:3

  if (.true.) x = 12345678901
             1
Error: Unclassifiable statement in IF-clause at (1)

This is with the compiler version

$ ~/gcc/bin/gfortran --version
GNU Fortran 95 (GCC) 4.2.0 20060527 (experimental)

The error message should instead be "Illegal integer constant", or "integer
constant too large for default integer kind integer*32", or something similar.


-- 
           Summary: Strange error message for illegal integer constant
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schnetter at aei dot mpg dot de
 GCC build triplet: i386-apple-darwin8.6.1
  GCC host triplet: i386-apple-darwin8.6.1
GCC target triplet: i386-apple-darwin8.6.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27981

Reply via email to