This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/31563] New: An Error is incorrectly generated for hex and octal data


When trying to build a program with gfortran, these errors were generated.
Absoft f90 and g95 are happy with the program -

[dranta:~/junk] dir% gfortran -o mask mask.f90
mask.f90:3.30:

      data msk4/o'37700000000'/
                             1
Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1)
mask.f90:2.27:

      data msk1/x'80000000'/
                          1
Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1)
mask.f90:4.11:

      msk1=x'80000000'
          1
Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1)
mask.f90:5.11:

      msk4=o'37700000000'
          1
Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1)
[dranta:~/junk] dir% g95 -o mask mask.f90
[dranta:~/junk] dir% f90 -o mask mask.f90
[dranta:~/junk] dir% gfortran --v
Using built-in specs.
Target: powerpc-apple-darwin8.9.0
Configured with: ../gcc/configure --disable-multilib
--prefix=/usr/local/gfortran --enable-languages=c,fortran
Thread model: posix
gcc version 4.3.0 20070412 (experimental)
[dranta:~/junk] dir% cat  mask.f90
      INTEGER *4 msk1, msk4
      data msk1/x'80000000'/
      data msk4/o'37700000000'/
      msk1=x'80000000'
      msk4=o'37700000000'
      end


-- 
           Summary: An Error is incorrectly generated for hex and octal data
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
  GCC host triplet: Darwin 8.9.0


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]