public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/104470] internal compiler error: Segmentation fault compiling std::variant with -std=c++20
Date: Thu, 10 Feb 2022 06:02:18 +0000	[thread overview]
Message-ID: <bug-104470-4-EHAmkx4Xf5@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-104470-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104470

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
here is the full backtrace:
In file included from t.cc:2:
/home/apinski/upstream-gcc/include/c++/12.0.1/variant: In substitution of
‘template<class ... _Types> template<class _Tp, class> using __accepted_type =
std::variant<_Types>::__to_type<__accepted_index<_Tp> > [with _Tp = _Tp&&;
<template-parameter-2-2> = typename std::enable_if<std::variant<Foo<T>, Bar<T>
>::__not_self<_Tp&&>, void>::type; _Types = {Foo<T>, Bar<T>}]’:
t.cc:21:15:   required from here
/home/apinski/upstream-gcc/include/c++/12.0.1/variant:1384:43: internal
compiler error: Segmentation fault
 1384 |         using __accepted_type = __to_type<__accepted_index<_Tp>>;
      |                                           ^~~~~~~~~~~~~~~~~~~~
0x11fceef crash_signal
        /home/apinski/src/upstream-gcc-git/gcc/gcc/toplev.cc:322
0xba5a12 tsubst_copy_and_build(tree_node*, tree_node*, int, tree_node*, bool,
bool)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:19883
0xbb95df tsubst_expr(tree_node*, tree_node*, int, tree_node*, bool)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:19316
0xbc306e tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:13423
0xbc3292 tsubst_template_args(tree_node*, tree_node*, int, tree_node*)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:13405
0xbb4a9e tsubst(tree_node*, tree_node*, int, tree_node*)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:15461
0xbc4197 tsubst_decl
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:14815
0xbb3792 instantiate_template_1
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:21470
0xbb4b7f instantiate_template(tree_node*, tree_node*, int)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:21529
0xbb4b7f instantiate_alias_template
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:21567
0xbb4b7f tsubst(tree_node*, tree_node*, int, tree_node*)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:15462
0xbd278e rewrite_tparm_list
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29006
0xbddce4 alias_ctad_tweaks
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29484
0xb9e9aa deduction_guides_for
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29646
0xb9ec34 do_class_deduction
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29777
0xb9ec34 do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/pt.cc:29934
0xa84b86 cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/decl.cc:7947
0xb767e4 cp_parser_init_declarator
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/parser.cc:22811
0xb51428 cp_parser_simple_declaration
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/parser.cc:15284
0xb531d0 cp_parser_declaration_statement
        /home/apinski/src/upstream-gcc-git/gcc/gcc/cp/parser.cc:14365
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

  parent reply	other threads:[~2022-02-10  6:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 18:25 [Bug c++/104470] New: " serpent7776 at gmail dot com
2022-02-10  1:09 ` [Bug c++/104470] " pinskia at gcc dot gnu.org
2022-02-10  6:02 ` pinskia at gcc dot gnu.org [this message]
2022-02-10  8:18 ` pinskia at gcc dot gnu.org
2022-04-22 11:57 ` max.kanold@nu-cost.com
2022-04-22 15:03 ` mpolacek at gcc dot gnu.org
2022-04-22 15:10 ` [Bug c++/104470] [10/11/12 Regression] " mpolacek at gcc dot gnu.org
2022-04-26 22:34 ` jason at gcc dot gnu.org
2022-04-29 21:25 ` [Bug c++/104470] [10/11/12/13 " cvs-commit at gcc dot gnu.org
2022-05-04 21:59 ` cvs-commit at gcc dot gnu.org
2022-05-15 16:29 ` [Bug c++/104470] [10/11/12 " cvs-commit at gcc dot gnu.org
2022-06-28 10:48 ` [Bug c++/104470] [10/11 " jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug c++/104470] [11 " rguenth 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-104470-4-EHAmkx4Xf5@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).