https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120709
--- Comment #8 from GCC Commits ---
The releases/gcc-15 branch has been updated by Andrew Pinski
:
https://gcc.gnu.org/g:e54a0c57c630c194ad260a53d9dc0e63b6aff607
commit r15-9977-ge54a0c57c630c194ad260a53d9dc0e63b6aff607
Author: Andrew Pinski
Date: Sun Jul 6 10:20:26 2025 -0700
crc: Error out on non-constant poly arguments for the crc builtins
[PR120709]
These builtins requires a constant integer for the third argument but
currently
there is assert rather than error. This fixes that and updates the
documentation too.
Uses the same terms as was being used for the __builtin_prefetch arguments.
Bootstrapped and tested on x86_64-linux-gnu.
PR middle-end/120709
gcc/ChangeLog:
* builtins.cc (expand_builtin_crc_table_based): Error out
instead of asserting the 3rd argument is an integer constant.
* internal-fn.cc (expand_crc_optab_fn): Likewise.
* doc/extend.texi (crc): Document requirement of the poly argument
being a constant.
gcc/testsuite/ChangeLog:
* gcc.dg/crc-non-cst-poly-1.c: New test.
Signed-off-by: Andrew Pinski
(cherry picked from commit be07dd9a96a7a6f8fb59c939eda84d74b54f8182)