]> git.ipfire.org Git - thirdparty/gcc.git/commit
testsuite: Add c23-stdarg-4.c test variant where all functions return large struct
authorJakub Jelinek <jakub@redhat.com>
Wed, 28 Feb 2024 08:26:51 +0000 (09:26 +0100)
committerJakub Jelinek <jakub@redhat.com>
Sat, 2 Mar 2024 00:37:26 +0000 (01:37 +0100)
commit84017b72884778c9e70c3cc5856e040907c854cc
tree5a56a3a9b852a6c3fcebd7c5b06373d187564ff7
parent6b8d8a8bce88981554e5ffeb66bcb6b71a869e62
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.

(cherry picked from commit dc30e24b76d570e13a71567a38f7594b104736bf)
gcc/testsuite/gcc.dg/c23-stdarg-6.c [new file with mode: 0644]