public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf
@ 2015-02-13  0:02 doko at gcc dot gnu.org
  2015-02-13  9:17 ` [Bug middle-end/65048] " rguenth at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: doko at gcc dot gnu.org @ 2015-02-13  0:02 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 65048
           Summary: [5 Regression] ICE in add_phi_args_after_copy_edge, at
                    tree-cfg.c on arm-linux-gnueabihf
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: doko at gcc dot gnu.org

seen with 20150205 on arm-linux-gnueabihf, configured with --with-arch=armv7-a
--with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb

$ gcc -c -g -O3 -Wno-implicit-int -Wno-implicit-function-declaration
translate.i 
translate.i:1:1: warning: data definition has no type or storage class
 a, b, c, d;
 ^
translate.i: In function 'fn2':
translate.i:11:1: internal compiler error: in add_phi_args_after_copy_edge, at
tree-cfg.c:5913
 fn2() {
 ^
Please submit a full bug report,
with preprocessed source if appropriate.

$ cat translate.i 
a, b, c, d;
fn1(p1) {
  switch (p1) {
  case 'A':
    return 'T';
  case 'U':
    return 'A';
  }
}

fn2() {
  for (;;) {
    b = fn1();
    a = fn1();
    fn3(b, a);
  }
}

fn3(p1, p2) {
  switch (c)
  case 'U':
  switch (p1) {
  default:
    fn4();
  case 'G':
    switch (p2)
    case 'A':
    d = 7;
  }
}


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
@ 2015-02-13  9:17 ` rguenth at gcc dot gnu.org
  2015-02-13 11:57 ` [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-13  9:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |middle-end
   Target Milestone|---                         |5.0


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
  2015-02-13  9:17 ` [Bug middle-end/65048] " rguenth at gcc dot gnu.org
@ 2015-02-13 11:57 ` jakub at gcc dot gnu.org
  2015-02-13 17:56 ` spop at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-13 11:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|arm-linux-gnueabihf         |
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-13
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |spop at gcc dot gnu.org
            Summary|[5 Regression] ICE in       |[5 Regression] ICE in
                   |add_phi_args_after_copy_edg |add_phi_args_after_copy_edg
                   |e, at tree-cfg.c on         |e, at tree-cfg.c
                   |arm-linux-gnueabihf         |
     Ever confirmed|0                           |1

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Slightly cleaned up testcase (though, it still requires the invalid calls of
function requiring argument without the argument and missing return).
int a, b, c, d;
void fn (void);

int
foo (x)
{
  switch (x)
    {
    case 'A':
      return 'T';
    case 'U':
      return 'A';
    }
}

void
bar (int x, int y)
{
  switch (c)
    {
    case 'U':
    switch (x)
      {
      default:
    fn ();
      case 'G':
    switch (y)
      {
      case 'A':
        d = 7;
      }
      }
    }
}

void
baz (void)
{
  while (1)
    {
      a = foo ();
      b = foo ();
      bar (a, b);
    }
}

Started with r218451.


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
  2015-02-13  9:17 ` [Bug middle-end/65048] " rguenth at gcc dot gnu.org
  2015-02-13 11:57 ` [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c jakub at gcc dot gnu.org
@ 2015-02-13 17:56 ` spop at gcc dot gnu.org
  2015-02-24  9:42 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: spop at gcc dot gnu.org @ 2015-02-13 17:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sebastian Pop <spop at gcc dot gnu.org> ---
Created attachment 34750
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34750&action=edit
fix

We used to attempt to jump thread this path that is not connex:
FSM jump thread: (7, 10) (13, 14)

This is because we collect all the jump thread paths before doing code
generation, and so once we start code generating the jump threads, the CFG
changes.
The attached patch checks for valid jump threads before code generating them.

I'm testing the patch and if it passes bootstrap I will send it to gcc-patches
with an apropriate changelog.


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-02-13 17:56 ` spop at gcc dot gnu.org
@ 2015-02-24  9:42 ` jakub at gcc dot gnu.org
  2015-02-26 14:52 ` law at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-24  9:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-02-24  9:42 ` jakub at gcc dot gnu.org
@ 2015-02-26 14:52 ` law at gcc dot gnu.org
  2015-02-26 14:55 ` law at redhat dot com
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: law at gcc dot gnu.org @ 2015-02-26 14:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jeffrey A. Law <law at gcc dot gnu.org> ---
Author: law
Date: Thu Feb 26 13:56:39 2015
New Revision: 221007

URL: https://gcc.gnu.org/viewcvs?rev=221007&root=gcc&view=rev
Log:
    PR tree-optimization/65048
    * tree-ssa-threadupdate.c (valid_jump_thread_path): New.
    (thread_through_all_blocks): Call valid_jump_thread_path.
    Remove invalid FSM jump-thread paths.

    PR tree-optimization/65048
    * gcc.dg/tree-ssa/ssa-dom-thread-9.c: New.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-threadupdate.c


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-02-26 14:52 ` law at gcc dot gnu.org
@ 2015-02-26 14:55 ` law at redhat dot com
  2015-02-26 15:03 ` law at redhat dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: law at redhat dot com @ 2015-02-26 14:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jeffrey A. Law <law at redhat dot com> ---
Fixed by Sebastain's change on the trunk.


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-02-26 14:55 ` law at redhat dot com
@ 2015-02-26 15:03 ` law at redhat dot com
  2015-02-27 15:15 ` jakub at gcc dot gnu.org
  2015-10-28  9:01 ` yroux at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: law at redhat dot com @ 2015-02-26 15:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Jeffrey A. Law <law at redhat dot com> ---
Per c#3/c#4.


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-02-26 15:03 ` law at redhat dot com
@ 2015-02-27 15:15 ` jakub at gcc dot gnu.org
  2015-10-28  9:01 ` yroux at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-02-27 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Fri Feb 27 14:34:18 2015
New Revision: 221063

URL: https://gcc.gnu.org/viewcvs?rev=221063&root=gcc&view=rev
Log:
    PR tree-optimization/65048
    * gcc.dg/tree-ssa/ssa-dom-thread-9.c: Add -std=gnu89 to dg-options.
    (foo): Use K&R style definition.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c


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

* [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c
  2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-02-27 15:15 ` jakub at gcc dot gnu.org
@ 2015-10-28  9:01 ` yroux at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: yroux at gcc dot gnu.org @ 2015-10-28  9:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Yvan Roux <yroux at gcc dot gnu.org> ---
Author: yroux
Date: Wed Oct 28 09:00:47 2015
New Revision: 229478

URL: https://gcc.gnu.org/viewcvs?rev=229478&root=gcc&view=rev
Log:
gcc/
2015-10-28 Yvan Roux  <yvan.roux@linaro.org>
           Sebastian Pop  <s.pop@samsung.com>

        Backport from trunk r221007, r221675, r222011.
        2015-04-11  Jakub Jelinek  <jakub@redhat.com>

        PR tree-optimization/65735
        * tree-ssa-threadedge.c (fsm_find_control_statement_thread_paths):
        Remove visited_phis argument, add visited_bbs, avoid recursing into the
        same bb rather than just into the same phi node.
        (thread_through_normal_block): Adjust caller.

        2015-03-25  Sebastian Pop  <s.pop@samsung.com>

        PR tree-optimization/65177
        * tree-ssa-threadupdate.c (verify_seme): Renamed verify_jump_thread.
        (bb_in_bbs): New.
        (duplicate_seme_region): Renamed duplicate_thread_path.  Redirect all
        edges not adjacent on the path to the original code.

        2015-02-26  Sebastian Pop  <s.pop@samsung.com>

        PR tree-optimization/65048
        * tree-ssa-threadupdate.c (valid_jump_thread_path): New.
        (thread_through_all_blocks): Call valid_jump_thread_path.
        Remove invalid FSM jump-thread paths.

gcc/testsuite/
2015-10-28 Yvan Roux  <yvan.roux@linaro.org>
           Sebastian Pop  <s.pop@samsung.com>

        Backport from trunk r221007, r221675, r222011.
        2015-04-11  Jakub Jelinek  <jakub@redhat.com>

        PR tree-optimization/65735
        * gcc.c-torture/compile/pr65735.c: New test.

        2015-03-25  Sebastian Pop  <s.pop@samsung.com>

        PR tree-optimization/65177
        * gcc.dg/tree-ssa/ssa-dom-thread-10.c: New.

        2015-02-26  Sebastian Pop  <s.pop@samsung.com>

        PR tree-optimization/65048
        * gcc.dg/tree-ssa/ssa-dom-thread-9.c: New.


Added:
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/compile/pr65735.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-10.c
   
branches/linaro/gcc-4_9-branch/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-9.c
Modified:
    branches/linaro/gcc-4_9-branch/gcc/ChangeLog.linaro
    branches/linaro/gcc-4_9-branch/gcc/testsuite/ChangeLog.linaro
    branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadedge.c
    branches/linaro/gcc-4_9-branch/gcc/tree-ssa-threadupdate.c


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

end of thread, other threads:[~2015-10-28  9:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-13  0:02 [Bug target/65048] New: [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c on arm-linux-gnueabihf doko at gcc dot gnu.org
2015-02-13  9:17 ` [Bug middle-end/65048] " rguenth at gcc dot gnu.org
2015-02-13 11:57 ` [Bug middle-end/65048] [5 Regression] ICE in add_phi_args_after_copy_edge, at tree-cfg.c jakub at gcc dot gnu.org
2015-02-13 17:56 ` spop at gcc dot gnu.org
2015-02-24  9:42 ` jakub at gcc dot gnu.org
2015-02-26 14:52 ` law at gcc dot gnu.org
2015-02-26 14:55 ` law at redhat dot com
2015-02-26 15:03 ` law at redhat dot com
2015-02-27 15:15 ` jakub at gcc dot gnu.org
2015-10-28  9:01 ` yroux 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).