testsuite: Add c23-stdarg-4.c test variant where all functions return large struct
commitdc30e24b76d570e13a71567a38f7594b104736bf
authorJakub Jelinek <jakub@redhat.com>
Wed, 28 Feb 2024 08:26:51 +0000 (28 09:26 +0100)
committerJakub Jelinek <jakub@redhat.com>
Wed, 28 Feb 2024 08:26:51 +0000 (28 09:26 +0100)
tree85d1afa2a4dde1e529c083f73406be2aed43ed08
parent615b62aada6cc42759e5c43e196dab6c524925d6
testsuite: Add c23-stdarg-4.c test variant where all functions return large struct

I think we have no coverage for the case where structure_value_addr_parm and
TYPE_NO_NAMED_ARGS_STDARG_P are both true.  The
  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 (TYPE_NO_NAMED_ARGS_STDARG_P (funtype))
    n_named_args = 0;
  else
    /* If we know nothing, treat all args as named.  */
    n_named_args = num_actuals;
code should probably have n_named_args = structure_value_addr_parm;
instead of n_named_args = 0;, this testcase is an attempt to see if
it is broken on any target.

2024-02-28  Jakub Jelinek  <jakub@redhat.com>

* gcc.dg/c23-stdarg-6.c: New test.
gcc/testsuite/gcc.dg/c23-stdarg-6.c [new file with mode: 0644]