diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-05 08:44:23 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-05 08:44:23 +0000 |
commit | dab9b85862660c536bf1f379ea336a589c179bb2 (patch) | |
tree | 3f7aac96f192e556316bc575c5abc7f7e3d41142 /gcc/tree-data-ref.c | |
parent | 89966701398b2249adf37e6f7967b37efe06ba5c (diff) | |
download | gcc-dab9b85862660c536bf1f379ea336a589c179bb2.tar.gz |
PR tree-optimization/33856
* tree-data-ref.c (get_references_in_stmt): Don't add
REFERENCE_CLASS_P trees to references vector if get_base_address
returns NULL on them.
* gcc.c-torture/compile/20071027-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@129897 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index 17851ee3cd0..bf7d2ab6aea 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -3913,7 +3913,7 @@ get_references_in_stmt (tree stmt, VEC (data_ref_loc, heap) **references) op1 = &GIMPLE_STMT_OPERAND (stmt, 1); if (DECL_P (*op1) - || REFERENCE_CLASS_P (*op1)) + || (REFERENCE_CLASS_P (*op1) && get_base_address (*op1))) { ref = VEC_safe_push (data_ref_loc, heap, *references, NULL); ref->pos = op1; @@ -3921,7 +3921,7 @@ get_references_in_stmt (tree stmt, VEC (data_ref_loc, heap) **references) } if (DECL_P (*op0) - || REFERENCE_CLASS_P (*op0)) + || (REFERENCE_CLASS_P (*op0) && get_base_address (*op0))) { ref = VEC_safe_push (data_ref_loc, heap, *references, NULL); ref->pos = op0; @@ -3938,7 +3938,7 @@ get_references_in_stmt (tree stmt, VEC (data_ref_loc, heap) **references) op0 = &CALL_EXPR_ARG (call, i); if (DECL_P (*op0) - || REFERENCE_CLASS_P (*op0)) + || (REFERENCE_CLASS_P (*op0) && get_base_address (*op0))) { ref = VEC_safe_push (data_ref_loc, heap, *references, NULL); ref->pos = op0; |