re PR tree-optimization/26425 (ice on valid C code with flag -Os)
PR tree-optimization/26425 * tree-vrp.c (vrp_visit_assignment): If the LHS's type has a NULL min/max, then assume its varying. * gcc.c-torture/compile/pr26425.c: New test. From-SVN: r111399
This commit is contained in:
parent
10c5bc6c2d
commit
e260a6142e
4 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2006-02-23 Jeff Law <law@redhat.com>
|
||||
|
||||
PR tree-optimization/26425
|
||||
* tree-vrp.c (vrp_visit_assignment): If the LHS's type has a NULL
|
||||
min/max, then assume its varying.
|
||||
|
||||
2006-02-23 Zdenek Dvorak <dvorakz@suse.cz>
|
||||
|
||||
PR rtl-optimization/26316
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2006-02-23 Jeff Law <law@redhat.com>
|
||||
|
||||
* gcc.c-torture/compile/pr26425.c: New test.
|
||||
|
||||
2006-02-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR middle-end/26412
|
||||
|
|
9
gcc/testsuite/gcc.c-torture/compile/pr26425.c
Normal file
9
gcc/testsuite/gcc.c-torture/compile/pr26425.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
struct keyring_list {
|
||||
struct key *keys[0];
|
||||
};
|
||||
void keyring_destroy(struct keyring_list *keyring, unsigned short a)
|
||||
{
|
||||
int loop;
|
||||
for (loop = a - 1; loop >= 0; loop--)
|
||||
key_put(keyring->keys[loop]);
|
||||
}
|
|
@ -3375,7 +3375,11 @@ vrp_visit_assignment (tree stmt, tree *output_p)
|
|||
|
||||
/* We only keep track of ranges in integral and pointer types. */
|
||||
if (TREE_CODE (lhs) == SSA_NAME
|
||||
&& (INTEGRAL_TYPE_P (TREE_TYPE (lhs))
|
||||
&& ((INTEGRAL_TYPE_P (TREE_TYPE (lhs))
|
||||
/* It is valid to have NULL MIN/MAX values on a type. See
|
||||
build_range_type. */
|
||||
&& TYPE_MIN_VALUE (TREE_TYPE (lhs))
|
||||
&& TYPE_MAX_VALUE (TREE_TYPE (lhs)))
|
||||
|| POINTER_TYPE_P (TREE_TYPE (lhs))))
|
||||
{
|
||||
struct loop *l;
|
||||
|
|
Loading…
Add table
Reference in a new issue