Bug path

test_pointer_comparison
‘test_pointer_comparison’: events 1-4
119int test_pointer_comparison (int n)
^~~~~~~~~~~~~~~~~~~~~~~
|
(1) entry to ‘test_pointer_comparison’
[...]
125 if (n > 10)
~
|
(2) following ‘true’ branch (when ‘n > 10’)...
126 ptr = (int *)malloc (sizeof (int) * n);
~~~~~~~~~~~~~~~~~~~~~~~~~
|
(3) ...to here
[...]
132 result = do_stuff (ptr, n);
~~~~~~~~~~~~~~~~~
|
(4) calling ‘do_stuff’ from ‘test_pointer_comparison’
do_stuff
‘do_stuff’: events 5-8
9do_stuff (int *p, int n)
^~~~~~~~
|
(5) entry to ‘do_stuff’
[...]
13 for (i = 0; i < n; i++)
~~~~~
|
(6) following ‘true’ branch (when ‘i < n’)...
14 p[i] = i; /* { dg-warning "dereference of possibly-NULL 'p'" } */
~~~~~~~~
| |
| (8) ‘<unknown>’ could be NULL
(7) ...to here