public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59737] New: ice from optimize_inline_calls
@ 2014-01-09 11:53 dcb314 at hotmail dot com
  2014-01-09 14:19 ` [Bug middle-end/59737] [4.9 Regression] " trippels at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dcb314 at hotmail dot com @ 2014-01-09 11:53 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59737
           Summary: ice from optimize_inline_calls
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com

Created attachment 31783
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31783&action=edit
gzipped C++ source code

I just compiled the attached code with gcc trunk 20140108
on a x86_64 box and it said

[dcb@zippy4 foundBugs]$ ../results/bin/g++ -c -O2 bug128.cc
ptclib/vcard.cxx: In member function ‘virtual void
PvCard::URIValue::ReadFrom(std::istream&)’:
ptclib/vcard.cxx:730:1: error: missing callgraph edge for call stmt:
__builtin_unreachable ();
_ZN6PvCard8URIValue8ReadFromERSi/1461 (virtual void
PvCard::URIValue::ReadFrom(std::istream&)) @0x7f129da023d8
  Type: function definition analyzed
  Visibility: externally_visible public virtual
  Address is taken.
  References:
  Referring: _ZTVN6PvCard8URIValueE/2137 (addr)
  Availability: available
  First run: 0
  Function flags: body
  Called by: _ZN6PvCard11InlineValue8ReadFromERSi/1466 (1.00 per call)
  Calls: _ZN14PAbstractArrayD2Ev/637 (1.00 per call) (can throw external)
_ZN14PAbstractArrayD2Ev/637 (1.00 per call) (can throw external)
_ZNSt9basic_iosIcSt11char_traitsIcEE5clearESt12_Ios_Iostate/2689 (1.00 per
call) (can throw external) _ZN7PStringC2EPKc/2641 (1.00 per call) (can throw
external)
  Has 2 outgoing edges for indirect calls.
ptclib/vcard.cxx:730:1: internal compiler error: verify_cgraph_node failed
0x89e2a0 verify_cgraph_node(cgraph_node*)
    ../../src/trunk/gcc/cgraph.c:2914
0xcd6fb9 optimize_inline_calls(tree_node*)
    ../../src/trunk/gcc/tree-inline.c:4606
0x11d3929 early_inliner
    ../../src/trunk/gcc/ipa-inline.c:2272
0x11d3929 execute
    ../../src/trunk/gcc/ipa-inline.c:2335
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.

Flag -O2 required.
>From gcc-bugs-return-439747-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Jan 09 11:53:57 2014
Return-Path: <gcc-bugs-return-439747-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 29337 invoked by alias); 9 Jan 2014 11:53:57 -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 29318 invoked by uid 48); 9 Jan 2014 11:53:53 -0000
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59675] -D_GLIBCXX_DEBUG asserts to stdout (it should stderr)
Date: Thu, 09 Jan 2014 11:53: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.2
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: redi at gcc dot gnu.org
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:
Message-ID: <bug-59675-4-GSPhkarx7F@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-59675-4@http.gcc.gnu.org/bugzilla/>
References: <bug-59675-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: 2014-01/txt/msg00889.txt.bz2
Content-length: 203

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Seems obviously correct, I don't know/remember if there was a reason stdout was
used


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

* [Bug middle-end/59737] [4.9 Regression] ice from optimize_inline_calls
  2014-01-09 11:53 [Bug c++/59737] New: ice from optimize_inline_calls dcb314 at hotmail dot com
@ 2014-01-09 14:19 ` trippels at gcc dot gnu.org
  2014-01-31  9:23 ` trippels at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-01-09 14:19 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-01-09
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Creduce came up with:

class A {
  virtual void m_fn1(int &p1);
  friend int &operator>>(int &p1, A &p2) { p2.m_fn1(p1); }
};
class B : public A {
  void m_fn1(int &p1);
};
class F : public B {
  void m_fn1(int &p1);
};
class G : public F {
  void m_fn1(int &);
};
class C : A {
  void m_fn1(int &);
  class H : public G {
    void m_fn1(int &);
  };
  struct D : A {
    H m_number;
  };
};
void C::m_fn1(int &p1) {
  D a;
  p1 >> a.m_number;
}


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

* [Bug middle-end/59737] [4.9 Regression] ice from optimize_inline_calls
  2014-01-09 11:53 [Bug c++/59737] New: ice from optimize_inline_calls dcb314 at hotmail dot com
  2014-01-09 14:19 ` [Bug middle-end/59737] [4.9 Regression] " trippels at gcc dot gnu.org
@ 2014-01-31  9:23 ` trippels at gcc dot gnu.org
  2014-01-31 11:25 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-01-31  9:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Valgrind shows:
==26377== Invalid read of size 4
==26377==    at 0x7D91EE: fold_stmt_1(gimple_stmt_iterator*, bool)
(gimple-fold.c:1186)
==26377==    by 0x997F29: fold_marked_statements(int, pointer_set_t*)
(tree-inline.c:4511)
==26377==    by 0x99FF50: optimize_inline_calls(tree_node*)
(tree-inline.c:4592)
==26377==    by 0xDAF93E: (anonymous namespace)::pass_early_inline::execute()
(ipa-inline.c:2272)
==26377==    by 0x8BC9C9: execute_one_pass(opt_pass*) (passes.c:2226)
==26377==    by 0x8BCC45: execute_pass_list(opt_pass*) (passes.c:2279)
==26377==    by 0x8BB54D: do_per_function_toporder(void (*)(void*), void*)
(passes.c:1627)
==26377==    by 0x8BD156: execute_ipa_pass_list(opt_pass*) (passes.c:2610)
==26377==    by 0x6E4229: compile() (cgraphunit.c:2033)
==26377==    by 0x6E4A74: finalize_compilation_unit() (cgraphunit.c:2319)
==26377==    by 0x5960C4: cp_write_global_declarations() (decl2.c:4431)
==26377==    by 0x957DCC: compile_file() (toplev.c:562)
==26377==  Address 0x5627794 is 4 bytes inside a block of size 40 free'd
==26377==    at 0x402AABE: realloc (vg_replace_malloc.c:687)
==26377==    by 0xE4BF8C: xrealloc (xmalloc.c:179)
==26377==    by 0x803712: maybe_record_node(vec<cgraph_node*, va_heap,
vl_ptr>&, tree_node*, pointer_set_t*, bool*) (vec.h:293)
==26377==    by 0x805668: possible_polymorphic_call_targets(tree_node*, long,
ipa_polymorphic_call_context, bool*, void**) (ipa-devirt.c:1185)
==26377==    by 0x7D91DA: fold_stmt_1(gimple_stmt_iterator*, bool)
(ipa-utils.h:135)
==26377==    by 0x997F29: fold_marked_statements(int, pointer_set_t*)
(tree-inline.c:4511)
==26377==    by 0x99FF50: optimize_inline_calls(tree_node*)
(tree-inline.c:4592)
==26377==    by 0xDAF93E: (anonymous namespace)::pass_early_inline::execute()
(ipa-inline.c:2272)
==26377==    by 0x8BC9C9: execute_one_pass(opt_pass*) (passes.c:2226)
==26377==    by 0x8BCC45: execute_pass_list(opt_pass*) (passes.c:2279)
==26377==    by 0x8BB54D: do_per_function_toporder(void (*)(void*), void*)
(passes.c:1627)
==26377==    by 0x8BD156: execute_ipa_pass_list(opt_pass*) (passes.c:2610)
==26377== 
==26377== Invalid read of size 1
==26377==    at 0x8061D8: hash_table<polymorphic_call_target_hasher,
xcallocator>::dispose() (vec.h:1656)
==26377==    by 0x804386: free_polymorphic_call_targets_hash()
(ipa-devirt.c:845)
==26377==    by 0x6DCD08: cgraph_remove_node(cgraph_node*) (cgraph.c:364)
==26377==    by 0x8248D4: symtab_remove_unreachable_nodes(bool, _IO_FILE*)
(ipa.c:472)
==26377==    by 0x6E4027: compile() (cgraphunit.c:2176)
==26377==    by 0x6E4A74: finalize_compilation_unit() (cgraphunit.c:2319)
==26377==    by 0x5960C4: cp_write_global_declarations() (decl2.c:4431)
==26377==    by 0x957DCC: compile_file() (toplev.c:562)
==26377==    by 0x959A27: toplev_main(int, char**) (toplev.c:1914)
==26377==    by 0x4ED5F8F: (below main) (in /lib64/libc-2.18.90.so)
==26377==  Address 0x5627793 is 3 bytes inside a block of size 40 free'd
==26377==    at 0x402AABE: realloc (vg_replace_malloc.c:687)
==26377==    by 0xE4BF8C: xrealloc (xmalloc.c:179)
==26377==    by 0x803712: maybe_record_node(vec<cgraph_node*, va_heap,
vl_ptr>&, tree_node*, pointer_set_t*, bool*) (vec.h:293)
==26377==    by 0x805668: possible_polymorphic_call_targets(tree_node*, long,
ipa_polymorphic_call_context, bool*, void**) (ipa-devirt.c:1185)
==26377==    by 0x7D91DA: fold_stmt_1(gimple_stmt_iterator*, bool)
(ipa-utils.h:135)
==26377==    by 0x997F29: fold_marked_statements(int, pointer_set_t*)
(tree-inline.c:4511)
==26377==    by 0x99FF50: optimize_inline_calls(tree_node*)
(tree-inline.c:4592)
==26377==    by 0xDAF93E: (anonymous namespace)::pass_early_inline::execute()
(ipa-inline.c:2272)
==26377==    by 0x8BC9C9: execute_one_pass(opt_pass*) (passes.c:2226)
==26377==    by 0x8BCC45: execute_pass_list(opt_pass*) (passes.c:2279)
==26377==    by 0x8BB54D: do_per_function_toporder(void (*)(void*), void*)
(passes.c:1627)
==26377==    by 0x8BD156: execute_ipa_pass_list(opt_pass*) (passes.c:2610)
==26377== 
==26377== Invalid free() / delete / delete[] / realloc()
==26377==    at 0x40298B0: free (vg_replace_malloc.c:468)
==26377==    by 0x8061EC: hash_table<polymorphic_call_target_hasher,
xcallocator>::dispose() (vec.h:312)
==26377==    by 0x804386: free_polymorphic_call_targets_hash()
(ipa-devirt.c:845)
==26377==    by 0x6DCD08: cgraph_remove_node(cgraph_node*) (cgraph.c:364)
==26377==    by 0x8248D4: symtab_remove_unreachable_nodes(bool, _IO_FILE*)
(ipa.c:472)
==26377==    by 0x6E4027: compile() (cgraphunit.c:2176)
==26377==    by 0x6E4A74: finalize_compilation_unit() (cgraphunit.c:2319)
==26377==    by 0x5960C4: cp_write_global_declarations() (decl2.c:4431)
==26377==    by 0x957DCC: compile_file() (toplev.c:562)
==26377==    by 0x959A27: toplev_main(int, char**) (toplev.c:1914)
==26377==    by 0x4ED5F8F: (below main) (in /lib64/libc-2.18.90.so)
==26377==  Address 0x5627790 is 0 bytes inside a block of size 40 free'd
==26377==    at 0x402AABE: realloc (vg_replace_malloc.c:687)
==26377==    by 0xE4BF8C: xrealloc (xmalloc.c:179)
==26377==    by 0x803712: maybe_record_node(vec<cgraph_node*, va_heap,
vl_ptr>&, tree_node*, pointer_set_t*, bool*) (vec.h:293)
==26377==    by 0x805668: possible_polymorphic_call_targets(tree_node*, long,
ipa_polymorphic_call_context, bool*, void**) (ipa-devirt.c:1185)
==26377==    by 0x7D91DA: fold_stmt_1(gimple_stmt_iterator*, bool)
(ipa-utils.h:135)
==26377==    by 0x997F29: fold_marked_statements(int, pointer_set_t*)
(tree-inline.c:4511)
==26377==    by 0x99FF50: optimize_inline_calls(tree_node*)
(tree-inline.c:4592)
==26377==    by 0xDAF93E: (anonymous namespace)::pass_early_inline::execute()
(ipa-inline.c:2272)
==26377==    by 0x8BC9C9: execute_one_pass(opt_pass*) (passes.c:2226)
==26377==    by 0x8BCC45: execute_pass_list(opt_pass*) (passes.c:2279)
==26377==    by 0x8BB54D: do_per_function_toporder(void (*)(void*), void*)
(passes.c:1627)
==26377==    by 0x8BD156: execute_ipa_pass_list(opt_pass*) (passes.c:2610)


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

* [Bug middle-end/59737] [4.9 Regression] ice from optimize_inline_calls
  2014-01-09 11:53 [Bug c++/59737] New: ice from optimize_inline_calls dcb314 at hotmail dot com
  2014-01-09 14:19 ` [Bug middle-end/59737] [4.9 Regression] " trippels at gcc dot gnu.org
  2014-01-31  9:23 ` trippels at gcc dot gnu.org
@ 2014-01-31 11:25 ` rguenth at gcc dot gnu.org
  2014-02-12 16:56 ` jakub at gcc dot gnu.org
  2014-02-13  8:32 ` trippels at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-01-31 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

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


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

* [Bug middle-end/59737] [4.9 Regression] ice from optimize_inline_calls
  2014-01-09 11:53 [Bug c++/59737] New: ice from optimize_inline_calls dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2014-01-31 11:25 ` rguenth at gcc dot gnu.org
@ 2014-02-12 16:56 ` jakub at gcc dot gnu.org
  2014-02-13  8:32 ` trippels at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2014-02-12 16:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Wed Feb 12 16:55:51 2014
New Revision: 207735

URL: http://gcc.gnu.org/viewcvs?rev=207735&root=gcc&view=rev
Log:
    PR middle-end/59737
    * g++.dg/ipa/pr59737.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/ipa/pr59737.C
Modified:
    trunk/gcc/testsuite/ChangeLog


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

* [Bug middle-end/59737] [4.9 Regression] ice from optimize_inline_calls
  2014-01-09 11:53 [Bug c++/59737] New: ice from optimize_inline_calls dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2014-02-12 16:56 ` jakub at gcc dot gnu.org
@ 2014-02-13  8:32 ` trippels at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: trippels at gcc dot gnu.org @ 2014-02-13  8:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Fixed.


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

end of thread, other threads:[~2014-02-13  8:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-09 11:53 [Bug c++/59737] New: ice from optimize_inline_calls dcb314 at hotmail dot com
2014-01-09 14:19 ` [Bug middle-end/59737] [4.9 Regression] " trippels at gcc dot gnu.org
2014-01-31  9:23 ` trippels at gcc dot gnu.org
2014-01-31 11:25 ` rguenth at gcc dot gnu.org
2014-02-12 16:56 ` jakub at gcc dot gnu.org
2014-02-13  8:32 ` 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).