public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "acoplan at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/99381] New: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve Date: Thu, 04 Mar 2021 09:56:11 +0000 [thread overview] Message-ID: <bug-99381-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99381 Bug ID: 99381 Summary: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: acoplan at gcc dot gnu.org Target Milestone: --- For the following C testcase: #include <arm_sve.h> _Bool a; int main() { a = svaddv(svptrue_b8(), svdup_s8(0)); } we ICE while printing a diagnostic if the -march=armv8.2-a+sve flag is omitted: $ aarch64-linux-gnu-gcc -c test.c test.c: In function ‘main’: test.c:3:25: error: ACLE function ‘svptrue_b8’ requires ISA extension ‘sve’ 3 | int main() { a = svaddv(svptrue_b8(), svdup_s8(0)); } | ^~~~~~~~~~ test.c:3:25: note: you can enable ‘sve’ using the command-line option ‘-march’, or by using the ‘target’ attribute or pragma ‘ in print_type, at c/c-objc-common.c:188 3 | int main() { a = svaddv(svptrue_b8(), svdup_s8(0)); } | ^~~ 0x741fee print_type /home/alecop01/toolchain/src/gcc/gcc/c/c-objc-common.c:188 0x74237b c_tree_printer /home/alecop01/toolchain/src/gcc/gcc/c/c-objc-common.c:310 0x1c518a0 pp_format(pretty_printer*, text_info*) /home/alecop01/toolchain/src/gcc/gcc/pretty-print.c:1475 0x1c33829 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) /home/alecop01/toolchain/src/gcc/gcc/diagnostic.c:1244 0x1c33d3a diagnostic_impl /home/alecop01/toolchain/src/gcc/gcc/diagnostic.c:1406 0x1c34813 error_at(unsigned int, char const*, ...) /home/alecop01/toolchain/src/gcc/gcc/diagnostic.c:1729 0x12c1a59 aarch64_sve::function_resolver::require_vector_type(unsigned int, aarch64_sve::vector_type_index) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve-builtins.cc:1472 0x12c20c2 aarch64_sve::function_resolver::check_gp_argument(unsigned int, unsigned int&, unsigned int&) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve-builtins.cc:2132 0x12c82dd aarch64_sve::function_resolver::resolve_uniform(unsigned int, unsigned int) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve-builtins.cc:2273 0x12cbeb7 aarch64_sve::reduction_wide_def::resolve(aarch64_sve::function_resolver&) const /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve-builtins-shapes.cc:2393 0x12c20e6 aarch64_sve::function_resolver::resolve() /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve-builtins.cc:2321 0x12c63fe aarch64_sve::resolve_overloaded_builtin(unsigned int, unsigned int, vec<tree_node*, va_gc, vl_embed>*) /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-sve-builtins.cc:3565 0x825c46 aarch64_resolve_overloaded_builtin /home/alecop01/toolchain/src/gcc/gcc/config/aarch64/aarch64-c.c:322 0x7c14a6 resolve_overloaded_builtin(unsigned int, tree_node*, vec<tree_node*, va_gc, vl_embed>*) /home/alecop01/toolchain/src/gcc/gcc/c-family/c-common.c:7598 0x729cca c_build_function_call_vec(unsigned int, vec<unsigned int, va_heap, vl_ptr>, tree_node*, vec<tree_node*, va_gc, vl_embed>*, vec<tree_node*, va_gc, vl_embed>*) /home/alecop01/toolchain/src/gcc/gcc/c/c-typeck.c:3210 0x758769 c_parser_postfix_expression_after_primary /home/alecop01/toolchain/src/gcc/gcc/c/c-parser.c:10464 0x74c1de c_parser_postfix_expression /home/alecop01/toolchain/src/gcc/gcc/c/c-parser.c:10137 0x754f1f c_parser_unary_expression /home/alecop01/toolchain/src/gcc/gcc/c/c-parser.c:8227 0x754fff c_parser_cast_expression /home/alecop01/toolchain/src/gcc/gcc/c/c-parser.c:8066 0x755276 c_parser_binary_expression /home/alecop01/toolchain/src/gcc/gcc/c/c-parser.c:7869 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. Notably the problem doesn't occur for the analogous C++ testcase: #include <arm_sve.h> bool a; int main() { a = svaddv(svptrue_b8(), svdup_s8(0)); } or for the C testcase if we use the specialised version of svaddv (instead of the overload): #include <arm_sve.h> _Bool a; int main() { a = svaddv_s8(svptrue_b8(), svdup_s8(0)); }
next reply other threads:[~2021-03-04 9:56 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-04 9:56 acoplan at gcc dot gnu.org [this message] 2021-03-04 14:37 ` [Bug target/99381] " cvs-commit at gcc dot gnu.org 2021-03-04 14:39 ` acoplan at gcc dot gnu.org 2021-03-04 14:47 ` acoplan at gcc dot gnu.org 2021-03-11 12:49 ` cvs-commit at gcc dot gnu.org 2021-03-11 12:50 ` acoplan 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-99381-4@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).