* flags.h (flag_volatile): Remove declaration.
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Feb 2003 13:09:41 +0000 (13:09 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 1 Feb 2003 13:09:41 +0000 (13:09 +0000)
(flag_volatile_global, flag_volatile_static): Likewise.
* c-typeck.c (build_indirect_ref): Don't check flag_volatile.
* toplev.c (flag_volatile): Remove definition.
(flag_volatile_global, flag_volatile_static): Likewise.
(f_options): Remove corresponding entries here.
* varasm.c (make_decl_rtl): Don't check flag_volatile_global
or flag_volatile_static.
* doc/invoke.texi: Remove documentation of -fvolatile,
-fvolatile-global and -fvolatile-static.

cp/
* typeck.c (build_indirect_ref): Don't check flag_volatile.

ada/
* utils2.c (build_unary_op): Don't check flag_volatile.
* gnat_ug.texi: Remove -fvolatile from example.
* gnat_ug_vxw.texi: Likewise.

testsuite/
* g++.dg/init/new1.C: Remove -fvolatile dg-options line.
* g++.dg/init/new2.C: Likewise.
* g++.dg/other/new1.C: Likewise.

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

16 files changed:
gcc/ChangeLog
gcc/ada/ChangeLog
gcc/ada/gnat_ug.texi
gcc/ada/gnat_ug_vxw.texi
gcc/ada/utils2.c
gcc/c-typeck.c
gcc/cp/ChangeLog
gcc/cp/typeck.c
gcc/doc/invoke.texi
gcc/flags.h
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/new1.C
gcc/testsuite/g++.dg/init/new2.C
gcc/testsuite/g++.dg/other/new1.C
gcc/toplev.c
gcc/varasm.c

index 8095a78..da99537 100644 (file)
@@ -1,3 +1,16 @@
+2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
+
+       * flags.h (flag_volatile): Remove declaration.
+       (flag_volatile_global, flag_volatile_static): Likewise.
+       * c-typeck.c (build_indirect_ref): Don't check flag_volatile.
+       * toplev.c (flag_volatile): Remove definition.
+       (flag_volatile_global, flag_volatile_static): Likewise.
+       (f_options): Remove corresponding entries here.
+       * varasm.c (make_decl_rtl): Don't check flag_volatile_global
+       or flag_volatile_static.
+       * doc/invoke.texi: Remove documentation of -fvolatile,
+       -fvolatile-global and -fvolatile-static.
+
 2003-01-31  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>
 
        * pa.c (pa_output_function_prologue, pa_output_function_epilogue): Move
index 328296b..d5f612d 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
+
+       * utils2.c (build_unary_op): Don't check flag_volatile.
+       * gnat_ug.texi: Remove -fvolatile from example.
+       * gnat_ug_vxw.texi: Likewise.
+
 2003-01-29  Laurent Guerby <guerby@acm.org>
 
         PR ada/8344
index 8faa273..be71814 100644 (file)
@@ -24047,7 +24047,7 @@ For a list of all available switches, refer to the sections describing
 Here is an example that passes the option @code{-v} to the GNAT compiler :
 @smallexample
 -g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
 -cargs -v
 @end smallexample
 
@@ -24056,7 +24056,7 @@ Here is an example that passes the option @code{-v} to the GNAT compiler, binder
 and @code{-v} and @code{-g} to the compiler :
 @smallexample
 -g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
 -cargs -v -g -O2 -bargs -v -largs -v
 @end smallexample
 
@@ -24065,7 +24065,7 @@ In both examples, the following arguments have been automatically added by the P
 Facility, and will be used by the C compiler.
 @smallexample
 -g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
 @end smallexample
 
 @noindent
index 6ea120e..0c61304 100644 (file)
@@ -19279,7 +19279,7 @@ For a list of all available switches, refer to the sections describing
 Here is an example that passes the option @code{-v} to the GNAT compiler :
 @smallexample
 -g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
 -cargs -v
 @end smallexample
 
@@ -19288,7 +19288,7 @@ Here is an example that passes the option @code{-v} to the GNAT compiler, binder
 and @code{-v} and @code{-g} to the compiler :
 @smallexample
 -g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
 -cargs -v -g -O2 -bargs -v -largs -v
 @end smallexample
 
@@ -19297,7 +19297,7 @@ In both examples, the following arguments have been automatically added by the P
 Facility, and will be used by the C compiler.
 @smallexample
 -g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
 @end smallexample
 
 @noindent
index 3777a5b..1d76d91 100644 (file)
@@ -1275,8 +1275,8 @@ build_unary_op (op_code, result_type, operand)
          TREE_READONLY (result) = TREE_READONLY (TREE_TYPE (type));
        }
 
-      side_effects = flag_volatile 
-       || (! TYPE_FAT_POINTER_P (type) && TYPE_VOLATILE (TREE_TYPE (type)));
+      side_effects = (! TYPE_FAT_POINTER_P (type)
+                     && TYPE_VOLATILE (TREE_TYPE (type)));
       break;
 
     case NEGATE_EXPR:
index 4134113..bbd94a0 100644 (file)
@@ -1189,7 +1189,6 @@ build_indirect_ref (ptr, errorstring)
   if (TREE_CODE (type) == POINTER_TYPE)
     {
       if (TREE_CODE (pointer) == ADDR_EXPR
-         && !flag_volatile
          && (TREE_TYPE (TREE_OPERAND (pointer, 0))
              == TREE_TYPE (type)))
        return TREE_OPERAND (pointer, 0);
@@ -1215,7 +1214,7 @@ build_indirect_ref (ptr, errorstring)
             to change it via some other pointer.  */
          TREE_READONLY (ref) = TYPE_READONLY (t);
          TREE_SIDE_EFFECTS (ref)
-           = TYPE_VOLATILE (t) || TREE_SIDE_EFFECTS (pointer) || flag_volatile;
+           = TYPE_VOLATILE (t) || TREE_SIDE_EFFECTS (pointer);
          TREE_THIS_VOLATILE (ref) = TYPE_VOLATILE (t);
          return ref;
        }
index 5c947c3..f376158 100644 (file)
@@ -1,3 +1,7 @@
+2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
+
+       * typeck.c (build_indirect_ref): Don't check flag_volatile.
+
 2003-01-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
 
        PR c++/8849
index 37a07b6..6d5cc65 100644 (file)
@@ -2352,7 +2352,6 @@ build_indirect_ref (ptr, errorstring)
           return error_mark_node;
         }
       else if (TREE_CODE (pointer) == ADDR_EXPR
-              && !flag_volatile
               && same_type_p (t, TREE_TYPE (TREE_OPERAND (pointer, 0))))
        /* The POINTER was something like `&x'.  We simplify `*&x' to
           `x'.  */
@@ -2367,8 +2366,7 @@ build_indirect_ref (ptr, errorstring)
          TREE_READONLY (ref) = CP_TYPE_CONST_P (t);
          TREE_THIS_VOLATILE (ref) = CP_TYPE_VOLATILE_P (t);
          TREE_SIDE_EFFECTS (ref)
-           = (TREE_THIS_VOLATILE (ref) || TREE_SIDE_EFFECTS (pointer)
-              || flag_volatile);
+           = (TREE_THIS_VOLATILE (ref) || TREE_SIDE_EFFECTS (pointer));
          return ref;
        }
     }
index e4c39c5..0b4d1dd 100644 (file)
@@ -705,8 +705,7 @@ in the following sections.
 -fno-common  -fno-ident  -fno-gnu-linker @gol
 -fpcc-struct-return  -fpic  -fPIC @gol
 -freg-struct-return  -fshared-data  -fshort-enums @gol
--fshort-double  -fshort-wchar -fvolatile @gol
--fvolatile-global  -fvolatile-static @gol
+-fshort-double  -fshort-wchar @gol
 -fverbose-asm  -fpack-struct  -fstack-check @gol
 -fstack-limit-register=@var{reg}  -fstack-limit-symbol=@var{sym} @gol
 -fargument-alias  -fargument-noalias @gol
@@ -10752,20 +10751,6 @@ debugging the compiler itself).
 extra information to be omitted and is useful when comparing two assembler
 files.
 
-@item -fvolatile
-@opindex fvolatile
-Consider all memory references through pointers to be volatile.
-
-@item -fvolatile-global
-@opindex fvolatile-global
-Consider all memory references to extern and global data items to
-be volatile.  GCC does not consider static data items to be volatile
-because of this switch.
-
-@item -fvolatile-static
-@opindex fvolatile-static
-Consider all memory references to static data to be volatile.
-
 @item -fpic
 @opindex fpic
 @cindex global offset table
index 8a1998c..80ee6a6 100644 (file)
@@ -337,18 +337,6 @@ extern int flag_omit_frame_pointer;
 
 extern int flag_no_peephole;
 
-/* Nonzero means all references through pointers are volatile.  */
-
-extern int flag_volatile;
-
-/* Nonzero means treat all global and extern variables as volatile.  */
-
-extern int flag_volatile_global;
-
-/* Nonzero means treat all static variables as volatile.  */
-
-extern int flag_volatile_static;
-
 /* Nonzero allows GCC to optimize sibling and tail recursive calls.  */
 
 extern int flag_optimize_sibling_calls;
index 91bba4a..61ed54b 100644 (file)
@@ -1,3 +1,9 @@
+2003-02-01  Richard Sandiford  <rsandifo@redhat.com>
+
+       * g++.dg/init/new1.C: Remove -fvolatile dg-options line.
+       * g++.dg/init/new2.C: Likewise.
+       * g++.dg/other/new1.C: Likewise.
+
 2003-01-31  Loren J. Rittle <ljrittle@acm.org>
 
        * gcc.dg/struct-ret-libc.c: New test.
index 24b60d3..5015d81 100644 (file)
@@ -1,7 +1,6 @@
 // Origin: asharji@uwaterloo.ca
 
 // { dg-do compile }
-// { dg-options "-fvolatile" }
 
 typedef __SIZE_TYPE__ size_t;
 
index 572cb28..8b207d0 100644 (file)
@@ -1,7 +1,6 @@
 // Origin: asharji@uwaterloo.ca
 
 // { dg-do compile }
-// { dg-options "-fvolatile" }
 
 class bar {
   public :
index 24b60d3..5015d81 100644 (file)
@@ -1,7 +1,6 @@
 // Origin: asharji@uwaterloo.ca
 
 // { dg-do compile }
-// { dg-options "-fvolatile" }
 
 typedef __SIZE_TYPE__ size_t;
 
index 3ab85ad..f783ed9 100644 (file)
@@ -606,18 +606,6 @@ int flag_signaling_nans = 0;
 
 int flag_complex_divide_method = 0;
 
-/* Nonzero means all references through pointers are volatile.  */
-
-int flag_volatile;
-
-/* Nonzero means treat all global and extern variables as volatile.  */
-
-int flag_volatile_global;
-
-/* Nonzero means treat all static variables as volatile.  */
-
-int flag_volatile_static;
-
 /* Nonzero means just do syntax checking; don't output anything.  */
 
 int flag_syntax_only = 0;
@@ -986,12 +974,6 @@ static const lang_independent_options f_options[] =
    N_("Perform DWARF2 duplicate elimination") },
   {"float-store", &flag_float_store, 1,
    N_("Do not store floats in registers") },
-  {"volatile", &flag_volatile, 1,
-   N_("Consider all mem refs through pointers as volatile") },
-  {"volatile-global", &flag_volatile_global, 1,
-   N_("Consider all mem refs to global data to be volatile") },
-  {"volatile-static", &flag_volatile_static, 1,
-   N_("Consider all mem refs to static data to be volatile") },
   {"defer-pop", &flag_defer_pop, 1,
    N_("Defer popping functions args from stack until later") },
   {"omit-frame-pointer", &flag_omit_frame_pointer, 1,
index 9fc92c4..fa6bf2c 100644 (file)
@@ -920,14 +920,6 @@ make_decl_rtl (decl, asmspec)
       name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
     }
 
-  /* If this variable is to be treated as volatile, show its
-     tree node has side effects.  */
-  if ((flag_volatile_global && TREE_CODE (decl) == VAR_DECL
-       && TREE_PUBLIC (decl))
-      || ((flag_volatile_static && TREE_CODE (decl) == VAR_DECL
-          && (TREE_PUBLIC (decl) || TREE_STATIC (decl)))))
-    TREE_SIDE_EFFECTS (decl) = 1;
-
   x = gen_rtx_MEM (DECL_MODE (decl), gen_rtx_SYMBOL_REF (Pmode, name));
   SYMBOL_REF_WEAK (XEXP (x, 0)) = DECL_WEAK (decl);
   if (TREE_CODE (decl) != FUNCTION_DECL)