diff options
author | Daniel Franke <franke.daniel@gmail.com> | 2009-06-07 09:45:47 -0400 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2009-06-07 15:45:47 +0200 |
commit | ca8a87956aacfb2f74687734de9a5f20f86bf4fe (patch) | |
tree | 75702351890b695bc6f6a150a48c7ea3895833aa /gcc/fortran/intrinsic.c | |
parent | 014583a13f592481bb6e4004607f2845cb4c7bc0 (diff) | |
download | gcc-ca8a87956aacfb2f74687734de9a5f20f86bf4fe.zip gcc-ca8a87956aacfb2f74687734de9a5f20f86bf4fe.tar.gz gcc-ca8a87956aacfb2f74687734de9a5f20f86bf4fe.tar.bz2 |
re PR fortran/36874 (Add shape checks to cshift/eoshift)
2009-06-07 Daniel Franke <franke.daniel@gmail.com>
* check.c (dim_rank_check): Return SUCCESS if DIM=NULL.
(gfc_check_lbound): Removed (now) redundant check for DIM=NULL.
(gfc_check_minloc_maxloc): Likewise.
(check_reduction): Likewise.
(gfc_check_size): Likewise.
(gfc_check_ubound): Likewise.
(gfc_check_cshift): Added missing shape-conformance checks.
(gfc_check_eoshift): Likewise.
* gfortran.h (gfc_check_conformance): Modified prototype to printf-style.
* expr.c (gfc_check_conformance): Accept error-message chunks in
printf-style. Changed all callers.
2009-06-07 Daniel Franke <franke.daniel@gmail.com>
PR fortran/36874
* gfortran.dg/intrinsic_argument_conformance_2.f90: Adjusted error message.
* gfortran.dg/zero_sized_1.f90: Removed checks with incompatible shapes.
* gfortran.dg/zero_sized_5.f90: Likewise.
From-SVN: r148247
Diffstat (limited to 'gcc/fortran/intrinsic.c')
-rw-r--r-- | gcc/fortran/intrinsic.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c index 6088a8d..c519f6e 100644 --- a/gcc/fortran/intrinsic.c +++ b/gcc/fortran/intrinsic.c @@ -3617,14 +3617,13 @@ check_specific (gfc_intrinsic_sym *specific, gfc_expr *expr, int error_flag) first_expr = arg->expr; for ( ; arg && arg->expr; arg = arg->next, n++) - { - char buffer[80]; - snprintf (buffer, 80, "arguments '%s' and '%s' for intrinsic '%s'", - gfc_current_intrinsic_arg[0], gfc_current_intrinsic_arg[n], - gfc_current_intrinsic); - if (gfc_check_conformance (buffer, first_expr, arg->expr) == FAILURE) - return FAILURE; - } + if (gfc_check_conformance (first_expr, arg->expr, + "arguments '%s' and '%s' for " + "intrinsic '%s'", + gfc_current_intrinsic_arg[0], + gfc_current_intrinsic_arg[n], + gfc_current_intrinsic) == FAILURE) + return FAILURE; } if (t == FAILURE) |