[Bug fortran/56666] New: Suppression flag for " DO loop at (1) will be executed zero times"
haugboel at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Mar 20 12:21:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56666
Bug #: 56666
Summary: Suppression flag for " DO loop at (1) will be executed
zero times"
Classification: Unclassified
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: haugboel@gmail.com
When running the gfortran compiler on source files with zero-trip do loops,
such as
do i=1,0
...do..something...
enddo
the compiler will complain with the warning :
Warning: DO loop at (1) will be executed zero times
test.f90:10.12:
do i=1,0
1
Warning: DO loop at (1) will be executed zero times
We have a code, which makes use of preprocessing to select different
configurations. In the default configuration there are hundreds of these kind
of loops. The warning makes it harder to spot other warnings and errors.
It would be nice if it were possible to suppress/enable the warning with a flag
like
-Wzerotrip
-Wno-zerotrip
More information about the Gcc-bugs
mailing list