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: [PATCH] fix PR39701 testsuite failures


On Fri, Apr 10, 2009 at 1:14 AM, Richard Guenther
<richard.guenther@gmail.com> wrote:
> On Fri, Apr 10, 2009 at 9:17 AM, Paolo Bonzini <bonzini@gnu.org> wrote:
>> Interestingly enough, these failures had three different root causes,
>> and each of them triggered a different observation on something dubious
>> in GCC.
>>
>> One was due to a disabled folding due to my patch when
>> -fno-delete-null-pointer-checks (including -O0 -O1). ?I fixed this by
>> considering &x to be non-zero if x is stack allocated.
>
> This part is ok for trunk.
>
>> ?Observation: I think however that it does not make sense to have
>> ?-fdelete-null-pointer-checks only at -O2 or higher -- it it is not
>> ?an optimization option, rather it describes the semantics of the
>> ?target, and it should be enabled uniformly at all optimization levels.
>> ?If there are places that we consider optimizations, they should be
>> ?guarded by "(optimize >= 2 && flag_delete_null_pointer_checks).
>
> I agree. ?A patch to make -fdelete-null-pointer-checks enabled by
> default is pre-approved (it likely needs documentation changes).
>
> Thanks,
> Richard.
>

I will check it in after testing.

Thanks.


-- 
H.J.
---
2009-04-10  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/39701
	* common.opt (-fdelete-null-pointer-checks): Initialize to 1.

	* opts.c (decode_options): Don't set flag_delete_null_pointer_checks
	here.

	* doc/invoke.texi: Update -fdelete-null-pointer-checks.

Attachment: gcc-pr39701-1.patch
Description: Text document


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