public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94462] New: ICE in duplicate_decls, at cp/decl.c:1456
@ 2020-04-02 19:43 asolokha at gmx dot com
  2020-04-03  7:12 ` [Bug c++/94462] [10 Regression] ICE in duplicate_decls, at cp/decl.c:1456 since r10-6586-gd6ef77e023cfe0bb marxin at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2020-04-02 19:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94462
           Summary: ICE in duplicate_decls, at cp/decl.c:1456
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-10.0.1-alpha20200329 snapshot (g:60c254b279e8e8443b8ad26cc46b9e4084cff66c)
ICEs when compiling the following testcase, extracted from
test/CXX/except/except.spec/p11-2a.cpp from the clang 10.0.0 test suite, w/
-std=c++2a:

namespace std {
  struct strong_ordering {
  };
}

namespace Synth {
  struct B {
    friend std::strong_ordering operator<=>(B, B) = default;
  };

  struct C {
    friend bool operator==(C, C);
  };
}

% g++-10.0.1 -std=c++2a -c nfj6urxw.cpp
nfj6urxw.cpp:12:32: internal compiler error: in duplicate_decls, at
cp/decl.c:1456
   12 |     friend bool operator==(C, C);
      |                                ^
0x60bd06 duplicate_decls(tree_node*, tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/decl.c:1456
0x973a60 do_pushdecl
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/name-lookup.c:3045
0x9759a3 pushdecl(tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/name-lookup.c:3174
0x9759a3 do_pushdecl_with_scope
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/name-lookup.c:3856
0x975b81 pushdecl_namespace_level(tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/name-lookup.c:5080
0x936333 do_friend(tree_node*, tree_node*, tree_node*, tree_node*,
overload_flags, bool)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/friend.c:627
0x90082c grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/decl.c:13363
0x91d4cf grokfield(cp_declarator const*, cp_decl_specifier_seq*, tree_node*,
bool, tree_node*, tree_node*)
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/decl2.c:841
0x9c1f06 cp_parser_member_declaration
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:25331
0x994d61 cp_parser_member_specification_opt
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:24775
0x994d61 cp_parser_class_specifier_1
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:23872
0x996eab cp_parser_class_specifier
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:24179
0x996eab cp_parser_type_specifier
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:17708
0x997fb5 cp_parser_decl_specifier_seq
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:14356
0x998a54 cp_parser_simple_declaration
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:13610
0x9c3302 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:13430
0x9c3042 cp_parser_toplevel_declaration
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:13458
0x9c3042 cp_parser_declaration_seq_opt
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:13306
0x9c3042 cp_parser_namespace_body
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:19716
0x9c3042 cp_parser_namespace_definition
       
/var/tmp/portage/sys-devel/gcc-10.0.1_alpha20200329/work/gcc-10-20200329/gcc/cp/parser.c:19694

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

end of thread, other threads:[~2020-04-07  4:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-02 19:43 [Bug c++/94462] New: ICE in duplicate_decls, at cp/decl.c:1456 asolokha at gmx dot com
2020-04-03  7:12 ` [Bug c++/94462] [10 Regression] ICE in duplicate_decls, at cp/decl.c:1456 since r10-6586-gd6ef77e023cfe0bb marxin at gcc dot gnu.org
2020-04-03  7:13 ` marxin at gcc dot gnu.org
2020-04-06 15:26 ` jason at gcc dot gnu.org
2020-04-07  4:11 ` cvs-commit at gcc dot gnu.org
2020-04-07  4:12 ` jason 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).