public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/65241] New: [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu
@ 2015-02-27 17:20 doko at gcc dot gnu.org
  2015-03-02  8:45 ` [Bug tree-optimization/65241] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: doko at gcc dot gnu.org @ 2015-02-27 17:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65241
           Summary: [5 Regression] ICE (in
                    remove_local_expressions_from_table, at
                    tree-ssa-dom.c:1081) on powerpc64le-linux-gnu
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

with r221042

$ gcc -c -g -O3 -Wno-implicit-int wmccc_dialogs.i 
wmccc_dialogs.i: In function 'fn3':
wmccc_dialogs.i:19:3: warning: implicit declaration of function 'fn4'
[-Wimplicit-function-declaration]
   fn4();
   ^
wmccc_dialogs.i:17:1: internal compiler error: in
remove_local_expressions_from_table, at tree-ssa-dom.c:1081
 fn3(wmccc_dialog_t p1) {
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

$ cat wmccc_dialogs.i
typedef enum {
  DLG_SITELIST,
  DLG_NEW_BOARD,
  DLG_NEW_RSS,
  NB_DLG
} wmccc_dialog_t;
fn1(wmccc_dialog_t p1) {
  static w[NB_DLG];
  if (w[p1])
    switch (p1)
    case DLG_NEW_RSS:
  w[p1] = 0;
}

fn2(p1) { fn1(p1); }

fn3(wmccc_dialog_t p1) {
  fn2(p1);
  fn4();
  fn2(p1);
}


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

* [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu
  2015-02-27 17:20 [Bug middle-end/65241] New: [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu doko at gcc dot gnu.org
@ 2015-03-02  8:45 ` rguenth at gcc dot gnu.org
  2015-03-02  9:52 ` [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-03-02  8:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
          Component|middle-end                  |tree-optimization
   Target Milestone|---                         |5.0


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

* [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081)
  2015-02-27 17:20 [Bug middle-end/65241] New: [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu doko at gcc dot gnu.org
  2015-03-02  8:45 ` [Bug tree-optimization/65241] " rguenth at gcc dot gnu.org
@ 2015-03-02  9:52 ` mpolacek at gcc dot gnu.org
  2015-03-02 10:00 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-02  9:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|powerpc64le-linux-gnu       |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-03-02
                 CC|                            |mpolacek at gcc dot gnu.org
            Summary|[5 Regression] ICE (in      |[5 Regression] ICE (in
                   |remove_local_expressions_fr |remove_local_expressions_fr
                   |om_table, at                |om_table, at
                   |tree-ssa-dom.c:1081) on     |tree-ssa-dom.c:1081)
                   |powerpc64le-linux-gnu       |
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Doesn't seem to be target dependent, reproduced even on x86_64-linux.  Started
with r217827.


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

* [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081)
  2015-02-27 17:20 [Bug middle-end/65241] New: [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu doko at gcc dot gnu.org
  2015-03-02  8:45 ` [Bug tree-optimization/65241] " rguenth at gcc dot gnu.org
  2015-03-02  9:52 ` [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) mpolacek at gcc dot gnu.org
@ 2015-03-02 10:00 ` mpolacek at gcc dot gnu.org
  2015-03-02 20:32 ` law at redhat dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2015-03-02 10:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Better test case:

enum E { A, B, C, D };
void fn4 (void);

int
fn1 (enum E p1)
{
  static int w[D];
  if (w[p1])
    switch (p1)
      case C:
      w[p1] = 0;
}

void
fn2 (p1)
{
  fn1 (p1);
}

void
fn3 (enum E p1)
{
  fn2 (p1);
  fn4 ();
  fn2 (p1);
}


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

* [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081)
  2015-02-27 17:20 [Bug middle-end/65241] New: [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-03-02 10:00 ` mpolacek at gcc dot gnu.org
@ 2015-03-02 20:32 ` law at redhat dot com
  2015-03-03 11:55 ` law at gcc dot gnu.org
  2015-03-03 11:57 ` law at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: law at redhat dot com @ 2015-03-02 20:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #3 from Jeffrey A. Law <law at redhat dot com> ---
This is a fairly obscure bug with a change from last year.

Basically Richi added a blob of code in lookup_avail_expr which walks the alias
chains after a "partial hit" in the hash table (I'm defining partial hit as a
hit ignoring vop/alias issues).  If the walking of the alias chains fails, then
the new code unconditionally twiddles the partial hit entry in the hash table.

This is fine and good, except that sometimes we call that routine when we want
to just look for an element in the table, but not insert anything.

The jump threader in particular wants to be able to replace operands in a
statement with their temporary equivalences, look for the result in the
available expression table, then restore the operands to their original values.
 The twiddling of the hash table in this particular case is particular bad as
we'll end up leaving the hash table in an inconsistent state after the operands
are  restored to their original values.  We detect this inconsistent state when
we unwind the table.

Patch testing in progress.


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

* [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081)
  2015-02-27 17:20 [Bug middle-end/65241] New: [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-03-02 20:32 ` law at redhat dot com
@ 2015-03-03 11:55 ` law at gcc dot gnu.org
  2015-03-03 11:57 ` law at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: law at gcc dot gnu.org @ 2015-03-03 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Tue Mar  3 11:54:49 2015
New Revision: 221145

URL: https://gcc.gnu.org/viewcvs?rev=221145&root=gcc&view=rev
Log:
    PR tree-optimization/65241
    * tree-ssa-dom.c (lookup_avail_expr): Only modify the avail_expr
    hash table if INSERT is true.

    PR tree-optimization/65241
    * gcc.c-torture/compile/pr65241.c: New test.

Added:
    trunk/gcc/testsuite/gcc.c-torture/compile/pr65241.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-dom.c


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

* [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081)
  2015-02-27 17:20 [Bug middle-end/65241] New: [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-03-03 11:55 ` law at gcc dot gnu.org
@ 2015-03-03 11:57 ` law at redhat dot com
  5 siblings, 0 replies; 7+ messages in thread
From: law at redhat dot com @ 2015-03-03 11:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jeffrey A. Law <law at redhat dot com> ---
Fixed on the trunk by my recent commit.


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

end of thread, other threads:[~2015-03-03 11:57 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-27 17:20 [Bug middle-end/65241] New: [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) on powerpc64le-linux-gnu doko at gcc dot gnu.org
2015-03-02  8:45 ` [Bug tree-optimization/65241] " rguenth at gcc dot gnu.org
2015-03-02  9:52 ` [Bug tree-optimization/65241] [5 Regression] ICE (in remove_local_expressions_from_table, at tree-ssa-dom.c:1081) mpolacek at gcc dot gnu.org
2015-03-02 10:00 ` mpolacek at gcc dot gnu.org
2015-03-02 20:32 ` law at redhat dot com
2015-03-03 11:55 ` law at gcc dot gnu.org
2015-03-03 11:57 ` 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).