aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/builtin-apply5.c
blob: 16892f76a8a777ecef18d9049fa006a59f386c27 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/* { dg-options "-O2 -Wmissing-noreturn -fgnu89-inline" } */
/* { dg-additional-options "-mno-mmx" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
/* { dg-do compile } */

extern void abort (void);

double
foo (int arg)
{
  if (arg != 116)
    abort();
  return arg + 1;
}

__attribute__((noreturn))
double
bar (int arg)
{
  foo (arg);
  __builtin_return (__builtin_apply ((void (*) ()) foo, /* { dg-warning "'noreturn' function does return" } */
				     __builtin_apply_args (), 16));
}