1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-pure-const-details" } */
4 __attribute__((noinline
, used
, no_icf
))
5 static void *foo (__SIZE_TYPE__ n
)
7 return __builtin_malloc (n
* 10);
10 __attribute__((noinline
, used
, no_icf
))
11 static void *bar(__SIZE_TYPE__ n
, int cond
)
17 p
= __builtin_malloc (n
);
22 /* { dg-final { scan-ipa-dump "Function foo found to be malloc" "pure-const" } } */
23 /* { dg-final { scan-ipa-dump "Function bar found to be malloc" "pure-const" } } */