public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/112989] GC ICE with C++, `#include <arm_sve.h>` and `-fsanitize=address` Date: Tue, 12 Dec 2023 22:40:10 +0000 [thread overview] Message-ID: <bug-112989-4-L3ZoJ16WOD@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-112989-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112989 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |rsandifo at gcc dot gnu.org --- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Here is where the 2 builtins are added: ``` Breakpoint 1, aarch64_sve::function_builder::add_function (this=0x7fffffffd980, instance=..., name=0x31d4ca0 "svmla_za64_vg4x1", fntype=0x7ffff7434930, attrs=0x0, required_extensions=5497558138885, overloaded_p=true, placeholder_p=true) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1478 1478 if (t != 0) (gdb) bt #0 aarch64_sve::function_builder::add_function (this=0x7fffffffd980, instance=..., name=0x31d4ca0 "svmla_za64_vg4x1", fntype=0x7ffff7434930, attrs=0x0, required_extensions=5497558138885, overloaded_p=true, placeholder_p=true) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1478 #1 0x00000000017ddeb5 in aarch64_sve::function_builder::add_overloaded_function (this=0x7fffffffd980, instance=..., required_extensions=5497558138885) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1581 #2 0x00000000017ddf7d in operator() (__closure=0x7fffffffd900, types=..., group_suffix_id=aarch64_sve::GROUP_vg4x1, pi=0) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1604 #3 0x00000000017de087 in operator() (__closure=0x7fffffffd8d0, group_suffix_id=aarch64_sve::GROUP_vg4x1, pi=0) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1628 #4 0x00000000017de1c4 in aarch64_sve::function_builder::add_overloaded_functions (this=0x7fffffffd980, group=..., mode=aarch64_sve::MODE_none) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1635 #5 0x00000000017f483d in aarch64_sve::binary_za_slice_opt_single_def::build (this=<optimized out>, b=..., group=...) at ../../gcc/config/aarch64/aarch64-sve-builtins-shapes.cc:1894 #6 0x00000000017de25d in aarch64_sve::function_builder::register_function_group (this=0x7fffffffd980, group=...) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1644 #7 0x00000000017e771b in aarch64_sve::handle_arm_sve_h () at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:4595 #8 0x0000000000da3d75 in aarch64_pragma_aarch64 () at ../../gcc/config/aarch64/aarch64-c.cc:347 #9 0x0000000000bf022f in cp_parser_pragma (parser=0x7ffff73409d8, context=pragma_external, if_p=0x0) at ../../gcc/cp/parser.cc:50751 #10 0x0000000000c2c2ac in cp_parser_toplevel_declaration (parser=0x7ffff73409d8) at ../../gcc/cp/parser.cc:15392 #11 cp_parser_toplevel_declaration (parser=0x7ffff73409d8) at ../../gcc/cp/parser.cc:15383 #12 cp_parser_translation_unit (parser=0x7ffff73409d8) at ../../gcc/cp/parser.cc:5273 #13 c_parse_file () at ../../gcc/cp/parser.cc:50845 #14 0x0000000000d741d2 in c_common_parse_file () at ../../gcc/c-family/c-opts.cc:1301 #15 0x000000000133917e in compile_file () at ../../gcc/toplev.cc:446 #16 0x0000000000a4b151 in do_compile () at ../../gcc/toplev.cc:2150 #17 toplev::main (this=this@entry=0x7fffffffdd5e, argc=<optimized out>, argc@entry=4, argv=<optimized out>, argv@entry=0x7fffffffde88) at ../../gcc/toplev.cc:2306 #18 0x0000000000a4d1ef in main (argc=4, argv=0x7fffffffde88) at ../../gcc/main.cc:39 (gdb) c Continuing. Breakpoint 1, aarch64_sve::function_builder::add_function (this=0x7fffffffd980, instance=..., name=0x31d4d20 "svmla_za64_vg4x1", fntype=0x7ffff640fe70, attrs=0x7ffff64c4aa0, required_extensions=5497558138885, overloaded_p=false, placeholder_p=false) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1478 1478 if (t != 0) (gdb) bt #0 aarch64_sve::function_builder::add_function (this=0x7fffffffd980, instance=..., name=0x31d4d20 "svmla_za64_vg4x1", fntype=0x7ffff640fe70, attrs=0x7ffff64c4aa0, required_extensions=5497558138885, overloaded_p=false, placeholder_p=false) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1478 #1 0x00000000017ddd0a in aarch64_sve::function_builder::add_unique_function (this=0x7fffffffd980, instance=..., return_type=0x7ffff7421f18, argument_types=..., required_extensions=5497558138885, force_direct_overloads=false) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1549 #2 0x00000000017ef6da in aarch64_sve::build_one (b=..., signature=<optimized out>, group=..., mode_suffix_id=<optimized out>, ti=<optimized out>, gi=<optimized out>, pi=0, force_direct_overloads=false) at ../../gcc/config/aarch64/aarch64-sve-builtins-shapes.cc:331 #3 0x00000000017ef7f9 in aarch64_sve::build_all (b=..., signature=signature@entry=0x263bcd7 "_,su32,t1,t1", group=..., mode_suffix_id=mode_suffix_id@entry=aarch64_sve::MODE_none, force_direct_overloads=force_direct_overloads@entry=false) at ../../gcc/config/aarch64/aarch64-sve-builtins-shapes.cc:470 #4 0x00000000017f4855 in aarch64_sve::binary_za_slice_opt_single_def::build (this=<optimized out>, b=..., group=...) at ../../gcc/config/aarch64/aarch64-sve-builtins-shapes.cc:1895 #5 0x00000000017de25d in aarch64_sve::function_builder::register_function_group (this=0x7fffffffd980, group=...) at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:1644 #6 0x00000000017e771b in aarch64_sve::handle_arm_sve_h () at ../../gcc/config/aarch64/aarch64-sve-builtins.cc:4595 #7 0x0000000000da3d75 in aarch64_pragma_aarch64 () at ../../gcc/config/aarch64/aarch64-c.cc:347 #8 0x0000000000bf022f in cp_parser_pragma (parser=0x7ffff73409d8, context=pragma_external, if_p=0x0) at ../../gcc/cp/parser.cc:50751 #9 0x0000000000c2c2ac in cp_parser_toplevel_declaration (parser=0x7ffff73409d8) at ../../gcc/cp/parser.cc:15392 #10 cp_parser_toplevel_declaration (parser=0x7ffff73409d8) at ../../gcc/cp/parser.cc:15383 #11 cp_parser_translation_unit (parser=0x7ffff73409d8) at ../../gcc/cp/parser.cc:5273 #12 c_parse_file () at ../../gcc/cp/parser.cc:50845 #13 0x0000000000d741d2 in c_common_parse_file () at ../../gcc/c-family/c-opts.cc:1301 #14 0x000000000133917e in compile_file () at ../../gcc/toplev.cc:446 #15 0x0000000000a4b151 in do_compile () at ../../gcc/toplev.cc:2150 #16 toplev::main (this=this@entry=0x7fffffffdd5e, argc=<optimized out>, argc@entry=4, argv=<optimized out>, argv@entry=0x7fffffffde88) at ../../gcc/toplev.cc:2306 #17 0x0000000000a4d1ef in main (argc=4, argv=0x7fffffffde88) at ../../gcc/main.cc:39 ``` I used this small patch to debug it: ``` diff --git a/gcc/config/aarch64/aarch64-sve-builtins.cc b/gcc/config/aarch64/aarch64-sve-builtins.cc index 15fa5907de5..4f285f47750 100644 --- a/gcc/config/aarch64/aarch64-sve-builtins.cc +++ b/gcc/config/aarch64/aarch64-sve-builtins.cc @@ -1472,6 +1472,13 @@ function_builder::add_function (const function_instance &instance, { unsigned int code = vec_safe_length (registered_functions); code = (code << AARCH64_BUILTIN_SHIFT) | AARCH64_BUILTIN_SVE; + if (strcmp (name, "svmla_za64_vg4x1") == 0) + { + static int t = 0; + if (t != 0) + gcc_unreachable(); + t++; + } /* We need to be able to generate placeholders to enusre that we have a consistent numbering scheme for function codes between the C and C++ ```
next prev parent reply other threads:[~2023-12-12 22:40 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-12 20:09 [Bug target/112989] New: " pinskia at gcc dot gnu.org 2023-12-12 21:07 ` [Bug target/112989] " mpolacek at gcc dot gnu.org 2023-12-12 21:34 ` pinskia at gcc dot gnu.org 2023-12-12 21:58 ` pinskia at gcc dot gnu.org 2023-12-12 22:15 ` pinskia at gcc dot gnu.org 2023-12-12 22:40 ` pinskia at gcc dot gnu.org [this message] 2024-01-09 18:53 ` [Bug target/112989] [14 Regression] " pinskia at gcc dot gnu.org 2024-01-09 20:07 ` pinskia at gcc dot gnu.org 2024-01-09 20:52 ` pinskia at gcc dot gnu.org 2024-01-10 13:28 ` rguenth at gcc dot gnu.org 2024-01-10 14:21 ` jakub at gcc dot gnu.org 2024-01-10 14:43 ` rsandifo at gcc dot gnu.org 2024-01-10 14:46 ` jakub at gcc dot gnu.org 2024-01-10 14:50 ` rsandifo at gcc dot gnu.org 2024-01-12 12:29 ` cvs-commit at gcc dot gnu.org 2024-01-12 12:29 ` cvs-commit at gcc dot gnu.org 2024-01-12 12:36 ` rsandifo at gcc dot gnu.org 2024-01-23 11:11 ` cvs-commit 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-112989-4-L3ZoJ16WOD@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: linkBe 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).