aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorSteven G. Kargl <kargls@comcast.net>2006-05-03 21:24:11 +0000
committerSteven G. Kargl <kargl@gcc.gnu.org>2006-05-03 21:24:11 +0000
commita23eec13d926c33de97b5b93e866a7524a8bcd1f (patch)
tree76d5f89de0f22f26d69e8f1e2ee408c4e2363a77 /gcc
parentafd83fe4394ec1ad673e4930573eac6e64a11a01 (diff)
downloadgcc-a23eec13d926c33de97b5b93e866a7524a8bcd1f.zip
gcc-a23eec13d926c33de97b5b93e866a7524a8bcd1f.tar.gz
gcc-a23eec13d926c33de97b5b93e866a7524a8bcd1f.tar.bz2
re PR fortran/26896 (Description of implementation of -Wtabs/-Wno-tabs reversed)
2006-03-30 Steven G. Kargl <kargls@comcast.net> PR fortran/26896 * lang.opt: Fix -Wtab description PR fortran/20248 * lang.opt: New flag -fall-intrinsics. * invoke.texi: Document option. * gfortran.h (options_t): New member flag_all_intrinsics. * options.c (gfc_init_options, gfc_handle_option): Set new option. sort nearby misplaced options. * intrinsic.c (add_sym, make_generic, make_alias): Use it. 2006-03-30 Steven G. Kargl <kargls@comcast.net> * gfortran.dg/iargc.f90: New test. From-SVN: r113502
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog13
-rw-r--r--gcc/fortran/gfortran.h1
-rw-r--r--gcc/fortran/intrinsic.c9
-rw-r--r--gcc/fortran/invoke.texi8
-rw-r--r--gcc/fortran/lang.opt6
-rw-r--r--gcc/fortran/options.c21
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gfortran.dg/iargc.f906
8 files changed, 56 insertions, 13 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index abc6c4a..9302099 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,16 @@
+2006-05-02 Steven G. Kargl <kargls@comcast.net>
+
+ PR fortran/26896
+ * lang.opt: Fix -Wtab description
+
+ PR fortran/20248
+ * lang.opt: New flag -fall-intrinsics.
+ * invoke.texi: Document option.
+ * gfortran.h (options_t): New member flag_all_intrinsics.
+ * options.c (gfc_init_options, gfc_handle_option): Set new option.
+ sort nearby misplaced options.
+ * intrinsic.c (add_sym, make_generic, make_alias): Use it.
+
2006-05-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/27269
diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h
index a7b84b1..b345910 100644
--- a/gcc/fortran/gfortran.h
+++ b/gcc/fortran/gfortran.h
@@ -1614,6 +1614,7 @@ typedef struct
int warn_underflow;
int warn_unused_labels;
+ int flag_all_intrinsics;
int flag_default_double;
int flag_default_integer;
int flag_default_real;
diff --git a/gcc/fortran/intrinsic.c b/gcc/fortran/intrinsic.c
index 7828922..e0763b8 100644
--- a/gcc/fortran/intrinsic.c
+++ b/gcc/fortran/intrinsic.c
@@ -224,7 +224,8 @@ add_sym (const char *name, int elemental, int actual_ok ATTRIBUTE_UNUSED,
/* First check that the intrinsic belongs to the selected standard.
If not, don't add it to the symbol list. */
- if (!(gfc_option.allow_std & standard))
+ if (!(gfc_option.allow_std & standard)
+ && gfc_option.flag_all_intrinsics == 0)
return;
switch (sizing)
@@ -782,7 +783,8 @@ make_generic (const char *name, gfc_generic_isym_id generic_id, int standard)
{
gfc_intrinsic_sym *g;
- if (!(gfc_option.allow_std & standard))
+ if (!(gfc_option.allow_std & standard)
+ && gfc_option.flag_all_intrinsics == 0)
return;
if (sizing != SZ_NOTHING)
@@ -824,7 +826,8 @@ make_alias (const char *name, int standard)
/* First check that the intrinsic belongs to the selected standard.
If not, don't add it to the symbol list. */
- if (!(gfc_option.allow_std & standard))
+ if (!(gfc_option.allow_std & standard)
+ && gfc_option.flag_all_intrinsics == 0)
return;
switch (sizing)
diff --git a/gcc/fortran/invoke.texi b/gcc/fortran/invoke.texi
index e95b32b..867e18a 100644
--- a/gcc/fortran/invoke.texi
+++ b/gcc/fortran/invoke.texi
@@ -116,7 +116,7 @@ by type. Explanations are in the following sections.
@item Fortran Language Options
@xref{Fortran Dialect Options,,Options Controlling Fortran Dialect}.
@gccoptlist{
--ffree-form -fno-fixed-form @gol
+-fall-intrinsics -ffree-form -fno-fixed-form @gol
-fdollar-ok -fimplicit-none -fmax-identifier-length @gol
-std=@var{std} -fd-lines-as-code -fd-lines-as-comments @gol
-ffixed-line-length-@var{n} -ffixed-line-length-none @gol
@@ -191,6 +191,12 @@ Specify the layout used by the source file. The free form layout
was introduced in Fortran 90. Fixed form was traditionally used in
older Fortran programs.
+@cindex -fall-intrinsics
+@item -fall-intrinsics
+Accept all of the intrinsic procedures provided in libgfortran
+without regard to the setting of @option{-std}. In particular,
+this option can be quite useful with @option{-std=f95}.
+
@cindex option, -fd-lines-as-code
@cindex -fd-lines-as-code, option
@cindex option, -fd-lines-as-comments
diff --git a/gcc/fortran/lang.opt b/gcc/fortran/lang.opt
index 853653a..439eb02 100644
--- a/gcc/fortran/lang.opt
+++ b/gcc/fortran/lang.opt
@@ -67,7 +67,7 @@ Warn about \"suspicious\" constructs
Wtabs
Fortran
-Warn about nonconforming uses of the tab character
+Permit nonconforming uses of the tab character
Wunderflow
Fortran
@@ -77,6 +77,10 @@ Wunused-labels
Fortran
Warn when a label is unused
+fall-intrinsics
+Fortran RejectNegative
+All intrinsics procedures are available regardless of selected standard
+
fautomatic
Fortran
Do not treat local variables and COMMON blocks as if they were named in SAVE statements
diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c
index 18d56c5..ff3719e 100644
--- a/gcc/fortran/options.c
+++ b/gcc/fortran/options.c
@@ -61,6 +61,7 @@ gfc_init_options (unsigned int argc ATTRIBUTE_UNUSED,
gfc_option.warn_underflow = 1;
gfc_option.warn_unused_labels = 0;
+ gfc_option.flag_all_intrinsics = 0;
gfc_option.flag_default_double = 0;
gfc_option.flag_default_integer = 0;
gfc_option.flag_default_real = 0;
@@ -424,6 +425,18 @@ gfc_handle_option (size_t scode, const char *arg, int value)
case OPT_Wunused_labels:
gfc_option.warn_unused_labels = value;
break;
+
+ case OPT_fall_intrinsics:
+ gfc_option.flag_all_intrinsics = 1;
+ break;
+
+ case OPT_fautomatic:
+ gfc_option.flag_automatic = value;
+ break;
+
+ case OPT_fbackslash:
+ gfc_option.flag_backslash = value;
+ break;
case OPT_fcray_pointer:
gfc_option.flag_cray_pointer = value;
@@ -437,14 +450,6 @@ gfc_handle_option (size_t scode, const char *arg, int value)
gfc_option.flag_dollar_ok = value;
break;
- case OPT_fautomatic:
- gfc_option.flag_automatic = value;
- break;
-
- case OPT_fbackslash:
- gfc_option.flag_backslash = value;
- break;
-
case OPT_fd_lines_as_code:
gfc_option.flag_d_lines = 1;
break;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index a439ad2..399b36d 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2006-05-02 Steven G. Kargl <kargls@comcast.net>
+
+ PR fortran/20248
+ * gfortran.dg/iargc.f90: New test.
+
2006-05-02 Mark Mitchell <mark@codesourcery.com>
PR c++/27102
diff --git a/gcc/testsuite/gfortran.dg/iargc.f90 b/gcc/testsuite/gfortran.dg/iargc.f90
new file mode 100644
index 0000000..a91e900
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/iargc.f90
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! { dg-options "-fall-intrinsics -std=f95" }
+! PR fortran/20248
+program z
+ if (iargc() /= 0) call abort
+end program z