public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105634] New: ICE: Floating point exception in maybe_warn_class_memaccess
@ 2022-05-17 18:46 gscfq@t-online.de
  2022-05-17 19:01 ` [Bug c++/105634] [9/10/11/12/13 Regression] " mpolacek at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: gscfq@t-online.de @ 2022-05-17 18:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105634
           Summary: ICE: Floating point exception in
                    maybe_warn_class_memaccess
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started with r8 :


$ cat z1.cc
struct s
{
  struct {} a[] = 1.0;
  void f (char *c)
  {
    s s;
    __builtin_memcpy (&s, c, sizeof(s));
  }
};


$ g++-13-20220515 -c z1.cc -Wall
z1.cc:3:13: error: flexible array member 's::a' in an otherwise empty 'struct
s'
    3 |   struct {} a[] = 1.0;
      |             ^
z1.cc:3:13: error: initializer for flexible array member 's::<unnamed struct>
s::a []'
z1.cc: In member function 'void s::f(char*)':
z1.cc:7:22: internal compiler error: Floating point exception
    7 |     __builtin_memcpy (&s, c, sizeof(s));
      |     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
0x10da4cf crash_signal
        ../../gcc/toplev.cc:322
0x736147 maybe_warn_class_memaccess
        ../../gcc/cp/call.cc:10332
0x736147 build_over_call
        ../../gcc/cp/call.cc:9880
0x736a87 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ../../gcc/cp/call.cc:4847
0x9ecc5e finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/cp/semantics.cc:2895
0x91b288 cp_parser_postfix_expression
        ../../gcc/cp/parser.cc:7888
0x932a91 cp_parser_unary_expression
        ../../gcc/cp/parser.cc:9037
0x90017f cp_parser_cast_expression
        ../../gcc/cp/parser.cc:9941
0x900a41 cp_parser_binary_expression
        ../../gcc/cp/parser.cc:10043
0x901470 cp_parser_assignment_expression
        ../../gcc/cp/parser.cc:10347
0x90315c cp_parser_expression
        ../../gcc/cp/parser.cc:10517
0x906597 cp_parser_expression_statement
        ../../gcc/cp/parser.cc:12734
0x916ab4 cp_parser_statement
        ../../gcc/cp/parser.cc:12526
0x917c94 cp_parser_statement_seq_opt
        ../../gcc/cp/parser.cc:12883
0x917d77 cp_parser_compound_statement
        ../../gcc/cp/parser.cc:12835
0x93ea00 cp_parser_function_body
        ../../gcc/cp/parser.cc:25186
0x93ea00 cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/cp/parser.cc:25237
0x93f07a cp_parser_function_definition_after_declarator
        ../../gcc/cp/parser.cc:31369
0x93f430 cp_parser_late_parsing_for_member
        ../../gcc/cp/parser.cc:32335
0x911802 cp_parser_class_specifier_1
        ../../gcc/cp/parser.cc:26305

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

end of thread, other threads:[~2022-07-19 18:26 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 18:46 [Bug c++/105634] New: ICE: Floating point exception in maybe_warn_class_memaccess gscfq@t-online.de
2022-05-17 19:01 ` [Bug c++/105634] [9/10/11/12/13 Regression] " mpolacek at gcc dot gnu.org
2022-05-17 19:05 ` mpolacek at gcc dot gnu.org
2022-05-18 14:33 ` cvs-commit at gcc dot gnu.org
2022-05-18 14:36 ` [Bug c++/105634] [9/10/11/12 " mpolacek at gcc dot gnu.org
2022-07-19 17:13 ` mpolacek at gcc dot gnu.org
2022-07-19 18:25 ` cvs-commit at gcc dot gnu.org
2022-07-19 18:26 ` [Bug c++/105634] [9/10/11 " 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).