view gcc/testsuite/gcc.dg/torture/pr86505.c @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
line wrap: on
line source

/* { dg-do run } */

static inline __attribute__(( __always_inline__)) int 
funA(unsigned int param, ...) 
{ 
  return __builtin_va_arg_pack_len(); 
}

static inline __attribute__(( __always_inline__)) int
funB(unsigned int param, ...)
{ 
  return funA(param,  2, 4, __builtin_va_arg_pack()); 
}

int 
testBuiltin(void) 
{ 
  int rc = funB(0,1,2); 
  if (rc != 4)
    return 1;
  return 0;
}

int
main()
{
  int rc = testBuiltin();
  if (rc == 1)
    __builtin_abort ();

  return 0;
}