public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/44777] [4.3/4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
@ 2011-06-27 14:32 ` rguenth at gcc dot gnu.org
  2012-01-04 14:28 ` [Bug middle-end/44777] [4.4/4.5/4.6/4.7 " jakub at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-06-27 14:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.3.6                       |4.4.7

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-27 12:14:03 UTC ---
4.3 branch is being closed, moving to 4.4.7 target.


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

* [Bug middle-end/44777] [4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
  2011-06-27 14:32 ` [Bug middle-end/44777] [4.3/4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c rguenth at gcc dot gnu.org
@ 2012-01-04 14:28 ` jakub at gcc dot gnu.org
  2012-01-04 14:58 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-04 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|gcc-bugs at gcc dot gnu.org |hubicka at gcc dot gnu.org,
                   |                            |jakub at gcc dot gnu.org

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-04 14:27:21 UTC ---
In y we instrument edges 2->5 (count 1001), 3->4 (count 0), 5->6 (count 1) and
7->8 (count 0).  bb 4 has the goto *x; which is never executed (a is never -1),
bb 6 ends in the non-local goto, bb 7 contains the recursive call to y and bb 8
contains the return from y (which is even never reached, as the innermost y
call performs a non-local goto to the caller).
I think the problem is that the fake edge from bb 7 to exit (the one added
because the call is not const/pure/noreturn and thus might not return at all or
might return e.g. through throwing exception or (in this case doing nonlocal
goto) is not added to the spanning tree, because there is already fake edge
from entry to the same block 7 (as bb 7 is also a destination of the abnormal
edge, computed goto).
Don't we need for bbs that have both entry and exit fake edges split those bbs
before find_spanning_tree (or in it), so that instrumentation can be added into
the middle of that basic block?


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

* [Bug middle-end/44777] [4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
  2011-06-27 14:32 ` [Bug middle-end/44777] [4.3/4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c rguenth at gcc dot gnu.org
  2012-01-04 14:28 ` [Bug middle-end/44777] [4.4/4.5/4.6/4.7 " jakub at gcc dot gnu.org
@ 2012-01-04 14:58 ` jakub at gcc dot gnu.org
  2012-01-04 19:42 ` jakub at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-04 14:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-04 14:57:58 UTC ---
Created attachment 26239
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26239
gcc47-pr44777.patch

Untested fix.


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

* [Bug middle-end/44777] [4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-01-04 14:58 ` jakub at gcc dot gnu.org
@ 2012-01-04 19:42 ` jakub at gcc dot gnu.org
  2012-01-05 19:34 ` hubicka at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-04 19:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #26239|0                           |1
        is obsolete|                            |

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-04 19:41:17 UTC ---
Created attachment 26242
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26242
gcc47-pr44777.patch

Unfortunately that patch regressed tree-prof/pr34999.c on i?86.  The bb's of
__builtin_setjmp_receiver (and __builtin_setjmp_dispatcher) contain abnormal
incoming and outgoing edges, therefore with the patch we want to split them,
which apparently is nothing the __builtin_setjmp_* expansion is prepared for.
In particular the code was first "optimized" so that the 64-bit counters are in
some places shadowed in local stack slots, but accessing those slots using %ebp
before the blockage from __builtin_setjmp_receiver means %ebp contains some bad
value rather than the correct one that __builtin_setjmp_receiver computes.
So, either we don't split bbs starting with these two builtins as done in this
new version of the patch, or perhaps we should just ignore some of the edges
between the 3 __builtin_setjmp_* builtins altogether for profiling purposes.


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

* [Bug middle-end/44777] [4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2012-01-04 19:42 ` jakub at gcc dot gnu.org
@ 2012-01-05 19:34 ` hubicka at gcc dot gnu.org
  2012-01-05 19:54 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: hubicka at gcc dot gnu.org @ 2012-01-05 19:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Jan Hubicka <hubicka at gcc dot gnu.org> 2012-01-05 19:34:08 UTC ---
OK, so the problem is separating the actual two builtins, not that profiling
would choke on the multiple returns now?
In that case I think the patch is OK (otherwise I would be concerned about
fork, that also returns twice, like setjmp receivers do).

Thanks a lot for looking into that!
Honza


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

* [Bug middle-end/44777] [4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2012-01-05 19:34 ` hubicka at gcc dot gnu.org
@ 2012-01-05 19:54 ` jakub at gcc dot gnu.org
  2012-01-05 20:11 ` [Bug middle-end/44777] [4.4/4.5/4.6 " jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-05 19:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-05 19:54:21 UTC ---
Author: jakub
Date: Thu Jan  5 19:54:16 2012
New Revision: 182920

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182920
Log:
    PR middle-end/44777
    * profile.c (branch_prob): Split bbs that have exit edge
    and need a fake entry edge too.

    * gcc.dg/tree-prof/pr44777.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-prof/pr44777.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/profile.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/44777] [4.4/4.5/4.6 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2012-01-05 19:54 ` jakub at gcc dot gnu.org
@ 2012-01-05 20:11 ` jakub at gcc dot gnu.org
  2012-02-09 17:21 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-01-05 20:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.4/4.5/4.6/4.7            |[4.4/4.5/4.6 Regression]
                   |Regression] ICE: SIGSEGV    |ICE: SIGSEGV with
                   |with -fprofile-use in       |-fprofile-use in
                   |gcc.c-torture/execute/comp- |gcc.c-torture/execute/comp-
                   |goto-2.c                    |goto-2.c

--- Comment #11 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-01-05 20:10:09 UTC ---
(In reply to comment #9)
> OK, so the problem is separating the actual two builtins, not that profiling
> would choke on the multiple returns now?

Yes, profiling code was fine, it was the expansion of the two setjmp halves
that was upset by anything unexpected in between the two.

Thus, committed, thanks.


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

* [Bug middle-end/44777] [4.4/4.5/4.6 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2012-01-05 20:11 ` [Bug middle-end/44777] [4.4/4.5/4.6 " jakub at gcc dot gnu.org
@ 2012-02-09 17:21 ` jakub at gcc dot gnu.org
  2012-02-09 21:35 ` [Bug middle-end/44777] [4.4/4.5 " jakub at gcc dot gnu.org
  2012-03-13 16:48 ` [Bug middle-end/44777] [4.4 " jakub at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-09 17:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-09 17:20:31 UTC ---
Author: jakub
Date: Thu Feb  9 17:20:09 2012
New Revision: 184053

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184053
Log:
    Backported from mainline
    2012-01-05  Jakub Jelinek  <jakub@redhat.com>

    PR middle-end/44777
    * profile.c (branch_prob): Split bbs that have exit edge
    and need a fake entry edge too.

    * gcc.dg/tree-prof/pr44777.c: New test.

Added:
    branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/tree-prof/pr44777.c
Modified:
    branches/gcc-4_6-branch/gcc/ChangeLog
    branches/gcc-4_6-branch/gcc/profile.c
    branches/gcc-4_6-branch/gcc/testsuite/ChangeLog


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

* [Bug middle-end/44777] [4.4/4.5 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2012-02-09 17:21 ` jakub at gcc dot gnu.org
@ 2012-02-09 21:35 ` jakub at gcc dot gnu.org
  2012-03-13 16:48 ` [Bug middle-end/44777] [4.4 " jakub at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-02-09 21:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-09 21:34:25 UTC ---
Author: jakub
Date: Thu Feb  9 21:34:21 2012
New Revision: 184070

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184070
Log:
    Backported from mainline
    2012-01-05  Jakub Jelinek  <jakub@redhat.com>

    PR middle-end/44777
    * profile.c (branch_prob): Split bbs that have exit edge
    and need a fake entry edge too.

    * gcc.dg/tree-prof/pr44777.c: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/tree-prof/pr44777.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/profile.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug middle-end/44777] [4.4 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c
       [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2012-02-09 21:35 ` [Bug middle-end/44777] [4.4/4.5 " jakub at gcc dot gnu.org
@ 2012-03-13 16:48 ` jakub at gcc dot gnu.org
  9 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2012-03-13 16:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|4.4.7                       |4.5.4

--- Comment #14 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-03-13 13:20:09 UTC ---
Fixed in 4.5+, 4.4 is no longer supported.


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

end of thread, other threads:[~2012-03-13 16:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-44777-4@http.gcc.gnu.org/bugzilla/>
2011-06-27 14:32 ` [Bug middle-end/44777] [4.3/4.4/4.5/4.6/4.7 Regression] ICE: SIGSEGV with -fprofile-use in gcc.c-torture/execute/comp-goto-2.c rguenth at gcc dot gnu.org
2012-01-04 14:28 ` [Bug middle-end/44777] [4.4/4.5/4.6/4.7 " jakub at gcc dot gnu.org
2012-01-04 14:58 ` jakub at gcc dot gnu.org
2012-01-04 19:42 ` jakub at gcc dot gnu.org
2012-01-05 19:34 ` hubicka at gcc dot gnu.org
2012-01-05 19:54 ` jakub at gcc dot gnu.org
2012-01-05 20:11 ` [Bug middle-end/44777] [4.4/4.5/4.6 " jakub at gcc dot gnu.org
2012-02-09 17:21 ` jakub at gcc dot gnu.org
2012-02-09 21:35 ` [Bug middle-end/44777] [4.4/4.5 " jakub at gcc dot gnu.org
2012-03-13 16:48 ` [Bug middle-end/44777] [4.4 " 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).