public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115560] New: ICE: in type_dependent_expression_p, at cp/pt.cc:28576
@ 2024-06-20 15:34 iamanonymous.cs at gmail dot com
  0 siblings, 0 replies; only message in thread
From: iamanonymous.cs at gmail dot com @ 2024-06-20 15:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115560
           Summary: ICE: in type_dependent_expression_p, at cp/pt.cc:28576
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
  Target Milestone: ---
            Target: x86_64

*******************************************************************************
The compiler produces an internal error in type_dependent_expression_p when
compiling the provided code with the specified options. 
The issue can also be reproduced on Compiler Explorer.

*******************************************************************************
OS and Platform:
# uname -a
Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023
x86_64 x86_64 x86_64 GNU/Linux
*******************************************************************************
# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /root/gdbtest/gcc/obj/../gcc/configure
--prefix=/root/gdbtest/gcc/gcc-15 --enable-languages=c,c++,fortran,go
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240509 (experimental) (GCC) 
*******************************************************************************
Program:
# cat source_code_1.cpp

struct C { void f(auto) noexcept; };
void C::f(auto) noexcept(C::x) {}


*******************************************************************************
Command Lines:
# g++ source_code_1.cpp  -std=c++2a -Wall -Wextra -pedantic
-fsanitize=undefined -fsanitize=address -O2 -c -o source_code_1.o
source_code_1.cpp:3:29: error: ‘x’ is not a member of ‘C’
    3 | void C::f(auto) noexcept(C::x) {}
      |                             ^
source_code_1.cpp:3:6: error: declaration of ‘void C::f(auto:2)’ has a
different exception specifier
    3 | void C::f(auto) noexcept(C::x) {}
      |      ^
source_code_1.cpp:2:17: note: from previous declaration ‘void C::f(auto:1)
noexcept’
    2 | struct C { void f(auto) noexcept; };
      |                 ^
source_code_1.cpp:3:30: internal compiler error: in
type_dependent_expression_p, at cp/pt.cc:28576
    3 | void C::f(auto) noexcept(C::x) {}
      |                              ^
0x82608a type_dependent_expression_p(tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:28576
0xcac924 instantiation_dependent_r
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:28781
0x16e163c walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        /root/gdbtest/gcc/obj/../gcc/gcc/tree.cc:11468
0x16e4db5 walk_tree_without_duplicates_1(tree_node**, tree_node*
(*)(tree_node**, int*, void*), void*, tree_node* (*)(tree_node**, int*,
tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false,
default_hash_traits<tree_node*> >*))
        /root/gdbtest/gcc/obj/../gcc/gcc/tree.cc:11728
0xca8299 instantiation_dependent_uneval_expression_p(tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:28810
0xca8299 instantiation_dependent_expression_p(tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:28820
0xca832c uses_template_parms(tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/pt.cc:11129
0xb5e638 duplicate_decls(tree_node*, tree_node*, bool, bool)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/decl.cc:2662
0xb628c6 grokfndecl
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/decl.cc:11094
0xb69a7b grokdeclarator(cp_declarator const*, cp_decl_specifier_seq*,
decl_context, int, tree_node**)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/decl.cc:15114
0xb6d066 start_function(cp_decl_specifier_seq*, cp_declarator const*,
tree_node*)
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/decl.cc:18212
0xc83107 cp_parser_function_definition_from_specifiers_and_declarator
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/parser.cc:32780
0xc83107 cp_parser_init_declarator
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/parser.cc:23451
0xc5668f cp_parser_simple_declaration
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/parser.cc:15958
0xc8ffea cp_parser_declaration
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/parser.cc:15631
0xc90fea cp_parser_toplevel_declaration
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/parser.cc:15652
0xc90fea cp_parser_translation_unit
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/parser.cc:5284
0xc90fea c_parse_file()
        /root/gdbtest/gcc/obj/../gcc/gcc/cp/parser.cc:51440
0xddf371 c_common_parse_file()
        /root/gdbtest/gcc/obj/../gcc/gcc/c-family/c-opts.cc:1311
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

*******************************************************************************

Also ICE on trunk, compiler explorer:https://godbolt.org/z/KGKv7YG54

*******************************************************************************

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-06-20 15:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-20 15:34 [Bug c++/115560] New: ICE: in type_dependent_expression_p, at cp/pt.cc:28576 iamanonymous.cs at gmail dot com

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).