public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rakdver at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/39612] [4.4/4.5/4.6/4.7 Regression] LIM inserts loads from uninitialized local memory
Date: Mon, 16 Jan 2012 16:43:00 -0000	[thread overview]
Message-ID: <bug-39612-4-LQbCwd6EVT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-39612-4@http.gcc.gnu.org/bugzilla/>

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39612

--- Comment #12 from Zdenek Dvorak <rakdver at gcc dot gnu.org> 2012-01-16 16:25:05 UTC ---
(In reply to comment #11)
> Re-confirmed on trunk with the testcase in comment #4 and -Os:
> 
> > ./cc1 -quiet t.c -Os -Wall -fdump-tree-all
> t.c: In function 'f2':
> t.c:4:11: warning: 'inter[0]' is used uninitialized in this function
> [-Wuninitialized]
> t.c:4:11: warning: 'inter[1]' is used uninitialized in this function
> [-Wuninitialized]
> 
> There is also a store data-race introduced by LIM when the loop header
> is not copied.  I suppose the real fix is to disable SM if the loop
> header is not copied.

I do not think this is the right way.  Disabling a valid (and fairly important)
optimization in order to silence a warning seems a bit extreme. I am not sure
what you mean by "a store data-race".

Also, the warning is at least morally right.  If R <= 1, the original code will
pass inter to foo uninitialized, which probably is not intended.  So, the right
thing to do could be issuing "may be used uninitialized" warning instead of "is
used uninitialized" one.


  parent reply	other threads:[~2012-01-16 16:25 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-39612-4@http.gcc.gnu.org/bugzilla/>
2010-10-01 11:57 ` [Bug tree-optimization/39612] [4.3/4.4/4.5/4.6 " jakub at gcc dot gnu.org
2011-04-16 10:26 ` [Bug tree-optimization/39612] [4.3/4.4/4.5/4.6/4.7 " jakub at gcc dot gnu.org
2012-01-16 13:43 ` [Bug tree-optimization/39612] [4.4/4.5/4.6/4.7 " rguenth at gcc dot gnu.org
2012-01-16 16:43 ` rakdver at gcc dot gnu.org [this message]
2012-01-17 10:09 ` rguenth at gcc dot gnu.org
2012-01-17 10:40 ` rakdver at gcc dot gnu.org
2012-01-17 10:53 ` jakub at gcc dot gnu.org
2012-01-17 11:03 ` rguenther at suse dot de
2012-01-17 11:08 ` rakdver at gcc dot gnu.org
2012-03-13 13:16 ` [Bug tree-optimization/39612] [4.5/4.6/4.7/4.8 " jakub at gcc dot gnu.org
2012-07-02 11:29 ` rguenth at gcc dot gnu.org
2013-04-12 15:16 ` [Bug tree-optimization/39612] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2014-03-17 10:51 ` rguenth at gcc dot gnu.org
2014-03-17 10:53 ` rguenth at gcc dot gnu.org
2014-03-17 10:53 ` rguenth at gcc dot gnu.org
2014-06-12 13:43 ` [Bug tree-optimization/39612] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-06-30  6:57 ` [Bug tree-optimization/39612] [4.8/4.9/4.10 " law at redhat dot com
2014-12-19 13:35 ` [Bug tree-optimization/39612] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-06-23  8:18 ` [Bug tree-optimization/39612] [4.8/4.9/5/6 " rguenth at gcc dot gnu.org
2015-06-26 20:06 ` [Bug tree-optimization/39612] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:34 ` jakub at gcc dot gnu.org
2020-03-12 11:58 ` [Bug tree-optimization/39612] [8/9 " jakub at gcc dot gnu.org
2020-04-30  9:22 ` rguenth at gcc dot gnu.org
2020-04-30 12:21 ` rguenth at gcc dot gnu.org
2020-05-04 12:15 ` cvs-commit at gcc dot gnu.org
2020-05-04 12:16 ` rguenth at gcc dot gnu.org
2020-05-05 12:32 ` tnfchris at gcc dot gnu.org
2020-05-05 12:39 ` rguenther at suse dot de
2020-05-05 12:48 ` tnfchris at gcc dot gnu.org
2020-05-05 22:43 ` joseph at codesourcery dot com
2022-04-22  4:43 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-39612-4-LQbCwd6EVT@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).