public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/44964]  New: [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
@ 2010-07-16 13:36 zsojka at seznam dot cz
  2010-07-16 13:37 ` [Bug tree-optimization/44964] " zsojka at seznam dot cz
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-16 13:36 UTC (permalink / raw)
  To: gcc-bugs

Command line:
$ gcc -fkeep-inline-functions -O[123s] testcase.c

Valgrind output:
$ valgrind -q --trace-children=yes
/mnt/svn/gcc-trunk/binary-162056-lto-fortran-checking-yes-rtl-df/bin/gcc
-fkeep-inline-functions -O1 testcase.c
==20756== Invalid read of size 8
==20756==    at 0x8CD66D: gimple_default_def (tree-dfa.c:539)
==20756==    by 0xADB938: setup_one_parameter (tree-inline.c:2527)
==20756==    by 0xAE140D: optimize_inline_calls (tree-inline.c:2690)
==20756==    by 0xAB9129: cgraph_early_inlining (ipa-inline.c:1783)
==20756==    by 0x7B813D: execute_one_pass (passes.c:1565)
==20756==    by 0x7B83D4: execute_pass_list (passes.c:1620)
==20756==    by 0x7B763B: do_per_function_toporder (passes.c:1158)
==20756==    by 0x7B87F5: execute_ipa_pass_list (passes.c:1920)
==20756==    by 0xAB0350: cgraph_optimize (cgraphunit.c:1851)
==20756==    by 0xAB05AA: cgraph_finalize_compilation_unit (cgraphunit.c:1171)
==20756==    by 0x4DF2D2: c_write_global_declarations (c-decl.c:9698)
==20756==    by 0x8A41E5: toplev_main (toplev.c:997)
==20756==  Address 0x40 is not stack'd, malloc'd or (recently) free'd
==20756== 
testcase.c: In function 'bar':
testcase.c:11:7: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

Tested revisions:
r162056 - crash
r159696 - crash
r158969 - crash
r158095 - OK
4.5 r160526 - OK


-- 
           Summary: [4.6 Regression] ICE: SIGSEGV in gimple_default_def
                    (tree-dfa.c:539) with -fkeep-inline-functions
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zsojka at seznam dot cz
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


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


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
  2010-07-16 13:36 [Bug tree-optimization/44964] New: [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions zsojka at seznam dot cz
@ 2010-07-16 13:37 ` zsojka at seznam dot cz
  2010-07-16 15:31 ` hjl dot tools at gmail dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-16 13:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from zsojka at seznam dot cz  2010-07-16 13:37 -------
Created an attachment (id=21222)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21222&action=view)
reduced testcase (from ffmpeg sources)

Command line:
$ gcc -fkeep-inline-functions -O1 pr44964.c


-- 


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


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
  2010-07-16 13:36 [Bug tree-optimization/44964] New: [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions zsojka at seznam dot cz
  2010-07-16 13:37 ` [Bug tree-optimization/44964] " zsojka at seznam dot cz
@ 2010-07-16 15:31 ` hjl dot tools at gmail dot com
  2010-07-23 12:50 ` rguenth at gcc dot gnu dot org
  2010-09-02 10:54 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-16 15:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl dot tools at gmail dot com  2010-07-16 15:31 -------
It is caused by revision 158477:

http://gcc.gnu.org/ml/gcc-cvs/2010-04/msg00583.html


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hubicka at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-07-16 15:31:35
               date|                            |
   Target Milestone|---                         |4.6.0


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


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
  2010-07-16 13:36 [Bug tree-optimization/44964] New: [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions zsojka at seznam dot cz
  2010-07-16 13:37 ` [Bug tree-optimization/44964] " zsojka at seznam dot cz
  2010-07-16 15:31 ` hjl dot tools at gmail dot com
@ 2010-07-23 12:50 ` rguenth at gcc dot gnu dot org
  2010-09-02 10:54 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-23 12:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from rguenth at gcc dot gnu dot org  2010-07-23 12:50 -------
Program received signal SIGSEGV, Segmentation fault.
0x0000000000a293b1 in gimple_default_def (fn=0x7ffff7ee1480, 
    var=0x7ffff7edb880) at /space/rguenther/src/svn/trunk/gcc/tree-dfa.c:538
538       return (tree) htab_find_with_hash (DEFAULT_DEFS (fn), &in, DECL_UID
(var));
(gdb) p fn->gimple_df 
$2 = (struct gimple_df *) 0x0

obviously that function (baz) is not in SSA form.  Still we want to inline
it.  Huh.  node->analyzed is true for it.  Huhuh.


-- 


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


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
  2010-07-16 13:36 [Bug tree-optimization/44964] New: [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2010-07-23 12:50 ` rguenth at gcc dot gnu dot org
@ 2010-09-02 10:54 ` rguenth at gcc dot gnu dot org
  3 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-09-02 10:54 UTC (permalink / raw)
  To: gcc-bugs



-- 

rguenth at gcc dot gnu dot org changed:

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


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


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
       [not found] <bug-44964-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2010-11-10 16:05 ` rguenth at gcc dot gnu.org
@ 2010-11-10 16:05 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-10 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #8 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-10 16:05:32 UTC ---
Fixed.


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
       [not found] <bug-44964-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2010-11-10 14:06 ` rguenth at gcc dot gnu.org
@ 2010-11-10 16:05 ` rguenth at gcc dot gnu.org
  2010-11-10 16:05 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-10 16:05 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-10 16:05:08 UTC ---
Author: rguenth
Date: Wed Nov 10 16:05:03 2010
New Revision: 166543

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166543
Log:
2010-11-10  Richard Guenther  <rguenther@suse.de>

    PR tree-optimization/44964
    * ipa-inline.c (cgraph_flatten): Check that SSA form matches.

    * gcc.dg/pr44964.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/pr44964.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-inline.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
       [not found] <bug-44964-4@http.gcc.gnu.org/bugzilla/>
  2010-11-03 15:57 ` rguenth at gcc dot gnu.org
  2010-11-10 13:53 ` rguenth at gcc dot gnu.org
@ 2010-11-10 14:06 ` rguenth at gcc dot gnu.org
  2010-11-10 16:05 ` rguenth at gcc dot gnu.org
  2010-11-10 16:05 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-10 14:06 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-10 14:06:04 UTC ---
It is caused by breaking edges to callees for always-inline functions when
topologically sorting the cgraph.  And cgraph_flatten misses a check
for matching SSA form like other inliners have.

I have a patch.


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
       [not found] <bug-44964-4@http.gcc.gnu.org/bugzilla/>
  2010-11-03 15:57 ` rguenth at gcc dot gnu.org
@ 2010-11-10 13:53 ` rguenth at gcc dot gnu.org
  2010-11-10 14:06 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-10 13:53 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-10 13:53:11 UTC ---
Looking at it.


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

* [Bug tree-optimization/44964] [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions
       [not found] <bug-44964-4@http.gcc.gnu.org/bugzilla/>
@ 2010-11-03 15:57 ` rguenth at gcc dot gnu.org
  2010-11-10 13:53 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2010-11-03 15:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2010-07-16 15:31:35         |2010-11-03 15:31:35

--- Comment #4 from Richard Guenther <rguenth at gcc dot gnu.org> 2010-11-03 15:57:21 UTC ---
Reconfirmed.


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

end of thread, other threads:[~2010-11-10 16:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-16 13:36 [Bug tree-optimization/44964] New: [4.6 Regression] ICE: SIGSEGV in gimple_default_def (tree-dfa.c:539) with -fkeep-inline-functions zsojka at seznam dot cz
2010-07-16 13:37 ` [Bug tree-optimization/44964] " zsojka at seznam dot cz
2010-07-16 15:31 ` hjl dot tools at gmail dot com
2010-07-23 12:50 ` rguenth at gcc dot gnu dot org
2010-09-02 10:54 ` rguenth at gcc dot gnu dot org
     [not found] <bug-44964-4@http.gcc.gnu.org/bugzilla/>
2010-11-03 15:57 ` rguenth at gcc dot gnu.org
2010-11-10 13:53 ` rguenth at gcc dot gnu.org
2010-11-10 14:06 ` rguenth at gcc dot gnu.org
2010-11-10 16:05 ` rguenth at gcc dot gnu.org
2010-11-10 16:05 ` 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).