public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52370] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
@ 2012-02-24 14:17 ` burnus at gcc dot gnu.org
2012-05-15 13:19 ` burnus at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-02-24 14:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
Tobias Burnus <burnus at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |diagnostic
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-02-24 14:05:32 UTC ---
(In reply to comment #1)
> The warning is not printed for the last line where one dereferences a pointer
> (line 8), but for the "b.0 =" assignment.
I have the impression that problem is rather line 8 - i.e. related to the
pointer dereference. The warning vanishes if one comments/moves the "a =" line
- unless "b" is volatile - or if one makes "a" a VALUE or a function result. I
assume that's because it is then simpler to merge the implicitly and the
explicitly created "if (present(b))" lines.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/52370] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
2012-02-24 14:17 ` [Bug fortran/52370] Spurious "may be used uninitialized" warning for check of optional argument burnus at gcc dot gnu.org
@ 2012-05-15 13:19 ` burnus at gcc dot gnu.org
2013-12-14 18:18 ` [Bug fortran/52370] [4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
` (6 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-05-15 13:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
--- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-05-15 13:15:49 UTC ---
See also http://gcc.gnu.org/ml/fortran/2012-05/msg00066.html
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
2012-02-24 14:17 ` [Bug fortran/52370] Spurious "may be used uninitialized" warning for check of optional argument burnus at gcc dot gnu.org
2012-05-15 13:19 ` burnus at gcc dot gnu.org
@ 2013-12-14 18:18 ` dominiq at lps dot ens.fr
2013-12-19 15:19 ` rguenth at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-12-14 18:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-12-14
Summary|Spurious "may be used |[4.7/4.8/4.9 Regression]
|uninitialized" warning for |Spurious "may be used
|check of optional argument |uninitialized" warning for
| |check of optional argument
Ever confirmed|0 |1
--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
I get the warning with 4.6.4 up to trunk (r205944), but not for 4.5.4. The
change occurred between revisions r182107 (2011-12-08) and r182980
(2012-01-07).
> That the warning only shows up in 4.7 but not in 4.7.2 is probably due
> to the patch for PR 50923. (The warning is only printed for -O1 but not
> for -O2 or -O0.)
The fix for PR 50923 is in the above range.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
` (2 preceding siblings ...)
2013-12-14 18:18 ` [Bug fortran/52370] [4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
@ 2013-12-19 15:19 ` rguenth at gcc dot gnu.org
2014-02-11 16:21 ` jakub at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-12-19 15:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
` (3 preceding siblings ...)
2013-12-19 15:19 ` rguenth at gcc dot gnu.org
@ 2014-02-11 16:21 ` jakub at gcc dot gnu.org
2014-02-11 17:31 ` jakub at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-11 16:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Until we get more fine-grained warning control, I believe the only way to fix
this is make sure TREE_NO_WARNING is set on Fortran optional argument related
variables (not just the data pointer (b.0 here), but I think the others too
(bounds, size, ...).
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/52370] [4.7/4.8/4.9 Regression] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
` (4 preceding siblings ...)
2014-02-11 16:21 ` jakub at gcc dot gnu.org
@ 2014-02-11 17:31 ` jakub at gcc dot gnu.org
2014-02-11 20:49 ` [Bug fortran/52370] [4.7/4.8 " jakub at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-11 17:31 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 32107
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32107&action=edit
gcc49-pr52370.patch
So, how about this patch?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/52370] [4.7/4.8 Regression] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
` (5 preceding siblings ...)
2014-02-11 17:31 ` jakub at gcc dot gnu.org
@ 2014-02-11 20:49 ` jakub at gcc dot gnu.org
2014-03-06 8:01 ` jakub at gcc dot gnu.org
2014-06-12 13:05 ` [Bug fortran/52370] [4.7 " rguenth at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-11 20:49 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Summary|[4.7/4.8/4.9 Regression] |[4.7/4.8 Regression]
|Spurious "may be used |Spurious "may be used
|uninitialized" warning for |uninitialized" warning for
|check of optional argument |check of optional argument
--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed on the trunk so far.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/52370] [4.7/4.8 Regression] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
` (6 preceding siblings ...)
2014-02-11 20:49 ` [Bug fortran/52370] [4.7/4.8 " jakub at gcc dot gnu.org
@ 2014-03-06 8:01 ` jakub at gcc dot gnu.org
2014-06-12 13:05 ` [Bug fortran/52370] [4.7 " rguenth at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-03-06 8:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Mar 6 08:00:49 2014
New Revision: 208367
URL: http://gcc.gnu.org/viewcvs?rev=208367&root=gcc&view=rev
Log:
Backport from mainline
2014-02-11 Jakub Jelinek <jakub@redhat.com>
PR fortran/52370
* trans-decl.c (gfc_build_dummy_array_decl): Set TREE_NO_WARNING
on decl if sym->attr.optional.
* gfortran.dg/pr52370.f90: New test.
Added:
branches/gcc-4_8-branch/gcc/testsuite/gfortran.dg/pr52370.f90
Modified:
branches/gcc-4_8-branch/gcc/fortran/ChangeLog
branches/gcc-4_8-branch/gcc/fortran/trans-decl.c
branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug fortran/52370] [4.7 Regression] Spurious "may be used uninitialized" warning for check of optional argument
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
` (7 preceding siblings ...)
2014-03-06 8:01 ` jakub at gcc dot gnu.org
@ 2014-06-12 13:05 ` rguenth at gcc dot gnu.org
8 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52370
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Known to work| |4.8.3
Resolution|--- |FIXED
Target Milestone|4.7.4 |4.8.3
Known to fail| |4.7.4
--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed for 4.8.3.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-06-12 13:05 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-52370-4@http.gcc.gnu.org/bugzilla/>
2012-02-24 14:17 ` [Bug fortran/52370] Spurious "may be used uninitialized" warning for check of optional argument burnus at gcc dot gnu.org
2012-05-15 13:19 ` burnus at gcc dot gnu.org
2013-12-14 18:18 ` [Bug fortran/52370] [4.7/4.8/4.9 Regression] " dominiq at lps dot ens.fr
2013-12-19 15:19 ` rguenth at gcc dot gnu.org
2014-02-11 16:21 ` jakub at gcc dot gnu.org
2014-02-11 17:31 ` jakub at gcc dot gnu.org
2014-02-11 20:49 ` [Bug fortran/52370] [4.7/4.8 " jakub at gcc dot gnu.org
2014-03-06 8:01 ` jakub at gcc dot gnu.org
2014-06-12 13:05 ` [Bug fortran/52370] [4.7 " rguenth 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).