diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/winline-10.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/winline-10.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/winline-10.c b/gcc/testsuite/gcc.dg/winline-10.c new file mode 100644 index 00000000000..2106253fcf2 --- /dev/null +++ b/gcc/testsuite/gcc.dg/winline-10.c @@ -0,0 +1,17 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -Winline" } */ + +struct s { int a; }; + +inline void f (x) /* { dg-warning "inlining .* mismatched arg" "" } */ + int x; +{ + asm (""); +} + +void g (struct s x) +{ + f (x); /* { dg-warning "called from here" "" } */ +} + +void f (int x); /* { dg-warning "follows non-prototype definition" } */ |