public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
@ 2013-11-23 17:57 marxin.liska at gmail dot com
  2013-11-25  9:19 ` [Bug ipa/59265] [4.9 Regression] " rguenth at gcc dot gnu.org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: marxin.liska at gmail dot com @ 2013-11-23 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59265
           Summary: Segmentation fault in ipa_note_param_call for
                    -fprofile-use in SPEC CPU2006
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin.liska at gmail dot com

Created attachment 31284
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31284&action=edit
Dump

Test: 447.dealIII

Command line:
home/marxin/gcc-mirror/bin/g++ -c -o mapping_q.o -DSPEC_CPU -DNDEBUG  -Iinclude
-DBOOST_DISABLE_THREADS -Ddeal_II_dimension=3  -fno-strict-aliasing
-fpeel-loops -ffast-math -march=native -O2 -fprofile-use=/tmp/spec2006  
-DSPEC_CPU_LP64       mapping_q.cc -fdump-ipa-all
In file included from mapping_q.cc:23:0:
include/grid/tria_boundary.h: In member function 'unsigned int
MappingQ<dim>::InternalData::memory_consumption() const [with int dim = 3]':
include/grid/tria_boundary.h:280:7: internal compiler error: Segmentation fault
 class StraightBoundary : public Boundary<dim>
       ^
0x93e9ff crash_signal
    ../../gcc/toplev.c:336
0x80097f ipa_note_param_call
    ../../gcc/ipa-prop.c:1753
0x80afae ipa_analyze_virtual_call_uses
    ../../gcc/ipa-prop.c:2007
0x80afae ipa_analyze_call_uses
    ../../gcc/ipa-prop.c:2031
0x80afae ipa_analyze_stmt_uses
    ../../gcc/ipa-prop.c:2045
0x80afae ipa_analyze_params_uses
    ../../gcc/ipa-prop.c:2144
0x80afae ipa_analyze_node(cgraph_node*)
    ../../gcc/ipa-prop.c:2195
0xd7a4d7 ipcp_generate_summary
    ../../gcc/ipa-cp.c:3616
0x89ffbd execute_ipa_summary_passes(ipa_opt_pass_d*)
    ../../gcc/passes.c:2013
0x6db1ed ipa_passes
    ../../gcc/cgraphunit.c:2022
0x6db1ed compile()
    ../../gcc/cgraphunit.c:2126
0x6db304 finalize_compilation_unit()
    ../../gcc/cgraphunit.c:2280
0x58bdd6 cp_write_global_declarations()

gcc version: trunk@205309

uname -a
Linux marxinbox 3.7.4-gentoo #6 SMP Mon Sep 30 20:53:52 CEST 2013 x86_64 AMD
FX(tm)-8350 Eight-Core Processor AuthenticAMD GNU/Linux

I attached dumps.

Martin


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
@ 2013-11-25  9:19 ` rguenth at gcc dot gnu.org
  2013-12-14 13:39 ` octoploid at yandex dot com
                   ` (21 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-25  9:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
                 CC|                            |hubicka at gcc dot gnu.org
          Component|c++                         |ipa
   Target Milestone|---                         |4.9.0
            Summary|Segmentation fault in       |[4.9 Regression]
                   |ipa_note_param_call for     |Segmentation fault in
                   |-fprofile-use in SPEC       |ipa_note_param_call for
                   |CPU2006                     |-fprofile-use in SPEC
                   |                            |CPU2006


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
  2013-11-25  9:19 ` [Bug ipa/59265] [4.9 Regression] " rguenth at gcc dot gnu.org
@ 2013-12-14 13:39 ` octoploid at yandex dot com
  2013-12-14 20:35 ` octoploid at yandex dot com
                   ` (20 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: octoploid at yandex dot com @ 2013-12-14 13:39 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <octoploid at yandex dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |octoploid at yandex dot com

--- Comment #1 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Created attachment 31440
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31440&action=edit
testcase with gcda

Also happens during Firefox PGO build:

markus@x4 src % c++ -w -c -fprofile-use -fprofile-correction -std=gnu++0x -O2
Unified_cpp_3.ii
In file included from /var/tmp/moz-build-dir/js/src/Unified_cpp_3.cpp:137:0:
/var/tmp/mozilla-central/js/src/jit/MCallOptimize.cpp: In member function
‘virtual void js::jit::LPhi::printInfo(FILE*)’:
/var/tmp/mozilla-central/js/src/jit/MCallOptimize.cpp:1484:1: internal compiler
error: Segmentation fault
>From gcc-bugs-return-437578-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Dec 14 15:00:11 2013
Return-Path: <gcc-bugs-return-437578-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 19001 invoked by alias); 14 Dec 2013 15:00:10 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 18950 invoked by uid 48); 14 Dec 2013 15:00:06 -0000
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/59502] [OOP] ICE on invalid on pointer assignment to non-pointer CLASS
Date: Sat, 14 Dec 2013 15:00:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: janus at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: janus at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-59502-4-PPVjYFXm3L@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59502-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59502-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-12/txt/msg01233.txt.bz2
Content-length: 189

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY502

--- Comment #2 from janus at gcc dot gnu.org ---
(In reply to janus from comment #1)
> Patch:

Regtests cleanly. Will commit as obvious.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
  2013-11-25  9:19 ` [Bug ipa/59265] [4.9 Regression] " rguenth at gcc dot gnu.org
  2013-12-14 13:39 ` octoploid at yandex dot com
@ 2013-12-14 20:35 ` octoploid at yandex dot com
  2013-12-15 16:00 ` hubicka at gcc dot gnu.org
                   ` (19 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: octoploid at yandex dot com @ 2013-12-14 20:35 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 6576 bytes --]

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

--- Comment #2 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Here's a reduced testcase that works without any gcda file:

markus@x4 testcase % < test.ii
class A {
  int m_fn1() const;
  unsigned m_fn2() const;
};
class B {
public:
  virtual void m_fn1();
};
class C final : B {
  C();
  virtual void m_fn2() { m_fn1(); }
};
int a;
unsigned A::m_fn2() const {
  if (m_fn1())
    return 0;
  a = m_fn2();
}
C::C() {}

markus@x4 testcase % c++ -c -fprofile-use -O2 -std=c++11 test.ii
test.ii: In member function ‘virtual void C::m_fn2()’:
test.ii:19:9: internal compiler error: Segmentation fault
 C::C() {}
>From gcc-bugs-return-437602-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Sat Dec 14 21:24:35 2013
Return-Path: <gcc-bugs-return-437602-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 25859 invoked by alias); 14 Dec 2013 21:24:35 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 25832 invoked by uid 48); 14 Dec 2013 21:24:32 -0000
From: "zsojka at seznam dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug debug/59510] New: [4.9 Regression] ICE: in vt_expand_var_loc_chain, at var-tracking.c:8212 with -O2 -g --param=large-stack-frame-growth=1
Date: Sat, 14 Dec 2013 21:24:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: debug
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: zsojka at seznam dot cz
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter attachments.created
Message-ID: <bug-59510-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-12/txt/msg01257.txt.bz2
Content-length: 4019

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY510

            Bug ID: 59510
           Summary: [4.9 Regression] ICE: in vt_expand_var_loc_chain, at
                    var-tracking.c:8212 with -O2 -g
                    --param=large-stack-frame-growth=1
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz

Created attachment 31441
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id1441&actioníit
autoreduced testcase

Compiler output:
$ gcc -O2 -g --param=large-stack-frame-growth=1 testcase.C
/home/smatz/build-205784-lto-fortran-checking-yes-rtl-df/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/stl_iterator_base_types.h:
In function '_OI {anonymous}::copy(_II, _II, _OI) [with _II = char*; _OI {anonymous}::ostreambuf_iterator<char>]':
/home/smatz/build-205784-lto-fortran-checking-yes-rtl-df/x86_64-unknown-linux-gnu/libstdc++-v3/include/bits/stl_iterator_base_types.h:200:3:
internal compiler error: in vt_expand_var_loc_chain, at var-tracking.c:8212
0xf35d6c vt_expand_var_loc_chain
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8212
0xf35d6c vt_expand_loc_callback
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8408
0x933fd1 cselib_expand_value_rtx_1
        /mnt/svn/gcc-trunk/gcc/cselib.c:1684
0x934f0e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        /mnt/svn/gcc-trunk/gcc/cselib.c:1531
0xf3500c vt_expand_loc_callback
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8344
0x9340ca cselib_expand_value_rtx_1
        /mnt/svn/gcc-trunk/gcc/cselib.c:1649
0x934f0e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        /mnt/svn/gcc-trunk/gcc/cselib.c:1531
0xf35468 vt_expand_var_loc_chain
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8246
0xf35468 vt_expand_loc_callback
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8408
0x933fd1 cselib_expand_value_rtx_1
        /mnt/svn/gcc-trunk/gcc/cselib.c:1684
0x934f0e cselib_expand_value_rtx_cb(rtx_def*, bitmap_head*, int, rtx_def*
(*)(rtx_def*, bitmap_head*, int, void*), void*)
        /mnt/svn/gcc-trunk/gcc/cselib.c:1531
0xf29b73 vt_expand_var_loc_chain
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8246
0xf29b73 vt_expand_1pvar
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8521
0xf29b73 emit_note_insn_var_location(variable_def**, emit_note_data_def*)
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8575
0xf3925b traverse_noresize<emit_note_data_def*, emit_note_insn_var_location>
        /mnt/svn/gcc-trunk/gcc/hash-table.h:928
0xf3925b traverse<emit_note_data_def*, emit_note_insn_var_location>
        /mnt/svn/gcc-trunk/gcc/hash-table.h:950
0xf3925b emit_notes_for_changes
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:8937
0xf39f01 emit_notes_in_bb
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:9382
0xf39f01 vt_emit_notes
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:9431
0xf3b026 variable_tracking_main_1
        /mnt/svn/gcc-trunk/gcc/var-tracking.c:10292
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-205985-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-205985-lto-fortran-checking-yes-rtl-df/
--without-cloog --without-ppl
Thread model: posix
gcc version 4.9.0 20131214 (experimental) (GCC)

Tested revisions:
r205985 - crash
4.8 r204890 - OK


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (2 preceding siblings ...)
  2013-12-14 20:35 ` octoploid at yandex dot com
@ 2013-12-15 16:00 ` hubicka at gcc dot gnu.org
  2013-12-15 16:32 ` hubicka at gcc dot gnu.org
                   ` (18 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-15 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2013-12-15
           Assignee|unassigned at gcc dot gnu.org      |hubicka at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #3 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
The problem here is that we devirtualize the call and then we try to analyze it
for ipa-cp. I guess ipa-prop should skip those calls. I am testing patch.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (3 preceding siblings ...)
  2013-12-15 16:00 ` hubicka at gcc dot gnu.org
@ 2013-12-15 16:32 ` hubicka at gcc dot gnu.org
  2013-12-15 22:19 ` hubicka at gcc dot gnu.org
                   ` (17 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-15 16:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Index: ipa-prop.c
===================================================================
--- ipa-prop.c  (revision 205941)
+++ ipa-prop.c  (working copy)
@@ -2022,9 +2022,18 @@
                       struct param_analysis_info *parms_ainfo, gimple call)
 {
   tree target = gimple_call_fn (call);
+  struct cgraph_edge *cs;

-  if (!target)
+  if (!target
+      || (TREE_CODE (target) != SSA_NAME
+          && !virtual_method_call_p (target)))
     return;
+
+  /* If we previously turned the call into a direct call, there is
+     no need to analyze.  */
+  cs = cgraph_edge (node, call);
+  if (cs && !cs->indirect_unknown_callee)
+    return;
   if (TREE_CODE (target) == SSA_NAME)
     ipa_analyze_indirect_call_uses (node, info, parms_ainfo, call, target);
   else if (virtual_method_call_p (target))


Patch I am testing...


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (4 preceding siblings ...)
  2013-12-15 16:32 ` hubicka at gcc dot gnu.org
@ 2013-12-15 22:19 ` hubicka at gcc dot gnu.org
  2013-12-16  6:16 ` octoploid at yandex dot com
                   ` (16 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-15 22:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Sun Dec 15 22:19:33 2013
New Revision: 206004

URL: http://gcc.gnu.org/viewcvs?rev=206004&root=gcc&view=rev
Log:

    PR ipa/59265
    * ipa-prop.c (ipa_analyze_call_uses): Skip already
    devirtualized calls.
    g++.dg/torture/pr59265.C: New testcase.

Added:
    trunk/gcc/testsuite/g++.dg/torture/pr59265.C
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-prop.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (5 preceding siblings ...)
  2013-12-15 22:19 ` hubicka at gcc dot gnu.org
@ 2013-12-16  6:16 ` octoploid at yandex dot com
  2013-12-16  8:02 ` octoploid at yandex dot com
                   ` (15 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: octoploid at yandex dot com @ 2013-12-16  6:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Markus Trippelsdorf <octoploid at yandex dot com> ---
It now segfaults in ipa_profile_generate_summary:

==9510==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000028 (pc
0x00000120aff0 sp 0x7fff4fe6add0 bp 0x606000210080 T0)
    #0 0x120afef in ipa_profile_generate_summary()
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/ipa-profile.c:216
    #1 0x142d44f in execute_ipa_summary_passes(ipa_opt_pass_d*)
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/passes.c:2013
    #2 0xd6bbbe in ipa_passes
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/cgraphunit.c:2022
    #3 0xd6bbbe in compile()
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/cgraphunit.c:2126
    #4 0xd6c62a in finalize_compilation_unit()
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/cgraphunit.c:2280
    #5 0x81a98a in cp_write_global_declarations()
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/cp/decl2.c:4431
    #6 0x1613bd4 in compile_file()
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/toplev.c:561
    #7 0x1618663 in do_compile
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/toplev.c:1893
    #8 0x1618663 in toplev_main(int, char**)
/var/tmp/gcc_build_dir/gcc/../../gcc/gcc/toplev.c:1969
    #9 0x7f764d115f8f in __libc_start_main (/lib/libc.so.6+0x1ff8f)
    #10 0x5b46b0 in _start
(/var/tmp/gcc_sani/usr/local/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/cc1plus+0x5b46b0)


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (6 preceding siblings ...)
  2013-12-16  6:16 ` octoploid at yandex dot com
@ 2013-12-16  8:02 ` octoploid at yandex dot com
  2013-12-16  8:48 ` octoploid at yandex dot com
                   ` (14 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: octoploid at yandex dot com @ 2013-12-16  8:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Program received signal SIGSEGV, Segmentation fault.
[Switching to process 18740]
ipa_profile_generate_summary () at ../../gcc/gcc/ipa-profile.c:214
214                               = h->hvalue.counters [0];
(gdb) bt
#0  ipa_profile_generate_summary () at ../../gcc/gcc/ipa-profile.c:214
#1  0x0000000000a9f197 in execute_ipa_summary_passes (ipa_pass=0x175c300) at
../../gcc/gcc/passes.c:2011
#2  0x0000000000830f94 in ipa_passes () at ../../gcc/gcc/cgraphunit.c:2022
#3  compile () at ../../gcc/gcc/cgraphunit.c:2126
#4  0x00000000008314e5 in finalize_compilation_unit () at
../../gcc/gcc/cgraphunit.c:2280
#5  0x000000000062a58f in cp_write_global_declarations () at
../../gcc/gcc/cp/decl2.c:4431
#6  0x0000000000b4763d in compile_file () at ../../gcc/gcc/toplev.c:561
#7  0x0000000000b495b8 in do_compile () at ../../gcc/gcc/toplev.c:1887
#8  toplev_main (argc=16, argv=0x7fffffffe0b8) at ../../gcc/gcc/toplev.c:1963
#9  0x00007ffff75eff90 in __libc_start_main () from /lib/libc.so.6
#10 0x000000000053e021 in _start ()
(gdb) l
209                            counter 2 is total number of executions.  */
210                         if (h->hvalue.counters[2])
211                           {
212                             struct cgraph_edge * e = cgraph_edge (node,
stmt);
213                             e->indirect_info->common_target_id
214                               = h->hvalue.counters [0];
215                             e->indirect_info->common_target_probability
216                               = GCOV_COMPUTE_SCALE (h->hvalue.counters [1],
h->hvalue.counters [2]);
217                             if (e->indirect_info->common_target_probability
> REG_BR_PROB_BASE)
218                               {
(gdb) p *e
$4 = {
  count = 990, 
  caller = 0x7ffff5b62668, 
  callee = 0x7ffff5ada148, 
  prev_caller = 0x0, 
  next_caller = 0x7ffff5c92f70, 
  prev_callee = 0x0, 
  next_callee = 0x7ffff58c0820, 
  call_stmt = 0x7ffff5875da8, 
  indirect_info = 0x0, 
  aux = 0x0, 
  inline_failed = CIF_FUNCTION_NOT_CONSIDERED, 
  lto_stmt_uid = 0, 
  frequency = 1000, 
  uid = 769, 
  indirect_inlining_edge = 0, 
  indirect_unknown_callee = 0, 
  call_stmt_cannot_inline_p = 0, 
  can_throw_external = 0, 
  speculative = 0
}


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (7 preceding siblings ...)
  2013-12-16  8:02 ` octoploid at yandex dot com
@ 2013-12-16  8:48 ` octoploid at yandex dot com
  2013-12-16 11:14 ` hubicka at gcc dot gnu.org
                   ` (13 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: octoploid at yandex dot com @ 2013-12-16  8:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Markus Trippelsdorf <octoploid at yandex dot com> ---
Maybe something like this:

diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c
index ef9e24224921..66f87816e1bf 100644
--- a/gcc/ipa-profile.c
+++ b/gcc/ipa-profile.c
@@ -210,6 +210,8 @@ ipa_profile_generate_summary (void)
                    if (h->hvalue.counters[2])
                      {
                        struct cgraph_edge * e = cgraph_edge (node, stmt);
+                       if (e && !e->indirect_unknown_callee)
+                         break;
                        e->indirect_info->common_target_id
                          = h->hvalue.counters [0];
                        e->indirect_info->common_target_probability

Seems to fix Mozilla build untill the next (unrelated) ICE:

/var/tmp/mozilla-central/js/src/vm/Stack.cpp: In member function ‘operator++’:
/var/tmp/mozilla-central/js/src/vm/Stack.cpp:717:1: internal compiler error: in
fixup_reorder_chain, at cfgrtl.c:3739
 }
 ^
0x5b594c fixup_reorder_chain
        ../../gcc/gcc/cfgrtl.c:3738
0x5b594c cfg_layout_finalize()
        ../../gcc/gcc/cfgrtl.c:4295
0xd42eb2 duplicate_computed_gotos
        ../../gcc/gcc/bb-reorder.c:2492
0xd42eb2 execute
        ../../gcc/gcc/bb-reorder.c:2524
Please submit a full bug report,
>From gcc-bugs-return-437689-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Dec 16 08:51:39 2013
Return-Path: <gcc-bugs-return-437689-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 27364 invoked by alias); 16 Dec 2013 08:51:38 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 27347 invoked by uid 48); 16 Dec 2013 08:51:35 -0000
From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59522] "cc1plus: error:=?UTF-8?Q? unrecognized command line option ‘-fmy-loop-block’ ?=" is generated when g++ is run but not with cc1plus
Date: Mon, 16 Dec 2013 08:51:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: mpolacek at gcc dot gnu.org
X-Bugzilla-Status: RESOLVED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_status cc resolution
Message-ID: <bug-59522-4-KoiTA8NWS6@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59522-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59522-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-12/txt/msg01344.txt.bz2
Content-length: 637

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY522

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |mpolacek at gcc dot gnu.org
         Resolution|---                         |INVALID

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Bugzilla isn't the right place for these kind of questions, use gcc-help
mailing list.

FWIW, I don't see why it shouldn't work with g++.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (8 preceding siblings ...)
  2013-12-16  8:48 ` octoploid at yandex dot com
@ 2013-12-16 11:14 ` hubicka at gcc dot gnu.org
  2013-12-16 12:04 ` octoploid at yandex dot com
                   ` (12 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-16 11:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Yes, this patch is OK, will you test and commit it?  I will also re-test the
patch that should prevent early passes from missing this optimization.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (9 preceding siblings ...)
  2013-12-16 11:14 ` hubicka at gcc dot gnu.org
@ 2013-12-16 12:04 ` octoploid at yandex dot com
  2013-12-16 13:20 ` hubicka at gcc dot gnu.org
                   ` (11 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: octoploid at yandex dot com @ 2013-12-16 12:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Markus Trippelsdorf <octoploid at yandex dot com> ---
(In reply to Jan Hubicka from comment #10)
> Yes, this patch is OK, will you test and commit it?  I will also re-test the
> patch that should prevent early passes from missing this optimization.

I've tested it on x86_64-pc-linux-gnu.
Please commit it yourself, because I don't have access.
Thanks.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (10 preceding siblings ...)
  2013-12-16 12:04 ` octoploid at yandex dot com
@ 2013-12-16 13:20 ` hubicka at gcc dot gnu.org
  2013-12-16 13:37 ` hubicka at gcc dot gnu.org
                   ` (10 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-16 13:20 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
OK, will commit it shortly (after re-testing with break replaced by continue).
You may just ask for write access and write me as garant.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (11 preceding siblings ...)
  2013-12-16 13:20 ` hubicka at gcc dot gnu.org
@ 2013-12-16 13:37 ` hubicka at gcc dot gnu.org
  2013-12-16 13:41 ` hubicka at gcc dot gnu.org
                   ` (9 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-16 13:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Author: hubicka
Date: Mon Dec 16 13:37:43 2013
New Revision: 206014

URL: http://gcc.gnu.org/viewcvs?rev=206014&root=gcc&view=rev
Log:
    PR ipa/59265
    * ipa-profile.c (ipa_profile_generate_summary): Do not ICE when
    call is already devirtualized.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-profile.c


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (12 preceding siblings ...)
  2013-12-16 13:37 ` hubicka at gcc dot gnu.org
@ 2013-12-16 13:41 ` hubicka at gcc dot gnu.org
  2013-12-16 15:08 ` octoploid at yandex dot com
                   ` (8 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at gcc dot gnu.org @ 2013-12-16 13:41 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

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

--- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fixed. Thank you for testing it.  The Firefox ICE
Seems to fix Mozilla build untill the next (unrelated) ICE:

/var/tmp/mozilla-central/js/src/vm/Stack.cpp: In member function ‘operator++’:
/var/tmp/mozilla-central/js/src/vm/Stack.cpp:717:1: internal compiler error: in
fixup_reorder_chain, at cfgrtl.c:3739
 }
 ^
0x5b594c fixup_reorder_chain
        ../../gcc/gcc/cfgrtl.c:3738
0x5b594c cfg_layout_finalize()
        ../../gcc/gcc/cfgrtl.c:4295
0xd42eb2 duplicate_computed_gotos
        ../../gcc/gcc/bb-reorder.c:2492
0xd42eb2 execute
        ../../gcc/gcc/bb-reorder.c:2524
Please submit a full bug report,

is apparently related to Tereza's patch enabling -freroder-blocks-and-partition
(and -fno-reorder-blocks-and-partition should be a workaround). Can you,
please, open a new PR for it, if not reported already?
>From gcc-bugs-return-437726-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Dec 16 13:43:50 2013
Return-Path: <gcc-bugs-return-437726-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 23562 invoked by alias); 16 Dec 2013 13:43:50 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 23541 invoked by uid 48); 16 Dec 2013 13:43:47 -0000
From: "janus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/54949] [F03] abstract procedure pointers not rejected
Date: Mon, 16 Dec 2013 13:43:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: fortran
X-Bugzilla-Version: 4.8.0
X-Bugzilla-Keywords: ice-on-invalid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: janus at gcc dot gnu.org
X-Bugzilla-Status: ASSIGNED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: janus at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-54949-4-Pwil5zBjak@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-54949-4@http.gcc.gnu.org/bugzilla/>
References: <bug-54949-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-12/txt/msg01381.txt.bz2
Content-length: 216

http://gcc.gnu.org/bugzilla/show_bug.cgi?idT949

--- Comment #4 from janus at gcc dot gnu.org ---
Both test cases give an ICE at least with 4.6 on upward, but not with 4.4, so
the ICE is technically a regression.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (13 preceding siblings ...)
  2013-12-16 13:41 ` hubicka at gcc dot gnu.org
@ 2013-12-16 15:08 ` octoploid at yandex dot com
  2013-12-16 17:51 ` hubicka at ucw dot cz
                   ` (7 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: octoploid at yandex dot com @ 2013-12-16 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Markus Trippelsdorf <octoploid at yandex dot com> ---
(In reply to Jan Hubicka from comment #14)
> Fixed. Thank you for testing it.  The Firefox ICE
> Seems to fix Mozilla build untill the next (unrelated) ICE:
> 
> /var/tmp/mozilla-central/js/src/vm/Stack.cpp: In member function
> ‘operator++’:
> /var/tmp/mozilla-central/js/src/vm/Stack.cpp:717:1: internal compiler error:
> in fixup_reorder_chain, at cfgrtl.c:3739
>  }
>  ^
> 0x5b594c fixup_reorder_chain
>         ../../gcc/gcc/cfgrtl.c:3738
> 0x5b594c cfg_layout_finalize()
>         ../../gcc/gcc/cfgrtl.c:4295
> 0xd42eb2 duplicate_computed_gotos
>         ../../gcc/gcc/bb-reorder.c:2492
> 0xd42eb2 execute
>         ../../gcc/gcc/bb-reorder.c:2524
> Please submit a full bug report,
> 
> is apparently related to Tereza's patch enabling
> -freroder-blocks-and-partition (and -fno-reorder-blocks-and-partition should
> be a workaround). Can you, please, open a new PR for it, if not reported
> already?

PR59527.

It looks like the fixes for this bug may be buggy, because with 
-fno-reorder-blocks-and-partition I get:

Executing: c++ -o js -Wall -Wpointer-arith -Woverloaded-virtual
-Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null
-Wsign-compare -Wno-invalid-offsetof -Wcast-align -flto=4 -fprofile-use
-fprofile-correction -fno-reorder-blocks-and-partition -march=native -fno-rtti
-fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED
-O3 -fomit-frame-pointer /var/tmp/moz-build-dir/js/src/shell/tmpD2q9gU.list
-lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id
-Wl,-rpath-link,../../../dist/bin
-Wl,-rpath-link,/var/tmp/moz-build-dir/dist/lib -L../../../dist/bin
-L../../../dist/lib -L/var/tmp/moz-build-dir/dist/lib -lnspr4 -lplc4 -lplds4
../libjs_static.a -lz -Wl,--whole-archive ../../../dist/lib/libmozglue.a
-Wl,--no-whole-archive -rdynamic -lm -ldl -lffi
/var/tmp/moz-build-dir/js/src/shell/tmpD2q9gU.list:
    INPUT("Unified_cpp_shell0.o")
    INPUT("../editline/Unified_c_editline0.o")

In member function ‘extractBetween’:
lto1: fatal error: Cgraph edge statement index out of range
compilation terminated.
>From gcc-bugs-return-437735-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Mon Dec 16 15:08:24 2013
Return-Path: <gcc-bugs-return-437735-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 15039 invoked by alias); 16 Dec 2013 15:08:23 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 14985 invoked by uid 48); 16 Dec 2013 15:08:18 -0000
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/59471] [4.9 Regression] ICE using vector extensions (non-top-level BIT_FIELD_REF, IMAGPART_EXPR or REALPART_EXPR)
Date: Mon, 16 Dec 2013 15:08:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: jakub at gcc dot gnu.org
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: 4.9.0
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc
Message-ID: <bug-59471-4-tK5rUASbzu@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59471-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59471-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-12/txt/msg01390.txt.bz2
Content-length: 857

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY471

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

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

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This started failing when the assertion has been added:
http://gcc.gnu.org/ml/gcc-patches/2013-05/msg01265.html
There is no code to ensure that it won't happen though.
So, either the verification patch should be reverted and SRA adjusted to cope
with this, or something in gimple-expr.[ch] ? will need to be adjusted to
reject it (but e.g. making is_gimple_addressable more expensive might be a
problem).


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (14 preceding siblings ...)
  2013-12-16 15:08 ` octoploid at yandex dot com
@ 2013-12-16 17:51 ` hubicka at ucw dot cz
  2013-12-16 20:32 ` trippels at gcc dot gnu.org
                   ` (6 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at ucw dot cz @ 2013-12-16 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 from Jan Hubicka <hubicka at ucw dot cz> ---
> Executing: c++ -o js -Wall -Wpointer-arith -Woverloaded-virtual
> -Werror=return-type -Wtype-limits -Wempty-body -Werror=conversion-null
> -Wsign-compare -Wno-invalid-offsetof -Wcast-align -flto=4 -fprofile-use
> -fprofile-correction -fno-reorder-blocks-and-partition -march=native -fno-rtti
> -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED
> -O3 -fomit-frame-pointer /var/tmp/moz-build-dir/js/src/shell/tmpD2q9gU.list
> -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id
> -Wl,-rpath-link,../../../dist/bin
> -Wl,-rpath-link,/var/tmp/moz-build-dir/dist/lib -L../../../dist/bin
> -L../../../dist/lib -L/var/tmp/moz-build-dir/dist/lib -lnspr4 -lplc4 -lplds4
> ../libjs_static.a -lz -Wl,--whole-archive ../../../dist/lib/libmozglue.a
> -Wl,--no-whole-archive -rdynamic -lm -ldl -lffi
> /var/tmp/moz-build-dir/js/src/shell/tmpD2q9gU.list:
>     INPUT("Unified_cpp_shell0.o")
>     INPUT("../editline/Unified_c_editline0.o")
> 
> In member function ???extractBetween???:
> lto1: fatal error: Cgraph edge statement index out of range
> compilation terminated.

This looks like some kind of LTO streaming corruption.  Are you sure you
rebuilt everything with updated compiler?

Honza


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (15 preceding siblings ...)
  2013-12-16 17:51 ` hubicka at ucw dot cz
@ 2013-12-16 20:32 ` trippels at gcc dot gnu.org
  2013-12-16 21:13 ` hubicka at ucw dot cz
                   ` (5 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: trippels at gcc dot gnu.org @ 2013-12-16 20:32 UTC (permalink / raw)
  To: gcc-bugs

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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

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

--- Comment #17 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #16)
> > In member function ???extractBetween???:
> > lto1: fatal error: Cgraph edge statement index out of range
> > compilation terminated.
> 
> This looks like some kind of LTO streaming corruption.  Are you sure you
> rebuilt everything with updated compiler?

Just double-checked. And yes, unfortunately it's 100% reproducible.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (16 preceding siblings ...)
  2013-12-16 20:32 ` trippels at gcc dot gnu.org
@ 2013-12-16 21:13 ` hubicka at ucw dot cz
  2013-12-16 21:32 ` trippels at gcc dot gnu.org
                   ` (4 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at ucw dot cz @ 2013-12-16 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #18 from Jan Hubicka <hubicka at ucw dot cz> ---
> Just double-checked. And yes, unfortunately it's 100% reproducible.

Can not think of much of reason for this.  How much off the index is? Just
slightly or is it completely random number?

Honza
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.
> You are the assignee for the bug.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (17 preceding siblings ...)
  2013-12-16 21:13 ` hubicka at ucw dot cz
@ 2013-12-16 21:32 ` trippels at gcc dot gnu.org
  2013-12-16 21:50 ` hubicka at ucw dot cz
                   ` (3 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: trippels at gcc dot gnu.org @ 2013-12-16 21:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #19 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #18)
> > Just double-checked. And yes, unfortunately it's 100% reproducible.
> 
> Can not think of much of reason for this.  How much off the index is? Just
> slightly or is it completely random number?

Off by one:
imple_stmt_max_uid (fn) < cedge->lto_stmt_uid)
9 < 10


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (18 preceding siblings ...)
  2013-12-16 21:32 ` trippels at gcc dot gnu.org
@ 2013-12-16 21:50 ` hubicka at ucw dot cz
  2013-12-17 13:01 ` trippels at gcc dot gnu.org
                   ` (2 subsequent siblings)
  22 siblings, 0 replies; 24+ messages in thread
From: hubicka at ucw dot cz @ 2013-12-16 21:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #20 from Jan Hubicka <hubicka at ucw dot cz> ---
Hmm, it may be someone altering the insns during streaming process.  You may
try to check
who is doing that while streaming out the relevant .o file.
Is it compilation->linker streaming or wpa->ltrans?
UIDs are initialized in renumber_gimple_stmt_uids calls in passes.c and then
you can
try to check if someone touch the statements....

I will try to check if I spot something obvoius, but probably only tomorrow.
Honza


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (19 preceding siblings ...)
  2013-12-16 21:50 ` hubicka at ucw dot cz
@ 2013-12-17 13:01 ` trippels at gcc dot gnu.org
  2013-12-17 21:25 ` trippels at gcc dot gnu.org
  2013-12-18  9:14 ` trippels at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: trippels at gcc dot gnu.org @ 2013-12-17 13:01 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #22 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Markus Trippelsdorf from comment #21)
> 
> I've tried to bisect the issue, but it's messy. 
> However I think I can rule out any commit since r205447.
> If r205447 is the culprit I cannot say for sure,
> because Firefox ICEs during the build.

No, it is not r205447, because reverting it on top of trunk
doesn't fix the issue.


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (20 preceding siblings ...)
  2013-12-17 13:01 ` trippels at gcc dot gnu.org
@ 2013-12-17 21:25 ` trippels at gcc dot gnu.org
  2013-12-18  9:14 ` trippels at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: trippels at gcc dot gnu.org @ 2013-12-17 21:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #23 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Here's a testcase:

 tmp % wget trippelsdorf.de/cceI2Nud.ltrans22.o.bz2
 tmp % bzip2 -d cceI2Nud.ltrans22.o.bz2
 tmp % g++ -xlto -fltrans cceI2Nud.ltrans22.o
In member function ‘extractBetween’:
lto1: fatal error: Cgraph edge statement index out of range 25 < 50
compilation terminated.
>From gcc-bugs-return-437922-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Tue Dec 17 21:28:10 2013
Return-Path: <gcc-bugs-return-437922-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 11012 invoked by alias); 17 Dec 2013 21:28:09 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 10965 invoked by uid 55); 17 Dec 2013 21:28:06 -0000
From: "hubicka at ucw dot cz" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/35545] virtual call specialization not happening with FDO
Date: Tue, 17 Dec 2013 21:28:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.4.0
X-Bugzilla-Keywords: missed-optimization
X-Bugzilla-Severity: enhancement
X-Bugzilla-Who: hubicka at ucw dot cz
X-Bugzilla-Status: NEW
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields:
Message-ID: <bug-35545-4-Vp58CYPgVM@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-35545-4@http.gcc.gnu.org/bugzilla/>
References: <bug-35545-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-12/txt/msg01577.txt.bz2
Content-length: 948

http://gcc.gnu.org/bugzilla/show_bug.cgi?id5545

--- Comment #10 from Jan Hubicka <hubicka at ucw dot cz> ---
> Tracer depends on the usual estimate_num_insns limits
>  (it is 12 years since I wrote it, so what I recall)

note that one impotant thing that changed in those 12 years is that I
originally carefuly tuned tracer in combination with crossjumping. Tracer
produced duplicates and if no pass managed to take use of them, crossjumping
cleaned them up pre-reload. Trace formation in bb-reorder re-instantiated
duplicated when it seemed sensible for code layout.

This broke, since SSA makes RTL cross jumping quite useless and it is now done
after reg-alloc only.  We never really got working code unification pass on
gimple.
http://www.ucw.cz/~hubicka/papers/amd64/node4.html
Claims that at that time I got 1.6% speedup on SPECint with profile feedback
1.43% code growth.  That is not bad, but wonder to what it translates today.

Honza


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

* [Bug ipa/59265] [4.9 Regression] Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006
  2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
                   ` (21 preceding siblings ...)
  2013-12-17 21:25 ` trippels at gcc dot gnu.org
@ 2013-12-18  9:14 ` trippels at gcc dot gnu.org
  22 siblings, 0 replies; 24+ messages in thread
From: trippels at gcc dot gnu.org @ 2013-12-18  9:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #24 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
I've opened pr59543 for the cgraph edge statement index issue.


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

end of thread, other threads:[~2013-12-18  9:14 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-23 17:57 [Bug c++/59265] New: Segmentation fault in ipa_note_param_call for -fprofile-use in SPEC CPU2006 marxin.liska at gmail dot com
2013-11-25  9:19 ` [Bug ipa/59265] [4.9 Regression] " rguenth at gcc dot gnu.org
2013-12-14 13:39 ` octoploid at yandex dot com
2013-12-14 20:35 ` octoploid at yandex dot com
2013-12-15 16:00 ` hubicka at gcc dot gnu.org
2013-12-15 16:32 ` hubicka at gcc dot gnu.org
2013-12-15 22:19 ` hubicka at gcc dot gnu.org
2013-12-16  6:16 ` octoploid at yandex dot com
2013-12-16  8:02 ` octoploid at yandex dot com
2013-12-16  8:48 ` octoploid at yandex dot com
2013-12-16 11:14 ` hubicka at gcc dot gnu.org
2013-12-16 12:04 ` octoploid at yandex dot com
2013-12-16 13:20 ` hubicka at gcc dot gnu.org
2013-12-16 13:37 ` hubicka at gcc dot gnu.org
2013-12-16 13:41 ` hubicka at gcc dot gnu.org
2013-12-16 15:08 ` octoploid at yandex dot com
2013-12-16 17:51 ` hubicka at ucw dot cz
2013-12-16 20:32 ` trippels at gcc dot gnu.org
2013-12-16 21:13 ` hubicka at ucw dot cz
2013-12-16 21:32 ` trippels at gcc dot gnu.org
2013-12-16 21:50 ` hubicka at ucw dot cz
2013-12-17 13:01 ` trippels at gcc dot gnu.org
2013-12-17 21:25 ` trippels at gcc dot gnu.org
2013-12-18  9:14 ` trippels 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).