re PR fortran/33544 ([4.3 only] Warning in TRANSFER intrinsic should be made optional)

2007-10-19  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR fortran/33544
	* simplify.c (gfc_simplify_transfer): Only warn for short transfer when
	-Wsurprising is given.
	* invoke.texi: Document revised behavior.

From-SVN: r129488
This commit is contained in:
Jerry DeLisle 2007-10-19 14:06:05 +00:00
parent ab58d043a7
commit 39a184ce43
3 changed files with 11 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2007-10-19 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33544
* simplify.c (gfc_simplify_transfer): Only warn for short transfer when
-Wsurprising is given.
* invoke.texi: Document revised behavior.
2007-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/33795

View File

@ -481,6 +481,9 @@ lower value is greater than its upper value.
@item
A LOGICAL SELECT construct has three CASE statements.
@item
A TRANSFER specifies a source that is shorter than the destination.
@end itemize
@item -Wtabs

View File

@ -4065,7 +4065,7 @@ gfc_simplify_transfer (gfc_expr *source, gfc_expr *mold, gfc_expr *size)
result_size = result_elt_size;
}
if (source_size < result_size)
if (gfc_option.warn_surprising && source_size < result_size)
gfc_warning("Intrinsic TRANSFER at %L has partly undefined result: "
"source size %ld < result size %ld", &source->where,
(long) source_size, (long) result_size);