This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/38984] [4.2/4.3/4.4 Regression] NULL pointers always considered distinct by PTA, even with -fno-delete-null-pointer-checks



------- Comment #8 from bonzini at gnu dot org  2009-01-27 12:27 -------
>From PR38985:

> These passes are able to propagate the address to the load: CCP, VRP, DOM.  If 
> we decide that it's an invalid transformation, fixing them would fix this bug.

The interesting part is that after you disable them... you find out PTA is not
actually able to use the NULL special variable because *NULL and *ANYTHING
conflict!  The pointed-to sets are okay though:

  pD.1230_1(D), is dereferenced, its value escapes, points-to anything
  nullD.1234_3, is dereferenced, points-to anything, points-to NULL

The patch in comment #1 however works (tested with -fno-tree-ccp -fno-tree-vrp
-fno-tree-dominator-opts, and looking at the constraints for null).  So my plan
would be:

1) apply the patch after regtesting, XFAILing the testcase;

2) when PR38985 is fixed, the testcase will pass and the XFAIL will be removed.

Sounds okay?


-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]