public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/21368] New: VRP does not know that &s.a != NULL
@ 2005-05-03 19:39 kazu at cs dot umass dot edu
  2005-05-03 22:11 ` [Bug tree-optimization/21368] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: kazu at cs dot umass dot edu @ 2005-05-03 19:39 UTC (permalink / raw)
  To: gcc-bugs

Consider

struct s {
  int a;
} s;

int
foo (void)
{
  int *p = &s.a;

  if (p == 0)
    return 123;

  /* Force VRP to run by having it insert at least one
     ASSERT_EXPR.  */
  *p = 456;

  return 0;
}

Note that with -fno-dominator-opts, VRP does not fold the "if" statement.

expr_computes_nonzero could use get_base_address.

-- 
           Summary: VRP does not know that &s.a != NULL
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kazu at cs dot umass dot edu
                CC: dnovillo at redhat dot com,gcc-bugs at gcc dot gnu dot
                    org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21368


^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <20050503193825.21368.kazu@gcc.gnu.org>]

end of thread, other threads:[~2005-09-10 18:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-03 19:39 [Bug tree-optimization/21368] New: VRP does not know that &s.a != NULL kazu at cs dot umass dot edu
2005-05-03 22:11 ` [Bug tree-optimization/21368] " pinskia at gcc dot gnu dot org
2005-05-31  2:33 ` dnovillo at gcc dot gnu dot org
2005-06-02  2:59 ` cvs-commit at gcc dot gnu dot org
     [not found] <20050503193825.21368.kazu@gcc.gnu.org>
2005-09-10 18:10 ` pinskia at gcc dot gnu dot 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).