https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88298
Bug ID: 88298
Summary: Bogus conversion warning for CSHIFT with
-fno-range-check -m64
Product: gcc
Version: 9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: anlauf at gmx dot de
Target Milestone: ---
The code below produces a bogus conversion warning for x86-64:
% cat gfcbug149.f90
subroutine bug (j, js)
integer :: j, js(3,2)
js(:,:) = cshift (js(:,:), shift=j, dim=1)
end subroutine bug
% gfc-trunk -c gfcbug149.f90 -fno-range-check -Wconversion -m64
gfcbug149.f90:3:42:
3 | js(:,:) = cshift (js(:,:), shift=j, dim=1)
| 1
Warning: Conversion from 'INTEGER(8)' to 'INTEGER(4)' at (1) [-Wconversion]
This happens with trunk rev. 266532 on x86_64-pc-linux-gnu,
but also with 7.3.1 [gcc-7-branch revision 258812].
No warning with -m32, or on i686-pc-linux-gnu.