c++: Fix ICE with #embed/RAW_DATA_CST after list conversion [PR118671]
[official-gcc.git] / gcc / testsuite / gcc.dg / ipa / propmalloc-1.c
blobf5e867663c972bec355c3ee9d8e28554b18bb96c
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -fdump-ipa-pure-const-details -fdelete-null-pointer-checks" } */
3 /* { dg-skip-if "" keeps_null_pointer_checks } */
5 __attribute__((noinline, no_icf, used))
6 static void *f(__SIZE_TYPE__ n)
8 void *p = __builtin_malloc (n);
9 if (p == 0)
10 __builtin_abort ();
11 return p;
14 __attribute__((noinline, no_icf, used))
15 static void *bar(__SIZE_TYPE__ n)
17 void *p = f (n);
18 return p;
21 /* { dg-final { scan-ipa-dump "Function f/\[0-9+\]+ found to be malloc" "pure-const" } } */
22 /* { dg-final { scan-ipa-dump "Function bar/\[0-9+\]+ found to be malloc" "pure-const" } } */