public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA
@ 2011-02-10 14:48 jakub at gcc dot gnu.org
  2011-02-10 14:53 ` [Bug tree-optimization/47679] " jakub at gcc dot gnu.org
                   ` (31 more replies)
  0 siblings, 32 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-10 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [4.6 Regression] Strange uninitialized warning after
                    SRA
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: jakub@gcc.gnu.org


On the attached testcase (simplified from #include <boost/optional> and then
just getitem prototype and following lines) g++ starting with
http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=164136
issues a weird warning with -O2 -m64 -Wall:
warning: ‘*((void*)& aNewItem +8)’ may be used uninitialized in this function
[-Wuninitialized]
(well, for some time it was an error about unhandled mem_ref in diagnostics).
Before that commit no warnings were reported.

For more details see http://bugzilla.redhat.com/676361


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
@ 2011-02-10 14:53 ` jakub at gcc dot gnu.org
  2011-02-10 16:00 ` jakub at gcc dot gnu.org
                   ` (30 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-10 14:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-10 14:48:38 UTC ---
Created attachment 23294
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23294
676361.C


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
  2011-02-10 14:53 ` [Bug tree-optimization/47679] " jakub at gcc dot gnu.org
@ 2011-02-10 16:00 ` jakub at gcc dot gnu.org
  2011-02-10 16:19 ` rguenth at gcc dot gnu.org
                   ` (29 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-10 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #23294|0                           |1
        is obsolete|                            |

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-10 15:43:53 UTC ---
Created attachment 23296
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=23296
rh676361.C

Actually, that was delta reduced perhaps too much, by having operator! return
false always it is certainly correct that it warns, as when the original is not
initialized dummy_ will be used uninitialized.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
  2011-02-10 14:53 ` [Bug tree-optimization/47679] " jakub at gcc dot gnu.org
  2011-02-10 16:00 ` jakub at gcc dot gnu.org
@ 2011-02-10 16:19 ` rguenth at gcc dot gnu.org
  2011-02-10 16:29 ` jakub at gcc dot gnu.org
                   ` (28 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-02-10 16:19 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
            Version|unknown                     |4.6.0
   Target Milestone|---                         |4.6.0

--- Comment #3 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-10 16:19:05 UTC ---
As for the message for diagnostics (if we know that ...) we can generalize
it to warning: 'aNewItem' may be used uninitialized.  That's less precise
but does not contain funny pointer arith.  It would of course be bad to
do that for the generic tree dumpers.

But anyway, what's so strange about ‘*((void*)& aNewItem +8)’?  It was
invented exactly to avoid 'MEM[&aNewItem+8]'.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-02-10 16:29 ` jakub at gcc dot gnu.org
@ 2011-02-10 16:29 ` jakub at gcc dot gnu.org
  2011-03-03 11:27 ` rguenth at gcc dot gnu.org
                   ` (26 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-10 16:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-10 16:20:13 UTC ---
So, before esra we have:
<bb 2>:
  aOldItem = getitem (); [return slot optimization]
  MEM[(struct optional_base *)&aNewItem].m_initialized = 0;
  D.3621_11 = MEM[(const struct optional_base *)this_2(D)];
  if (D.3621_11 != 0)
    goto <bb 3>;
  else
    goto <bb 4>;

<bb 3>:
  D.3623_13 = MEM[(const long unsigned int &)this_2(D) + 8];
  MEM[(internal_type *)&aNewItem + 8B] = D.3623_13;
  MEM[(struct optional_base *)&aNewItem].m_initialized = 1;

<bb 4>:
  D.3628_14 = MEM[(const struct optional_base *)&aOldItem];
  D.3629_15 = !D.3628_14;
  D.3630_16 = MEM[(const struct optional_base *)&aNewItem];
  D.3631_17 = !D.3630_16;
  if (D.3629_15 == D.3631_17)
    goto <bb 5>;
  else
    goto <bb 7>;

<bb 5>:
  D.3632_18 = MEM[(const struct optional_base *)&aOldItem];
  if (D.3632_18 == 0)
    goto <bb 7>;
  else
    goto <bb 6>;

<bb 6>:
  D.3634_19 = MEM[(const long unsigned int &)&aOldItem + 8];
  D.3633_20 = MEM[(const long unsigned int &)&aNewItem + 8];
  D.3635_21 = D.3634_19 == D.3633_20;

<bb 7>:
  # D.3635_22 = PHI <0(4), 1(5), D.3635_21(6)>

which has aNewItem+8 uninitialized if aNewItem.m_initialized is false, but then
aNewItem+8 isn't used either, just the condition is not very simple.
Then eSRA comes in and puts in an uninitialized SSA_NAME on one side of the
PHI, but as the condition is too complicated we don't figure it out and warn
anyway.

Not sure what can be done about it though,
return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ;
is simply too complicated even for the current predicate aware uninitialized
variable analysis (http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00706.html),
particularly figuring out that (*x) == (*y) is only invoked if !!x.

Another thing is why the MEM_REF in the diagnostic isn't printed as
aNewItem.m_storage.dummy_ or aNewItem.m_storage.dummy_.data or
aNewItem.m_storage.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-02-10 16:19 ` rguenth at gcc dot gnu.org
@ 2011-02-10 16:29 ` jakub at gcc dot gnu.org
  2011-02-10 16:29 ` jakub at gcc dot gnu.org
                   ` (27 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-02-10 16:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-02-10 16:29:18 UTC ---
Changing boost slightly:
    template<class OptionalPointee> inline bool equal_pointees2
(OptionalPointee const& x, OptionalPointee const& y ) {
-    return (!x) != (!y) ? false : ( !x ? true : (*x) == (*y) ) ;
+    if (!x && !y) return true;
+    if (!x || !y) return false;
+    return (*x) == (*y);
   }
makes the warning go away, then the predicate aware uninit analysis figures
things out.  But the generated code for this testcase is then 3 bytes longer
(though, same number of insns).


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-02-10 16:29 ` jakub at gcc dot gnu.org
@ 2011-03-03 11:27 ` rguenth at gcc dot gnu.org
  2011-03-25 20:09 ` [Bug tree-optimization/47679] [4.6/4.7 " jakub at gcc dot gnu.org
                   ` (25 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-03-03 11:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.03.03 11:26:57
     Ever Confirmed|0                           |1

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-03-03 11:26:57 UTC ---
> Another thing is why the MEM_REF in the diagnostic isn't printed as
> aNewItem.m_storage.dummy_ or aNewItem.m_storage.dummy_.data or
> aNewItem.m_storage.

this is because it doesn't usually match the source and in some cases
is ambiguous.  It's by design.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6/4.7 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-03-03 11:27 ` rguenth at gcc dot gnu.org
@ 2011-03-25 20:09 ` jakub at gcc dot gnu.org
  2011-06-27 16:00 ` jakub at gcc dot gnu.org
                   ` (24 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-03-25 20:09 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.0                       |4.6.1

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-03-25 19:53:00 UTC ---
GCC 4.6.0 is being released, adjusting target milestone.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6/4.7 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2011-03-25 20:09 ` [Bug tree-optimization/47679] [4.6/4.7 " jakub at gcc dot gnu.org
@ 2011-06-27 16:00 ` jakub at gcc dot gnu.org
  2011-10-26 17:57 ` jakub at gcc dot gnu.org
                   ` (23 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-06-27 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.1                       |4.6.2

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-06-27 12:33:07 UTC ---
GCC 4.6.1 is being released.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6/4.7 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2011-06-27 16:00 ` jakub at gcc dot gnu.org
@ 2011-10-26 17:57 ` jakub at gcc dot gnu.org
  2012-03-01 15:16 ` jakub at gcc dot gnu.org
                   ` (22 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-10-26 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.2                       |4.6.3

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-10-26 17:13:51 UTC ---
GCC 4.6.2 is being released.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.6/4.7 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2011-10-26 17:57 ` jakub at gcc dot gnu.org
@ 2012-03-01 15:16 ` jakub at gcc dot gnu.org
  2013-04-12 15:16 ` [Bug tree-optimization/47679] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
                   ` (21 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-01 15:16 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.3                       |4.6.4

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-01 14:39:05 UTC ---
GCC 4.6.3 is being released.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.7/4.8/4.9 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2012-03-01 15:16 ` jakub at gcc dot gnu.org
@ 2013-04-12 15:16 ` jakub at gcc dot gnu.org
  2013-08-30 13:04 ` Woebbeking at web dot de
                   ` (20 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-04-12 15:16 UTC (permalink / raw)
  To: gcc-bugs


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.6.4                       |4.7.4

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-12 15:16:20 UTC ---
GCC 4.6.4 has been released and the branch has been closed.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.7/4.8/4.9 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2013-04-12 15:16 ` [Bug tree-optimization/47679] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
@ 2013-08-30 13:04 ` Woebbeking at web dot de
  2014-02-16 13:13 ` jackie.rosen at hushmail dot com
                   ` (19 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: Woebbeking at web dot de @ 2013-08-30 13:04 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 5729 bytes --]

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

--- Comment #12 from André Wöbbeking <Woebbeking at web dot de> ---
Does anyone look into this? The warnings are really annoying. 

FYI, Clang 3.3 doesn't warn about this.
>From gcc-bugs-return-428711-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Aug 30 13:10:58 2013
Return-Path: <gcc-bugs-return-428711-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 8579 invoked by alias); 30 Aug 2013 13:10:58 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 8522 invoked by uid 48); 30 Aug 2013 13:10:53 -0000
From: "bmerry at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/58281] New: Problem with explicit constexpr template functions
Date: Fri, 30 Aug 2013 13:10:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.1
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: bmerry at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created
Message-ID: <bug-58281-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-08/txt/msg01635.txt.bz2
Content-length: 3660

http://gcc.gnu.org/bugzilla/show_bug.cgi?idX281

            Bug ID: 58281
           Summary: Problem with explicit constexpr template functions
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bmerry at gmail dot com

Created attachment 30730
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id0730&actioníit
Minimal broken test case

It seems that in some cases explicit instantiation of a function template fails
to actually instantiate anything. A minimal example (also attached) is

template<typename T> constexpr bool f(T a)
{
    return a == 3;
}
extern template bool f<int>(int);
bool g(int x) { return f(x); }
template bool f<int>(int);
int main() { return g(4); }

for which compilation gives

$ g++-4.8 -std=c++11 -o instantiate instantiate.cpp
/tmp/ccPWHA9d.o: In function `g(int)':
instantiate.cpp:(.text+0x11): undefined reference to `bool f<int>(int)'
collect2: error: ld returned 1 exit status


Obviously in real usage the explicit instantiation declaration would be in a
header and the explicit instantiation definition would be in a .cpp file, but
it's all one translation unit either way.

Some experimentation shows that any of following will compile:
- moving function g to after the explicit instantiation definition
- removing the constexpr qualifier from f
- removing g and main entirely (nm shows the symbol for f<int> in the resulting
.o file)

The only relevant constraints I found in a quick search of the C++11 [draft]
spec were in 14.7.2.11:

"If an entity is the subject of both an explicit instantiation declaration and
an explicit instantiation definition in the same translation unit, the
definition shall follow the declaration. An entity that is the subject of an
explicit instantiation declaration and that is also used in a way that would
otherwise cause an implicit instantiation (14.7.1) in the translation unit
shall be the subject of an explicit instantiation definition somewhere in the
program; otherwise the program is ill-formed, no diagnostic required."

which all seem to be satisfied by the example.

System information: Ubuntu 12.04 on x86_64, running with GCC 4.8.1:

Using built-in specs.
COLLECT_GCC=g++-4.8
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.8.1-2ubuntu1~12.04' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre
--enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686
--with-abi=m64 --with-multilib-list=m32,m64 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.1 (Ubuntu 4.8.1-2ubuntu1~12.04)


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.7/4.8/4.9 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2013-08-30 13:04 ` Woebbeking at web dot de
@ 2014-02-16 13:13 ` jackie.rosen at hushmail dot com
  2014-06-12 13:44 ` [Bug tree-optimization/47679] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
                   ` (18 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jackie.rosen at hushmail dot com @ 2014-02-16 13:13 UTC (permalink / raw)
  To: gcc-bugs

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

Jackie Rosen <jackie.rosen at hushmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jackie.rosen at hushmail dot com

--- Comment #13 from Jackie Rosen <jackie.rosen at hushmail dot com> ---
*** Bug 260998 has been marked as a duplicate of this bug. ***
Seen from the domain http://volichat.com
Page where seen: http://volichat.com/adult-chat-rooms
Marked for reference. Resolved as fixed @bugzilla.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.7/4.8/4.9/4.10 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2014-02-16 13:13 ` jackie.rosen at hushmail dot com
@ 2014-06-12 13:44 ` rguenth at gcc dot gnu.org
  2014-12-19 13:27 ` [Bug tree-optimization/47679] [4.8/4.9/5 " jakub at gcc dot gnu.org
                   ` (17 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-06-12 13:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.7.4                       |4.8.4

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
The 4.7 branch is being closed, moving target milestone to 4.8.4.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.8/4.9/5 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2014-06-12 13:44 ` [Bug tree-optimization/47679] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
@ 2014-12-19 13:27 ` jakub at gcc dot gnu.org
  2015-01-12 17:11 ` gafnium@yandex-team.ru
                   ` (16 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-12-19 13:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.4                       |4.8.5

--- Comment #15 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.8.4 has been released.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.8/4.9/5 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2014-12-19 13:27 ` [Bug tree-optimization/47679] [4.8/4.9/5 " jakub at gcc dot gnu.org
@ 2015-01-12 17:11 ` gafnium@yandex-team.ru
  2015-02-16 23:39 ` law at redhat dot com
                   ` (15 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: gafnium@yandex-team.ru @ 2015-01-12 17:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

Sergey Eliseev <gafnium@yandex-team.ru> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gafnium@yandex-team.ru

--- Comment #16 from Sergey Eliseev <gafnium@yandex-team.ru> ---
Created attachment 34425
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34425&action=edit
Another warning appearance example

Found similar warning in optional value comparison. 
GCC 4.8.3, boost::optional 1.40 and 1.53 

Compile with -O2 -Wall -Werror


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.8/4.9/5 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2015-01-12 17:11 ` gafnium@yandex-team.ru
@ 2015-02-16 23:39 ` law at redhat dot com
  2015-04-15 18:52 ` [Bug tree-optimization/47679] [4.8/4.9/5/6 " law at gcc dot gnu.org
                   ` (14 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at redhat dot com @ 2015-02-16 23:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |law at redhat dot com

--- Comment #17 from Jeffrey A. Law <law at redhat dot com> ---
Couldn't this be seen as a failure to thread jumps?  In the rs676361 testcase
we have the following relevant blocks after DOM2:

;;   basic block 2, loop depth 0
;;    pred:       ENTRY
  aOldItem = getitem (); [return slot optimization]
  aNewItem_19 = 0;
  _9 = MEM[(bool *)this_4(D)];
  if (_9 != 0)
    goto <bb 3>;
  else
    goto <bb 4>;
;;    succ:       3
;;                4

;;   basic block 3, loop depth 0
;;    pred:       2
  aNewItem$8_22 = MEM[(const long unsigned int &)this_4(D) + 8];
  aNewItem$8_20 = aNewItem$8_22;
  aNewItem_21 = 1;
;;    succ:       4

;;   basic block 4, loop depth 0
;;    pred:       3
;;                2
  # aNewItem_24 = PHI <1(3), 0(2)>
  # aNewItem$8_23 = PHI <aNewItem$8_22(3), aNewItem$8_6(D)(2)>
  _5 = MEM[(bool *)&aOldItem];
  _10 = ~_5;
  _11 = VIEW_CONVERT_EXPR<const bool>(aNewItem_24);
  _12 = ~_11;
  if (_10 == _12)
    goto <bb 5>;
  else
    goto <bb 7>;
;;    succ:       5
;;                7

;;   basic block 5, loop depth 0
;;    pred:       4
  if (_10 != 0)
    goto <bb 7>;
  else
    goto <bb 6>;
;;    succ:       7
;;                6

;;   basic block 6, loop depth 0
;;    pred:       5
  _13 = MEM[(const long unsigned int &)&aOldItem + 8];
  aNewItem$8_14 = aNewItem$8_23;
  iftmp.4_15 = _13 == aNewItem$8_23;
  _16 = ~iftmp.4_15;
  _17 = (int) _16;
;;    succ:       7


The key here is that we know the value of _12 depending on how we reach block
#4.  If BB4 then transfers control to block #5 we'll also know the value of _10
which would allow us to thread jumps and I believe simplifies things enough to
avoid the false positive, at least on the reduced case.  I haven't tried case
from Sergey yet.

This appears to be caused by a few deficiencies in jump threading.  None appear
to be major issues though.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.8/4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (16 preceding siblings ...)
  2015-02-16 23:39 ` law at redhat dot com
@ 2015-04-15 18:52 ` law at gcc dot gnu.org
  2015-04-17 19:24 ` law at gcc dot gnu.org
                   ` (13 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-04-15 18:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #18 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Wed Apr 15 18:51:49 2015
New Revision: 222130

URL: https://gcc.gnu.org/viewcvs?rev=222130&root=gcc&view=rev
Log:
    PR tree-optimization/47679
    * tree-ssa-dom.c (build_and_record_new_cond): Moved to avoid
    need for forward declaration in upcoming changes.
    (record_conditions, record_edge_info): Likewise.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-dom.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.8/4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (17 preceding siblings ...)
  2015-04-15 18:52 ` [Bug tree-optimization/47679] [4.8/4.9/5/6 " law at gcc dot gnu.org
@ 2015-04-17 19:24 ` law at gcc dot gnu.org
  2015-06-23  8:23 ` rguenth at gcc dot gnu.org
                   ` (12 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-04-17 19:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #19 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Fri Apr 17 19:24:17 2015
New Revision: 222195

URL: https://gcc.gnu.org/viewcvs?rev=222195&root=gcc&view=rev
Log:
    PR tree-optimization/47679
    * Makefile.in (OBJS); Add tree-ssa-scopedtables.o.
    * tree-ssa-scopedtables.c: New file.
    * tree-ssa-scopedtables.h: New file.
    * tree-ssa-dom.c: Include tree-ssa-scopedtables.h.
    (const_and_copies): Change name/type.
    (record_const_or_copy): Move into tree-ssa-scopedtables.c
    (record_const_or_copy_1): Similarly.
    (restore_vars_to_original_value): Similarly.
    (pass_dominator::execute): Create and destroy const_and_copies table.
    (thread_across_edge): Update passing of const_and_copies.
    (record_temporary_equivalence): Use method calls rather than
    manipulating const_and_copies directly.
    (record_equality, cprop_into_successor_phis): Similarly.
    (dom_opt_dom_walker::before_dom_children): Similarly.
    (dom_opt_dom_walker::after_dom_children): Similarly.
    (eliminate_redundant_computations): Similarly.
    * tree-ssa-threadedge.c (remove_temporary_equivalences): Delete.
    (record_temporary_equivalence): Likewise.
    (invalidate_equivalences): Likewise.
    (record_temporary_equivalences_from_phis): Update due to type
    change of const_and_copies.  Use method calls rather than
    manipulating the stack directly.
    (record_temporary_equivalences_from_stmts_at_dest): Likewise.
    (thread_through_normal_block, thread_across_edge): Likewise.
    (thread_across_edge): Likewise.
    * tree-ssa-threadedge.h (thread_across_edge): Update prototype.
    * tree-vrp.c: Include tree-ssa-scopedtables.h.  Change type
    of equiv_stack.
    (identify_jump_threads): Update due to type change of equiv_stack.
    (finalize_jump_threads): Delete the equiv_stack when complete.

Added:
    trunk/gcc/tree-ssa-scopedtables.c
    trunk/gcc/tree-ssa-scopedtables.h
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/tree-ssa-dom.c
    trunk/gcc/tree-ssa-loop-ch.c
    trunk/gcc/tree-ssa-threadedge.c
    trunk/gcc/tree-ssa-threadedge.h
    trunk/gcc/tree-vrp.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.8/4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (18 preceding siblings ...)
  2015-04-17 19:24 ` law at gcc dot gnu.org
@ 2015-06-23  8:23 ` rguenth at gcc dot gnu.org
  2015-06-26 19:56 ` [Bug tree-optimization/47679] [4.9/5/6 " jakub at gcc dot gnu.org
                   ` (11 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-23  8:23 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.8.5                       |4.9.3

--- Comment #20 from Richard Biener <rguenth at gcc dot gnu.org> ---
The gcc-4_8-branch is being closed, re-targeting regressions to 4.9.3.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (19 preceding siblings ...)
  2015-06-23  8:23 ` rguenth at gcc dot gnu.org
@ 2015-06-26 19:56 ` jakub at gcc dot gnu.org
  2015-06-26 20:28 ` jakub at gcc dot gnu.org
                   ` (10 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 19:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #21 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9.3 has been released.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (20 preceding siblings ...)
  2015-06-26 19:56 ` [Bug tree-optimization/47679] [4.9/5/6 " jakub at gcc dot gnu.org
@ 2015-06-26 20:28 ` jakub at gcc dot gnu.org
  2015-09-14 20:11 ` law at gcc dot gnu.org
                   ` (9 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-06-26 20:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.9.3                       |4.9.4


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (21 preceding siblings ...)
  2015-06-26 20:28 ` jakub at gcc dot gnu.org
@ 2015-09-14 20:11 ` law at gcc dot gnu.org
  2015-09-15 17:04 ` law at gcc dot gnu.org
                   ` (8 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-09-14 20:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #23 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Mon Sep 14 20:10:30 2015
New Revision: 227762

URL: https://gcc.gnu.org/viewcvs?rev=227762&root=gcc&view=rev
Log:
[PATCH] Minor DOM cleanup

        PR tree-optimization/47679
        * tree-ssa-dom.c (avail_expr_hash): Pass a pointer to a real
        type rather than void *.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-dom.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (22 preceding siblings ...)
  2015-09-14 20:11 ` law at gcc dot gnu.org
@ 2015-09-15 17:04 ` law at gcc dot gnu.org
  2015-09-16 17:26 ` law at gcc dot gnu.org
                   ` (7 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-09-15 17:04 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #24 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Tue Sep 15 17:03:49 2015
New Revision: 227801

URL: https://gcc.gnu.org/viewcvs?rev=227801&root=gcc&view=rev
Log:
[PATCH] More class-ification of DOM

        PR tree-optimization/47679
        * tree-ssa-dom.c (expr_hash_elt): Now a class with ctors/dtors,
        methods and private members.
        (avail_exprs_stack): Similarly.  Change type of global
        from a pair of expr_hash_elt_t to the new class.
        (expr_elt_hasher::hash): Corresponding changes.
        (expr_elt_hasher::equal): Similarly.
        (avail_expr_hash): Similarly.
        (pass_dominator::execute): Similarly.
        (dom_opt_dom_walker::thread_across_edge): Similarly.
        (record_cond): Similarly.
        (dom_opt_dom_walker::before_dom_children): Similarly.
        (dom_opt_dom_walker::after_dom_children): Similarly.
        (lookup_avail_expr): Likewise.
        (initialize_hash_element): Now a expr_hash_elt constructor.
        (initialize_hash_element_from_expr): Similarly.
        (free_expr_hash_elt_contents): Now a dtor for class expr_hash_elt.
        (free_expr_hash_elt): Call dtor for the element.
        (remove_local_expressions_from_table): Now the "pop_to_marker"
        method in the available_exprs_stack class.
        (avail_expr_stack::record_expr): Method factored out.
        (print_expr_hash_elt): Now a method in the expr_hash_elt class.
        Fix formatting.
        (hashable_expr_equal_p): Fix formatting.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-dom.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (23 preceding siblings ...)
  2015-09-15 17:04 ` law at gcc dot gnu.org
@ 2015-09-16 17:26 ` law at gcc dot gnu.org
  2015-09-17  3:01 ` law at gcc dot gnu.org
                   ` (6 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-09-16 17:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #25 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Wed Sep 16 17:25:51 2015
New Revision: 227831

URL: https://gcc.gnu.org/viewcvs?rev=227831&root=gcc&view=rev
Log:
[PATCH] Move code out of tree-ssa-dom into tree-ssa-scopedtables

        PR tree-optimization/47679
        * tree-ssa-dom.c (enum expr_kind): Moved from here to
        tree-ssa-scopedtables.h.
        (struct hashable_expr, class expr_hash_elt): Likewise.
        (struct expr_elt_hasher, class avail_exprs_stack): Likewise.
        Move associated methods into tree-ssa-scopedtables.c.
        (avail_expr_hash, initialize_expr_from_cond): Similarly.
        (hashable_expr_equal_p, add_expr_commutative): Likewise.
        (add_hashable_expr): Likewise.
        (record_cond): Delete element directly.
        * tree-ssa-scopedtables.h (avail_expr_stack, const_and_copies): Add
        private copy ctor and assignment operator methods.
        (expr_elt_hasher): Inline trivial methods.
        (initialize_expr_from_cond): Prototype.
        * tree-ssa-scopedtables.c: Add necessary includes, functions and
        methods that were previously in tree-ssa-dom.c.  Improve various
        comments.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-dom.c
    trunk/gcc/tree-ssa-scopedtables.c
    trunk/gcc/tree-ssa-scopedtables.h


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (24 preceding siblings ...)
  2015-09-16 17:26 ` law at gcc dot gnu.org
@ 2015-09-17  3:01 ` law at gcc dot gnu.org
  2015-09-18 15:29 ` law at gcc dot gnu.org
                   ` (5 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-09-17  3:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #26 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Thu Sep 17 03:01:03 2015
New Revision: 227842

URL: https://gcc.gnu.org/viewcvs?rev=227842&root=gcc&view=rev
Log:
[PATCH] Pass in avail_expr_stack and setup edge_infos earlier

        PR tree-optimization/47679
        * tree-ssa-dom.c (free_edge_info): Factored out of free_all_edge_infos.
        (free_all_edge_infos): Use it.
        (allocate_edge_info): Free preexisting edge info data.
        (pass_dominator::execute): Set up initial edge info structures.
        (dom_opt_dom_walker::thread_across_edge): Pass avail_expr_stack to
        thread_across_edge.
        * tree-ssa-threadedge.c (thread_across_edge): Accept new argument.  If
        non-null, then push/pop markers appropriately.
        * tree-ssa-threadedge.h (thread_across_edge): Update prototype.
        * tree-vrp.c (identify_jump_threads): Pass NULL for new argument to
        thread-across_edge.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-dom.c
    trunk/gcc/tree-ssa-threadedge.c
    trunk/gcc/tree-ssa-threadedge.h
    trunk/gcc/tree-vrp.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (25 preceding siblings ...)
  2015-09-17  3:01 ` law at gcc dot gnu.org
@ 2015-09-18 15:29 ` law at gcc dot gnu.org
  2015-09-18 19:34 ` law at gcc dot gnu.org
                   ` (4 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-09-18 15:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #27 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Fri Sep 18 15:29:01 2015
New Revision: 227908

URL: https://gcc.gnu.org/viewcvs?rev=227908&root=gcc&view=rev
Log:
[PATCH] Break out phi-only cprop into its own file

        PR tree-optimization/47679
        * Makefile.in (OBJS): Add tree-ssa-phionlycprop.o
        * tree-ssa-dom.c: Remove unnecessary header includes.
        (remove_stmt_or_phi): Moved from here into tree-ssa-phionlycprop.c
        (get_rhs_or_phi_arg, get_lhs_or_phi_result): Likewise.
        (propagate_rhs_into_lhs, eliminate_const_or_copy): Likewise.
        (eliminate_degenerate_phis_1, pass_phi_only_cprop): Likewise.
        (pass_phi_only_cprop::execute): Likewise.
        (make_pass_phi_only_cprop): Likewise.
        * tree-ssa-phionlycprop.c: New file with moved code.  Eliminate
        uses of file scoped statics by passing the required objects
        as parameters wherever needed.

Added:
    trunk/gcc/tree-ssa-phionlycprop.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/Makefile.in
    trunk/gcc/tree-ssa-dom.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (26 preceding siblings ...)
  2015-09-18 15:29 ` law at gcc dot gnu.org
@ 2015-09-18 19:34 ` law at gcc dot gnu.org
  2015-09-19  2:57 ` law at gcc dot gnu.org
                   ` (3 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-09-18 19:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #28 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Fri Sep 18 19:33:48 2015
New Revision: 227922

URL: https://gcc.gnu.org/viewcvs?rev=227922&root=gcc&view=rev
Log:
[PATCH] const_and_copies is no longer file scoped

        PR tree-optimization/47679
        * tree-ssa-dom.c (const_and_copies): No longer file scoped.  Move
        it here ...
        (dom_opt_dom_walker): New private member holding the const_and_copies
        object.  Update constructor.
        (pass_dominator::execute): Corresponding changes to declaration
        and initialization of const_and_copies.  Update constructor call
        for the dom_opt_dom_walker object.
        (record_temporary_equivalences): Accept const_and_copies argument
        pass it down to children as needed.
        (record_equality): Likewise.
        (record_equivalences_from_incoming_edge): Likewise.
        (cprop_into_successor_phis, optimize_stmt): Likewise.
        (eliminate_redundant_computations): Likewise.
        (dom_opt_dom_walker::thread_across_edge): Update access to
        const_and_copies object and pass it to children as needed.
        (dom_opt_dom_walker::before_dom_children): Similarly.
        (dom_opt_dom_walker::after_dom_children): Similarly.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-dom.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (27 preceding siblings ...)
  2015-09-18 19:34 ` law at gcc dot gnu.org
@ 2015-09-19  2:57 ` law at gcc dot gnu.org
  2015-09-20  6:16 ` law at redhat dot com
                   ` (2 subsequent siblings)
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-09-19  2:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #29 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Sat Sep 19 02:56:15 2015
New Revision: 227931

URL: https://gcc.gnu.org/viewcvs?rev=227931&root=gcc&view=rev
Log:
[PATCH] avail_expr_stack is no longer file scoped

       PR tree-optimization/47679
        * tree-ssa-dom.c (avail_exprs_stack): No longer file scoped.  Move
        it here ...
        (dom_opt_dom_walker): New private member holding the avail_exprs_stack
        object.  Update constructor.
        (pass_dominator::execute):  Corresponding chagnes to declaration
        and initialization of avail_exprs_stack.  Update constructor call
        for dom_opt_dom_walker object.
        (lookup_avail_expr, record_cond): Accept additional argument.  Pass
        it down to children as needed.
        (record_equivalences_from_incoming_edge): Likewise.
        (eliminate_redundant_computations): Likewise.
        (record_equivalences_from_stmt): Likewise.
        (simplify_stmt_for_jump_threading): Likewise.
        (record_temporary_equivalences): Likewise.
        (optimize_stmt): Likewise.
        (dom_opt_dom_walker::thread_across_edge): Update access to
        avail_exprs_stack object and pass it to children as needed.
        (dom_opt_dom_walker::before_dom_children): Similarly.
        (dom_opt_dom_walker::after_dom_children): Similarly.
        * tree-ssa-threadedge.c (pfn_simplify): New typedef.
        (record_temporary_equivalences_from_stmts_at_dest): Use new typedef.
        Add avail_expr_stack argument.  Pass it to children as needed.
        (dummy_simplify): Likewise.
        (simplify_control_stmt_condition): Likewise.
        (thread_around_empty_blocks): Likewise.
        (thread_through_normal_block): Likewise.
        (thread_across_edge): Likewise.
        * tree-ssa-threadedge.h (thread_across_edge): Update prototype.
        * tree-vrp.c (simplify_stmt_for_jump_threading): Update.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-dom.c
    trunk/gcc/tree-ssa-threadedge.c
    trunk/gcc/tree-ssa-threadedge.h
    trunk/gcc/tree-vrp.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (28 preceding siblings ...)
  2015-09-19  2:57 ` law at gcc dot gnu.org
@ 2015-09-20  6:16 ` law at redhat dot com
  2015-09-20  6:40 ` law at gcc dot gnu.org
  2015-09-20  6:40 ` [Bug tree-optimization/47679] [4.9/5 " law at redhat dot com
  31 siblings, 0 replies; 33+ messages in thread
From: law at redhat dot com @ 2015-09-20  6:16 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #30 from Jeffrey A. Law <law at redhat dot com> ---
AFACT the testcase in c#16 is bogus.  If i is never equal to k, then opt is
never assigned any value.  It's then used in the conditional outside the loop. 
That's how it looks at the source level and that's also what it looks like in
the dom2 dump.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5/6 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (29 preceding siblings ...)
  2015-09-20  6:16 ` law at redhat dot com
@ 2015-09-20  6:40 ` law at gcc dot gnu.org
  2015-09-20  6:40 ` [Bug tree-optimization/47679] [4.9/5 " law at redhat dot com
  31 siblings, 0 replies; 33+ messages in thread
From: law at gcc dot gnu.org @ 2015-09-20  6:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

--- Comment #31 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Sun Sep 20 06:37:39 2015
New Revision: 227942

URL: https://gcc.gnu.org/viewcvs?rev=227942&root=gcc&view=rev
Log:
[PATCH] Fix 47679 by improving jump threading

        PR tree-optimization/47679
        * tree-ssa-dom.c (record_temporary_equivalences): No longer static.
        * tree-ssa-dom.h (record_temporary_equivalences): Add prototype.
        * tree-ssa-threadedge.c: Include tree-ssa-dom.h.
        (thread_through_normal_block): Use record_temporary_equivalences.

        PR tree-optimization/47679
        * g++.dg/warn/Wuninitialized-6.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wuninitialized-6.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-dom.c
    trunk/gcc/tree-ssa-dom.h
    trunk/gcc/tree-ssa-threadedge.c


^ permalink raw reply	[flat|nested] 33+ messages in thread

* [Bug tree-optimization/47679] [4.9/5 Regression] Strange uninitialized warning after SRA
  2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
                   ` (30 preceding siblings ...)
  2015-09-20  6:40 ` law at gcc dot gnu.org
@ 2015-09-20  6:40 ` law at redhat dot com
  31 siblings, 0 replies; 33+ messages in thread
From: law at redhat dot com @ 2015-09-20  6:40 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=47679

Jeffrey A. Law <law at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.9/5/6 Regression]        |[4.9/5 Regression] Strange
                   |Strange uninitialized       |uninitialized warning after
                   |warning after SRA           |SRA

--- Comment #32 from Jeffrey A. Law <law at redhat dot com> ---
Fixed on the trunk.  Not planning to backport the patch series to any of the
release branches.


^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2015-09-20  6:40 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-10 14:48 [Bug tree-optimization/47679] New: [4.6 Regression] Strange uninitialized warning after SRA jakub at gcc dot gnu.org
2011-02-10 14:53 ` [Bug tree-optimization/47679] " jakub at gcc dot gnu.org
2011-02-10 16:00 ` jakub at gcc dot gnu.org
2011-02-10 16:19 ` rguenth at gcc dot gnu.org
2011-02-10 16:29 ` jakub at gcc dot gnu.org
2011-02-10 16:29 ` jakub at gcc dot gnu.org
2011-03-03 11:27 ` rguenth at gcc dot gnu.org
2011-03-25 20:09 ` [Bug tree-optimization/47679] [4.6/4.7 " jakub at gcc dot gnu.org
2011-06-27 16:00 ` jakub at gcc dot gnu.org
2011-10-26 17:57 ` jakub at gcc dot gnu.org
2012-03-01 15:16 ` jakub at gcc dot gnu.org
2013-04-12 15:16 ` [Bug tree-optimization/47679] [4.7/4.8/4.9 " jakub at gcc dot gnu.org
2013-08-30 13:04 ` Woebbeking at web dot de
2014-02-16 13:13 ` jackie.rosen at hushmail dot com
2014-06-12 13:44 ` [Bug tree-optimization/47679] [4.7/4.8/4.9/4.10 " rguenth at gcc dot gnu.org
2014-12-19 13:27 ` [Bug tree-optimization/47679] [4.8/4.9/5 " jakub at gcc dot gnu.org
2015-01-12 17:11 ` gafnium@yandex-team.ru
2015-02-16 23:39 ` law at redhat dot com
2015-04-15 18:52 ` [Bug tree-optimization/47679] [4.8/4.9/5/6 " law at gcc dot gnu.org
2015-04-17 19:24 ` law at gcc dot gnu.org
2015-06-23  8:23 ` rguenth at gcc dot gnu.org
2015-06-26 19:56 ` [Bug tree-optimization/47679] [4.9/5/6 " jakub at gcc dot gnu.org
2015-06-26 20:28 ` jakub at gcc dot gnu.org
2015-09-14 20:11 ` law at gcc dot gnu.org
2015-09-15 17:04 ` law at gcc dot gnu.org
2015-09-16 17:26 ` law at gcc dot gnu.org
2015-09-17  3:01 ` law at gcc dot gnu.org
2015-09-18 15:29 ` law at gcc dot gnu.org
2015-09-18 19:34 ` law at gcc dot gnu.org
2015-09-19  2:57 ` law at gcc dot gnu.org
2015-09-20  6:16 ` law at redhat dot com
2015-09-20  6:40 ` law at gcc dot gnu.org
2015-09-20  6:40 ` [Bug tree-optimization/47679] [4.9/5 " law at redhat dot com

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).