[PATCH,testsuite]Fix tree-ssa tests for target with no-delete-null-pointer-checks

Andy H hutchinsonandy@aim.com
Thu Jun 19 02:39:00 GMT 2008


Here is patch again revised now to use a new target effective keyword

    keeps_null_pointer_checks

which is set true if target should not have any null pointer checks 
discarded after dereferencing.

target-supports.exp has been modified accordingly to introduce new keyword.
This is set true for avr-*-* target or any target with it defined in 
target_info struct

(The name is a bit long but accurate)

Tested on AVR and i686 targets. No regressions.

Ok for 4.4 mainline?


2008-06-19  Andy Hutchinson   <hutchinsonandy@aim.com>

   * lib/target-supports.exp: 
(check_effective_target_keeps_null_pointer_checks) : New function.
   * gcc.dg/tree-ssa/20030730-1.c: Use keeps_null_pointer_checks to 
determine correct test response.
   * gcc.dg/tree-ssa/20030730-2.c: Ditto.
   * gcc.dg/tree-ssa/pr20701.c: Ditto.
   * gcc.dg/tree-ssa/pr20702.c: Ditto.
   * gcc.dg/tree-ssa/pr21086.c: Ditto.
   * gcc.dg/tree-ssa/vrp02.c:: Ditto.
   * gcc.dg/tree-ssa/vrp07.c:: Ditto.
   * gcc.dg/tree-ssa/vrp08.c:: Ditto.



Janis Johnson wrote:
> On Wed, 2008-06-18 at 10:12 -0400, hutchinsonandy@aim.com wrote:
>   
>> Thanks Janis
>>
>> What I was trying to do here was:
>>
>> -fno-delete-null-pointer-checks (eg avr)
>>
>> Check null-pointer checks are NOT deleted
>>
>> -fdelete-null-pointer-checks
>>
>> Check (already dereferenced) null-pointer checks are deleted
>>
>>
>> If I create null-pointer effective target I can only skip tests
>>     
>
> Not true, you can use the effective target keyword where you
> now use avr-*-*.
>
>   
>> SO I will then have to add the same tests again with !effective target 
>> and have dg-bogus checks to check that null-pointer checks are not 
>> deleted. (Assuming of course there is a NOT effective target selector - 
>> I have feeling there is not?)
>>     
>
> There probably isn't such a keyword yet but it would be easy to
> add.  The idea is that if there are other targets with the same
> property then it's cleaner to use a keyword than use a list in
> each test that is affected.
>
> Janis
>
>   
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nopoint.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20080619/606432a7/attachment.ksh>


More information about the Gcc-patches mailing list