public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/63284] New: [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable ()
@ 2014-09-17  8:56 jakub at gcc dot gnu.org
  2014-09-17  9:06 ` [Bug debug/63284] " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-17  8:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 63284
           Summary: [4.9/5 Regression] -fcompare-debug issue due to
                    redirection to __builtin_unreachable ()
           Product: gcc
           Version: 4.9.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: jakub at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org

/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */

int a[10], *b, *d, c, f;
int fn2 (void);
void fn3 (void);
void fn4 (int);

static int
fn1 (int x)
{
  int e = a[0];
  if (e)
    return 1;
  if (b)
    switch (x)
      {
      case 1:
        if (d)
          e = fn2 ();
        else
          fn3 ();
        break;
      case 0:
        if (d)
          {
            fn3 ();
            if (c)
              fn4 (1);
          }
        else
          fn4 (0);
      }
  return e;
}

void
fn6 (void)
{
  f = fn1 (0);
}

fails on the 4.9 branch, it happens to succeed on the trunk, but when one looks
at *.optimized dumps differences, there are still undesirable differences in
the order of predecessors of one bb (and thus also PHI argument order).


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

* [Bug debug/63284] [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable ()
  2014-09-17  8:56 [Bug debug/63284] New: [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable () jakub at gcc dot gnu.org
@ 2014-09-17  9:06 ` jakub at gcc dot gnu.org
  2014-09-17  9:07 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-17  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.9.2


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

* [Bug debug/63284] [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable ()
  2014-09-17  8:56 [Bug debug/63284] New: [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable () jakub at gcc dot gnu.org
  2014-09-17  9:06 ` [Bug debug/63284] " jakub at gcc dot gnu.org
@ 2014-09-17  9:07 ` jakub at gcc dot gnu.org
  2014-09-17 19:06 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-17  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 33507
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33507&action=edit
gcc49-pr63284.patch

Untested fix.


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

* [Bug debug/63284] [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable ()
  2014-09-17  8:56 [Bug debug/63284] New: [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable () jakub at gcc dot gnu.org
  2014-09-17  9:06 ` [Bug debug/63284] " jakub at gcc dot gnu.org
  2014-09-17  9:07 ` jakub at gcc dot gnu.org
@ 2014-09-17 19:06 ` jakub at gcc dot gnu.org
  2014-09-17 19:07 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-17 19:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Sep 17 19:05:49 2014
New Revision: 215331

URL: https://gcc.gnu.org/viewcvs?rev=215331&root=gcc&view=rev
Log:
    PR debug/63284
    * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
    if there are only debug stmts after the noreturn call, instead
    remove the debug stmts.

    * gcc.dg/pr63284.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr63284.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-cfgcleanup.c


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

* [Bug debug/63284] [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable ()
  2014-09-17  8:56 [Bug debug/63284] New: [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable () jakub at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-09-17 19:06 ` jakub at gcc dot gnu.org
@ 2014-09-17 19:07 ` jakub at gcc dot gnu.org
  2014-09-17 19:08 ` jakub at gcc dot gnu.org
  2014-09-22 10:26 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-17 19:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Sep 17 19:07:04 2014
New Revision: 215332

URL: https://gcc.gnu.org/viewcvs?rev=215332&root=gcc&view=rev
Log:
    PR debug/63284
    * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
    if there are only debug stmts after the noreturn call, instead
    remove the debug stmts.

    * gcc.dg/pr63284.c: New test.

Added:
    branches/gcc-4_9-branch/gcc/testsuite/gcc.dg/pr63284.c
Modified:
    branches/gcc-4_9-branch/gcc/ChangeLog
    branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_9-branch/gcc/tree-cfgcleanup.c


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

* [Bug debug/63284] [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable ()
  2014-09-17  8:56 [Bug debug/63284] New: [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable () jakub at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-09-17 19:07 ` jakub at gcc dot gnu.org
@ 2014-09-17 19:08 ` jakub at gcc dot gnu.org
  2014-09-22 10:26 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-09-17 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Sep 17 19:08:06 2014
New Revision: 215333

URL: https://gcc.gnu.org/viewcvs?rev=215333&root=gcc&view=rev
Log:
    PR debug/63284
    * tree-cfgcleanup.c (fixup_noreturn_call): Don't split block
    if there are only debug stmts after the noreturn call, instead
    remove the debug stmts.

    * gcc.dg/pr63284.c: New test.

Added:
    branches/gcc-4_8-branch/gcc/testsuite/gcc.dg/pr63284.c
Modified:
    branches/gcc-4_8-branch/gcc/ChangeLog
    branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_8-branch/gcc/tree-cfgcleanup.c


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

* [Bug debug/63284] [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable ()
  2014-09-17  8:56 [Bug debug/63284] New: [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable () jakub at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-09-17 19:08 ` jakub at gcc dot gnu.org
@ 2014-09-22 10:26 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-09-22 10:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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


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

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

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-17  8:56 [Bug debug/63284] New: [4.9/5 Regression] -fcompare-debug issue due to redirection to __builtin_unreachable () jakub at gcc dot gnu.org
2014-09-17  9:06 ` [Bug debug/63284] " jakub at gcc dot gnu.org
2014-09-17  9:07 ` jakub at gcc dot gnu.org
2014-09-17 19:06 ` jakub at gcc dot gnu.org
2014-09-17 19:07 ` jakub at gcc dot gnu.org
2014-09-17 19:08 ` jakub at gcc dot gnu.org
2014-09-22 10:26 ` 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).