[Bug fortran/13213] New: Hex constant problem when compiling with -fugly-logint and -ftypeless-boz
castro at cae dot ca
gcc-bugzilla@gcc.gnu.org
Thu Nov 27 17:25:00 GMT 2003
If you have code doing something like:
INTEGER*2 RES1, RES2, RES3
REAL*4 GPA
RES1 = GPA * X'6B5'
RES2 = GPA * (X'6B5')
WRITE(*,*) RES1
WRITE(*,*) RES2
these are the results you get with different compilation options:
%>g77 -fugly-logint -ftypeless-boz test.f
%>./a.out
0
9271
%>g77 -fugly-logint test.f
%>./a.out
9271
9271
%>g77 -ftypeless-boz test.f
test.f: In program `main':
test.f:10:
RES1 = GPA * X'6B5'
1 2
Arithmetic operator at (1) must operate on two subexpressions of arithmetic
type, but the subexpression at (2) is not of arithmetic type
%>g77 test.f
%>./a.out
9271
9271
%>
--
Summary: Hex constant problem when compiling with -fugly-logint
and -ftypeless-boz
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: castro at cae dot ca
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13213
More information about the Gcc-bugs
mailing list