diff options
Diffstat (limited to 'gcc/fortran/trans-expr.c')
-rw-r--r-- | gcc/fortran/trans-expr.c | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/gcc/fortran/trans-expr.c b/gcc/fortran/trans-expr.c index 3793cfb..85c77b7 100644 --- a/gcc/fortran/trans-expr.c +++ b/gcc/fortran/trans-expr.c @@ -1799,11 +1799,11 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind, fault = fold_build2_loc (input_location, TRUTH_ANDIF_EXPR, boolean_type_node, nonempty, fault); if (name) - asprintf (&msg, "Substring out of bounds: lower bound (%%ld) of '%s' " - "is less than one", name); + msg = xasprintf ("Substring out of bounds: lower bound (%%ld) of '%s' " + "is less than one", name); else - asprintf (&msg, "Substring out of bounds: lower bound (%%ld)" - "is less than one"); + msg = xasprintf ("Substring out of bounds: lower bound (%%ld)" + "is less than one"); gfc_trans_runtime_check (true, false, fault, &se->pre, where, msg, fold_convert (long_integer_type_node, start.expr)); @@ -1815,11 +1815,11 @@ gfc_conv_substring (gfc_se * se, gfc_ref * ref, int kind, fault = fold_build2_loc (input_location, TRUTH_ANDIF_EXPR, boolean_type_node, nonempty, fault); if (name) - asprintf (&msg, "Substring out of bounds: upper bound (%%ld) of '%s' " - "exceeds string length (%%ld)", name); + msg = xasprintf ("Substring out of bounds: upper bound (%%ld) of '%s' " + "exceeds string length (%%ld)", name); else - asprintf (&msg, "Substring out of bounds: upper bound (%%ld) " - "exceeds string length (%%ld)"); + msg = xasprintf ("Substring out of bounds: upper bound (%%ld) " + "exceeds string length (%%ld)"); gfc_trans_runtime_check (true, false, fault, &se->pre, where, msg, fold_convert (long_integer_type_node, end.expr), fold_convert (long_integer_type_node, @@ -4930,18 +4930,19 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, if (attr.allocatable && (fsym == NULL || !fsym->attr.allocatable)) - asprintf (&msg, "Allocatable actual argument '%s' is not " - "allocated or not present", e->symtree->n.sym->name); + msg = xasprintf ("Allocatable actual argument '%s' is not " + "allocated or not present", + e->symtree->n.sym->name); else if (attr.pointer && (fsym == NULL || !fsym->attr.pointer)) - asprintf (&msg, "Pointer actual argument '%s' is not " - "associated or not present", - e->symtree->n.sym->name); + msg = xasprintf ("Pointer actual argument '%s' is not " + "associated or not present", + e->symtree->n.sym->name); else if (attr.proc_pointer && (fsym == NULL || !fsym->attr.proc_pointer)) - asprintf (&msg, "Proc-pointer actual argument '%s' is not " - "associated or not present", - e->symtree->n.sym->name); + msg = xasprintf ("Proc-pointer actual argument '%s' is not " + "associated or not present", + e->symtree->n.sym->name); else goto end_pointer_check; @@ -4963,16 +4964,16 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, { if (attr.allocatable && (fsym == NULL || !fsym->attr.allocatable)) - asprintf (&msg, "Allocatable actual argument '%s' is not " - "allocated", e->symtree->n.sym->name); + msg = xasprintf ("Allocatable actual argument '%s' is not " + "allocated", e->symtree->n.sym->name); else if (attr.pointer && (fsym == NULL || !fsym->attr.pointer)) - asprintf (&msg, "Pointer actual argument '%s' is not " - "associated", e->symtree->n.sym->name); + msg = xasprintf ("Pointer actual argument '%s' is not " + "associated", e->symtree->n.sym->name); else if (attr.proc_pointer && (fsym == NULL || !fsym->attr.proc_pointer)) - asprintf (&msg, "Proc-pointer actual argument '%s' is not " - "associated", e->symtree->n.sym->name); + msg = xasprintf ("Proc-pointer actual argument '%s' is not " + "associated", e->symtree->n.sym->name); else goto end_pointer_check; |