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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-10-31
              Build|powerpc64-linux-gnu,        |
                   |powerpc64le-linux-gnu       |
               Host|powerpc64-linux-gnu,        |
                   |powerpc64le-linux-gnu       |
                 CC|                            |ebotcazou at gcc dot gnu.org
             Target|powerpc64-linux-gnu,        |
                   |powerpc64le-linux-gnu       |
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
Likewise on SPARC64.  It's a TARGET_STRICT_ARGUMENT_NAMING target, so we have
in expand_call:

  /* Count the arguments and set NUM_ACTUALS.  */
  num_actuals =
    call_expr_nargs (exp) + num_complex_actuals + structure_value_addr_parm;

  /* Compute number of named args.
     First, do a raw count of the args for INIT_CUMULATIVE_ARGS.  */

  if (type_arg_types != 0)
    n_named_args
      = (list_length (type_arg_types)
         /* Count the struct value address, if it is passed as a parm.  */
         + structure_value_addr_parm);
  else
    /* If we know nothing, treat all args as named.  */
    n_named_args = num_actuals;

which yields n_named_args = num_actuals since type_arg_types == 0 and then:

  if (type_arg_types != 0
      && targetm.calls.strict_argument_naming (args_so_far))
    ;

so n_named_args = num_actuals in the end and the game is over.

Reply via email to