public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
@ 2010-11-16 15:45 zsojka at seznam dot cz
  2010-11-16 15:59 ` [Bug tree-optimization/46499] " zsojka at seznam dot cz
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2010-11-16 15:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

           Summary: gcc.c-torture/execute/20051021-1.c FAILs with
                    -fno-tree-dominator-opts -fno-tree-ccp
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Command line:
$ gcc -O -fno-omit-frame-pointer -fno-tree-ccp -fno-tree-dominator-opts
-finline-small-functions 20051021-1.i
$ ./a.out
Segmentation fault

In the assembly output, there seems to be missing end of main():
0000000000400508 <main>:
  400508:       55                      push   %rbp
  400509:       48 89 e5                mov    %rsp,%rbp
  40050c:       83 05 15 0b 20 00 02    addl   $0x2,0x200b15(%rip)        #
601028 <count>
  400513:       90                      nop
.... nop nop nop ...

Tested revisions:
r166763 - fail
4.5 r166509 - fail
4.4 r166509 - OK


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

* [Bug tree-optimization/46499] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
@ 2010-11-16 15:59 ` zsojka at seznam dot cz
  2010-11-16 16:06 ` [Bug tree-optimization/46499] [4.5/4.6 Regression] " rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2010-11-16 15:59 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

--- Comment #1 from Zdenek Sojka <zsojka at seznam dot cz> 2010-11-16 15:45:09 UTC ---
Created attachment 22423
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22423
testcase causing RTL check ICE

While reducing the testcase, I got to this, which crashes with RTL checking:

$ gcc -O -fno-tree-ccp -fno-tree-dominator-opts pr46499.c 
pr46499.c: In function 'main':
pr46499.c:14:1: internal compiler error: RTL check: expected elt 3 type 'B',
have '0' (rtx barrier) in rtl_verify_flow_info_1, at cfgrtl.c:1846
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug tree-optimization/46499] [4.5/4.6 Regression] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
  2010-11-16 15:59 ` [Bug tree-optimization/46499] " zsojka at seznam dot cz
@ 2010-11-16 16:06 ` rguenth at gcc dot gnu.org
  2010-11-22 14:00 ` [Bug middle-end/46499] " jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-16 16:06 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.11.16 16:02:49
   Target Milestone|---                         |4.5.2
            Summary|gcc.c-torture/execute/20051 |[4.5/4.6 Regression]
                   |021-1.c FAILs with          |gcc.c-torture/execute/20051
                   |-fno-tree-dominator-opts    |021-1.c FAILs with
                   |-fno-tree-ccp               |-fno-tree-dominator-opts
                   |                            |-fno-tree-ccp
     Ever Confirmed|0                           |1

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-16 16:02:49 UTC ---
Confirmed.


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

* [Bug middle-end/46499] [4.5/4.6 Regression] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
  2010-11-16 15:59 ` [Bug tree-optimization/46499] " zsojka at seznam dot cz
  2010-11-16 16:06 ` [Bug tree-optimization/46499] [4.5/4.6 Regression] " rguenth at gcc dot gnu.org
@ 2010-11-22 14:00 ` jakub at gcc dot gnu.org
  2010-11-22 14:17 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-22 14:00 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |matz at gcc dot gnu.org
          Component|tree-optimization           |middle-end
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-22 13:54:57 UTC ---
Caused by PR40021 change.


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

* [Bug middle-end/46499] [4.5/4.6 Regression] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-11-22 14:00 ` [Bug middle-end/46499] " jakub at gcc dot gnu.org
@ 2010-11-22 14:17 ` jakub at gcc dot gnu.org
  2010-11-23 15:34 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-22 14:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-22 14:10:16 UTC ---
Created attachment 22483
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22483
gcc46-pr46499.patch

Untested fix.  We have since last:
(jump_insn 8 7 9 (set (pc)
        (label_ref 0)) pr46499-1.c:26 -1
     (nil))

(barrier 9 8 10)

(jump_insn 10 9 11 (set (pc)
        (label_ref 0)) pr46499-1.c:26 -1
     (nil))

(barrier 11 10 0)

and maybe_cleanup_end_of_basic_block, as it sees there is no drop through label
and thus all jumps must go to the other edge, decides to remove the first jump,
but doesn't remove the barrier right after it, and a barrier left in the middle
of a bb after no insn that could cause the barrier of course confuses
everything and is wrong, because we really want to jump to the target label
instead of assuming the spot is never reachable.


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

* [Bug middle-end/46499] [4.5/4.6 Regression] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2010-11-22 14:17 ` jakub at gcc dot gnu.org
@ 2010-11-23 15:34 ` jakub at gcc dot gnu.org
  2010-11-25 16:10 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-23 15:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-23 15:16:52 UTC ---
Author: jakub
Date: Tue Nov 23 15:16:43 2010
New Revision: 167082

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167082
Log:
    PR middle-end/46499
    * cfgexpand.c (maybe_cleanup_end_of_block): Remove also BARRIERs
    following unconditional jumps.

    * gcc.dg/pr46499-1.c: New test.
    * gcc.dg/pr46499-2.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr46499-1.c
    trunk/gcc/testsuite/gcc.dg/pr46499-2.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cfgexpand.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/46499] [4.5/4.6 Regression] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2010-11-23 15:34 ` jakub at gcc dot gnu.org
@ 2010-11-25 16:10 ` rguenth at gcc dot gnu.org
  2010-11-26 22:10 ` [Bug middle-end/46499] [4.5 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-25 16:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
      Known to work|                            |4.6.0
      Known to fail|4.6.0                       |4.5.0


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

* [Bug middle-end/46499] [4.5 Regression] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2010-11-25 16:10 ` rguenth at gcc dot gnu.org
@ 2010-11-26 22:10 ` jakub at gcc dot gnu.org
  2010-12-07 15:23 ` jakub at gcc dot gnu.org
  2010-12-07 15:44 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-11-26 22:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.5/4.6 Regression]        |[4.5 Regression]
                   |gcc.c-torture/execute/20051 |gcc.c-torture/execute/20051
                   |021-1.c FAILs with          |021-1.c FAILs with
                   |-fno-tree-dominator-opts    |-fno-tree-dominator-opts
                   |-fno-tree-ccp               |-fno-tree-ccp

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-11-26 21:46:57 UTC ---
Fixed on the trunk so far.


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

* [Bug middle-end/46499] [4.5 Regression] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2010-11-26 22:10 ` [Bug middle-end/46499] [4.5 " jakub at gcc dot gnu.org
@ 2010-12-07 15:23 ` jakub at gcc dot gnu.org
  2010-12-07 15:44 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-07 15:23 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-07 15:23:23 UTC ---
Author: jakub
Date: Tue Dec  7 15:23:15 2010
New Revision: 167545

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167545
Log:
    Backport from mainline
    2010-11-24  Jakub Jelinek  <jakub@redhat.com>

    PR middle-end/46629
    * cfgexpand.c (maybe_cleanup_end_of_block): Test NEXT_INSN (insn)
    instead of insn with any_condjump_p.

    2010-11-23  Jakub Jelinek  <jakub@redhat.com>

    PR middle-end/46499
    * cfgexpand.c (maybe_cleanup_end_of_block): Remove also BARRIERs
    following unconditional jumps.

    * gcc.dg/pr46499-1.c: New test.
    * gcc.dg/pr46499-2.c: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/pr46499-1.c
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/pr46499-2.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/cfgexpand.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug middle-end/46499] [4.5 Regression] gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp
  2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
                   ` (7 preceding siblings ...)
  2010-12-07 15:23 ` jakub at gcc dot gnu.org
@ 2010-12-07 15:44 ` jakub at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2010-12-07 15:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46499

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

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

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2010-12-07 15:44:22 UTC ---
Fixed.


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

end of thread, other threads:[~2010-12-07 15:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-16 15:45 [Bug tree-optimization/46499] New: gcc.c-torture/execute/20051021-1.c FAILs with -fno-tree-dominator-opts -fno-tree-ccp zsojka at seznam dot cz
2010-11-16 15:59 ` [Bug tree-optimization/46499] " zsojka at seznam dot cz
2010-11-16 16:06 ` [Bug tree-optimization/46499] [4.5/4.6 Regression] " rguenth at gcc dot gnu.org
2010-11-22 14:00 ` [Bug middle-end/46499] " jakub at gcc dot gnu.org
2010-11-22 14:17 ` jakub at gcc dot gnu.org
2010-11-23 15:34 ` jakub at gcc dot gnu.org
2010-11-25 16:10 ` rguenth at gcc dot gnu.org
2010-11-26 22:10 ` [Bug middle-end/46499] [4.5 " jakub at gcc dot gnu.org
2010-12-07 15:23 ` jakub at gcc dot gnu.org
2010-12-07 15:44 ` jakub 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).