2 /* { dg-do compile } */
3 /* { dg-options "-Winfinite-recursion" } */
5 typedef __SIZE_TYPE__
size_t;
6 int memcmp (const void *, const void *, size_t);
8 extern inline __attribute__((always_inline
, gnu_inline
)) int
9 memcmp (const void *p
, const void *q
, size_t size
) /* { dg-warning "infinite recursion detected" } */
10 { /* { dg-error "inlining failed in call to" "" { target *-*-* } .-1 } */
11 return memcmp (p
, q
, size
); /* { dg-message "recursive call" } */
12 } /* { dg-message "called from here" "" { target *-*-* } .-1 } */
15 foo (const void *p
, const void *q
, size_t size
)
17 return memcmp (p
, q
, size
);