re PR tree-optimization/43971 (index domain error in tree-ssa-structalias.c:3450)
2010-05-03 Richard Guenther <rguenther@suse.de> PR tree-optimization/43971 * tree-ssa-structalias.c (get_constraint_for_1): Fix constraints in the !flag_delete_null_pointer_checks case. * gcc.dg/pr43971.c: New testcase. From-SVN: r158991
This commit is contained in:
parent
c4e26da143
commit
8eb7bc3cda
@ -1,3 +1,9 @@
|
|||||||
|
2010-05-03 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/43971
|
||||||
|
* tree-ssa-structalias.c (get_constraint_for_1): Fix
|
||||||
|
constraints in the !flag_delete_null_pointer_checks case.
|
||||||
|
|
||||||
2010-05-03 Jakub Jelinek <jakub@redhat.com>
|
2010-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR debug/43972
|
PR debug/43972
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2010-05-03 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
|
PR tree-optimization/43971
|
||||||
|
* gcc.dg/pr43971.c: New testcase.
|
||||||
|
|
||||||
2010-05-03 Jakub Jelinek <jakub@redhat.com>
|
2010-05-03 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
PR debug/43972
|
PR debug/43972
|
||||||
|
14
gcc/testsuite/gcc.dg/pr43971.c
Normal file
14
gcc/testsuite/gcc.dg/pr43971.c
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
/* { dg-do compile } */
|
||||||
|
/* { dg-options "-Os -fno-delete-null-pointer-checks" } */
|
||||||
|
|
||||||
|
union ktime {
|
||||||
|
long tv64;
|
||||||
|
};
|
||||||
|
typedef union ktime ktime_t;
|
||||||
|
ktime_t
|
||||||
|
do_one_initcall(ktime_t rettime, ktime_t calltime)
|
||||||
|
{
|
||||||
|
ktime_t delta;
|
||||||
|
delta = ({ (ktime_t){ .tv64 = (rettime).tv64 - (calltime).tv64 }; });
|
||||||
|
return delta;
|
||||||
|
}
|
@ -3286,16 +3286,18 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p)
|
|||||||
in that case *NULL does not fail, so it _should_ alias *anything.
|
in that case *NULL does not fail, so it _should_ alias *anything.
|
||||||
It is not worth adding a new option or renaming the existing one,
|
It is not worth adding a new option or renaming the existing one,
|
||||||
since this case is relatively obscure. */
|
since this case is relatively obscure. */
|
||||||
if (flag_delete_null_pointer_checks
|
if ((TREE_CODE (t) == INTEGER_CST
|
||||||
&& ((TREE_CODE (t) == INTEGER_CST
|
|
||||||
&& integer_zerop (t))
|
&& integer_zerop (t))
|
||||||
/* The only valid CONSTRUCTORs in gimple with pointer typed
|
/* The only valid CONSTRUCTORs in gimple with pointer typed
|
||||||
elements are zero-initializer. But in IPA mode we also
|
elements are zero-initializer. But in IPA mode we also
|
||||||
process global initializers, so verify at least. */
|
process global initializers, so verify at least. */
|
||||||
|| (TREE_CODE (t) == CONSTRUCTOR
|
|| (TREE_CODE (t) == CONSTRUCTOR
|
||||||
&& CONSTRUCTOR_NELTS (t) == 0)))
|
&& CONSTRUCTOR_NELTS (t) == 0))
|
||||||
{
|
{
|
||||||
|
if (flag_delete_null_pointer_checks)
|
||||||
temp.var = nothing_id;
|
temp.var = nothing_id;
|
||||||
|
else
|
||||||
|
temp.var = anything_id;
|
||||||
temp.type = ADDRESSOF;
|
temp.type = ADDRESSOF;
|
||||||
temp.offset = 0;
|
temp.offset = 0;
|
||||||
VEC_safe_push (ce_s, heap, *results, &temp);
|
VEC_safe_push (ce_s, heap, *results, &temp);
|
||||||
|
Loading…
Reference in New Issue
Block a user