diff options
author | Tobias Burnus <burnus@net-b.de> | 2007-09-13 20:08:04 +0200 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2007-09-13 20:08:04 +0200 |
commit | 3c7b91d3dcaf577588205ee810fbbdb91e64125f (patch) | |
tree | b9179f5461f752d81a6f49fc2cb48a258d0aa68b /gcc/fortran/expr.c | |
parent | 10a6db6ef3704c55bebf354218fcd9166800f543 (diff) | |
download | gcc-3c7b91d3dcaf577588205ee810fbbdb91e64125f.zip gcc-3c7b91d3dcaf577588205ee810fbbdb91e64125f.tar.gz gcc-3c7b91d3dcaf577588205ee810fbbdb91e64125f.tar.bz2 |
re PR fortran/33343 (ICE (segfault) on invalid code with wrongly shaped arguments to elemental procedures)
2007-09-13 Tobias Burnus <burnus@net-b.de>
PR fortran/33343
* expr.c (gfc_check_conformance): Print ranks in the error message.
* resolve.c (resolve_elemental_actual): Check also conformance of
the actual arguments for elemental functions.
2007-09-13 Tobias Burnus <burnus@net-b.de>
PR fortran/33343
* gfortran.dg/elemental_args_check_1.f90: New.
* gfortran.dg/assumed_size_refs_1.f90: Update error message.
* gfortran.dg/elemental_subroutine_4.f90: Ditto.
From-SVN: r128473
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r-- | gcc/fortran/expr.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index ebed1f2..6ffcf7e 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -2513,8 +2513,8 @@ gfc_check_conformance (const char *optype_msgid, gfc_expr *op1, gfc_expr *op2) if (op1->rank != op2->rank) { - gfc_error ("Incompatible ranks in %s at %L", _(optype_msgid), - &op1->where); + gfc_error ("Incompatible ranks in %s (%d and %d) at %L", _(optype_msgid), + op1->rank, op2->rank, &op1->where); return FAILURE; } @@ -2527,7 +2527,7 @@ gfc_check_conformance (const char *optype_msgid, gfc_expr *op1, gfc_expr *op2) if (op1_flag && op2_flag && mpz_cmp (op1_size, op2_size) != 0) { - gfc_error ("different shape for %s at %L on dimension %d (%d/%d)", + gfc_error ("different shape for %s at %L on dimension %d (%d and %d)", _(optype_msgid), &op1->where, d + 1, (int) mpz_get_si (op1_size), (int) mpz_get_si (op2_size)); |