+2019-03-12 Martin Liska <mliska@suse.cz>
+
+ * config/i386/i386.c: Reword an error message.
+
2019-03-12 Martin Jambor <mjambor@suse.cz>
* cgraph.c (cgraph_node::dump): Dump more info for former thunks,
+2019-03-12 Martin Liska <mliska@suse.cz>
+
+ * c-opts.c (c_common_handle_option): Wrap option with %< and %>.
+
2019-03-11 Martin Liska <mliska@suse.cz>
* c-opts.c (c_common_post_options): Wrap apostrophes
else
{
if (quote_chain_split)
- error ("-I- specified twice");
+ error ("%<-I-%> specified twice");
quote_chain_split = true;
split_quote_chain ();
inform (input_location, "obsolete option %<-I-%> used, "
mode0 = insn_data[icode].operand[0].mode;
if (!insn_data[icode].operand[0].predicate (op0, mode0))
{
- error ("xabort argument must be an 8-bit immediate");
+ error ("the argument to %<xabort%> intrinsic must "
+ "be an 8-bit immediate");
return const0_rtx;
}
emit_insn (gen_xabort (op0));
+2019-03-12 Martin Liska <mliska@suse.cz>
+
+ * decl.c (add_init_expr_to_sym): Replace usage of 'can't'
+ with 'cannot'.
+ (variable_decl): Likewise.
+ (cray_pointer_decl): Likewise.
+ (match_binding_attributes): Likewise.
+ * f95-lang.c (gfc_init): Likewise.
+ * interface.c (gfc_check_typebound_override): Likewise.
+ * intrinsic.c (make_generic): Likewise.
+ * module.c (dump_module): Likewise.
+ (gfc_use_module): Likewise.
+ * primary.c (gfc_convert_to_structure_constructor): Likewise.
+ * resolve.c (resolve_entries): Likewise.
+ (check_generic_tbp_ambiguity): Likewise.
+ (get_checked_tb_operator_target): Likewise.
+ * scanner.c (load_file): Likewise.
+ * trans-expr.c (gfc_conv_intrinsic_to_class): Likewise.
+
2019-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89363
if (init->rank == 0)
{
- gfc_error ("Can't initialize implied-shape array at %L"
+ gfc_error ("Cannot initialize implied-shape array at %L"
" with scalar", &sym->declared_at);
return false;
}
if (as->type == AS_IMPLIED_SHAPE && current_attr.flavor != FL_PARAMETER)
{
m = MATCH_ERROR;
- gfc_error ("Non-PARAMETER symbol %qs at %L can't be implied-shape",
+ gfc_error ("Non-PARAMETER symbol %qs at %L cannot be implied-shape",
name, &var_locus);
goto cleanup;
}
else
{
if (!gfc_set_array_spec (sym, cp_as, &var_locus))
- gfc_internal_error ("Couldn't set pointee array spec.");
+ gfc_internal_error ("Cannot set pointee array spec.");
/* Fix the array spec. */
m = gfc_mod_pointee_as (sym->as);
if (cpte->as == NULL)
{
if (!gfc_set_array_spec (cpte, as, &var_locus))
- gfc_internal_error ("Couldn't set Cray pointee array spec.");
+ gfc_internal_error ("Cannot set Cray pointee array spec.");
}
else if (as != NULL)
{
/* NON_OVERRIDABLE and DEFERRED exclude themselves. */
if (ba->non_overridable && ba->deferred)
{
- gfc_error ("NON_OVERRIDABLE and DEFERRED can't both appear at %C");
+ gfc_error ("NON_OVERRIDABLE and DEFERRED cannot both appear at %C");
goto error;
}
gfc_init_1 ();
if (!gfc_new_file ())
- fatal_error (input_location, "can't open input file: %s", gfc_source_file);
+ fatal_error (input_location, "cannot open input file: %s", gfc_source_file);
if (flag_preprocess_only)
return false;
/* If the overwritten procedure is GENERIC, this is an error. */
if (old->n.tb->is_generic)
{
- gfc_error ("Can't overwrite GENERIC %qs at %L",
+ gfc_error ("Cannot overwrite GENERIC %qs at %L",
old->name, &proc->n.tb->where);
return false;
}
g = gfc_find_function (name);
if (g == NULL)
- gfc_internal_error ("make_generic(): Can't find generic symbol %qs",
+ gfc_internal_error ("make_generic(): Cannot find generic symbol %qs",
name);
gcc_assert (g->id == id);
gfc_error ("The argument list functions %%VAL, %%LOC or %%REF "
"are not allowed in this context at %L", where);
else
- gfc_error ("Can't find keyword named %qs in call to %qs at %L",
+ gfc_error ("Cannot find keyword named %qs in call to %qs at %L",
a->name, name, where);
return false;
}
bad:
if (eflag == 1)
{
- gfc_error ("Can't convert %s to %s at %L",
+ gfc_error ("Cannot convert %s to %s at %L",
gfc_typename (&from_ts), gfc_typename (ts), &expr->where);
return false;
}
- gfc_internal_error ("Can't convert %qs to %qs at %L",
+ gfc_internal_error ("Cannot convert %qs to %qs at %L",
gfc_typename (&from_ts), gfc_typename (ts),
&expr->where);
/* Not reached */
/* Write the module to the temporary file. */
module_fp = gzopen (filename_tmp, "w");
if (module_fp == NULL)
- gfc_fatal_error ("Can't open module file %qs for writing at %C: %s",
+ gfc_fatal_error ("Cannot open module file %qs for writing at %C: %s",
filename_tmp, xstrerror (errno));
/* Use lbasename to ensure module files are reproducible regardless
{
/* Module file have changed, replace the old one. */
if (remove (filename) && errno != ENOENT)
- gfc_fatal_error ("Can't delete module file %qs: %s", filename,
+ gfc_fatal_error ("Cannot delete module file %qs: %s", filename,
xstrerror (errno));
if (rename (filename_tmp, filename))
- gfc_fatal_error ("Can't rename module file %qs to %qs: %s",
+ gfc_fatal_error ("Cannot rename module file %qs to %qs: %s",
filename_tmp, filename, xstrerror (errno));
}
else
{
if (remove (filename_tmp))
- gfc_fatal_error ("Can't delete temporary module file %qs: %s",
+ gfc_fatal_error ("Cannot delete temporary module file %qs: %s",
filename_tmp, xstrerror (errno));
}
}
module_fp = gzopen_intrinsic_module (filename);
if (module_fp == NULL && module->intrinsic)
- gfc_fatal_error ("Can't find an intrinsic module named %qs at %C",
+ gfc_fatal_error ("Cannot find an intrinsic module named %qs at %C",
module_name);
/* Check for the IEEE modules, so we can mark their symbols
{
if (gfc_state_stack->state != COMP_SUBMODULE
&& module->submodule_name == NULL)
- gfc_fatal_error ("Can't open module file %qs for reading at %C: %s",
+ gfc_fatal_error ("Cannot open module file %qs for reading at %C: %s",
filename, xstrerror (errno));
else
gfc_fatal_error ("Module file %qs has not been generated, either "
for (p = gfc_state_stack; p; p = p->previous)
if ((p->state == COMP_MODULE || p->state == COMP_SUBMODULE)
&& strcmp (p->sym->name, module_name) == 0)
- gfc_fatal_error ("Can't USE the same %smodule we're building",
+ gfc_fatal_error ("Cannot USE the same %smodule we're building",
p->state == COMP_SUBMODULE ? "sub" : "");
init_pi_tree ();
if (!parent && sym->attr.abstract)
{
- gfc_error ("Can't construct ABSTRACT type %qs at %L",
+ gfc_error ("Cannot construct ABSTRACT type %qs at %L",
sym->name, &expr->where);
goto cleanup;
}
if (sym->attr.dimension)
{
if (el == ns->entries)
- gfc_error ("FUNCTION result %s can't be an array in "
+ gfc_error ("FUNCTION result %s cannot be an array in "
"FUNCTION %s at %L", sym->name,
ns->entries->sym->name, &sym->declared_at);
else
- gfc_error ("ENTRY result %s can't be an array in "
+ gfc_error ("ENTRY result %s cannot be an array in "
"FUNCTION %s at %L", sym->name,
ns->entries->sym->name, &sym->declared_at);
}
else if (sym->attr.pointer)
{
if (el == ns->entries)
- gfc_error ("FUNCTION result %s can't be a POINTER in "
+ gfc_error ("FUNCTION result %s cannot be a POINTER in "
"FUNCTION %s at %L", sym->name,
ns->entries->sym->name, &sym->declared_at);
else
- gfc_error ("ENTRY result %s can't be a POINTER in "
+ gfc_error ("ENTRY result %s cannot be a POINTER in "
"FUNCTION %s at %L", sym->name,
ns->entries->sym->name, &sym->declared_at);
}
if (sym)
{
if (el == ns->entries)
- gfc_error ("FUNCTION result %s can't be of type %s "
+ gfc_error ("FUNCTION result %s cannot be of type %s "
"in FUNCTION %s at %L", sym->name,
gfc_typename (ts), ns->entries->sym->name,
&sym->declared_at);
else
- gfc_error ("ENTRY result %s can't be of type %s "
+ gfc_error ("ENTRY result %s cannot be of type %s "
"in FUNCTION %s at %L", sym->name,
gfc_typename (ts), ns->entries->sym->name,
&sym->declared_at);
if (sym1->attr.subroutine != sym2->attr.subroutine
|| sym1->attr.function != sym2->attr.function)
{
- gfc_error ("%qs and %qs can't be mixed FUNCTION/SUBROUTINE for"
+ gfc_error ("%qs and %qs cannot be mixed FUNCTION/SUBROUTINE for"
" GENERIC %qs at %L",
sym1->name, sym2->name, generic_name, &where);
return false;
/* If we attempt to "overwrite" a specific binding, this is an error. */
if (p->overridden && !p->overridden->is_generic)
{
- gfc_error ("GENERIC %qs at %L can't overwrite specific binding with"
+ gfc_error ("GENERIC %qs at %L cannot overwrite specific binding with"
" the same name", name, &p->where);
return false;
}
/* F08:C468. All operator bindings must have a passed-object dummy argument. */
if (target->specific->nopass)
{
- gfc_error ("Type-bound operator at %L can't be NOPASS", &where);
+ gfc_error ("Type-bound operator at %L cannot be NOPASS", &where);
return NULL;
}
if (input == NULL)
{
- gfc_error_now ("Can't open file %qs", filename);
+ gfc_error_now ("Cannot open file %qs", filename);
return false;
}
}
}
else
{
- gfc_error ("Can't compute the length of the char array at %L.",
- &e->where);
+ gfc_error ("Cannot compute the length of the char array "
+ "at %L.", &e->where);
}
}
}
+2019-03-12 Martin Liska <mliska@suse.cz>
+
+ * gfortran.dg/abstract_type_3.f03: Amend test-case scan
+ patterns.
+ * gfortran.dg/binding_label_tests_4.f03: Likewise.
+ * gfortran.dg/c_f_pointer_tests_6.f90: Likewise.
+ * gfortran.dg/c_funloc_tests_6.f90: Likewise.
+ * gfortran.dg/c_loc_tests_17.f90: Likewise.
+ * gfortran.dg/constructor_9.f90: Likewise.
+ * gfortran.dg/dec_structure_8.f90: Likewise.
+ * gfortran.dg/entry_4.f90: Likewise.
+ * gfortran.dg/init_char_with_nonchar_ctr.f90: Likewise.
+ * gfortran.dg/initialization_23.f90: Likewise.
+ * gfortran.dg/logical_assignment_1.f90: Likewise.
+ * gfortran.dg/pr80752.f90: Likewise.
+ * gfortran.dg/pr88116_1.f90: Likewise.
+ * gfortran.dg/pr88467.f90: Likewise.
+ * gfortran.dg/typebound_call_7.f03: Likewise.
+ * gfortran.dg/typebound_generic_1.f03: Likewise.
+ * gfortran.dg/typebound_operator_2.f03: Likewise.
+ * gfortran.dg/typebound_operator_4.f03: Likewise.
+ * gfortran.dg/typebound_proc_9.f03: Likewise.
+ * gfortran.dg/unlimited_polymorphic_2.f03: Likewise.
+
2019-03-12 Paul Thomas <pault@gcc.gnu.org>
PR fortran/89363
SUBROUTINE sub (arg) ! { dg-error "is of the ABSTRACT type 'again_abst_t'" }
IMPLICIT NONE
TYPE(again_abst_t) :: arg
- arg = again_abst_t () ! { dg-error "Can't construct ABSTRACT type 'again_abst_t'" }
+ arg = again_abst_t () ! { dg-error "Cannot construct ABSTRACT type 'again_abst_t'" }
END SUBROUTINE sub
SUBROUTINE impl ()
module C
use A
-use B ! { dg-error "Can't open module file" }
+use B ! { dg-error "Cannot open module file" }
end module C
! { dg-excess-errors "compilation terminated" }
integer, pointer :: bari
call c_f_procpointer(fptr,bar) ! { dg-error "Argument CPTR at .1. to C_F_PROCPOINTER shall have the type TYPE.C_FUNPTR." }
call c_f_pointer(fun,bari) ! { dg-error "Argument CPTR at .1. to C_F_POINTER shall have the type TYPE.C_PTR." }
-fun = fptr ! { dg-error "Can't convert TYPE.c_ptr. to TYPE.c_funptr." }
+fun = fptr ! { dg-error "Cannot convert TYPE.c_ptr. to TYPE.c_funptr." }
end
subroutine test()
integer, external :: noCsub
procedure(integer), pointer :: fint
-cp = c_funloc (sub) ! { dg-error "Can't convert TYPE.c_funptr. to TYPE.c_ptr." })
-cfp = c_loc (int) ! { dg-error "Can't convert TYPE.c_ptr. to TYPE.c_funptr." }
+cp = c_funloc (sub) ! { dg-error "Cannot convert TYPE.c_funptr. to TYPE.c_ptr." })
+cfp = c_loc (int) ! { dg-error "Cannot convert TYPE.c_ptr. to TYPE.c_funptr." }
call c_f_pointer (cfp, int) ! { dg-error "Argument CPTR at .1. to C_F_POINTER shall have the type TYPE.C_PTR." }
call c_f_procpointer (cp, fsub) ! { dg-error "Argument CPTR at .1. to C_F_PROCPOINTER shall have the type TYPE.C_FUNPTR." }
use iso_c_binding, only : c_loc
integer, target :: i
type(C_PTR) :: f_ptr ! { dg-error "being used before it is defined" }
- f_ptr=c_loc(i) ! { dg-error "Can't convert" }
+ f_ptr=c_loc(i) ! { dg-error "Cannot convert" }
end program aaaa
contains
subroutine cfi()
type(cfmde), pointer :: cfd
- cfd=cfmde() ! { dg-error "Can't convert" }
+ cfd=cfmde() ! { dg-error "Cannot convert" }
end subroutine
end module
integer b // ! { dg-error "Empty old style initializer list" }
integer c /2*3/ ! { dg-error "Repeat spec invalid in scalar" }
integer d /1,2,3/ ! { dg-error "End of scalar initializer expected" }
- integer e /"HI"/ ! { dg-error "Can't convert" }
+ integer e /"HI"/ ! { dg-error "Cannot convert" }
integer f(as) /4*9/ ! { dg-error "Too many elements" }
integer g(3) /1,3/ ! { dg-error "Not enough elements" }
integer h(3) /1,3,5,7/ ! { dg-error "Too many elements" }
! { dg-do compile { target i?86-*-* x86_64-*-* } }
-function f1 () result (r) ! { dg-error "can't be a POINTER" }
+function f1 () result (r) ! { dg-error "cannot be a POINTER" }
integer, pointer :: r
real e1
allocate (r)
e1a = 13
end function
function f2 ()
-integer, dimension (2, 7, 6) :: e2 ! { dg-error "can't be an array" }
+integer, dimension (2, 7, 6) :: e2 ! { dg-error "cannot be an array" }
f2 = 6
return
entry e2 ()
e2 (:, :, :) = 2
end function
-integer(kind=8) function f3 () ! { dg-error "can't be of type" }
-complex(kind=8) e3 ! { dg-error "can't be of type" }
+integer(kind=8) function f3 () ! { dg-error "cannot be of type" }
+complex(kind=8) e3 ! { dg-error "cannot be of type" }
f3 = 1
return
entry e3 ()
integer :: n = 0
end type
type t2
- character :: c = t() ! { dg-error "Can't convert TYPE\\(t\\) to CHARACTER\\(1\\)" }
+ character :: c = t() ! { dg-error "Cannot convert TYPE\\(t\\) to CHARACTER\\(1\\)" }
end type
end subroutine
type t
end type
type t2
- character :: c(1) = [t()] ! { dg-error "Can't convert TYPE\\(t\\) to CHARACTER\\(1\\)" }
+ character :: c(1) = [t()] ! { dg-error "Cannot convert TYPE\\(t\\) to CHARACTER\\(1\\)" }
end type
end subroutine
subroutine s3
type t
integer :: a = 1
- character :: c = t() ! { dg-error "Can't convert TYPE\\(t\\) to CHARACTER\\(1\\)" }
+ character :: c = t() ! { dg-error "Cannot convert TYPE\\(t\\) to CHARACTER\\(1\\)" }
end type
end subroutine
subroutine s4
type t
integer, allocatable :: a
- character :: c = t() ! { dg-error "Can't convert TYPE\\(t\\) to CHARACTER\\(1\\)" }
+ character :: c = t() ! { dg-error "Cannot convert TYPE\\(t\\) to CHARACTER\\(1\\)" }
end type
end subroutine
TYPE :: one_parameter
CHARACTER :: name
END TYPE one_parameter
- CHARACTER, PARAMETER :: the_alpha = one_parameter('c') ! { dg-error "Can't convert TYPE" }
+ CHARACTER, PARAMETER :: the_alpha = one_parameter('c') ! { dg-error "Cannot convert TYPE" }
CHARACTER, PARAMETER :: the_beta = (/one_parameter('c')/) ! { dg-error "Incompatible ranks" }
END MODULE cdf_aux_mod
program emptyarray5
implicit none
real a(0)
- a = [logical::] ! { dg-error "Can't convert LOGICAL" }
+ a = [logical::] ! { dg-error "Cannot convert LOGICAL" }
print *,size(a)
end program emptyarray5
integer, parameter, public :: knd = 8
type, private :: a
- logical :: add_vs98 = 0.0_knd ! { dg-error "Can't convert" }
+ logical :: add_vs98 = 0.0_knd ! { dg-error "Cannot convert" }
end type a
type, private :: x_param_t
! { dg-do compile }
program p
- print *, [integer :: 1, [integer(8) :: 2, ['3']]] ! { dg-error "Can't convert" }
+ print *, [integer :: 1, [integer(8) :: 2, ['3']]] ! { dg-error "Cannot convert" }
end
! { dg-do compile }
program foo
- print *, [integer :: 1, [integer(8) :: 2, '3']] ! { dg-error "Can't convert" }
+ print *, [integer :: 1, [integer(8) :: 2, '3']] ! { dg-error "Cannot convert" }
end program foo
REAL :: resArr(3), resSmall(2)
res = sys%solve1 () ! { dg-error "Incompatible rank" }
- res = sys%solve2 () ! { dg-error "Can't convert" }
+ res = sys%solve2 () ! { dg-error "Cannot convert" }
resSmall = sys%solve1 () ! { dg-error "Different shape" }
res = sys%solve3 ()
CONTAINS
GENERIC :: gen2 => p1a ! { dg-error "are ambiguous" }
GENERIC :: gen2 => p3
- GENERIC :: p1 => p2 ! { dg-error "can't overwrite specific" }
+ GENERIC :: p1 => p2 ! { dg-error "cannot overwrite specific" }
GENERIC :: gensub => p2 ! { dg-error "mixed FUNCTION/SUBROUTINE" }
- PROCEDURE, NOPASS :: gen1 => intf1 ! { dg-error "Can't overwrite GENERIC" }
+ PROCEDURE, NOPASS :: gen1 => intf1 ! { dg-error "Cannot overwrite GENERIC" }
END TYPE t
CONTAINS
GENERIC :: OPERATOR(.UNARY.) => onearg_alt
GENERIC, PRIVATE :: OPERATOR(.UNARY.) => onearg_alt2 ! { dg-error "must have the same access" }
- GENERIC :: OPERATOR(.UNARYPRIME.) => nopassed ! { dg-error "can't be NOPASS" }
- GENERIC :: OPERATOR(-) => nopassed ! { dg-error "can't be NOPASS" }
+ GENERIC :: OPERATOR(.UNARYPRIME.) => nopassed ! { dg-error "cannot be NOPASS" }
+ GENERIC :: OPERATOR(-) => nopassed ! { dg-error "cannot be NOPASS" }
END TYPE t
CONTAINS
SUBROUTINE in_module ()
TYPE(myint) :: x
- x = 0 ! { dg-bogus "Can't convert" }
+ x = 0 ! { dg-bogus "Cannot convert" }
x = x + 42 ! { dg-bogus "Operands of" }
x = x .PLUS. 5 ! { dg-bogus "Unknown operator" }
END SUBROUTINE in_module
IMPLICIT NONE
TYPE(myint) :: x
- x = 0 ! { dg-error "Can't convert" }
+ x = 0 ! { dg-error "Cannot convert" }
x = x + 42 ! { dg-error "binary intrinsic numeric operator" }
x = x .PLUS. 5 ! { dg-error "Unknown operator" }
END PROGRAM main
CONTAINS
PROCEDURE, DEFERRED :: p2 ! { dg-error "Interface must be specified" }
PROCEDURE(intf), NOPASS :: p3 ! { dg-error "should be declared DEFERRED" }
- PROCEDURE(intf), DEFERRED, NON_OVERRIDABLE :: p4 ! { dg-error "can't both" }
+ PROCEDURE(intf), DEFERRED, NON_OVERRIDABLE :: p4 ! { dg-error "cannot both" }
PROCEDURE(unknown), DEFERRED :: p5 ! { dg-error "has no IMPLICIT|must be explicit" }
PROCEDURE(intf), DEFERRED, DEFERRED :: p6 ! { dg-error "Duplicate DEFERRED" }
PROCEDURE(intf), DEFERRED :: p6 => proc ! { dg-error "is invalid for DEFERRED" }
! F2008: C4106\r
u2 = [u1] ! { dg-error "shall not be unlimited polymorphic" }\r
\r
- i = u2 ! { dg-error "Can\\'t convert CLASS\\(\\*\\)" }\r
+ i = u2 ! { dg-error "Cannot convert CLASS\\(\\*\\)" }\r
\r
! Repeats same_type_as_1.f03 for unlimited polymorphic u2\r
flag = same_type_as (i, u2) ! { dg-error "cannot be of type INTEGER" }\r