public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/31731] New: False warning for variable used in 'automatic' implied do loop
@ 2007-04-27 20:17 terry at chem dot gu dot se
2007-04-27 21:18 ` [Bug fortran/31731] " kargl at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: terry at chem dot gu dot se @ 2007-04-27 20:17 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2028 bytes --]
This is not bug 5035.
[tjf@fkpc167 Bug2]$ cat bb.f90
subroutine SetupRadii(N)
integer,intent(in)::N
integer::i,j
write(*,*)(/(i,i=1,N)/)
write(*,*)(/(j,j=1,5)/)
end subroutine SetupRadii
[tjf@fkpc167 Bug2]$ gfortran -Wall -O1 -v -c bb.f90
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --disable-multilib --enable-languages=fortran
Thread model: posix
gcc version 4.2.0 20070228 (prerelease)
/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/f951 bb.f90 -quiet
-dumpbase bb.f90 -mtune=generic -auxbase bb -O1 -Wall -version -I
/usr/local/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/finclude -o /tmp/cc30FF7z.s
GNU F95 version 4.2.0 20070228 (prerelease) (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.2.0 20070228 (prerelease).
GGC heuristics: --param ggc-min-expand=89 --param ggc-min-heapsize=112046
bb.f90: In function setupradii:
bb.f90:5: warning: i is used uninitialized in this function
as --traditional-format -V -Qy -o bb.o /tmp/cc30FF7z.s
GNU assembler version 2.17 (x86_64-linux-gnu) using BFD version 2.17 Debian
GNU/Linux
For those that missed it:
bb.f90: In function setupradii:
bb.f90:5: warning: i is used uninitialized in this function
It seems that whatever generates this warning is not fully aware of implied do
constructs. Note that no warning is generated for j, for which the bounds are
known at compile time. The warning is still generated when N is a local
variable rather than an argument.
I haven't tried with gcc younger than my two month old build.
--
Summary: False warning for variable used in 'automatic' implied
do loop
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: terry at chem dot gu dot se
GCC host triplet: x86_64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31731
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/31731] False warning for variable used in 'automatic' implied do loop
2007-04-27 20:17 [Bug fortran/31731] New: False warning for variable used in 'automatic' implied do loop terry at chem dot gu dot se
@ 2007-04-27 21:18 ` kargl at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: kargl at gcc dot gnu dot org @ 2007-04-27 21:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from kargl at gcc dot gnu dot org 2007-04-27 22:18 -------
*** This bug has been marked as a duplicate of 29458 ***
--
kargl at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31731
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-27 21:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-27 20:17 [Bug fortran/31731] New: False warning for variable used in 'automatic' implied do loop terry at chem dot gu dot se
2007-04-27 21:18 ` [Bug fortran/31731] " kargl at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).