error.c (gfc_fatal_error_1): Renamed from gfc_fatal_error.
2014-11-15 Tobias Burnus <burnus@net-b.de> gcc/fortran/ * error.c (gfc_fatal_error_1): Renamed from gfc_fatal_error. (gfc_fatal_error): Add; uses common diagnostics. * array.c (gfc_match_array_ref, gfc_match_array_spec): Use %< %>. * check.c (check_co_collective, gfc_check_lcobound, gfc_check_image_index, gfc_check_num_images, gfc_check_this_image, gfc_check_ucobound): Ditto. * cpp.c (gfc_cpp_post_options): Ditto. (gfc_cpp_init_0, gfc_cpp_done): Change %s to %qs. * gfc-diagnostic.def (DK_FATAL): Capitalize first letter. * gfortran.h (gfc_fatal_error_1): Add. * match.c (gfc_match_name, gfc_match_critical, lock_unlock_statement, sync_statement): Add %< %>. * module.c (bad_module, gfc_dump_module, gfc_use_module): Change %s to %qs. * options.c (gfc_handle_module_path_options, * gfc_handle_fpe_option, gfc_handle_coarray_option, gfc_handle_runtime_check_option, gfc_handle_option): Add %< %>. * simplify.c (gfc_simplify_num_images): Ditto. * trans-stmt.c (gfc_trans_sync): Use gfc_fatal_error_1. * trans-array.c (gfc_conv_array_initializer): Ditto. * trans-types.c (gfc_init_kinds): Use gfc_fatal_error instead of fatal_error; add %< %> quotations. gcc/testsuite/ * gfortran.dg/binding_label_tests_4.f03: Add dg-excess-errors. * gfortran.dg/coarray_9.f90: Ditto. * gfortran.dg/empty_label.f: Ditto. * gfortran.dg/empty_label.f90: Ditto. From-SVN: r217600
This commit is contained in:
parent
87d4b38387
commit
ddc05d1165
19 changed files with 135 additions and 63 deletions
|
@ -1,3 +1,29 @@
|
|||
2014-11-15 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
* error.c (gfc_fatal_error_1): Renamed from gfc_fatal_error.
|
||||
(gfc_fatal_error): Add; uses common diagnostics.
|
||||
* array.c (gfc_match_array_ref, gfc_match_array_spec): Use
|
||||
%< %>.
|
||||
* check.c (check_co_collective, gfc_check_lcobound,
|
||||
gfc_check_image_index, gfc_check_num_images,
|
||||
gfc_check_this_image, gfc_check_ucobound): Ditto.
|
||||
* cpp.c (gfc_cpp_post_options): Ditto.
|
||||
(gfc_cpp_init_0, gfc_cpp_done): Change %s to %qs.
|
||||
* gfc-diagnostic.def (DK_FATAL): Capitalize first letter.
|
||||
* gfortran.h (gfc_fatal_error_1): Add.
|
||||
* match.c (gfc_match_name, gfc_match_critical,
|
||||
lock_unlock_statement, sync_statement): Add %< %>.
|
||||
* module.c (bad_module, gfc_dump_module, gfc_use_module): Change
|
||||
%s to %qs.
|
||||
* options.c (gfc_handle_module_path_options, gfc_handle_fpe_option,
|
||||
gfc_handle_coarray_option, gfc_handle_runtime_check_option,
|
||||
gfc_handle_option): Add %< %>.
|
||||
* simplify.c (gfc_simplify_num_images): Ditto.
|
||||
* trans-stmt.c (gfc_trans_sync): Use gfc_fatal_error_1.
|
||||
* trans-array.c (gfc_conv_array_initializer): Ditto.
|
||||
* trans-types.c (gfc_init_kinds): Use gfc_fatal_error instead
|
||||
of fatal_error; add %< %> quotations.
|
||||
|
||||
2014-11-13 Bernd Schmidt <bernds@codesourcery.com>
|
||||
Thomas Schwinge <thomas@codesourcery.com>
|
||||
Ilya Verbin <ilya.verbin@intel.com>
|
||||
|
|
|
@ -209,7 +209,7 @@ coarray:
|
|||
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
|
||||
|
@ -592,7 +592,7 @@ coarray:
|
|||
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
|
@ -1482,8 +1482,8 @@ check_co_collective (gfc_expr *a, gfc_expr *image_idx, gfc_expr *stat,
|
|||
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %L, use -fcoarray= to enable",
|
||||
&a->where);
|
||||
gfc_fatal_error_1 ("Coarrays disabled at %L, use -fcoarray= to enable",
|
||||
&a->where);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -2569,7 +2569,7 @@ gfc_check_lcobound (gfc_expr *coarray, gfc_expr *dim, gfc_expr *kind)
|
|||
{
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4847,7 +4847,7 @@ gfc_check_image_index (gfc_expr *coarray, gfc_expr *sub)
|
|||
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4885,7 +4885,7 @@ gfc_check_num_images (gfc_expr *distance, gfc_expr *failed)
|
|||
{
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -4927,7 +4927,7 @@ gfc_check_this_image (gfc_expr *coarray, gfc_expr *dim, gfc_expr *distance)
|
|||
{
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5126,7 +5126,7 @@ gfc_check_ucobound (gfc_expr *coarray, gfc_expr *dim, gfc_expr *kind)
|
|||
{
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -450,7 +450,7 @@ gfc_cpp_post_options (void)
|
|||
|| gfc_cpp_option.no_line_commands
|
||||
|| gfc_cpp_option.dump_macros
|
||||
|| gfc_cpp_option.dump_includes))
|
||||
gfc_fatal_error("To enable preprocessing, use -cpp");
|
||||
gfc_fatal_error ("To enable preprocessing, use %<-cpp%>");
|
||||
|
||||
if (!gfc_cpp_enabled ())
|
||||
return;
|
||||
|
@ -548,7 +548,7 @@ gfc_cpp_init_0 (void)
|
|||
|
||||
print.outf = fopen (gfc_cpp_option.output_filename, "w");
|
||||
if (print.outf == NULL)
|
||||
gfc_fatal_error ("opening output file %s: %s",
|
||||
gfc_fatal_error ("opening output file %qs: %s",
|
||||
gfc_cpp_option.output_filename,
|
||||
xstrerror (errno));
|
||||
}
|
||||
|
@ -559,7 +559,7 @@ gfc_cpp_init_0 (void)
|
|||
{
|
||||
print.outf = fopen (gfc_cpp_option.temporary_filename, "w");
|
||||
if (print.outf == NULL)
|
||||
gfc_fatal_error ("opening output file %s: %s",
|
||||
gfc_fatal_error ("opening output file %qs: %s",
|
||||
gfc_cpp_option.temporary_filename, xstrerror (errno));
|
||||
}
|
||||
|
||||
|
@ -666,7 +666,7 @@ gfc_cpp_done (void)
|
|||
fclose (f);
|
||||
}
|
||||
else
|
||||
gfc_fatal_error ("opening output file %s: %s",
|
||||
gfc_fatal_error ("opening output file %qs: %s",
|
||||
gfc_cpp_option.deps_filename,
|
||||
xstrerror (errno));
|
||||
}
|
||||
|
|
|
@ -933,6 +933,7 @@ gfc_notify_std (int std, const char *gmsgid, ...)
|
|||
|
||||
|
||||
/* Immediate warning (i.e. do not buffer the warning). */
|
||||
/* Use gfc_warning_now_2 instead, unless gmsgid contains a %L. */
|
||||
|
||||
void
|
||||
gfc_warning_now (const char *gmsgid, ...)
|
||||
|
@ -1086,6 +1087,7 @@ gfc_diagnostic_finalizer (diagnostic_context *context,
|
|||
}
|
||||
|
||||
/* Immediate warning (i.e. do not buffer the warning). */
|
||||
/* This function uses the common diagnostics, but does not support %L, yet. */
|
||||
|
||||
bool
|
||||
gfc_warning_now_2 (int opt, const char *gmsgid, ...)
|
||||
|
@ -1104,6 +1106,7 @@ gfc_warning_now_2 (int opt, const char *gmsgid, ...)
|
|||
}
|
||||
|
||||
/* Immediate warning (i.e. do not buffer the warning). */
|
||||
/* This function uses the common diagnostics, but does not support %L, yet. */
|
||||
|
||||
bool
|
||||
gfc_warning_now_2 (const char *gmsgid, ...)
|
||||
|
@ -1122,6 +1125,7 @@ gfc_warning_now_2 (const char *gmsgid, ...)
|
|||
|
||||
|
||||
/* Immediate error (i.e. do not buffer). */
|
||||
/* This function uses the common diagnostics, but does not support %L, yet. */
|
||||
|
||||
void
|
||||
gfc_error_now_2 (const char *gmsgid, ...)
|
||||
|
@ -1135,6 +1139,24 @@ gfc_error_now_2 (const char *gmsgid, ...)
|
|||
va_end (argp);
|
||||
}
|
||||
|
||||
|
||||
/* Fatal error, never returns. */
|
||||
/* This function uses the common diagnostics, but does not support %L, yet. */
|
||||
|
||||
void
|
||||
gfc_fatal_error (const char *gmsgid, ...)
|
||||
{
|
||||
va_list argp;
|
||||
diagnostic_info diagnostic;
|
||||
|
||||
va_start (argp, gmsgid);
|
||||
diagnostic_set_info (&diagnostic, gmsgid, &argp, UNKNOWN_LOCATION, DK_FATAL);
|
||||
report_diagnostic (&diagnostic);
|
||||
va_end (argp);
|
||||
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
||||
/* Clear the warning flag. */
|
||||
|
||||
void
|
||||
|
@ -1213,6 +1235,7 @@ warning:
|
|||
|
||||
|
||||
/* Immediate error. */
|
||||
/* Use gfc_error_now_2 instead, unless gmsgid contains a %L. */
|
||||
|
||||
void
|
||||
gfc_error_now (const char *gmsgid, ...)
|
||||
|
@ -1243,9 +1266,10 @@ gfc_error_now (const char *gmsgid, ...)
|
|||
|
||||
|
||||
/* Fatal error, never returns. */
|
||||
/* Use gfc_fatal_error instead, unless gmsgid contains a %L. */
|
||||
|
||||
void
|
||||
gfc_fatal_error (const char *gmsgid, ...)
|
||||
gfc_fatal_error_1 (const char *gmsgid, ...)
|
||||
{
|
||||
va_list argp;
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ DEFINE_DIAGNOSTIC_KIND (DK_UNSPECIFIED, "", NULL)
|
|||
DEFINE_DIAGNOSTIC_KIND (DK_IGNORED, "", NULL)
|
||||
|
||||
/* The remainder are real diagnostic types. */
|
||||
DEFINE_DIAGNOSTIC_KIND (DK_FATAL, "fatal error", "error")
|
||||
DEFINE_DIAGNOSTIC_KIND (DK_FATAL, "Fatal Error", "error")
|
||||
DEFINE_DIAGNOSTIC_KIND (DK_ICE, "internal compiler error", "error")
|
||||
DEFINE_DIAGNOSTIC_KIND (DK_ERROR, "Error", "error")
|
||||
DEFINE_DIAGNOSTIC_KIND (DK_SORRY, "sorry, unimplemented", "error")
|
||||
|
|
|
@ -2707,6 +2707,7 @@ void gfc_warning_check (void);
|
|||
void gfc_error (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
|
||||
void gfc_error_now (const char *, ...) ATTRIBUTE_GCC_GFC(1,2);
|
||||
void gfc_error_now_2 (const char *gmsgid, ...) ATTRIBUTE_GCC_GFC(1,2);
|
||||
void gfc_fatal_error_1 (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
|
||||
void gfc_fatal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
|
||||
void gfc_internal_error (const char *, ...) ATTRIBUTE_NORETURN ATTRIBUTE_GCC_GFC(1,2);
|
||||
void gfc_clear_error (void);
|
||||
|
|
|
@ -557,8 +557,8 @@ gfc_match_name (char *buffer)
|
|||
|
||||
if (c == '$' && !gfc_option.flag_dollar_ok)
|
||||
{
|
||||
gfc_fatal_error ("Invalid character '$' at %L. Use -fdollar-ok to allow "
|
||||
"it as an extension", &old_loc);
|
||||
gfc_fatal_error_1 ("Invalid character '$' at %L. Use -fdollar-ok to allow"
|
||||
" it as an extension", &old_loc);
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
|
||||
|
@ -1665,7 +1665,8 @@ gfc_match_critical (void)
|
|||
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to "
|
||||
"enable");
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
|
||||
|
@ -2726,7 +2727,7 @@ lock_unlock_statement (gfc_statement st)
|
|||
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
|
||||
|
@ -2922,7 +2923,8 @@ sync_statement (gfc_statement st)
|
|||
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to "
|
||||
"enable");
|
||||
return MATCH_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -1054,15 +1054,15 @@ bad_module (const char *msgid)
|
|||
switch (iomode)
|
||||
{
|
||||
case IO_INPUT:
|
||||
gfc_fatal_error ("Reading module %s at line %d column %d: %s",
|
||||
gfc_fatal_error ("Reading module %qs at line %d column %d: %s",
|
||||
module_name, module_line, module_column, msgid);
|
||||
break;
|
||||
case IO_OUTPUT:
|
||||
gfc_fatal_error ("Writing module %s at line %d column %d: %s",
|
||||
gfc_fatal_error ("Writing module %qs at line %d column %d: %s",
|
||||
module_name, module_line, module_column, msgid);
|
||||
break;
|
||||
default:
|
||||
gfc_fatal_error ("Module %s at line %d column %d: %s",
|
||||
gfc_fatal_error ("Module %qs at line %d column %d: %s",
|
||||
module_name, module_line, module_column, msgid);
|
||||
break;
|
||||
}
|
||||
|
@ -6010,7 +6010,7 @@ gfc_dump_module (const char *name, int dump_flag)
|
|||
/* 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 '%s' for writing at %C: %s",
|
||||
gfc_fatal_error ("Can't open module file %qs for writing at %C: %s",
|
||||
filename_tmp, xstrerror (errno));
|
||||
|
||||
gzprintf (module_fp, "GFORTRAN module version '%s' created from %s\n",
|
||||
|
@ -6030,7 +6030,7 @@ gfc_dump_module (const char *name, int dump_flag)
|
|||
write_char ('\n');
|
||||
|
||||
if (gzclose (module_fp))
|
||||
gfc_fatal_error ("Error writing module file '%s' for writing: %s",
|
||||
gfc_fatal_error ("Error writing module file %qs for writing: %s",
|
||||
filename_tmp, xstrerror (errno));
|
||||
|
||||
/* Read the CRC32 from the gzip trailers of the module files and
|
||||
|
@ -6041,10 +6041,10 @@ gfc_dump_module (const char *name, int dump_flag)
|
|||
{
|
||||
/* Module file have changed, replace the old one. */
|
||||
if (remove (filename) && errno != ENOENT)
|
||||
gfc_fatal_error ("Can't delete module file '%s': %s", filename,
|
||||
gfc_fatal_error ("Can't delete module file %qs: %s", filename,
|
||||
xstrerror (errno));
|
||||
if (rename (filename_tmp, filename))
|
||||
gfc_fatal_error ("Can't rename module file '%s' to '%s': %s",
|
||||
gfc_fatal_error ("Can't rename module file %qs to %qs: %s",
|
||||
filename_tmp, filename, xstrerror (errno));
|
||||
}
|
||||
else
|
||||
|
@ -6789,7 +6789,7 @@ gfc_use_module (gfc_use_list *module)
|
|||
module_fp = gzopen_intrinsic_module (filename);
|
||||
|
||||
if (module_fp == NULL && module->intrinsic)
|
||||
gfc_fatal_error ("Can't find an intrinsic module named '%s' at %C",
|
||||
gfc_fatal_error ("Can't find an intrinsic module named %qs at %C",
|
||||
module_name);
|
||||
|
||||
/* Check for the IEEE modules, so we can mark their symbols
|
||||
|
@ -6814,7 +6814,7 @@ gfc_use_module (gfc_use_list *module)
|
|||
}
|
||||
|
||||
if (module_fp == NULL)
|
||||
gfc_fatal_error ("Can't open module file '%s' for reading at %C: %s",
|
||||
gfc_fatal_error ("Can't open module file %qs for reading at %C: %s",
|
||||
filename, xstrerror (errno));
|
||||
|
||||
/* Check that we haven't already USEd an intrinsic module with the
|
||||
|
@ -6845,7 +6845,7 @@ gfc_use_module (gfc_use_list *module)
|
|||
parse_name (c);
|
||||
if ((start == 1 && strcmp (atom_name, "GFORTRAN") != 0)
|
||||
|| (start == 2 && strcmp (atom_name, " module") != 0))
|
||||
gfc_fatal_error ("File '%s' opened at %C is not a GNU Fortran"
|
||||
gfc_fatal_error ("File %qs opened at %C is not a GNU Fortran"
|
||||
" module file", filename);
|
||||
if (start == 3)
|
||||
{
|
||||
|
@ -6853,7 +6853,7 @@ gfc_use_module (gfc_use_list *module)
|
|||
|| module_char () != ' '
|
||||
|| parse_atom () != ATOM_STRING
|
||||
|| strcmp (atom_string, MOD_VERSION))
|
||||
gfc_fatal_error ("Cannot read module file '%s' opened at %C,"
|
||||
gfc_fatal_error ("Cannot read module file %qs opened at %C,"
|
||||
" because it was created by a different"
|
||||
" version of GNU Fortran", filename);
|
||||
|
||||
|
|
|
@ -489,7 +489,7 @@ gfc_handle_module_path_options (const char *arg)
|
|||
{
|
||||
|
||||
if (gfc_option.module_dir != NULL)
|
||||
gfc_fatal_error ("gfortran: Only one -J option allowed");
|
||||
gfc_fatal_error ("gfortran: Only one %<-J%> option allowed");
|
||||
|
||||
gfc_option.module_dir = XCNEWVEC (char, strlen (arg) + 2);
|
||||
strcpy (gfc_option.module_dir, arg);
|
||||
|
@ -561,9 +561,9 @@ gfc_handle_fpe_option (const char *arg, bool trap)
|
|||
}
|
||||
}
|
||||
if (!result && !trap)
|
||||
gfc_fatal_error ("Argument to -ffpe-trap is not valid: %s", arg);
|
||||
gfc_fatal_error ("Argument to %<-ffpe-trap%> is not valid: %s", arg);
|
||||
else if (!result)
|
||||
gfc_fatal_error ("Argument to -ffpe-summary is not valid: %s", arg);
|
||||
gfc_fatal_error ("Argument to %<-ffpe-summary%> is not valid: %s", arg);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -579,7 +579,7 @@ gfc_handle_coarray_option (const char *arg)
|
|||
else if (strcmp (arg, "lib") == 0)
|
||||
gfc_option.coarray = GFC_FCOARRAY_LIB;
|
||||
else
|
||||
gfc_fatal_error ("Argument to -fcoarray is not valid: %s", arg);
|
||||
gfc_fatal_error ("Argument to %<-fcoarray%> is not valid: %s", arg);
|
||||
}
|
||||
|
||||
|
||||
|
@ -617,7 +617,7 @@ gfc_handle_runtime_check_option (const char *arg)
|
|||
}
|
||||
}
|
||||
if (!result)
|
||||
gfc_fatal_error ("Argument to -fcheck is not valid: %s", arg);
|
||||
gfc_fatal_error ("Argument to %<-fcheck%> is not valid: %s", arg);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -823,7 +823,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
|||
|
||||
case OPT_ffixed_line_length_:
|
||||
if (value != 0 && value < 7)
|
||||
gfc_fatal_error ("Fixed line length must be at least seven.");
|
||||
gfc_fatal_error ("Fixed line length must be at least seven");
|
||||
gfc_option.fixed_line_length = value;
|
||||
break;
|
||||
|
||||
|
@ -845,7 +845,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
|||
|
||||
case OPT_ffree_line_length_:
|
||||
if (value != 0 && value < 4)
|
||||
gfc_fatal_error ("Free line length must be at least three.");
|
||||
gfc_fatal_error ("Free line length must be at least three");
|
||||
gfc_option.free_line_length = value;
|
||||
break;
|
||||
|
||||
|
@ -859,7 +859,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
|||
|
||||
case OPT_static_libgfortran:
|
||||
#ifndef HAVE_LD_STATIC_DYNAMIC
|
||||
gfc_fatal_error ("-static-libgfortran is not supported in this "
|
||||
gfc_fatal_error ("%<-static-libgfortran%> is not supported in this "
|
||||
"configuration");
|
||||
#endif
|
||||
break;
|
||||
|
@ -974,7 +974,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
|||
else if (!strcasecmp (arg, "true"))
|
||||
gfc_option.flag_init_logical = GFC_INIT_LOGICAL_TRUE;
|
||||
else
|
||||
gfc_fatal_error ("Unrecognized option to -finit-logical: %s",
|
||||
gfc_fatal_error ("Unrecognized option to %<-finit-logical%>: %s",
|
||||
arg);
|
||||
break;
|
||||
|
||||
|
@ -990,7 +990,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
|||
else if (!strcasecmp (arg, "-inf"))
|
||||
gfc_option.flag_init_real = GFC_INIT_REAL_NEG_INF;
|
||||
else
|
||||
gfc_fatal_error ("Unrecognized option to -finit-real: %s",
|
||||
gfc_fatal_error ("Unrecognized option to %<-finit-real%>: %s",
|
||||
arg);
|
||||
break;
|
||||
|
||||
|
@ -1006,7 +1006,7 @@ gfc_handle_option (size_t scode, const char *arg, int value,
|
|||
gfc_option.flag_init_character_value = (char)value;
|
||||
}
|
||||
else
|
||||
gfc_fatal_error ("The value of n in -finit-character=n must be "
|
||||
gfc_fatal_error ("The value of n in %<-finit-character=n%> must be "
|
||||
"between 0 and 127");
|
||||
break;
|
||||
|
||||
|
|
|
@ -4634,7 +4634,7 @@ gfc_simplify_num_images (gfc_expr *distance ATTRIBUTE_UNUSED, gfc_expr *failed)
|
|||
|
||||
if (gfc_option.coarray == GFC_FCOARRAY_NONE)
|
||||
{
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use -fcoarray= to enable");
|
||||
gfc_fatal_error ("Coarrays disabled at %C, use %<-fcoarray=%> to enable");
|
||||
return &gfc_bad_expr;
|
||||
}
|
||||
|
||||
|
|
|
@ -5425,11 +5425,11 @@ gfc_conv_array_initializer (tree type, gfc_expr * expr)
|
|||
{
|
||||
/* Problems occur when we get something like
|
||||
integer :: a(lots) = (/(i, i=1, lots)/) */
|
||||
gfc_fatal_error ("The number of elements in the array constructor "
|
||||
"at %L requires an increase of the allowed %d "
|
||||
"upper limit. See -fmax-array-constructor "
|
||||
"option", &expr->where,
|
||||
gfc_option.flag_max_array_constructor);
|
||||
gfc_fatal_error_1 ("The number of elements in the array "
|
||||
"constructor at %L requires an increase of "
|
||||
"the allowed %d upper limit. See "
|
||||
"-fmax-array-constructor option", &expr->where,
|
||||
gfc_option.flag_max_array_constructor);
|
||||
return NULL_TREE;
|
||||
}
|
||||
if (mpz_cmp_si (c->offset, 0) != 0)
|
||||
|
|
|
@ -865,9 +865,9 @@ gfc_trans_sync (gfc_code *code, gfc_exec_op type)
|
|||
{
|
||||
/* FIXME. */
|
||||
if (code->expr1->ts.kind != gfc_c_int_kind)
|
||||
gfc_fatal_error ("Sorry, only support for integer kind %d "
|
||||
"implemented for image-set at %L",
|
||||
gfc_c_int_kind, &code->expr1->where);
|
||||
gfc_fatal_error_1 ("Sorry, only support for integer kind %d "
|
||||
"implemented for image-set at %L",
|
||||
gfc_c_int_kind, &code->expr1->where);
|
||||
|
||||
gfc_conv_array_parameter (&se, code->expr1, true, NULL, NULL, &len);
|
||||
images = se.expr;
|
||||
|
|
|
@ -496,7 +496,8 @@ gfc_init_kinds (void)
|
|||
if (gfc_option.flag_default_integer)
|
||||
{
|
||||
if (!saw_i8)
|
||||
fatal_error ("INTEGER(KIND=8) is not available for -fdefault-integer-8 option");
|
||||
gfc_fatal_error ("INTEGER(KIND=8) is not available for "
|
||||
"%<-fdefault-integer-8%> option");
|
||||
|
||||
gfc_default_integer_kind = 8;
|
||||
|
||||
|
@ -504,7 +505,8 @@ gfc_init_kinds (void)
|
|||
else if (gfc_option.flag_integer4_kind == 8)
|
||||
{
|
||||
if (!saw_i8)
|
||||
fatal_error ("INTEGER(KIND=8) is not available for -finteger-4-integer-8 option");
|
||||
gfc_fatal_error ("INTEGER(KIND=8) is not available for "
|
||||
"%<-finteger-4-integer-8%> option");
|
||||
|
||||
gfc_default_integer_kind = 8;
|
||||
}
|
||||
|
@ -522,28 +524,32 @@ gfc_init_kinds (void)
|
|||
if (gfc_option.flag_default_real)
|
||||
{
|
||||
if (!saw_r8)
|
||||
fatal_error ("REAL(KIND=8) is not available for -fdefault-real-8 option");
|
||||
gfc_fatal_error ("REAL(KIND=8) is not available for "
|
||||
"%<-fdefault-real-8%> option");
|
||||
|
||||
gfc_default_real_kind = 8;
|
||||
}
|
||||
else if (gfc_option.flag_real4_kind == 8)
|
||||
{
|
||||
if (!saw_r8)
|
||||
fatal_error ("REAL(KIND=8) is not available for -freal-4-real-8 option");
|
||||
gfc_fatal_error ("REAL(KIND=8) is not available for %<-freal-4-real-8%> "
|
||||
"option");
|
||||
|
||||
gfc_default_real_kind = 8;
|
||||
}
|
||||
else if (gfc_option.flag_real4_kind == 10)
|
||||
{
|
||||
if (!saw_r10)
|
||||
fatal_error ("REAL(KIND=10) is not available for -freal-4-real-10 option");
|
||||
gfc_fatal_error ("REAL(KIND=10) is not available for "
|
||||
"%<-freal-4-real-10%> option");
|
||||
|
||||
gfc_default_real_kind = 10;
|
||||
}
|
||||
else if (gfc_option.flag_real4_kind == 16)
|
||||
{
|
||||
if (!saw_r16)
|
||||
fatal_error ("REAL(KIND=16) is not available for -freal-4-real-16 option");
|
||||
gfc_fatal_error ("REAL(KIND=16) is not available for "
|
||||
"%<-freal-4-real-16%> option");
|
||||
|
||||
gfc_default_real_kind = 16;
|
||||
}
|
||||
|
@ -557,7 +563,8 @@ gfc_init_kinds (void)
|
|||
specified without -fdefault-double, we use kind=16, if it's available.
|
||||
Otherwise we do not change anything. */
|
||||
if (gfc_option.flag_default_double && !gfc_option.flag_default_real)
|
||||
fatal_error ("Use of -fdefault-double-8 requires -fdefault-real-8");
|
||||
gfc_fatal_error ("Use of %<-fdefault-double-8%> requires "
|
||||
"%<-fdefault-real-8%>");
|
||||
|
||||
if (gfc_option.flag_default_real && gfc_option.flag_default_double && saw_r8)
|
||||
gfc_default_double_kind = 8;
|
||||
|
@ -566,21 +573,24 @@ gfc_init_kinds (void)
|
|||
else if (gfc_option.flag_real8_kind == 4)
|
||||
{
|
||||
if (!saw_r4)
|
||||
fatal_error ("REAL(KIND=4) is not available for -freal-8-real-4 option");
|
||||
gfc_fatal_error ("REAL(KIND=4) is not available for "
|
||||
"%<-freal-8-real-4%> option");
|
||||
|
||||
gfc_default_double_kind = 4;
|
||||
}
|
||||
else if (gfc_option.flag_real8_kind == 10 )
|
||||
{
|
||||
if (!saw_r10)
|
||||
fatal_error ("REAL(KIND=10) is not available for -freal-8-real-10 option");
|
||||
gfc_fatal_error ("REAL(KIND=10) is not available for "
|
||||
"%<-freal-8-real-10%> option");
|
||||
|
||||
gfc_default_double_kind = 10;
|
||||
}
|
||||
else if (gfc_option.flag_real8_kind == 16 )
|
||||
{
|
||||
if (!saw_r16)
|
||||
fatal_error ("REAL(KIND=10) is not available for -freal-8-real-16 option");
|
||||
gfc_fatal_error ("REAL(KIND=10) is not available for "
|
||||
"%<-freal-8-real-16%> option");
|
||||
|
||||
gfc_default_double_kind = 16;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,10 @@
|
|||
2014-11-15 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
* gfortran.dg/binding_label_tests_4.f03: Add dg-excess-errors.
|
||||
* gfortran.dg/coarray_9.f90: Ditto.
|
||||
* gfortran.dg/empty_label.f: Ditto.
|
||||
* gfortran.dg/empty_label.f90: Ditto.
|
||||
|
||||
2014-11-14 Michael Meissner <meissner@linux.vnet.ibm.com>
|
||||
|
||||
* gcc.target/powerpc/ppc-fpconv-1.c: Adjust for -mupper-regs-df
|
||||
|
|
|
@ -20,5 +20,4 @@ module C
|
|||
use A
|
||||
use B ! { dg-error "Can't open module file" }
|
||||
end module C
|
||||
|
||||
|
||||
! { dg-excess-errors "compilation terminated" }
|
||||
|
|
|
@ -16,3 +16,4 @@ critical ! "Coarrays disabled" (but error above is fatal)
|
|||
end critical ! "Expecting END PROGRAM statement" (but error above is fatal)
|
||||
|
||||
end
|
||||
! { dg-excess-errors "compilation terminated" }
|
||||
|
|
|
@ -3,3 +3,4 @@ C { dg-options "-Werror -fmax-errors=1" }
|
|||
100 ! { dg-warning "empty statement" }
|
||||
end
|
||||
C { dg-error "count reached limit" "" { target *-*-* } 0 }
|
||||
C { dg-excess-errors "compilation terminated" }
|
||||
|
|
|
@ -3,3 +3,4 @@
|
|||
100 ! { dg-warning "empty statement" }
|
||||
end
|
||||
! { dg-error "count reached limit" "" { target *-*-* } 0 }
|
||||
! { dg-excess-errors "compilation terminated" }
|
||||
|
|
Loading…
Add table
Reference in a new issue