PR middle-end/36902 Array bound warning with dead code after optimization

Richard Guenther richard.guenther@gmail.com
Fri Apr 17 15:52:00 GMT 2009


On Fri, Apr 17, 2009 at 5:42 PM, Manuel López-Ibáñez
<lopezibanez@gmail.com> wrote:
> PING2: http://gcc.gnu.org/ml/gcc-patches/2009-04/msg00689.html

Ok with

-search_for_addr_array (tree t, const location_t *location)
+search_for_addr_array(tree t, location_t location)
 {

this whitespace change removed.

Thanks,
Richard.


> 2009/4/9 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>> Updated to a recent revision, bootstrapped and regression tested on
>> x86_64-unknown-linux-gnu with
>> --enable-languages=all,obj-c++ --enable-decimal-float.
>>
>> 2009-04-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>
>>
>>        PR middle-end/36902
>>        * tree-vrp.c (check_array_ref): Pass a location_t instead of a
>>        pointer. Use warning_at instead of warning.
>>        (search_for_addr_array): Likewise.
>>        (check_array_bounds): Likewise.
>>        (check_all_array_refs): Check that the incoming edge is not in the
>>        list of edges to be removed.
>>        (check_all_array_refs): Avoid the temporal pointer.
>>        (vrp_visit_cond_stmt): Fix typo.
>>        (simplify_switch_using_ranges): Handle the case where the switch
>>        index is an integer constant.
>> testsuite/
>>        * gcc.dg/pr36902.c: New.
>>
>>
>> OK for trunk?
>>
>> Manuel.
>>
>> 2008/10/26 Manuel López-Ibáñez <lopezibanez@gmail.com>:
>>> Bootstrapped and regression tested on x86_64-unknown-linux-gnu with
>>> --enable-languages=all,obj-c++ --enable-decimal-float.
>>>
>>> This could be improved further by:
>>>
>>> * Marking the edges to be removed in some way, so we don't have to
>>> search in the list to_remove_edges.
>>> * Considering BBs that have more than one incoming edge.
>>> * Augmenting get_value_range to handle integer constants (or constants
>>> in general).
>>> * Augmenting find_case_label_range to handle more efficiently the case
>>> where i == j.
>>>
>>> Nonetheless, the current patch is enough to fix the PR. I could
>>> include the above proposals in the comments.
>>>
>>
>



More information about the Gcc-patches mailing list