public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "asolokha at gmx dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/108566] New: [11/12/13 Regression] ICE: tree check: expected tree that contains 'decl with visibility' structure, have 'field_decl' in write_unqualified_name, at cp/mangle.cc:1438
Date: Fri, 27 Jan 2023 02:59:25 +0000	[thread overview]
Message-ID: <bug-108566-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 108566
           Summary: [11/12/13 Regression] ICE: tree check: expected tree
                    that contains 'decl with visibility' structure, have
                    'field_decl' in write_unqualified_name, at
                    cp/mangle.cc:1438
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

gcc 13.0.1 20230122 snapshot (g:844eab81da3f49da88e8bb02e2b1255ba88d02b0) ICEs
when compiling the following testcase, extracted from
test/CodeGenCXX/mangle-nttp-anon-union.cpp from the clang 15 test suite, w/
-std=c++20:

template<typename T>
struct wrapper1 {
  union {
    struct {
      T RightName;
    };
  };
};

template<auto tparam> void dummy(){}

void uses() {
  dummy<wrapper1<double>{123.0}>();
}

% g++-13 -std=c++20 -c h6lcbgyp.cpp
h6lcbgyp.cpp: In function 'void uses()':
h6lcbgyp.cpp:13:33: internal compiler error: tree check: expected tree that
contains 'decl with visibility' structure, have 'field_decl' in
write_unqualified_name, at cp/mangle.cc:1438
   13 |   dummy<wrapper1<double>{123.0}>();
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
0x894b25 tree_contains_struct_check_failed(tree_node const*,
tree_node_structure_enum, char const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/tree.cc:9028
0x700b5b contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/tree.h:3644
0x700b5b write_unqualified_name
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/mangle.cc:1438
0xa7b3b5 write_expression
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/mangle.cc:3424
0xa7b373 write_expression
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/mangle.cc:3430
0xa7e18a mangle_template_parm_object(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/mangle.cc:4607
0xb6b6af create_template_parm_object
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/pt.cc:7227
0xb6b6af convert_nontype_argument
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/pt.cc:7734
0xb6b6af convert_template_argument
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/pt.cc:8659
0xb6c402 coerce_template_parms(tree_node*, tree_node*, tree_node*, int, bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/pt.cc:9151
0xb8bbc5 fn_type_unification(tree_node*, tree_node*, tree_node*, tree_node*
const*, unsigned int, tree_node*, unification_kind_t, int, conversion**, bool,
bool)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/pt.cc:22255
0x96c4a4 add_template_candidate_real
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/call.cc:3593
0x96d6b6 add_template_candidate
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/call.cc:3681
0x96d6b6 add_candidates
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/call.cc:6593
0x976811 add_candidates
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/call.cc:4891
0x976811 perform_overload_resolution
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/call.cc:4908
0x97b0c2 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/call.cc:5015
0xbae6da finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/semantics.cc:2923
0xb08fa8 cp_parser_postfix_expression
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/parser.cc:7957
0xaf02e4 cp_parser_binary_expression
       
/var/tmp/portage/sys-devel/gcc-13.0.1_p20230122/work/gcc-13-20230122/gcc/cp/parser.cc:10101

             reply	other threads:[~2023-01-27  2:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-27  2:59 asolokha at gmx dot com [this message]
2023-01-27  3:16 ` [Bug c++/108566] " pinskia at gcc dot gnu.org
2023-01-27  3:19 ` [Bug c++/108566] ICE: tree check: expected tree that contains 'decl with visibility' structure, have 'field_decl' in write_unqualified_name with anonymous struct inside an anonymous union pinskia at gcc dot gnu.org
2023-01-27  3:21 ` pinskia at gcc dot gnu.org
2023-01-27  3:29 ` pinskia at gcc dot gnu.org
2023-02-06 13:51 ` [Bug c++/108566] [11/12/13 Regression] ICE: tree check: expected tree that contains 'decl with visibility' structure, have 'field_decl' in write_unqualified_name with anonymous struct inside an anonymous union since r11-2016-g6324c52bba490baa marxin at gcc dot gnu.org
2023-03-09 23:35 ` jason at gcc dot gnu.org
2023-03-10  3:28 ` jason at gcc dot gnu.org
2023-03-10 13:54 ` cvs-commit at gcc dot gnu.org
2023-03-10 13:55 ` [Bug c++/108566] [11/12 " jason at gcc dot gnu.org
2023-03-15 10:01 ` rguenth at gcc dot gnu.org
2023-04-18 20:45 ` cvs-commit at gcc dot gnu.org
2023-05-29 10:07 ` [Bug c++/108566] [11 " jakub 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-108566-4@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).