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
This commit is contained in:
parent
f370e66bb8
commit
0976ffb63f
|
@ -1,3 +1,10 @@
|
|||
2007-11-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
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.
|
||||
|
||||
2007-11-05 Alexandre Oliva <aoliva@redhat.com>
|
||||
|
||||
* cfg.c (dump_cfg_bb_info): Update bb_bitnames to match enum.
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
2007-11-05 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/33856
|
||||
* gcc.c-torture/compile/20071027-1.c: New test.
|
||||
|
||||
PR c++/33836
|
||||
* g++.dg/ext/label10.C: New test.
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
/* PR tree-optimization/33856 */
|
||||
/* Testcase by Martin Michlmayr <tbm@cyrius.com> */
|
||||
|
||||
typedef struct z_key
|
||||
{
|
||||
int key;
|
||||
int mask;
|
||||
} z_key;
|
||||
typedef struct picture_size
|
||||
{
|
||||
z_key key;
|
||||
} picture_size;
|
||||
|
||||
void picture_size_new (picture_size *ps)
|
||||
{
|
||||
z_key key;
|
||||
ps->key = key;
|
||||
}
|
||||
|
||||
void picture_sizes_load_default (picture_size *ps)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 5; ++i)
|
||||
picture_size_new (ps);
|
||||
}
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue