aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorTobias Schlüter <tobi@gcc.gnu.org>2007-09-27 23:27:51 +0200
committerTobias Schlüter <tobi@gcc.gnu.org>2007-09-27 23:27:51 +0200
commit7e49f9653784a0683e7e7f5d52daa1de081b7a14 (patch)
treec8c963b4e7930274695f7cb023f990e51a9c4cda /gcc/fortran/expr.c
parent0da4c1ea8461992bef38a5ad49e9e5e67fd5a495 (diff)
downloadgcc-7e49f9653784a0683e7e7f5d52daa1de081b7a14.zip
gcc-7e49f9653784a0683e7e7f5d52daa1de081b7a14.tar.gz
gcc-7e49f9653784a0683e7e7f5d52daa1de081b7a14.tar.bz2
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
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c18
1 files changed, 8 insertions, 10 deletions
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)
{