public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/57661] New: [4.9 Regression] ICE: SIGSEGV in verify_ssa
@ 2013-06-20 13:37 zsojka at seznam dot cz
  2013-06-24 11:09 ` [Bug middle-end/57661] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2013-06-20 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 57661
           Summary: [4.9 Regression] ICE: SIGSEGV in verify_ssa
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 30326
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30326&action=edit
partially reduced testcase

Compiler output:
$ gcc -O2 -fno-tree-forwprop -std=gnu++0x testcase.C
testcase.C: In destructor '_Rope_RopeFunction<_CharT,
_Alloc>::~_Rope_RopeFunction() [with _CharT = char; _Alloc = allocator<char>]':
testcase.C:54:5: internal compiler error: Segmentation fault
     ~_Rope_RopeFunction () throw ()
     ^
0xbe9c8f crash_signal
        /mnt/svn/gcc-trunk/gcc/toplev.c:333
0xd6b5f0 verify_ssa(bool)
        /mnt/svn/gcc-trunk/gcc/tree-ssa.c:938
0xafc281 execute_function_todo
        /mnt/svn/gcc-trunk/gcc/passes.c:1970
0xafcbe7 execute_todo
        /mnt/svn/gcc-trunk/gcc/passes.c:2002
0xafe8e1 execute_one_ipa_transform_pass
        /mnt/svn/gcc-trunk/gcc/passes.c:2185
0xafe8e1 execute_all_ipa_transforms()
        /mnt/svn/gcc-trunk/gcc/passes.c:2215
0x874a38 expand_function
        /mnt/svn/gcc-trunk/gcc/cgraphunit.c:1584
0x8766f6 expand_all_functions
        /mnt/svn/gcc-trunk/gcc/cgraphunit.c:1695
0x8766f6 compile()
        /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2029
0x876cc9 finalize_compilation_unit()
        /mnt/svn/gcc-trunk/gcc/cgraphunit.c:2106
0x685d60 cp_write_global_declarations()
        /mnt/svn/gcc-trunk/gcc/cp/decl2.c:4356
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


$ gcc -v                                            
Using built-in specs.
COLLECT_GCC=/mnt/svn/gcc-trunk/binary-latest/bin/gcc
COLLECT_LTO_WRAPPER=/mnt/svn/gcc-trunk/binary-200224-lto-fortran-checking-yes-rtl-df/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /mnt/svn/gcc-trunk//configure --enable-checking=yes,rtl,df
--enable-languages=c,c++,lto,fortran
--prefix=/mnt/svn/gcc-trunk/binary-200224-lto-fortran-checking-yes-rtl-df/
--without-cloog --without-ppl
Thread model: posix
gcc version 4.9.0 20130619 (experimental) (GCC) 

Tested revisions:
r200224 - crash
4.8 r198018 - OK


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

* [Bug middle-end/57661] [4.9 Regression] ICE: SIGSEGV in verify_ssa
  2013-06-20 13:37 [Bug middle-end/57661] New: [4.9 Regression] ICE: SIGSEGV in verify_ssa zsojka at seznam dot cz
@ 2013-06-24 11:09 ` rguenth at gcc dot gnu.org
  2013-07-12  1:50 ` mpolacek at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-06-24 11:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2013-06-24
   Target Milestone|---                         |4.9.0
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed, we are missing the SSA_NAME_DEF_STMT for _18.


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

* [Bug middle-end/57661] [4.9 Regression] ICE: SIGSEGV in verify_ssa
  2013-06-20 13:37 [Bug middle-end/57661] New: [4.9 Regression] ICE: SIGSEGV in verify_ssa zsojka at seznam dot cz
  2013-06-24 11:09 ` [Bug middle-end/57661] " rguenth at gcc dot gnu.org
@ 2013-07-12  1:50 ` mpolacek at gcc dot gnu.org
  2013-07-22 22:03 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2013-07-12  1:50 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Probably something in the inliner; -fno-inline prevents the ICE.


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

* [Bug middle-end/57661] [4.9 Regression] ICE: SIGSEGV in verify_ssa
  2013-06-20 13:37 [Bug middle-end/57661] New: [4.9 Regression] ICE: SIGSEGV in verify_ssa zsojka at seznam dot cz
  2013-06-24 11:09 ` [Bug middle-end/57661] " rguenth at gcc dot gnu.org
  2013-07-12  1:50 ` mpolacek at gcc dot gnu.org
@ 2013-07-22 22:03 ` jakub at gcc dot gnu.org
  2013-07-22 22:36 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-07-22 22:03 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, ipa-split.c together with MEM_REF gimple_clobber_p and anonymous SSA_NAME
cause this.
ipa-split intentionally ignores clobber stmts during analysis, because they
aren't real stmts, worst case we just ignore them and/or throw them away.
If a clobber has a decl on lhs, then the decl is always present and not a
problem.  If it is a MEM_REF clobber with non-anonymous SSA_NAME, it is also
just fine, ipa-split will during the cloning of the fn to *.part.* turn those
SSA_NAMEs into SSA_NAME_IS_DEFAULT_DEF ones, and then tree-ssa-live will throw
such clobbers away as useless.  But anonymous SSA_NAMEs aren't meant to be ever
SSA_NAME_IS_DEFAULT_DEF, which causes this problem.

Perhaps ipa-split should just fix such SSA_NAMEs up (look up what anonymous
SSA_NAMEs have no SSA_NAME_DEFAULT_STMT and remove all clobbers that depend on
those and remove those SSA_NAMEs?


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

* [Bug middle-end/57661] [4.9 Regression] ICE: SIGSEGV in verify_ssa
  2013-06-20 13:37 [Bug middle-end/57661] New: [4.9 Regression] ICE: SIGSEGV in verify_ssa zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2013-07-22 22:03 ` jakub at gcc dot gnu.org
@ 2013-07-22 22:36 ` jakub at gcc dot gnu.org
  2013-07-22 23:50 ` jakub at gcc dot gnu.org
  2013-08-13 19:58 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-07-22 22:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Perhaps if copy_cfg_body saved a pointer to the blocks_to_copy bitmap
temporarily into a new field in *id, the copying of clobber stmts could check
if for MEM_REF clobbers the SSA_NAME mentioned there has a definition in a
block not listed in blocks_to_copy and in that case instead of copying over the
clobber stmt just throw it on the floor.


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

* [Bug middle-end/57661] [4.9 Regression] ICE: SIGSEGV in verify_ssa
  2013-06-20 13:37 [Bug middle-end/57661] New: [4.9 Regression] ICE: SIGSEGV in verify_ssa zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2013-07-22 22:36 ` jakub at gcc dot gnu.org
@ 2013-07-22 23:50 ` jakub at gcc dot gnu.org
  2013-08-13 19:58 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-07-22 23:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 30537
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30537&action=edit
gcc49-pr57661.patch

Untested fix.


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

* [Bug middle-end/57661] [4.9 Regression] ICE: SIGSEGV in verify_ssa
  2013-06-20 13:37 [Bug middle-end/57661] New: [4.9 Regression] ICE: SIGSEGV in verify_ssa zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2013-07-22 23:50 ` jakub at gcc dot gnu.org
@ 2013-08-13 19:58 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2013-08-13 19:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Tue Aug 13 17:06:13 2013
New Revision: 201698

URL: http://gcc.gnu.org/viewcvs?rev=201698&root=gcc&view=rev
Log:
    PR tree-optimization/57661
    * tree-inline.h (struct copy_body_data): Add blocks_to_copy field.
    * tree-inline.c (tree_function_versioning): Initialize it.
    (remap_gimple_stmt): Return GIMPLE_NOP for MEM_REF lhs clobber stmts
    if id->blocks_to_copy and MEM_REF's SSA_NAME is defined in a block
    that is not being copied.

    * g++.dg/opt/pr57661.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/opt/pr57661.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-inline.c
    trunk/gcc/tree-inline.h


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

end of thread, other threads:[~2013-08-13 19:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-20 13:37 [Bug middle-end/57661] New: [4.9 Regression] ICE: SIGSEGV in verify_ssa zsojka at seznam dot cz
2013-06-24 11:09 ` [Bug middle-end/57661] " rguenth at gcc dot gnu.org
2013-07-12  1:50 ` mpolacek at gcc dot gnu.org
2013-07-22 22:03 ` jakub at gcc dot gnu.org
2013-07-22 22:36 ` jakub at gcc dot gnu.org
2013-07-22 23:50 ` jakub at gcc dot gnu.org
2013-08-13 19:58 ` 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).