libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / Wuse-after-free-3.c
blobd1bcfcb3dda447e8581e8c1c032dcaf9baf624d4
1 /* PR middle-end/104232 - spurious -Wuse-after-free after conditional free
2 { dg-do compile }
3 { dg-options "-O2 -Wall" } */
5 char* f (void);
7 static inline void freep (void *p)
9 __builtin_free (*(void**)p); // { dg-bogus "-Wuse-after-free" }
12 int test_no_warn (void)
14 __attribute__ ((__cleanup__ (freep))) char *s = 0, *t = 0;
16 t = f ();
17 if (!t)
18 return 0;
20 s = f ();
21 return 1;