diff options
author | Jakub Jelinek <jakub@redhat.com> | 2007-11-05 09:44:23 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2007-11-05 09:44:23 +0100 |
commit | 0976ffb63f5c2d03f1e58fd7e085799b0043d638 (patch) | |
tree | 3f7aac96f192e556316bc575c5abc7f7e3d41142 /gcc/tree-data-ref.c | |
parent | f370e66bb8c7fe4b8fe694dd79f13e834b4e7575 (diff) | |
download | gcc-0976ffb63f5c2d03f1e58fd7e085799b0043d638.zip gcc-0976ffb63f5c2d03f1e58fd7e085799b0043d638.tar.gz gcc-0976ffb63f5c2d03f1e58fd7e085799b0043d638.tar.bz2 |
re PR tree-optimization/33856 (Segfault in create_data_ref/compute_data_dependences_for_loop)
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.
From-SVN: r129897
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 17851ee..bf7d2ab 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; |