]> gcc.gnu.org Git - gcc.git/blame - gcc/testsuite/gcc.dg/ipa/pr85734.c
Skip -fdelete-null-pointer-check tests if target keeps_null_pointer_checks
[gcc.git] / gcc / testsuite / gcc.dg / ipa / pr85734.c
CommitLineData
0fac5f2a 1/* { dg-do compile } */
24ce3d94 2/* { dg-options "-O2 -Wsuggest-attribute=malloc -fdelete-null-pointer-checks" } */
1c6ebfdf 3/* { dg-skip-if "" keeps_null_pointer_checks } */
0fac5f2a
PK
4
5__attribute__((noinline))
6static void *f1(__SIZE_TYPE__ sz) /* { dg-bogus "function might be candidate for attribute 'malloc'" } */
7{
8 return __builtin_malloc (sz);
9}
10
11__attribute__((noinline))
12static void *f2(__SIZE_TYPE__ sz) /* { dg-bogus "function might be candidate for attribute 'malloc'" } */
13{
14 return f1 (sz);
15}
16
17void *f3(__SIZE_TYPE__ sz) /* { dg-warning "function might be candidate for attribute 'malloc'" } */
18{
19 return f2(sz);
20}
This page took 4.839481 seconds and 5 git commands to generate.