re PR fortran/44882 (Bogus types in references with mismatched commons)

2010-07-09  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/44882
	* tree-vect-stmts.c (vectorizable_store): Do not assert alias
	sets do conflict.
	(vectorizable_load): Likewise.

	* gfortran.dg/pr44882.f90: New testcase.

From-SVN: r161990
This commit is contained in:
Richard Guenther 2010-07-09 10:05:27 +00:00 committed by Richard Biener
parent 2dd0f799c4
commit ca1316d24a
4 changed files with 26 additions and 9 deletions

View File

@ -1,3 +1,10 @@
2010-07-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44882
* tree-vect-stmts.c (vectorizable_store): Do not assert alias
sets do conflict.
(vectorizable_load): Likewise.
2010-07-09 Bernd Schmidt <bernds@codesourcery.com>
PR target/40657

View File

@ -1,3 +1,8 @@
2010-07-09 Richard Guenther <rguenther@suse.de>
PR tree-optimization/44882
* gfortran.dg/pr44882.f90: New testcase.
2010-07-09 Bernd Schmidt <bernds@codesourcery.com>
PR target/40657

View File

@ -0,0 +1,14 @@
! { dg-do compile }
! { dg-options "-O3 -ffast-math -funroll-loops -w" }
SUBROUTINE TRUDGE(KDIR)
! There is a type mismatch here for TRUPAR which caused an ICE
COMMON /TRUPAR/ DR(10),V(10,10)
DO 110 I=1,NDIR
110 DR(I)=V(I,JDIR)
END
SUBROUTINE TRUSRC(LEAVE)
IMPLICIT DOUBLE PRECISION (A-H,O-Z)
COMMON /TRUPAR/ DX(10),V(10,10)
END

View File

@ -3372,11 +3372,6 @@ vectorizable_store (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
data_ref = build2 (MISALIGNED_INDIRECT_REF, vectype, dataref_ptr, tmis);
}
/* If accesses through a pointer to vectype do not alias the original
memory reference we have a problem. This should never happen. */
gcc_assert (alias_sets_conflict_p (get_alias_set (data_ref),
get_alias_set (gimple_assign_lhs (stmt))));
/* Arguments are ready. Create the new vector stmt. */
new_stmt = gimple_build_assign (data_ref, vec_oprnd);
vect_finish_stmt_generation (stmt, new_stmt, gsi);
@ -3822,10 +3817,6 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
default:
gcc_unreachable ();
}
/* If accesses through a pointer to vectype do not alias the original
memory reference we have a problem. This should never happen. */
gcc_assert (alias_sets_conflict_p (get_alias_set (data_ref),
get_alias_set (gimple_assign_rhs1 (stmt))));
vec_dest = vect_create_destination_var (scalar_dest, vectype);
new_stmt = gimple_build_assign (vec_dest, data_ref);
new_temp = make_ssa_name (vec_dest, new_stmt);