interface.c (fold_unary): Rename to...
* interface.c (fold_unary): Rename to... (fold_unary_intrinsic): ... this. (gfc_extend_expr): Adjust caller. (gfc_match_generic_spec): Likewise. Initialize *op to INTRINSIC_NONE to avoid warnings. * expr.c (gfc_simplify_expr): Initialize start and end before calling gfc_extract_int. From-SVN: r148366
This commit is contained in:
parent
e521964299
commit
e8d4f3fcb2
|
@ -1,3 +1,13 @@
|
|||
2009-06-11 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* interface.c (fold_unary): Rename to...
|
||||
(fold_unary_intrinsic): ... this.
|
||||
(gfc_extend_expr): Adjust caller.
|
||||
(gfc_match_generic_spec): Likewise. Initialize *op to INTRINSIC_NONE
|
||||
to avoid warnings.
|
||||
* expr.c (gfc_simplify_expr): Initialize start and end before calling
|
||||
gfc_extract_int.
|
||||
|
||||
2009-06-10 Dave Korn <dave.korn.cygwin@gmail.com>
|
||||
|
||||
* trans-decl.c (create_main_function): Don't build main decl twice.
|
||||
|
|
|
@ -1654,18 +1654,16 @@ gfc_simplify_expr (gfc_expr *p, int type)
|
|||
gfc_char_t *s;
|
||||
int start, end;
|
||||
|
||||
start = 0;
|
||||
if (p->ref && p->ref->u.ss.start)
|
||||
{
|
||||
gfc_extract_int (p->ref->u.ss.start, &start);
|
||||
start--; /* Convert from one-based to zero-based. */
|
||||
}
|
||||
else
|
||||
start = 0;
|
||||
|
||||
end = p->value.character.length;
|
||||
if (p->ref && p->ref->u.ss.end)
|
||||
gfc_extract_int (p->ref->u.ss.end, &end);
|
||||
else
|
||||
end = p->value.character.length;
|
||||
|
||||
s = gfc_get_wide_string (end - start + 2);
|
||||
memcpy (s, p->value.character.string + start,
|
||||
|
|
|
@ -95,7 +95,7 @@ gfc_free_interface (gfc_interface *intr)
|
|||
minus respectively, leaving the rest unchanged. */
|
||||
|
||||
static gfc_intrinsic_op
|
||||
fold_unary (gfc_intrinsic_op op)
|
||||
fold_unary_intrinsic (gfc_intrinsic_op op)
|
||||
{
|
||||
switch (op)
|
||||
{
|
||||
|
@ -136,10 +136,11 @@ gfc_match_generic_spec (interface_type *type,
|
|||
if (gfc_match (" operator ( %o )", &i) == MATCH_YES)
|
||||
{ /* Operator i/f */
|
||||
*type = INTERFACE_INTRINSIC_OP;
|
||||
*op = fold_unary (i);
|
||||
*op = fold_unary_intrinsic (i);
|
||||
return MATCH_YES;
|
||||
}
|
||||
|
||||
*op = INTRINSIC_NONE;
|
||||
if (gfc_match (" operator ( ") == MATCH_YES)
|
||||
{
|
||||
m = gfc_match_defined_op_name (buffer, 1);
|
||||
|
@ -2482,7 +2483,7 @@ gfc_extend_expr (gfc_expr *e)
|
|||
actual->next->expr = e->value.op.op2;
|
||||
}
|
||||
|
||||
i = fold_unary (e->value.op.op);
|
||||
i = fold_unary_intrinsic (e->value.op.op);
|
||||
|
||||
if (i == INTRINSIC_USER)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue