public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/94447] New: Not handling CONSTRUCTOR tree code
@ 2020-04-01 16:10 dmalcolm at gcc dot gnu.org
  2020-04-28 13:26 ` [Bug analyzer/94447] " cvs-commit at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2020-04-01 16:10 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94447
           Summary: Not handling CONSTRUCTOR tree code
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

Consider e.g.:

struct foo
{
  int *v;
};

int test (void)
{
  struct foo f = {};
  return *f.v;
}

This currently reports
t.c: In function ‘test’:
t.c:9:10: warning: use of uninitialized value ‘<unknown>’ [CWE-457]
[-Wanalyzer-use-of-uninitialized-value]
    9 |   return *f.v;
      |          ^~~~
  ‘test’: event 1
    |
    |

when it should be a NULL dereference.

The f = {}; shows up as f = {}; in the gimple dump, a CONSTRUCTOR, and
region_model::on_assignment is hitting a TODO for that tree code.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-08-18  0:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-01 16:10 [Bug analyzer/94447] New: Not handling CONSTRUCTOR tree code dmalcolm at gcc dot gnu.org
2020-04-28 13:26 ` [Bug analyzer/94447] " cvs-commit at gcc dot gnu.org
2020-04-28 13:36 ` dmalcolm at gcc dot gnu.org
2020-05-08 13:14 ` dmalcolm at gcc dot gnu.org
2020-08-18  0:59 ` dmalcolm at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).