OSDN Git Service

2006-03-30 Steven G. Kargl <kargls@comcast.net>
authorkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 May 2006 21:24:11 +0000 (21:24 +0000)
committerkargl <kargl@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 3 May 2006 21:24:11 +0000 (21:24 +0000)
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113502 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/gfortran.h
gcc/fortran/intrinsic.c
gcc/fortran/invoke.texi
gcc/fortran/lang.opt
gcc/fortran/options.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/iargc.f90 [new file with mode: 0644]

index abc6c4a..9302099 100644 (file)
@@ -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
index a7b84b1..b345910 100644 (file)
@@ -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;
index 7828922..e0763b8 100644 (file)
@@ -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)
index e95b32b..867e18a 100644 (file)
@@ -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
index 853653a..439eb02 100644 (file)
@@ -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
index 18d56c5..ff3719e 100644 (file)
@@ -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;
index a439ad2..399b36d 100644 (file)
@@ -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 (file)
index 0000000..a91e900
--- /dev/null
@@ -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