aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/gfortran.h2
-rw-r--r--gcc/fortran/gfortran.texi11
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/feed_1.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/feed_2.f9012
6 files changed, 47 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index ab98c20..d3971a6 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,5 +1,10 @@
2016-10-25 Fritz Reese <fritzoreese@gmail.com>
+ * gfortran.texi: Document.
+ * gfortran.h (gfc_is_whitespace): Include form feed ('\f').
+
+2016-10-25 Fritz Reese <fritzoreese@gmail.com>
+
* invoke.texi, gfortran.texi: Touch up documentation of -fdec.
* gfortran.h (gfc_option): Move flag_dec_structure out of gfc_option.
* decl.c (match_record_decl, gfc_match_decl_type_spec,
@@ -10,6 +15,7 @@
* lang.opt (fdec): Use Fortran Var to create flag_dec.
* options.c (set_dec_flags): With -fdec enable -fcray-pointer,
-fd-lines-as-comments (default), -fdollar-ok, and legacy std flags.
+
2016-10-24 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/77828
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index 78a75e5..37423b75 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -60,7 +60,7 @@ not after.
#define MAX_SUBRECORD_LENGTH 2147483639 /* 2**31-9 */
-#define gfc_is_whitespace(c) ((c==' ') || (c=='\t'))
+#define gfc_is_whitespace(c) ((c==' ') || (c=='\t') || (c=='\f'))
/* Macros to check for groups of structure-like types and flavors since
derived types, structures, maps, unions are often treated similarly. */
diff --git a/gcc/fortran/gfortran.texi b/gcc/fortran/gfortran.texi
index fa1f17c..688b956 100644
--- a/gcc/fortran/gfortran.texi
+++ b/gcc/fortran/gfortran.texi
@@ -1465,6 +1465,7 @@ compatibility extensions along with those enabled by @option{-std=legacy}.
* Type variants for integer intrinsics::
* AUTOMATIC and STATIC attributes::
* Extended math intrinsics::
+* Form feed as whitespace::
@end menu
@node Old-style kind specifications
@@ -2510,6 +2511,16 @@ and then multiplying it by a constant radian-to-degree (or degree-to-radian)
factor, as appropriate. The factor is computed at compile-time as 180/pi (or
pi/180).
+@node Form feed as whitespace
+@subsection Form feed as whitespace
+@cindex form feed whitespace
+
+Historically, legacy compilers allowed insertion of form feed characters ('\f',
+ASCII 0xC) at the beginning of lines for formatted output to line printers,
+though the Fortran standard does not mention this. GNU Fortran supports the
+interpretation of form feed characters in source as whitespace for
+compatibility.
+
@node Extensions not implemented in GNU Fortran
@section Extensions not implemented in GNU Fortran
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index edc026e..b2662db 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-25 Fritz Reese <fritzoreese@gmail.com>
+
+ gfortran.dg/
+ * feed_1.f90, feed_2.f90: New testcases.
+
2016-10-25 Martin Liska <mliska@suse.cz>
PR sanitizer/78106
diff --git a/gcc/testsuite/gfortran.dg/feed_1.f90 b/gcc/testsuite/gfortran.dg/feed_1.f90
new file mode 100644
index 0000000..4dc98a1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/feed_1.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! { dg-options "-ffree-form" }
+! Test acceptance of form feed character in free source.
+
+implicit none
+integer, volatile :: x
+
+
+
+x = 5
+
+end
diff --git a/gcc/testsuite/gfortran.dg/feed_2.f90 b/gcc/testsuite/gfortran.dg/feed_2.f90
new file mode 100644
index 0000000..c55435f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/feed_2.f90
@@ -0,0 +1,12 @@
+ ! { dg-do compile }
+ ! { dg-options "-ffixed-form" }
+ ! Test acceptance of form feed character in fixed source.
+
+ implicit none
+ integer, volatile :: x
+
+
+
+ x = 5
+
+ end