public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
@ 2015-08-12 13:33 trippels at gcc dot gnu.org
  2015-08-12 14:21 ` [Bug tree-optimization/67191] " trippels at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-08-12 13:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67191
           Summary: [6 Regression] ICE: in before_dom_children, at
                    tree-ssa-sccvn.c:4372
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org
  Target Milestone: ---

r226801 causes: 

trippels@gcc2-power8 tools % ~/gcc_test/usr/local/bin/g++ -ftemplate-depth-128
-O3 -finline-functions -Wno-inline -Wall -pedantic -fPIC -m64 -pedantic
-Wstrict-aliasing -fstrict-aliasing -Wextra -Wsign-promo -Wunused-parameter
-Wconversion -Wfloat-equal -Wshadow -Wno-long-long -DBOOST_ALL_NO_LIB=1
-DNDEBUG -I".." -c -o
"/home/trippels/boost_testing/results/boost/bin.v2/libs/unordered/test/unordered/fwd_set_test.test/gcc-6.0.0/release/fwd_set_test.o"
"../libs/unordered/test/unordered/fwd_set_test.cpp"
In file included from
../libs/unordered/test/unordered/../helpers/test.hpp:10:0,
                 from ../libs/unordered/test/unordered/fwd_set_test.cpp:61:
../libs/unordered/test/unordered/fwd_set_test.cpp: In member function ‘virtual
void use_multiset_fwd_declared_function_type::run()’:
../libs/unordered/test/unordered/fwd_set_test.cpp:96:21: internal compiler
error: in before_dom_children, at tree-ssa-sccvn.c:4372
 UNORDERED_AUTO_TEST(use_multiset_fwd_declared_function) {
                     ^
../boost/preprocessor/cat.hpp:29:34: note: in definition of macro
‘BOOST_PP_CAT_I’
 #    define BOOST_PP_CAT_I(a, b) a ## b
                                  ^
../libs/unordered/test/unordered/../helpers/test.hpp:24:10: note: in expansion
of macro ‘BOOST_PP_CAT’
     void BOOST_PP_CAT(x, _type)::run()                                      \
          ^
../libs/unordered/test/unordered/fwd_set_test.cpp:96:1: note: in expansion of
macro ‘UNORDERED_AUTO_TEST’
 UNORDERED_AUTO_TEST(use_multiset_fwd_declared_function) {
 ^
0x10c518c7 sccvn_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc/gcc/tree-ssa-sccvn.c:4371
0x110b0e2b dom_walker::walk(basic_block_def*)
        ../../gcc/gcc/domwalk.c:177
0x10c53033 run_scc_vn(vn_lookup_kind)
        ../../gcc/gcc/tree-ssa-sccvn.c:4459
0x10c23503 execute
        ../../gcc/gcc/tree-ssa-pre.c:4847
Please submit a full bug report,
with preprocessed source if appropriate

reducing...
>From gcc-bugs-return-494634-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 12 13:33:55 2015
Return-Path: <gcc-bugs-return-494634-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 50610 invoked by alias); 12 Aug 2015 13:33:55 -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 50525 invoked by uid 48); 12 Aug 2015 13:33:52 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/55095] Wshift-overflow
Date: Wed, 12 Aug 2015 13:33:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: diagnostic
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: REOPENED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: mpolacek at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 6.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status resolution
Message-ID: <bug-55095-4-Lwu1Wofk09@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-55095-4@http.gcc.gnu.org/bugzilla/>
References: <bug-55095-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: 2015-08/txt/msg00776.txt.bz2
Content-length: 431

https://gcc.gnu.org/bugzilla/show_bug.cgi?idU095

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #17 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Reopening.


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

* [Bug tree-optimization/67191] [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
  2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
@ 2015-08-12 14:21 ` trippels at gcc dot gnu.org
  2015-08-12 14:34 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-08-12 14:21 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-08-12
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
trippels@gcc2-power8 tools % cat fwd_set_test.ii
template <typename> class A;
template <typename _Tp> using __allocator_base = _Tp;
template <class T, class = T, class = int, class = __allocator_base<int>>
class B;
template <class T, class H, class P, class A>
bool operator==(B<T, H, P, A> const &, B<T, H, P, A> const &);
template <class T, class H, class P, class A>
bool operator!=(B<T, H, P, A> const &, B<T, H, P, A> const &);
typedef B<int> int_multiset;
int a;
template <typename> struct C {
  C(int) {}
};
template <typename> struct D;
template <typename> struct K;
struct L : C<A<D<int>>>, C<A<K<int>>> {
  template <typename First, typename Second>
  L(First, Second)
      : C<A<D<int>>>(0), C<A<K<int>>>(0) {}
};
template <typename Node> struct F {
  typedef typename Node::node_pointer node_pointer;
  node_pointer node_;
  F();
  F(typename Node::link_pointer p1) : node_(static_cast<node_pointer>(p1)) {}
  void operator++() { node_ = 0; }
  int operator!=(F p1) { return node_ != p1.node_; }
};
struct G {
  typedef G *link_pointer;
};
struct H {
  static int new_bucket_count(int) {
    int b;
    int *c = 0;
    if (a)
      b = *c;
    return b;
  }
};
class functions {
public:
  functions(int, int) {}
  ~functions();
};
template <typename Types> struct table : functions {
  typedef typename Types::policy policy;
  typedef Types node_allocator;
  typedef F<typename Types::node> iterator;
  L allocators_;
  int bucket_count_;
  int size_;
  typename Types::link_pointer get_previous_start() const;
  iterator begin() const { return size_ ? get_previous_start() : 0; }
  table(int, typename Types::hasher, typename Types::key_equal, node_allocator)
      : functions(0, 0), allocators_(0, 0),
        bucket_count_(policy::new_bucket_count(0)), size_() {}
};
template <typename> struct K : G { typedef K *node_pointer; };
struct I {
  typedef G *link_pointer;
};
struct J {
  typedef I::link_pointer link_pointer;
};
template <typename> struct D {
  typedef int hasher;
  typedef int key_equal;
  typedef K<int> node;
  typedef J::link_pointer link_pointer;
  typedef H policy;
};
struct M : table<D<int>> {
  node_allocator grouped_table_impl_a;
  M(int, int) : table(0, 0, 0, grouped_table_impl_a) {}
  void equals(M const &) const {
    for (iterator d = begin(); d.node_;) {
      iterator e;
      group_equals(e);
    }
  }
  static int group_equals(iterator p1) {
    int f;
    iterator g;
    for (; g != p1; ++g)
      if (find())
        if (f)
          return 0;
  }
  static int find();
};
template <class, class, class, class> class B {
  M table_;

public:
  B(unsigned long = 0);
  friend bool operator==<>(B const &, B const &);
  friend bool operator!=<>(B const &, B const &);
};
template <class T, class H, class P, class A>
B<T, H, P, A>::B(unsigned long)
    : table_(0, 0) {}
template <class T, class H, class P, class A>
bool operator==(B<T, H, P, A> const &p1, B<T, H, P, A> const &p2) {
  p1.table_.equals(p2.table_);
}
template <class T, class H, class P, class A>
bool operator!=(B<T, H, P, A> const &p1, B<T, H, P, A> const &p2) {
  p1.table_.equals(p2.table_);
}
void use_multiset_fwd_declared_function_typerun() {
  int_multiset x, y;
  x == y;
  x != y;
}


trippels@gcc2-power8 tools % g++ -O2 -c fwd_set_test.ii
fwd_set_test.ii: In function ‘void
use_multiset_fwd_declared_function_typerun()’:
fwd_set_test.ii:111:6: internal compiler error: in before_dom_children, at
tree-ssa-sccvn.c:4372
 void use_multiset_fwd_declared_function_typerun() {
      ^
>From gcc-bugs-return-494642-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 12 14:28:33 2015
Return-Path: <gcc-bugs-return-494642-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 56574 invoked by alias); 12 Aug 2015 14:28:33 -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 56522 invoked by uid 48); 12 Aug 2015 14:28:25 -0000
From: "manu at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/35234] Undetected "use before definition".
Date: Wed, 12 Aug 2015 14:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.3.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: manu at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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_status cf_reconfirmed_on cc resolution everconfirmed
Message-ID: <bug-35234-4-KiL5ANDeDx@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-35234-4@http.gcc.gnu.org/bugzilla/>
References: <bug-35234-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2015-08/txt/msg00784.txt.bz2
Content-length: 746

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

Manuel López-Ibáñez <manu at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |NEW
   Last reconfirmed|                            |2015-08-12
                 CC|                            |manu at gcc dot gnu.org
         Resolution|DUPLICATE                   |---
     Ever confirmed|0                           |1

--- Comment #3 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Francois-Xavier Coudert from comment #2)
> It's indeed a duplicate of 27120.

It seems it wasn't.
>From gcc-bugs-return-494643-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 12 14:28:41 2015
Return-Path: <gcc-bugs-return-494643-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 57257 invoked by alias); 12 Aug 2015 14:28:41 -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 57159 invoked by uid 48); 12 Aug 2015 14:28:37 -0000
From: "jason at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/67161] [5/6 Regression] ICE with a static_assert using our internal __not/__or/__and traits
Date: Wed, 12 Aug 2015 14:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 6.0
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jason at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: jason at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc assigned_to
Message-ID: <bug-67161-4-Mr4FaEIMLK@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-67161-4@http.gcc.gnu.org/bugzilla/>
References: <bug-67161-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: 2015-08/txt/msg00785.txt.bz2
Content-length: 449

https://gcc.gnu.org/bugzilla/show_bug.cgi?idg161

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jason at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org


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

* [Bug tree-optimization/67191] [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
  2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
  2015-08-12 14:21 ` [Bug tree-optimization/67191] " trippels at gcc dot gnu.org
@ 2015-08-12 14:34 ` rguenth at gcc dot gnu.org
  2015-08-12 14:34 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-12 14:34 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |6.0

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Hmm, doesn't reproduce on x86_64 for me.  Anyway mine, hopefully we'll get a
x86_64 testcase as well.


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

* [Bug tree-optimization/67191] [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
  2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
  2015-08-12 14:21 ` [Bug tree-optimization/67191] " trippels at gcc dot gnu.org
  2015-08-12 14:34 ` rguenth at gcc dot gnu.org
@ 2015-08-12 14:34 ` rguenth at gcc dot gnu.org
  2015-08-12 14:39 ` trippels at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-12 14:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Oh, maybe just the reduced testcase no longer fails after r226814.


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

* [Bug tree-optimization/67191] [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
  2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-08-12 14:34 ` rguenth at gcc dot gnu.org
@ 2015-08-12 14:39 ` trippels at gcc dot gnu.org
  2015-08-12 14:46 ` antoine.balestrat at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: trippels at gcc dot gnu.org @ 2015-08-12 14:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #3)
> Oh, maybe just the reduced testcase no longer fails after r226814.

Still fails on ppc64le after r226814. So a cross should reproduce this.


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

* [Bug tree-optimization/67191] [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
  2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-08-12 14:39 ` trippels at gcc dot gnu.org
@ 2015-08-12 14:46 ` antoine.balestrat at gmail dot com
  2015-08-13  7:41 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: antoine.balestrat at gmail dot com @ 2015-08-12 14:46 UTC (permalink / raw)
  To: gcc-bugs

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

Antoine Balestrat <antoine.balestrat at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |antoine.balestrat at gmail dot com

--- Comment #5 from Antoine Balestrat <antoine.balestrat at gmail dot com> ---
Hello ! This simpler C testcase seemingly triggers the exact same ICE at -O1 on
my x86_64 machine :

$ cat tested.c
int a;
void f(void)
{
    int b;
    for(a=1; a;);
    for(; b; b++)
lbl:
        b || a;
    if(a)
        goto lbl;
}

$ xgcc -w -O1 tested.c
tested.c: In function ‘f’:
tested.c:11:1: internal compiler error: in before_dom_children, at
tree-ssa-sccvn.c:4372
 }
 ^
0xc66ffc sccvn_dom_walker::before_dom_children(basic_block_def*)
        ../../srcdir/gcc/tree-ssa-sccvn.c:4371
0x10c46a1 dom_walker::walk(basic_block_def*)
        ../../srcdir/gcc/domwalk.c:177
0xc681d6 run_scc_vn(vn_lookup_kind)
        ../../srcdir/gcc/tree-ssa-sccvn.c:4459
0xc3a3b2 execute
        ../../srcdir/gcc/tree-ssa-pre.c:4959
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
>From gcc-bugs-return-494648-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Wed Aug 12 14:48:35 2015
Return-Path: <gcc-bugs-return-494648-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19148 invoked by alias); 12 Aug 2015 14:48:34 -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 18863 invoked by uid 55); 12 Aug 2015 14:48:31 -0000
From: "paolo at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/47461] warn_unused_result attribute ignored for templates
Date: Wed, 12 Aug 2015 14:48:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.6.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: paolo at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Resolution:
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:
Message-ID: <bug-47461-4-J5CA0Bh4eC@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-47461-4@http.gcc.gnu.org/bugzilla/>
References: <bug-47461-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: 2015-08/txt/msg00790.txt.bz2
Content-length: 493

https://gcc.gnu.org/bugzilla/show_bug.cgi?idG461

--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Wed Aug 12 14:47:58 2015
New Revision: 226816

URL: https://gcc.gnu.org/viewcvs?rev"6816&root=gcc&view=rev
Log:
2015-08-12  Paolo Carlini  <paolo.carlini@oracle.com>

        PR c++/47461
        * g++.dg/warn/Wunused-result-1.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/warn/Wunused-result-1.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/67191] [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
  2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-08-12 14:46 ` antoine.balestrat at gmail dot com
@ 2015-08-13  7:41 ` rguenth at gcc dot gnu.org
  2015-08-13  9:40 ` rguenth at gcc dot gnu.org
  2015-08-13  9:44 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-13  7:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ok, reproduced with a cross.  The assert means the DOM walk didn't visit the
definition of an operand before its use which shouldn't happen.  The use
is in a loop nested in a loop which contains the definition dominating the
nested loop entry.

Ah, so we are detecting the outer loop as not executable.  But then the DOM
walk goes to a CFG part looking like


   <bb10>
   /    \
  /     <bb11>
 <bb28>  |    \
  |     <bb20> \
  |    /        <loop exit>
 <bb13>
  |    \
  |     <other loop exit>
 <loop latch>

and for some reason it visits this in order 10, 28, 13(!) instead of
what I would expect (10, 28, 11, 20, 13).  So we don't see bb13 as
not executable and thus the assert triggers.

In domwalk the sort using the postorder number is supposed to make
sure that CFG merges inside the dominator children are visited last.
Somehow this doesn't work here and thus results in non-optimal order
for propagation.  Of course due to the CFG the children are
only 13, 28 and 11 (not 20) so there isn't a "merge" within the
children :/

In the end the assert wasn't meant to stay - it's fine if it triggers
for code that ends up being unreachable.  So the immediate fix is to
remove it but we still want to fix that dominator walk ordering issue
IMHO, which of course would make it a non-dominator walk in some sense
(walking bb11 children before completing bb10 children).

PRE uses a worklist approach and defers blocks which have unvisited
predecessors exactly to overcome this ordering issue which is bad
for propagation passes (if only for compile-time reasons).


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

* [Bug tree-optimization/67191] [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
  2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-08-13  7:41 ` rguenth at gcc dot gnu.org
@ 2015-08-13  9:40 ` rguenth at gcc dot gnu.org
  2015-08-13  9:44 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-13  9:40 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Aug 13 09:39:50 2015
New Revision: 226854

URL: https://gcc.gnu.org/viewcvs?rev=226854&root=gcc&view=rev
Log:
2015-08-13  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/67191
        * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Remove
        assert we value-numbered last stmts operand because it can validly
        trigger for unreachable code.

        * gcc.dg/torture/pr67191.c: New testcase.
        * g++.dg/torture/pr67191.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr67191.C
    trunk/gcc/testsuite/gcc.dg/torture/pr67191.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-sccvn.c


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

* [Bug tree-optimization/67191] [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372
  2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-08-13  9:40 ` rguenth at gcc dot gnu.org
@ 2015-08-13  9:44 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-13  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2015-08-13  9:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-12 13:33 [Bug tree-optimization/67191] New: [6 Regression] ICE: in before_dom_children, at tree-ssa-sccvn.c:4372 trippels at gcc dot gnu.org
2015-08-12 14:21 ` [Bug tree-optimization/67191] " trippels at gcc dot gnu.org
2015-08-12 14:34 ` rguenth at gcc dot gnu.org
2015-08-12 14:34 ` rguenth at gcc dot gnu.org
2015-08-12 14:39 ` trippels at gcc dot gnu.org
2015-08-12 14:46 ` antoine.balestrat at gmail dot com
2015-08-13  7:41 ` rguenth at gcc dot gnu.org
2015-08-13  9:40 ` rguenth at gcc dot gnu.org
2015-08-13  9:44 ` 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).