https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102692
--- Comment #1 from eggert at cs dot ucla.edu ---
Sorry, forgot to mention the incorrect GCC output. Here it is:
-----
analyzer-null-dereference-simple.i: In function ‘fix_overlays_before’:
analyzer-null-dereference-simple.i:79:35: warning: dereference of NULL ‘tail’
[CWE-476] [-Wanalyzer-null-dereference]
79 | if (!tail || end < prev || !tail->next)
| ~~~~^~~~~~
‘fix_overlays_before’: events 1-5
|
| 72 | while (tail
| | ~~~~
| 73 | && (tem = make_lisp_ptr (tail, 5),
| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| | |
| | (1) following ‘false’ branch (when ‘tail’ is NULL)...
| 74 | (end = marker_position (XOVERLAY (tem)->end)) >=
pos))
| | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|......
| 79 | if (!tail || end < prev || !tail->next)
| | ~~~~~~ ~~~~~~~~~~
| | || |
| | || (4) ...to here
| | |(2) ...to here (5) dereference of NULL ‘tail’
| | (3) following ‘false’ branch...
|