This is the mail archive of the gcc-patches@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]

Re: Some VRP improvements


> From: Jakub Jelinek <jakub@redhat.com>
>> On Thu, Jun 02, 2005 at 08:50:13AM -0400, Paul Schlie wrote:
>>> From: Diego Novillo <dnovillo@redhat.com>
>>>> On Thu, Jun 02, 2005 at 08:17:58AM -0400, Paul Schlie wrote:
>>> 
>>>>   many of the VRP test cases involving pointers should not correspondingly
>>>>   presume the presence of this optimization by default?
>>>> 
>>> They do.  -fdelete-null-pointer-checks is enabled by default at -O2.
>> 
>> - But what will occur when -fdelete-null-pointer-checks is properly target
>>   specifically enabled?
> 
> A conforming ISO C program must not dereference null pointers (as no object
> nor function may be present at that address),

- Ergo, an implementation therefore may not rely on any particular semantics
  resulting from such an undefined specified operation, unless the resulting
  semantic effect is reliably and specifically known by the implementation;
  which for a multi-target implementation will be correspondingly target
  specific.

  (The argument that an undefined behavior provides the license to presume
  one which is known to not be universally factually true, and then rely on
  that unreliable behavior as the basis of of subsequent optimizations which
  may alter the semantics the remaining specified program which were not
  otherwise dependant on the logical result of that undefined effect, is
  a perversion of logic.)

> so I don't see why this ought to be target specific.



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