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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |rsandifo at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
This is aarch64 backend bug in aarch64_simd_clone_compute_vecsize_and_simdlen.
If you look at the i386 counterpart, for argument checking it does:
  tree type_arg_types = TYPE_ARG_TYPES (TREE_TYPE (node->decl));
  bool decl_arg_p = (node->definition || type_arg_types == NULL_TREE);

  for (t = (decl_arg_p ? DECL_ARGUMENTS (node->decl) : type_arg_types), i = 0;
       t && t != void_list_node; t = TREE_CHAIN (t), i++)
    {
      tree arg_type = decl_arg_p ? TREE_TYPE (t) : TREE_VALUE (t);
but aarch64 doesn't bother and instead it does just:
  for (t = DECL_ARGUMENTS (node->decl); t; t = DECL_CHAIN (t))
    {
      arg_type = TREE_TYPE (t);
The problem with that is that it doesn't check the arguments at all for
function declarations that aren't definitions.

Reply via email to