diff options
author | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-10 14:13:18 +0000 |
---|---|---|
committer | dberlin <dberlin@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-06-10 14:13:18 +0000 |
commit | 676792f6faa9b49fa90404248a3771719858c97d (patch) | |
tree | 4bf87f9ad05eb29a503990baa669100ec1d9275a /gcc/tree-data-ref.c | |
parent | 914b41f43d1f0a99e948d4fdb9a0b3889fe409bb (diff) | |
download | gcc-676792f6faa9b49fa90404248a3771719858c97d.tar.gz |
2007-06-09 Daniel Berlin <dberlin@dberlin.org>
* tree-data-ref.c (dr_may_alias_p): Check that decl_a != decl_b,
and allow DECL_P here.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125601 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 99f8fd2b91f..4d96311ae6c 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -1176,8 +1176,9 @@ dr_may_alias_p (struct data_reference *a, struct data_reference *b) if (TYPE_RESTRICT (type_a) && TYPE_RESTRICT (type_b) && (!DR_IS_READ (a) || !DR_IS_READ (b)) - && decl_a && TREE_CODE (decl_a) == PARM_DECL - && decl_b && TREE_CODE (decl_b) == PARM_DECL + && decl_a && DECL_P (decl_a) + && decl_b && DECL_P (decl_b) + && decl_a != decl_b && TREE_CODE (DECL_CONTEXT (decl_a)) == FUNCTION_DECL && DECL_CONTEXT (decl_a) == DECL_CONTEXT (decl_b)) return false; |