Bug 29814 - integer assignment in hexadecimal fails
Summary: integer assignment in hexadecimal fails
Status: RESOLVED DUPLICATE of bug 24828
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-13 11:21 UTC by Olav Vahtras
Modified: 2006-11-14 01:23 UTC (History)
3 users (show)

See Also:
Host: powerpc-apple-darwin8.8.0
Target: powerpc-apple-darwin8.8.0
Build: powerpc-apple-darwin8.8.0
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olav Vahtras 2006-11-13 11:21:01 UTC
INTEGER*4 :: MASK1 = Z'FFFFFFFF'
      PRINT *,MASK1
      END

compiles and produces "-1" with g77 (as it should) while gfortran reports 

 In file err.f:1

      INTEGER*4 :: MASK1 = Z'FFFFFFFF'                                  
                         1
Error: Arithmetic overflow converting INTEGER(8) to INTEGER(4) at (1)

Olav
Comment 1 Andrew Pinski 2006-11-13 13:59:42 UTC
Gfortran is doing the correct thing for BOZs.
This is a dup of bug 24828.

*** This bug has been marked as a duplicate of 24828 ***
Comment 2 Jerry DeLisle 2006-11-14 01:23:16 UTC
Try -fno-range-check or use standard conforming methods.
Comment 3 vahtras@kth.se 2006-11-14 09:42:05 UTC
Subject: Re:  integer assignment in hexadecimal fails


On 14 nov 2006, at 02.23, jvdelisle at gcc dot gnu dot org wrote:

> Try -fno-range-check or use standard conforming methods.

Thank you, this was a learning experience indeed. /Olav