public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/63476] New: [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689
@ 2014-10-07 21:05 trippels at gcc dot gnu.org
  2014-10-08 11:11 ` [Bug tree-optimization/63476] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-10-07 21:05 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63476
           Summary: [5 Regression] ICE: tree check: expected ssa_name,
                    have var_decl in walk_aliased_vdefs_1, at
                    tree-ssa-alias.c:2689
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: trippels at gcc dot gnu.org

On ppc64 I get:

trippels@gcc1-power7: % cat nsCacheService.ii
enum class nsresult;
class A;
class B
{
public:
  B (int);
  A *operator->();
};
class C
{
};
class A
{
public:
  virtual nsresult AddObserver (const char *, C *, bool) = 0;
};
class D : A
{
  nsresult
  AddObserver (const char *p1, C *p2, bool p3)
  {
    AddObserver (p1, p2, p3);
  }
};
char *prefList[]{};
class F : C
{
  nsresult Install ();
};
nsresult
F::Install ()
{
  B branch = 0;
  for (int i;;)
    branch->AddObserver (prefList[i], this, false);
}

trippels@gcc1-power7: % c++ -c -std=gnu++0x -O3 nsCacheService.ii
nsCacheService.ii: In function ‘virtual nsresult D::AddObserver(const char*,
C*, bool)’:
nsCacheService.ii:20:3: internal compiler error: tree check: expected ssa_name,
have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689
   AddObserver (const char *p1, C *p2, bool p3)
   ^
0x10c40f8f tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9175
0x10a88313 tree_check
        ../../gcc/gcc/tree.h:2733
0x10a88313 walk_aliased_vdefs_1
        ../../gcc/gcc/tree-ssa-alias.c:2689
0x10a883d7 walk_aliased_vdefs(ao_ref*, tree_node*, bool (*)(ao_ref*,
tree_node*, void*), void*, bitmap_head**, bool*)
        ../../gcc/gcc/tree-ssa-alias.c:2741
0x1074de9f ipa_polymorphic_call_context::get_dynamic_type(tree_node*,
tree_node*, tree_node*, gimple_statement_base*)
        ../../gcc/gcc/ipa-polymorphic-call.c:1584
0x10b30543 eliminate_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc/gcc/tree-ssa-pre.c:4285
0x10f1925b dom_walker::walk(basic_block_def*)
        ../../gcc/gcc/domwalk.c:177
0x10b2e1c3 eliminate
        ../../gcc/gcc/tree-ssa-pre.c:4431
0x10b3839b execute
        ../../gcc/gcc/tree-ssa-pre.c:4762
0x10b3839b execute
        ../../gcc/gcc/tree-ssa-pre.c:4721
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-463493-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Oct 07 21:15:23 2014
Return-Path: <gcc-bugs-return-463493-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25278 invoked by alias); 7 Oct 2014 21:15:23 -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 25186 invoked by uid 48); 7 Oct 2014 21:15:20 -0000
From: "boger at us dot ibm.com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug go/60406] recover.go: test13reflect2 test failure
Date: Tue, 07 Oct 2014 21:15:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: go
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: boger at us dot ibm.com
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: ian at airs dot com
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-60406-4-IjGbHeLa4y@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60406-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60406-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: 2014-10/txt/msg00514.txt.bz2
Content-length: 232

https://gcc.gnu.org/bugzilla/show_bug.cgi?id`406

--- Comment #20 from boger at us dot ibm.com ---
The latest patch worked on ppc64 for LE & BE.  That is, the testcase recover.go
now works and no new regressions were introduced.


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

* [Bug tree-optimization/63476] [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689
  2014-10-07 21:05 [Bug tree-optimization/63476] New: [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689 trippels at gcc dot gnu.org
@ 2014-10-08 11:11 ` rguenth at gcc dot gnu.org
  2014-10-09 11:12 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-10-08 11:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-10-08
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Target Milestone|---                         |5.0
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine (finally a small enough testcase...).  This means somebody is not updating
VDEFs properly (expected for load VUSEs btw).


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

* [Bug tree-optimization/63476] [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689
  2014-10-07 21:05 [Bug tree-optimization/63476] New: [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689 trippels at gcc dot gnu.org
  2014-10-08 11:11 ` [Bug tree-optimization/63476] " rguenth at gcc dot gnu.org
@ 2014-10-09 11:12 ` rguenth at gcc dot gnu.org
  2014-10-10 11:05 ` rguenth at gcc dot gnu.org
  2014-10-10 11:09 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-10-09 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah,

#5  0x0000000000c263c2 in ipa_polymorphic_call_context::get_dynamic_type (
    this=0x7fffffffd790, instance=<ssa_name 0x7ffff687b678>, 
    otr_object=<ssa_name 0x7ffff687b678>, 
    otr_type=<record_type 0x7ffff6867b28 D>, call=<gimple_call 0x7ffff6895498>)
    at /space/rguenther/src/svn/trunk/gcc/ipa-polymorphic-call.c:1606
(gdb) l
1601      tci.multiple_types_encountered = false;
1602      tci.speculative = false;
1603      tci.seen_unanalyzed_store = false;
1604
1605      walk_aliased_vdefs (&ao, gimple_vuse (stmt),
check_stmt_for_type_change,
1606                          &tci, NULL, &function_entry_reached);

this walks on gimple_vuse!

(gdb) p debug_gimple_stmt (stmt)
# VUSE <.MEM>
pretmp_5 = this_10(D)->D.2797._vptr.A;

VUSEs are not kept renamed by load PRE insertion phase so this will not work.

The function is called on the call

# .MEM_45 = VDEF <.MEM_6(D)>
OBJ_TYPE_REF(pretmp_1;(struct D)this_10(D)->0) (this_10(D), p1_11(D), p2_14(D),
0);


Of course it would be nice to keep virtual SSA form up-to-date during
PRE insertion, but as of now that was not necessary (and we can't simply
rename VOPs as that will break the SSA value-numbering lattice which includes
virtuals).  Keeping virtual SSA form up-to-date requires computing the
life virtual operand on edges (which means BB exit).

I'm going to try that.


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

* [Bug tree-optimization/63476] [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689
  2014-10-07 21:05 [Bug tree-optimization/63476] New: [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689 trippels at gcc dot gnu.org
  2014-10-08 11:11 ` [Bug tree-optimization/63476] " rguenth at gcc dot gnu.org
  2014-10-09 11:12 ` rguenth at gcc dot gnu.org
@ 2014-10-10 11:05 ` rguenth at gcc dot gnu.org
  2014-10-10 11:09 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-10-10 11:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Fri Oct 10 11:04:39 2014
New Revision: 216065

URL: https://gcc.gnu.org/viewcvs?rev=216065&root=gcc&view=rev
Log:
2014-10-10  Richard Biener  <rguenther@suse.de>

    PR tree-optimization/63476
    * tree-ssa-pre.c (struct bb_bitmap_sets): Add vop_on_exit member.
    (BB_LIVE_VOP_ON_EXIT): New define.
    (create_expression_by_pieces): Assign VUSEs to stmts.
    (compute_avail): Track BB_LIVE_VOP_ON_EXIT.
    (pass_pre::execute): Assert virtual SSA form is up-to-date
    after insertion.

    * g++.dg/torture/pr63476.C: New testcase.

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


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

* [Bug tree-optimization/63476] [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689
  2014-10-07 21:05 [Bug tree-optimization/63476] New: [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689 trippels at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-10-10 11:05 ` rguenth at gcc dot gnu.org
@ 2014-10-10 11:09 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-10-10 11:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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


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

end of thread, other threads:[~2014-10-10 11:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-07 21:05 [Bug tree-optimization/63476] New: [5 Regression] ICE: tree check: expected ssa_name, have var_decl in walk_aliased_vdefs_1, at tree-ssa-alias.c:2689 trippels at gcc dot gnu.org
2014-10-08 11:11 ` [Bug tree-optimization/63476] " rguenth at gcc dot gnu.org
2014-10-09 11:12 ` rguenth at gcc dot gnu.org
2014-10-10 11:05 ` rguenth at gcc dot gnu.org
2014-10-10 11:09 ` 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).