gcc/gcc/fortran
Roger Sayle bfcabc6ce2 re PR fortran/30404 ([4.1 only] Wrong FORALL result)
2007-01-16  Roger Sayle  <roger@eyesopen.com>

	PR fortran/30404
	* trans-stmt.c (forall_info): Remove pmask field.
	(gfc_trans_forall_loop): Remove NVAR argument, instead assume that
	NVAR covers all the interation variables in the current forall_info.
	Add an extra OUTER parameter, which specified the loop header in
	which to place mask index initializations.
	(gfc_trans_nested_forall_loop): Remove NEST_FLAG argument.
	Change the semantics of MASK_FLAG to only control the mask in the
	innermost loop.
	(compute_overall_iter_number): Optimize the trivial case of a
	top-level loop having a constant number of iterations.  Update
	call to gfc_trans_nested_forall_loop.  Calculate the number of
	times the inner loop will be executed, not to size of the 
	iteration space.
	(allocate_temp_for_forall_nest_1): Reuse SIZE as BYTESIZE when
	sizeof(type) == 1.  Tidy up.
	(gfc_trans_assign_need_temp): Remove NEST_FLAG argument from calls
	to gfc_trans_nested_forall_loop.
	(gfc_trans_pointer_assign_need_temp): Likewise.
	(gfc_trans_forall_1): Remove unused BYTESIZE, TMPVAR, SIZEVAR and
	LENVAR local variables.  Split mask allocation into a separate
	hunk/pass from mask population.  Use allocate_temp_for_forall_nest
	to allocate the FORALL mask with the correct size.  Update calls
	to gfc_trans_nested_forall_loop.
	(gfc_evaluate_where_mask): Update call to
	gfc_trans_nested_forall_loop.
	(gfc_trans_where_2): Likewise.

	* gfortran.dg/forall_6.f90: New test case.
	* gfortran.dg/dependency_8.f90: Update test to find "temp" array.
	* gfortran.dg/dependency_13.f90: Likewise.


Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
Co-Authored-By: Steven G. Kargl <kargl@gcc.gnu.org>

From-SVN: r120829
2007-01-16 18:15:19 +00:00
..
ChangeLog re PR fortran/30404 ([4.1 only] Wrong FORALL result) 2007-01-16 18:15:19 +00:00
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006 Rotate ChangeLog. 2007-01-01 19:22:09 +00:00
Make-lang.in
arith.c arith.c: Update copyright years. 2007-01-06 21:53:03 +00:00
arith.h
array.c Fix whitespace in a table within a comment. 2007-01-07 03:26:06 +00:00
bbt.c [multiple changes] 2007-01-07 00:28:29 +00:00
check.c [multiple changes] 2007-01-07 00:28:29 +00:00
config-lang.in configure.ac (strict1_warn): Rename to strict_warn. 2007-01-11 10:49:30 +00:00
convert.c decl.c, [...]: Update Copyright dates. 2007-01-07 19:39:52 +00:00
data.c decl.c, [...]: Update Copyright dates. 2007-01-07 19:39:52 +00:00
decl.c decl.c, [...]: Update Copyright dates. 2007-01-07 19:39:52 +00:00
dependency.c decl.c, [...]: Update Copyright dates. 2007-01-07 19:39:52 +00:00
dependency.h re PR fortran/30207 (ICE in gfc_dep_resolver with where (a < 0) a(:) = 1) 2006-12-17 18:28:07 +00:00
dump-parse-tree.c decl.c, [...]: Update Copyright dates. 2007-01-07 19:39:52 +00:00
error.c decl.c, [...]: Update Copyright dates. 2007-01-07 19:39:52 +00:00
expr.c decl.c, [...]: Update Copyright dates. 2007-01-07 19:39:52 +00:00
f95-lang.c interface.c, [...]: Update Copyright years. 2007-01-08 19:02:08 +00:00
gfortran.h re PR fortran/23232 ([4.1 only] DATA implied DO variables) 2007-01-05 14:45:20 +00:00
gfortran.texi gfortran.texi: Fix typos. 2007-01-08 01:23:16 +00:00
gfortranspec.c interface.c, [...]: Update Copyright years. 2007-01-08 19:02:08 +00:00
interface.c interface.c, [...]: Update Copyright years. 2007-01-08 19:02:08 +00:00
intrinsic.c interface.c, [...]: Update Copyright years. 2007-01-08 19:02:08 +00:00
intrinsic.h
intrinsic.texi intrinsic.texi: Minor cleanup, reflowing overlong paragraphs, and correcting whitespace. 2007-01-04 17:26:27 -08:00
invoke.texi * invoke.texi: Update manpage copyright to include 2007. 2007-01-04 09:09:34 -08:00
io.c interface.c, [...]: Update Copyright years. 2007-01-08 19:02:08 +00:00
ioparm.def re PR libfortran/30014 (INQUIRE (iolength = xx) limited to kind=4) 2006-12-28 01:39:15 +00:00
iresolve.c re PR libfortran/30415 (MINLOC, MAXLOC missing for integer kinds 1 and 2) 2007-01-11 20:32:42 +00:00
iso-fortran-env.def
lang-specs.h
lang.opt [multiple changes] 2007-01-10 04:34:34 +00:00
match.c interface.c, [...]: Update Copyright years. 2007-01-08 19:02:08 +00:00
match.h re PR fortran/23232 ([4.1 only] DATA implied DO variables) 2007-01-05 14:45:20 +00:00
matchexp.c
mathbuiltins.def
misc.c
module.c re PR fortran/20896 (ambiguous interface not detected) 2006-12-27 13:46:47 +00:00
openmp.c
options.c [multiple changes] 2007-01-10 04:34:34 +00:00
parse.c
parse.h
primary.c re PR fortran/23060 (%VAL, %REF and %DESCR constructs not implemented) 2006-12-31 06:55:16 +00:00
resolve.c re PR fortran/28172 ([4.2 and 4.1 only] alternate return in contained procedure segfaults) 2007-01-15 08:16:17 +00:00
scanner.c re PR fortran/30452 ([4.2, 4.1 only] Strange syntax error with high-value character) 2007-01-14 11:01:20 +00:00
simplify.c simplify.c: Update copyright to 2007. 2007-01-11 01:07:36 -08:00
st.c
symbol.c symbol.c (check_conflict): Fix error message. 2007-01-05 21:26:00 +01:00
trans-array.c trans-array.c (constant_array_constructor_p): New function to determine whether an array constructor consists only of... 2007-01-08 17:56:37 +00:00
trans-array.h
trans-common.c
trans-const.c
trans-const.h
trans-decl.c re PR fortran/30410 (Host association bug w/ EXTERNAL) 2007-01-14 14:43:08 +00:00
trans-expr.c trans-expr.c (gfc_trans_assignment_1): New subroutine to scalarize array assignments split out from gfc_trans_assignment. 2007-01-05 21:27:16 +00:00
trans-intrinsic.c trans-intrinsic.c (gfc_conv_intrinsic_ibits): Fix call to build_int_cst. 2007-01-03 03:44:15 +00:00
trans-io.c tree-ssa-ccp.c (maybe_fold_offset_to_array_ref): Use type of offset to build the index. 2007-01-08 18:29:18 +00:00
trans-openmp.c
trans-stmt.c re PR fortran/30404 ([4.1 only] Wrong FORALL result) 2007-01-16 18:15:19 +00:00
trans-stmt.h
trans-types.c re PR fortran/25392 (ICEs with -ff2c) 2006-12-21 04:04:43 +01:00
trans-types.h
trans.c
trans.h
types.def