This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/56666] New: Suppression flag for " DO loop at (1) will be executed zero times"
- From: "haugboel at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 20 Mar 2013 12:21:07 +0000
- Subject: [Bug fortran/56666] New: Suppression flag for " DO loop at (1) will be executed zero times"
- Auto-submitted: auto-generated
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