This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/13213] New: Hex constant problem when compiling with -fugly-logint and -ftypeless-boz
- From: "castro at cae dot ca" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Nov 2003 17:25:07 -0000
- Subject: [Bug fortran/13213] New: Hex constant problem when compiling with -fugly-logint and -ftypeless-boz
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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