public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50334] New: interaction between -Wuninitialized and -finit-real=snan
@ 2011-09-08 16:27 arnaud02 at users dot sourceforge.net
2011-09-08 16:41 ` [Bug fortran/50334] " pinskia at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: arnaud02 at users dot sourceforge.net @ 2011-09-08 16:27 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50334
Bug #: 50334
Summary: interaction between -Wuninitialized and
-finit-real=snan
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: arnaud02@users.sourceforge.net
Considering
subroutine qq(aa)
aa = bb + 1 ! bb unset
end subroutine
>gfortran461 -O3 -Wuninitialized -c qq.f
qq.f: In function 'qq':
qq.f:2:0: warning: 'bb' is used uninitialized in this function
[-Wuninitialized]
>gfortran461 -O3 -Wuninitialized -finit-real=snan -c qq.f
>
The absence of compile-time warnings in the second case surprised me for a
while until I tracked it down to "-finit-real=snan". "-finit-real=snan" is a
killer feature of gfortran, badly missing in Intel Fortran for instance. It is
somewhat regrettable that this option disables the compile-time warnings about
uninitialized variables as "snan" in this case is used to find unset variables
at run-time.
Could you at least add a note in the description of "-finit-real=" explaining
that "-finit-real=" will disable the warnings about uninitialized variables
even for "snan"?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/50334] interaction between -Wuninitialized and -finit-real=snan
2011-09-08 16:27 [Bug fortran/50334] New: interaction between -Wuninitialized and -finit-real=snan arnaud02 at users dot sourceforge.net
@ 2011-09-08 16:41 ` pinskia at gcc dot gnu.org
2011-09-08 17:06 ` kargl at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2011-09-08 16:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50334
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-09-08 16:40:19 UTC ---
Well this is kinda of expected, since you are saying all float variables are
going to be initialized with SNAN so you can detect at runtime those variables
which were left uninitialized.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/50334] interaction between -Wuninitialized and -finit-real=snan
2011-09-08 16:27 [Bug fortran/50334] New: interaction between -Wuninitialized and -finit-real=snan arnaud02 at users dot sourceforge.net
2011-09-08 16:41 ` [Bug fortran/50334] " pinskia at gcc dot gnu.org
@ 2011-09-08 17:06 ` kargl at gcc dot gnu.org
2011-11-08 8:05 ` [Bug fortran/50334] interaction between -Wuninitialized and -finit-* fxcoudert at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu.org @ 2011-09-08 17:06 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50334
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P5
CC| |kargl at gcc dot gnu.org
Severity|normal |enhancement
--- Comment #2 from kargl at gcc dot gnu.org 2011-09-08 17:05:37 UTC ---
Changed to enhancement request.
Although, I think that this should be closed as
a 'Doctor, it hurts when I do this.' issue.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/50334] interaction between -Wuninitialized and -finit-*
2011-09-08 16:27 [Bug fortran/50334] New: interaction between -Wuninitialized and -finit-real=snan arnaud02 at users dot sourceforge.net
2011-09-08 16:41 ` [Bug fortran/50334] " pinskia at gcc dot gnu.org
2011-09-08 17:06 ` kargl at gcc dot gnu.org
@ 2011-11-08 8:05 ` fxcoudert at gcc dot gnu.org
2011-11-08 8:13 ` fxcoudert at gcc dot gnu.org
2011-11-08 8:50 ` fxcoudert at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2011-11-08 8:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50334
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2011-11/msg01136.htm
| |l
Keywords| |documentation, patch
Last reconfirmed| |2011-11-08
CC| |fxcoudert at gcc dot
| |gnu.org
AssignedTo|unassigned at gcc dot |fxcoudert at gcc dot
|gnu.org |gnu.org
Ever Confirmed|0 |1
Summary|interaction between |interaction between
|-Wuninitialized and |-Wuninitialized and
|-finit-real=snan |-finit-*
--- Comment #3 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> 2011-11-08 07:56:41 UTC ---
Document patch submitted at
http://gcc.gnu.org/ml/gcc-patches/2011-11/msg01136.html
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/50334] interaction between -Wuninitialized and -finit-*
2011-09-08 16:27 [Bug fortran/50334] New: interaction between -Wuninitialized and -finit-real=snan arnaud02 at users dot sourceforge.net
` (2 preceding siblings ...)
2011-11-08 8:05 ` [Bug fortran/50334] interaction between -Wuninitialized and -finit-* fxcoudert at gcc dot gnu.org
@ 2011-11-08 8:13 ` fxcoudert at gcc dot gnu.org
2011-11-08 8:50 ` fxcoudert at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2011-11-08 8:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50334
--- Comment #4 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> 2011-11-08 08:11:16 UTC ---
Author: fxcoudert
Date: Tue Nov 8 08:11:10 2011
New Revision: 181150
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181150
Log:
PR fortran/50334
* invoke.texi (-finit-*): Document interaction with
-Wuninitialized.
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/invoke.texi
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug fortran/50334] interaction between -Wuninitialized and -finit-*
2011-09-08 16:27 [Bug fortran/50334] New: interaction between -Wuninitialized and -finit-real=snan arnaud02 at users dot sourceforge.net
` (3 preceding siblings ...)
2011-11-08 8:13 ` fxcoudert at gcc dot gnu.org
@ 2011-11-08 8:50 ` fxcoudert at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: fxcoudert at gcc dot gnu.org @ 2011-11-08 8:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50334
Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.7.0
--- Comment #5 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> 2011-11-08 08:11:57 UTC ---
Fixed on trunk.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-11-08 8:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-08 16:27 [Bug fortran/50334] New: interaction between -Wuninitialized and -finit-real=snan arnaud02 at users dot sourceforge.net
2011-09-08 16:41 ` [Bug fortran/50334] " pinskia at gcc dot gnu.org
2011-09-08 17:06 ` kargl at gcc dot gnu.org
2011-11-08 8:05 ` [Bug fortran/50334] interaction between -Wuninitialized and -finit-* fxcoudert at gcc dot gnu.org
2011-11-08 8:13 ` fxcoudert at gcc dot gnu.org
2011-11-08 8:50 ` fxcoudert at gcc dot gnu.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).