public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99381] New: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve
@ 2021-03-04 9:56 acoplan at gcc dot gnu.org
2021-03-04 14:37 ` [Bug target/99381] " cvs-commit at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-04 9:56 UTC (permalink / raw)
To: gcc-bugs
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)); }
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99381] SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve
2021-03-04 9:56 [Bug target/99381] New: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve acoplan at gcc dot gnu.org
@ 2021-03-04 14:37 ` cvs-commit at gcc dot gnu.org
2021-03-04 14:39 ` acoplan at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-04 14:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99381
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Alex Coplan <acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:a6bc1680a493de356d6a381718021c6a44401201
commit r11-7510-ga6bc1680a493de356d6a381718021c6a44401201
Author: Alex Coplan <alex.coplan@arm.com>
Date: Thu Mar 4 14:36:39 2021 +0000
aarch64: Add missing error_mark_node check [PR99381]
We were missing a check in function_resolver::require_vector_type to see
if the argument type was already invalid. This was causing us to attempt
to emit a diagnostic and subsequently ICE in print_type. Fixed thusly.
gcc/ChangeLog:
PR target/99381
* config/aarch64/aarch64-sve-builtins.cc
(function_resolver::require_vector_type): Handle error_mark_node.
gcc/testsuite/ChangeLog:
PR target/99381
* gcc.target/aarch64/pr99381.c: New test.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99381] SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve
2021-03-04 9:56 [Bug target/99381] New: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve acoplan at gcc dot gnu.org
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
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-04 14:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99381
--- Comment #2 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Fixed on trunk. Needs backporting to GCC 10.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99381] SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve
2021-03-04 9:56 [Bug target/99381] New: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve acoplan at gcc dot gnu.org
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
4 siblings, 0 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-04 14:47 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99381
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Last reconfirmed| |2021-03-04
Status|UNCONFIRMED |ASSIGNED
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99381] SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve
2021-03-04 9:56 [Bug target/99381] New: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve acoplan at gcc dot gnu.org
` (2 preceding siblings ...)
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
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-11 12:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99381
--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-10 branch has been updated by Alex Coplan
<acoplan@gcc.gnu.org>:
https://gcc.gnu.org/g:6925d4763e469e43b9d06e4a17187215bc03d3c9
commit r10-9436-g6925d4763e469e43b9d06e4a17187215bc03d3c9
Author: Alex Coplan <alex.coplan@arm.com>
Date: Thu Mar 4 14:36:39 2021 +0000
aarch64: Add missing error_mark_node check [PR99381]
We were missing a check in function_resolver::require_vector_type to see
if the argument type was already invalid. This was causing us to attempt
to emit a diagnostic and subsequently ICE in print_type. Fixed thusly.
gcc/ChangeLog:
PR target/99381
* config/aarch64/aarch64-sve-builtins.cc
(function_resolver::require_vector_type): Handle error_mark_node.
gcc/testsuite/ChangeLog:
PR target/99381
* gcc.target/aarch64/pr99381.c: New test.
(cherry picked from commit a6bc1680a493de356d6a381718021c6a44401201)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/99381] SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve
2021-03-04 9:56 [Bug target/99381] New: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve acoplan at gcc dot gnu.org
` (3 preceding siblings ...)
2021-03-11 12:49 ` cvs-commit at gcc dot gnu.org
@ 2021-03-11 12:50 ` acoplan at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-11 12:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99381
Alex Coplan <acoplan at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #4 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-11 12:50 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 9:56 [Bug target/99381] New: SVE: ICE with ACLE intrinsics when missing -march=armv8.2-a+sve acoplan at gcc dot gnu.org
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
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).