public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/39074]  New: PTA constraint processing for *x = y is wrong
@ 2009-02-02 13:47 rguenth at gcc dot gnu dot org
  2009-02-02 14:03 ` [Bug tree-optimization/39074] " rguenth at gcc dot gnu dot org
                   ` (20 more replies)
  0 siblings, 21 replies; 22+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-02-02 13:47 UTC (permalink / raw)
  To: gcc-bugs

if the solution of x includes ANYTHING we fail to add the solution of y to all
variables.  Testcase (fails on a-i branch):

int i;
void __attribute__((noinline))
foo(long b, long q)
{
  int *y;
  int **a = &y, **x;
  int ***p;
  if (b)
    p = (int ***)q;
  else
    p = &a;
  x = *p;
  *x = &i;
  *y = 0;
}
extern void abort (void);
int main()
{
  i = 1;
  foo (0, 0);
  if (i != 0)
    abort ();
  return 0;
}

I guess we should warn for dereferenced pointers whos points-to set is empty
with "warning: dereferencing uninitialized pointer".


-- 
           Summary: PTA constraint processing for *x = y is wrong
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code, alias
          Severity: major
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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


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

end of thread, other threads:[~2009-06-17 12:34 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-02 13:47 [Bug tree-optimization/39074] New: PTA constraint processing for *x = y is wrong rguenth at gcc dot gnu dot org
2009-02-02 14:03 ` [Bug tree-optimization/39074] " rguenth at gcc dot gnu dot org
2009-02-02 14:07 ` rguenth at gcc dot gnu dot org
2009-02-02 19:42 ` dberlin at gcc dot gnu dot org
2009-02-03  9:17 ` rguenth at gcc dot gnu dot org
2009-02-03 14:16 ` dberlin at dberlin dot org
2009-02-03 14:24 ` rguenther at suse dot de
2009-02-04  0:30 ` dberlin at dberlin dot org
2009-02-04  9:35 ` rguenther at suse dot de
2009-02-04 12:16 ` rguenth at gcc dot gnu dot org
2009-02-04 12:26 ` rguenth at gcc dot gnu dot org
2009-02-04 12:31 ` rguenth at gcc dot gnu dot org
2009-02-04 12:37 ` [Bug tree-optimization/39074] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2009-02-04 16:09 ` dberlin at dberlin dot org
2009-02-04 16:26 ` rguenther at suse dot de
2009-02-04 16:38 ` dberlin at dberlin dot org
2009-02-06  9:17 ` rguenth at gcc dot gnu dot org
2009-02-09 21:21 ` jsm28 at gcc dot gnu dot org
2009-02-19 10:13 ` rguenth at gcc dot gnu dot org
2009-02-19 10:13 ` [Bug tree-optimization/39074] [4.2/4.3 " rguenth at gcc dot gnu dot org
2009-03-31 21:09 ` [Bug tree-optimization/39074] [4.3 " jsm28 at gcc dot gnu dot org
2009-06-17 12:34 ` rguenth 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).