aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorPaul Thomas <pault@gcc.gnu.org>2008-06-24 21:44:28 +0000
committerPaul Thomas <pault@gcc.gnu.org>2008-06-24 21:44:28 +0000
commitc4e3543d047ac58fa0c989d036ce8f3bbc0392a7 (patch)
treea1a57d6d3298f726c1ff44a3519a0a4e32c92381 /gcc/fortran/expr.c
parent7b98a7257e8957c74611788d9020d8cd613d7d89 (diff)
downloadgcc-c4e3543d047ac58fa0c989d036ce8f3bbc0392a7.zip
gcc-c4e3543d047ac58fa0c989d036ce8f3bbc0392a7.tar.gz
gcc-c4e3543d047ac58fa0c989d036ce8f3bbc0392a7.tar.bz2
re PR fortran/36371 (Wrong locus for errors in DATA statement)
2008-06-24 Paul Thomas <pault@gcc.gnu.org> PR fortran/34371 * expr.c (gfc_check_assign): Change message and locus for error when conform == 0. 2008-06-24 Paul Thomas <pault@gcc.gnu.org> PR fortran/36371 * gfortran.dg/data_array_5.f90: New test. From-SVN: r137088
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index ace09de..2f7030e 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -2829,6 +2829,7 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform)
if (gfc_compare_types (&lvalue->ts, &rvalue->ts))
return SUCCESS;
+ /* Only DATA Statements come here. */
if (!conform)
{
/* Numeric can be converted to any other numeric. And Hollerith can be
@@ -2840,9 +2841,9 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform)
if (lvalue->ts.type == BT_LOGICAL && rvalue->ts.type == BT_LOGICAL)
return SUCCESS;
- gfc_error ("Incompatible types in assignment at %L; attempted assignment "
- "of %s to %s", &rvalue->where, gfc_typename (&rvalue->ts),
- gfc_typename (&lvalue->ts));
+ gfc_error ("Incompatible types in DATA statement at %L; attempted "
+ "conversion of %s to %s", &lvalue->where,
+ gfc_typename (&rvalue->ts), gfc_typename (&lvalue->ts));
return FAILURE;
}