This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/80142] New: [7 Regression] Warning: No location in expression ... with -O / -ffrontend-optimize
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 21 Mar 2017 22:04:45 +0000
- Subject: [Bug fortran/80142] New: [7 Regression] Warning: No location in expression ... with -O / -ffrontend-optimize
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80142
Bug ID: 80142
Summary: [7 Regression] Warning: No location in expression ...
with -O / -ffrontend-optimize
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: anlauf at gmx dot de
Target Milestone: ---
Hello all,
current trunk produces a strange warning for the following code
when either optimization is enabled or -ffrontend-optimize:
% gfc-trunk -c gfcbug140.f90 -ffrontend-optimize
gfcbug140.f90:14:43:
if (any (basis == wv_CDV_list(:))) then
1
Warning: No location in expression near (1)
gfcbug140.f90:14:43: Warning: No location in expression near (1)
% cat gfcbug140.f90
! Bug with -O / -ffrontend-optimize
MODULE gfcbug140
implicit none
integer ,parameter :: WV_NONE = 1
integer, parameter :: WV_CDV_4 = 23
integer, parameter :: WV_CDV_8 = 24
integer, parameter :: wv_CDV_list(2) = [ WV_CDV_4, WV_CDV_8 ]
integer :: basis = WV_NONE
contains
subroutine wave_1d (x)
real, intent(inout) :: x(:,:)
integer :: oldbase
oldbase = basis
if (any (basis == wv_CDV_list(:))) then
end if
basis = oldbase
end subroutine wave_1d
!-
subroutine mr_gp_mat (A)
real, intent(inout) :: A (:,:)
call wave_1d (A)
end subroutine mr_gp_mat
end module gfcbug140