https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109580

--- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
The warning is emitted on this statement:

  _23 = _3 | _5;

within this basic block in the optimized code:

  <bb 3> [local count: 217325344]:
  nfd_26 = emacs_open_noquit ("/dev/null", 2, 0);
  _3 = nfd_26 < 0;
  _4 = dup2 (nfd_26, 0);
  _5 = _4 < 0;
  _23 = _3 | _5;
  _6 = dup2 (nfd_26, 1);
  [...snip...]

where the statement has UNKNOWN_LOCATION for its source location.

So there are several things going on here:

(a) the statement has UNKNOWN_LOCATION, rather than a meaningful source
location

(b) pragmas don't affect statements at UNKNOWN_LOCATION; perhaps they should?

(c) the analyzer has some logic to workaround stmt bad locations (stmt_finder);
perhaps it could use it in this case

Reply via email to