[Patch, Fortran] Move gfc_internal_error to common diagnostics

Tobias Burnus tobias.burnus@physik.fu-berlin.de
Mon Nov 24 13:51:00 GMT 2014


Dear all,

this patch uses the common diagnostic code for gfc_internal_error; the
change is essentially only in error.c, but I additionally changed:

* Use gfc_fatal_error for the user-reachable message:
   if (gfc_option.flag_allow_leading_underscore && letter == '_')
     gfc_internal_error ("Option -fallow-leading-underscore is for use only by "
                        "gfortran developers, and should not be used for "
                        "implicitly typed variables");

* Used a bunch of %<...%> or %qs for nicer output

* Always use gfc_internal_error instead of internal_error

* Updated some gfc_*_now* comments to reflect the current status.


Build and regtested on x86-64-gnu-linux.
OK for the trunk?

Tobias

PS: I used -fallow-leading-underscore to test the patch - before changing it
to gfc_fatal_error, which worked fine.

PPS: I somehow missed to commit the following bits with my fatal-errors patch;
I will commit them this evening - unless someone else wants to have the
honour:

diff --git a/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90 b/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90
index bb4d2d3..2a3ddf4 100644
--- a/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_collectives_3.f90
@@ -10,0 +11 @@ end program test
+! { dg-excess-errors "compilation terminated" }
diff --git a/gcc/testsuite/gfortran.dg/dollar_sym_3.f b/gcc/testsuite/gfortran.dg/dollar_sym_3.f
index 8b26445..7b9b344 100644
--- a/gcc/testsuite/gfortran.dg/dollar_sym_3.f
+++ b/gcc/testsuite/gfortran.dg/dollar_sym_3.f
@@ -10,0 +11 @@ c Segmentation fault in gfc_restore_last_undo_checkpoint
+! { dg-excess-errors "compilation terminated" }
-------------- next part --------------
A non-text attachment was scrubbed...
Name: internal.diff
Type: text/x-diff
Size: 8337 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20141124/8e1af2b8/attachment.bin>


More information about the Gcc-patches mailing list