Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/ipa/propmalloc-1.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-O2 -fdump-ipa-pure-const-details -fdelete-null-pointer-checks" } */ | |
3 | |
4 __attribute__((noinline, no_icf, used)) | |
5 static void *f(__SIZE_TYPE__ n) | |
6 { | |
7 void *p = __builtin_malloc (n); | |
8 if (p == 0) | |
9 __builtin_abort (); | |
10 return p; | |
11 } | |
12 | |
13 __attribute__((noinline, no_icf, used)) | |
14 static void *bar(__SIZE_TYPE__ n) | |
15 { | |
16 void *p = f (n); | |
17 return p; | |
18 } | |
19 | |
20 /* { dg-final { scan-ipa-dump "Function f found to be malloc" "pure-const" } } */ | |
21 /* { dg-final { scan-ipa-dump "Function bar found to be malloc" "pure-const" } } */ |