[Bug fortran/81304] New: Bogus warning with -Wsurprising and -fopenmp: Type specified for intrinsic function 'min' / 'max'
janus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 4 09:23:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81304
Bug ID: 81304
Summary: Bogus warning with -Wsurprising and -fopenmp: Type
specified for intrinsic function 'min' / 'max'
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: janus at gcc dot gnu.org
Target Milestone: ---
Consider this minimal test case:
program bogus_warning
integer :: i
real, dimension(1:3) :: Dx_min, Dx_max
!$omp parallel do default(shared) private(i) reduction(min: Dx_min)
reduction(max: Dx_max)
do i = 1,16
end do
!$omp end parallel do
end
When compiled with -Wsurprising -fopenmp, it yields two bogus warnings:
surprising.f90:4:90:
!$omp parallel do default(shared) private(i) reduction(min: Dx_min)
reduction(max: Dx_max)
1
Warning: Type specified for intrinsic function ‘min’ at (1) is ignored
[-Wsurprising]
surprising.f90:4:90:
!$omp parallel do default(shared) private(i) reduction(min: Dx_min)
reduction(max: Dx_max)
1
Warning: Type specified for intrinsic function ‘max’ at (1) is ignored
[-Wsurprising]
This happens with all versions I tried from 4.6 to 7, but not with 4.4.
(Loosely related to PR59107, but not a duplicate.)
More information about the Gcc-bugs
mailing list