Bug path

‘test_4’: events 1-5
45 int *ptr = (int *)malloc (sizeof (int));
^~~~~~~~~~~~~~~~~~~~~
|
(1) allocated here
46 if (ptr)
~
|
(2) assuming ‘ptr’ is NULL
(3) following ‘false’ branch (when ‘ptr’ is NULL)...
[...]
49 *ptr = 43; /* { dg-warning "dereference of NULL 'ptr'" } */
~~~~~~~~~
|
(4) ...to here
(5) dereference of NULL ‘ptr’