diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr38338.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr38338.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr38338.c b/gcc/testsuite/gcc.dg/pr38338.c new file mode 100644 index 000000000..e8fcc3c45 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr38338.c @@ -0,0 +1,18 @@ +/* PR middle-end/38338 */ +/* { dg-options "-O0" } */ +/* { dg-options "-O0 -fPIC" { target fpic } } */ + +typedef void (*fnp) (void); + +static char +foo (char x) +{ + return x; +} + +static void * +bar (char x) +{ + void *args = __builtin_apply_args (); + return __builtin_apply ((fnp) foo, args, sizeof (void *)); +} |