1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wfree-nonheap-object" } */
4 struct local_caches
*get_local_caches_lcs
;
5 void *calloc(long, long);
12 struct local_caches
*get_local_caches() {
13 if (get_local_caches_lcs
)
14 return get_local_caches_lcs
;
15 get_local_caches_lcs
= calloc(1, 0);
16 return get_local_caches_lcs
;
19 void libtrace_ocache_free() {
20 struct local_caches lcs
= *get_local_caches(), __trans_tmp_1
= lcs
;
22 struct local_caches
*lcs
= &__trans_tmp_1
;
23 lcs
->t_mem_caches
+= 10;
24 __trans_tmp_1
.t_mem_caches
= realloc(__trans_tmp_1
.t_mem_caches
, sizeof(int)); // { dg-warning "called on pointer (?:(?!PHI).)*nonzero offset" }