From 7e49f9653784a0683e7e7f5d52daa1de081b7a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Schl=C3=BCter?= <tobi@gcc.gnu.org> Date: Thu, 27 Sep 2007 23:27:51 +0200 Subject: arith.c (reduce_binary_aa): Fix capitalization. fortran/ * arith.c (reduce_binary_aa): Fix capitalization. * check.c (gfc_check_dot_product): Likewise. (gfc_check_matmul): Likewise. * expr.c (gfc_check_conformance): Likewise. (gfc_check_assign): Likewise. (gfc_default_initializer): Simplify logic. * trans.c (gfc_msg_bounds): Make const. (gfc_msg_fault): Likewise. (gfc_msg_wrong_return): Likewise. * trans.h: Add const to corresponding extern declarations. testsuite/ * gfortran.dg/array_initializer_3.f90: Adapt error annotations for fixed capitalizations. * gfortran.dg/compliant_elemental_intrinsics_1.f90: Likewise. * gfortran.dg/compliant_elemental_intrinsics_2.f90: Likewise. * gfortran.dg/elemental_subroutine_4.f90: Likewise. * gfortran.dg/intrinsic_argument_conformance_1.f90: Likewise. * gfortran.dg/maxloc_shape_1.f90: Likewise. * gfortran.dg/maxval_maxloc_conformance_1.f90: Likewise. * gfortran.dg/min_max_conformance.f90: Likewise. From-SVN: r128849 --- gcc/fortran/expr.c | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'gcc/fortran/expr.c') diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 815612e..0c68095 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -2556,8 +2556,8 @@ 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 and %d)", - _(optype_msgid), &op1->where, d + 1, + 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)); @@ -2696,7 +2696,7 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) /* Check size of array assignments. */ if (lvalue->rank != 0 && rvalue->rank != 0 - && gfc_check_conformance ("Array assignment", lvalue, rvalue) != SUCCESS) + && gfc_check_conformance ("array assignment", lvalue, rvalue) != SUCCESS) return FAILURE; if (gfc_compare_types (&lvalue->ts, &rvalue->ts)) @@ -2905,22 +2905,20 @@ gfc_default_initializer (gfc_typespec *ts) gfc_expr *init; gfc_component *c; - init = NULL; - /* See if we have a default initializer. */ for (c = ts->derived->components; c; c = c->next) - { - if ((c->initializer || c->allocatable) && init == NULL) - init = gfc_get_expr (); - } + if (c->initializer || c->allocatable) + break; - if (init == NULL) + if (!c) return NULL; /* Build the constructor. */ + init = gfc_get_expr (); init->expr_type = EXPR_STRUCTURE; init->ts = *ts; init->where = ts->derived->declared_at; + tail = NULL; for (c = ts->derived->components; c; c = c->next) { -- cgit v1.1