public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/57102] [4.9 Regression] ICE: SIGSEGV in fndecl_declared_return_type with -fcompare-debug
Date: Sat, 04 May 2013 18:48:00 -0000 [thread overview]
Message-ID: <bug-57102-4-GVFTHVF4to@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-57102-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57102
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2013-05-04
Ever Confirmed|0 |1
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2013-05-04 18:48:32 UTC ---
Confirmed, the segfault can be triggered with:
~/gcc-build/gcc/cc1plus -O2 -std=gnu++11 -fno-inline -fdump-final-insns=aaa
The important part is "-fdump-final-insns=...".
...
Performing interprocedural optimizations
<*free_lang_data> <visibility> <early_local_cleanups> <*free_inline_summary>
<whole-program> <profile_estimate> <cp> <inline> <pure-const>
<static-var>Assembling functions:
constexpr _Tp&& std::forward(typename std::remove_reference<_Tp>::type&) [with
_Tp = <lambda()>; typename std::remove_reference<_Tp>::type = <lambda()>]
constexpr typename std::remove_reference<_Tp>::type&& std::move(_Tp&&) [with
_Tp = <lambda()>&; typename std::remove_reference<_Tp>::type = <lambda()>]
std::_Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp>::_Impl::_Impl(_Alloc) [with _Tp
= std::__future_base::_Task_state<<lambda()>, __gnu_test::SimpleAllocator<int>,
int()>; _Alloc = __gnu_test::SimpleAllocator<int>; __gnu_cxx::_Lock_policy _Lp
= (__gnu_cxx::_Lock_policy)2u] std::function<_Res(_ArgTypes
...)>::function(_Functor) [with _Functor =
std::reference_wrapper<std::_Bind_simple<std::reference_wrapper<<lambda()> >()>
>; <template-parameter-2-2> = void; _Res = int; _ArgTypes = {}]
final.ii:765:61: internal compiler error: Segmentation fault
packaged_task<int()> p(allocator_arg, a, []() { return 1; });
^
0xa94bff crash_signal
../../gcc-svn/trunk/gcc/toplev.c:333
0x54160b fndecl_declared_return_type(tree_node*)
../../gcc-svn/trunk/gcc/cp/decl.c:14388
0x5f620c dump_function_decl
../../gcc-svn/trunk/gcc/cp/error.c:1416
0x5f7b40 decl_as_string(tree_node*, int)
../../gcc-svn/trunk/gcc/cp/error.c:2642
0x69f562 cxx_printable_name_internal
../../gcc-svn/trunk/gcc/cp/tree.c:1953
0xa95312 announce_function(tree_node*)
../../gcc-svn/trunk/gcc/toplev.c:229
0x7c26f6 expand_function
../../gcc-svn/trunk/gcc/cgraphunit.c:1610
0x7c44d6 expand_all_functions
../../gcc-svn/trunk/gcc/cgraphunit.c:1744
0x7c44d6 compile()
../../gcc-svn/trunk/gcc/cgraphunit.c:2042
0x7c4b79 finalize_compilation_unit()
../../gcc-svn/trunk/gcc/cgraphunit.c:2119
0x5ea280 cp_write_global_declarations()
../../gcc-svn/trunk/gcc/cp/decl2.c:4330
Please submit a full bug report,
It looks that compilation fails during IPO, trying to dump fndecl.
gdb says:
Program received signal SIGSEGV, Segmentation fault.
0x000000000054160b in fndecl_declared_return_type (fn=0x7ffff165ad00) at
../../gcc-svn/trunk/gcc/cp/decl.c:14388
14388 ->x_auto_return_pattern);
(gdb) bt
#0 0x000000000054160b in fndecl_declared_return_type (fn=0x7ffff165ad00) at
../../gcc-svn/trunk/gcc/cp/decl.c:14388
#1 0x00000000005f620d in dump_function_decl (t=0x7ffff165ad00, flags=4) at
../../gcc-svn/trunk/gcc/cp/error.c:1416
#2 0x00000000005f7b41 in decl_as_string (decl=0x7ffff165ad00, flags=4) at
../../gcc-svn/trunk/gcc/cp/error.c:2642
#3 0x000000000069f563 in cxx_printable_name_internal (decl=0x7ffff165ad00,
v=2, translate=<optimized out>) at ../../gcc-svn/trunk/gcc/cp/tree.c:1953
#4 0x0000000000b2a8f9 in dump_function_header (dump_file=0x17cb5a0,
fdecl=0x7ffff165ad00, flags=0) at
../../gcc-svn/trunk/gcc/tree-pretty-print.c:3138
#5 0x000000000087f4b1 in rest_of_clean_state () at
../../gcc-svn/trunk/gcc/final.c:4455
#6 0x00000000009f846f in execute_one_pass (pass=pass@entry=0x1639380
<pass_clean_state>) at ../../gcc-svn/trunk/gcc/passes.c:2337
(gdb) list
14383 fndecl_declared_return_type (tree fn)
14384 {
14385 fn = STRIP_TEMPLATE (fn);
14386 if (FNDECL_USED_AUTO (fn))
14387 return (DECL_STRUCT_FUNCTION (fn)->language
14388 ->x_auto_return_pattern);
14389 else
14390 return TREE_TYPE (TREE_TYPE (fn));
14391 }
14392
next prev parent reply other threads:[~2013-05-04 18:48 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-28 14:23 [Bug c++/57102] New: " zsojka at seznam dot cz
2013-04-29 8:09 ` [Bug c++/57102] " rguenth at gcc dot gnu.org
2013-05-04 18:48 ` ubizjak at gmail dot com [this message]
2013-05-04 18:50 ` [Bug c++/57102] [4.9 Regression] ICE: SIGSEGV in fndecl_declared_return_type with -fdump-final-insns= ubizjak at gmail dot com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-57102-4-GVFTHVF4to@http.gcc.gnu.org/bugzilla/ \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).