public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "reichelt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/59066] [C++11] 'using' instead of 'typedef' causes a segmentation fault.
Date: Fri, 14 Feb 2014 21:16:00 -0000	[thread overview]
Message-ID: <bug-59066-4-h8JuBtnu0M@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-59066-4@http.gcc.gnu.org/bugzilla/>

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2014-02-14
                 CC|                            |reichelt at gcc dot gnu.org
            Summary|C++11, 'using' instead of   |[C++11] 'using' instead of
                   |'typedef' causes a          |'typedef' causes a
                   |segmentation fault.         |segmentation fault.
     Ever confirmed|0                           |1
      Known to fail|                            |4.7.0, 4.8.0, 4.9.0

--- Comment #4 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Confirmed. Reduced testcase that crashes since GCC 4.7.0 when template
alias (aka 'using') was introduced:

============================================================================
template<typename T, template <typename> class U> void foo(const U<T>&) {}

template<typename> struct A
{
  using B = A;
  B bar();
};

void baz()
{
  foo(A<int>().bar());
}
============================================================================

Stack trace with current 4.8 branch:

bug.cc: In function 'void baz()':
bug.cc:11:22: internal compiler error: Segmentation fault
   foo(A<int>().bar());
                      ^
0xad469f crash_signal
        ../../gcc/gcc/toplev.c:332
0xcff5e2 tree_check
        ../../gcc/gcc/tree.h:3683
0xcff5e2 make_decl_rtl(tree_node*)
        ../../gcc/gcc/varasm.c:1197
0x7d72f3 rtx_for_function_call
        ../../gcc/gcc/calls.c:1675
0x7d72f3 expand_call(tree_node*, rtx_def*, int)
        ../../gcc/gcc/calls.c:2983
0x8aadcd expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**)
        ../../gcc/gcc/expr.c:10263
0x7e82fd expand_call_stmt
        ../../gcc/gcc/cfgexpand.c:2114
0x7e82fd expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:2152
0x7e82fd expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:2304
0x7e9162 expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:4138
0x7eacdc gimple_expand_cfg
        ../../gcc/gcc/cfgexpand.c:4657
Please submit a full bug report, [etc.]


Stack trace with trunk:

cc1plus: internal compiler error: Segmentation fault
0xba523f crash_signal
        ../../gcc/gcc/toplev.c:337
0x87e004 tree_check
        ../../gcc/gcc/tree.h:2918
0x87e004 decl_assembler_name_hash
        ../../gcc/gcc/symtab.c:98
0x87e46f insert_to_assembler_name_hash
        ../../gcc/gcc/symtab.c:209
0x87e5c1 symtab_initialize_asm_name_hash
        ../../gcc/gcc/symtab.c:432
0x88cda2 analyze_functions
        ../../gcc/gcc/cgraphunit.c:1124
0x88e2a5 finalize_compilation_unit()
        ../../gcc/gcc/cgraphunit.c:2320
0x689cae cp_write_global_declarations()
        ../../gcc/gcc/cp/decl2.c:4448
Please submit a full bug report, [etc.]


  parent reply	other threads:[~2014-02-14 21:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-10 11:44 [Bug c++/59066] New: Segmentation fault alexandre.hamez at gmail dot com
2013-11-10 12:03 ` [Bug c++/59066] " alexandre.hamez at gmail dot com
2013-11-10 13:00 ` redi at gcc dot gnu.org
2013-11-10 13:22 ` [Bug c++/59066] C+11, 'using' instead of 'typedef' causes a segmentation fault alexandre.hamez at gmail dot com
2013-11-13  9:34 ` [Bug c++/59066] C++11, " paolo.carlini at oracle dot com
2014-02-14 21:16 ` reichelt at gcc dot gnu.org [this message]
2014-02-26 21:56 ` [Bug c++/59066] [C++11] " reichelt at gcc dot gnu.org
2014-02-27 17:04 ` jason at gcc dot gnu.org

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-59066-4-h8JuBtnu0M@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).