public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/115476] New: __has_unique_object_representation ICE with array of uninstantiated type of unknown bound
@ 2024-06-13 15:08 mital at mitalashok dot co.uk
  2024-06-13 15:20 ` [Bug c++/115476] [13/14/15 Regression] " pinskia at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: mital at mitalashok dot co.uk @ 2024-06-13 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115476
           Summary: __has_unique_object_representation ICE with array of
                    uninstantiated type of unknown bound
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: mital at mitalashok dot co.uk
  Target Milestone: ---

Discovered when libc++ removed the `remove_extent_t` from the standard type
trait: https://github.com/llvm/llvm-project/issues/95311 /
https://github.com/llvm/llvm-project/pull/69241

https://gcc.godbolt.org/z/e136MGrG1

    template <int>
    class Foo {
      int x;
    };
    static_assert(__has_unique_object_representations(Foo<0>[]));

With this error:

./test.cpp:6:59: internal compiler error: Segmentation fault
    6 | static_assert(__has_unique_object_representations(Foo<0>[]));
      |                                                           ^
0x13b4fb3 crash_signal
        ../../gcc/gcc/toplev.cc:319
0x7fb3eb34451f ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0
0xd16bb0 contains_struct_check(tree_node const*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/gcc/tree.h:4065
0xd16bb0 wi::extended_tree<128>::extended_tree(tree_node const*)
        ../../gcc/gcc/tree.h:6477
0xd16bb0 generic_wide_int<wi::extended_tree<128> >::generic_wide_int<tree_node
const*>(tree_node const* const&)
        ../../gcc/gcc/wide-int.h:847
0xd16bb0 wi::to_offset(tree_node const*)
        ../../gcc/gcc/tree.h:6429
0xd16bb0 record_has_unique_obj_representations
        ../../gcc/gcc/cp/tree.cc:4836
0xd165a0 type_has_unique_obj_representations(tree_node const*)
        ../../gcc/gcc/cp/tree.cc:4751
0xcf620d finish_trait_expr(unsigned int, cp_trait_kind, tree_node*, tree_node*)
        ../../gcc/gcc/cp/semantics.cc:13088
0xc59ee7 cp_parser_trait
        ../../gcc/gcc/cp/parser.cc:11314
0xc4bba9 cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.cc:7954
0xc244cf cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.cc:10413
0xc25492 cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.cc:10757
0xc2754d cp_parser_constant_expression
        ../../gcc/gcc/cp/parser.cc:11047
0xc29fce cp_parser_static_assert
        ../../gcc/gcc/cp/parser.cc:17105
0xc6f2d4 cp_parser_declaration
        ../../gcc/gcc/cp/parser.cc:15715
0xc6fdda cp_parser_toplevel_declaration
        ../../gcc/gcc/cp/parser.cc:15736
0xc6fdda cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.cc:5299
0xc6fdda c_parse_file()
        ../../gcc/gcc/cp/parser.cc:51933
0xdc6629 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.cc:1322

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

end of thread, other threads:[~2024-06-25 21:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-06-13 15:08 [Bug c++/115476] New: __has_unique_object_representation ICE with array of uninstantiated type of unknown bound mital at mitalashok dot co.uk
2024-06-13 15:20 ` [Bug c++/115476] [13/14/15 Regression] " pinskia at gcc dot gnu.org
2024-06-13 15:36 ` mpolacek at gcc dot gnu.org
2024-06-13 15:45 ` mpolacek at gcc dot gnu.org
2024-06-13 15:52 ` mital at mitalashok dot co.uk
2024-06-13 15:56 ` mital at mitalashok dot co.uk
2024-06-13 16:22 ` mpolacek at gcc dot gnu.org
2024-06-13 16:26 ` mpolacek at gcc dot gnu.org
2024-06-13 18:14 ` mital at mitalashok dot co.uk
2024-06-18 14:39 ` mpolacek at gcc dot gnu.org
2024-06-25 21:45 ` cvs-commit at gcc dot gnu.org
2024-06-25 21:46 ` [Bug c++/115476] [13/14 " mpolacek 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).