flags.h (flag_volatile): Remove declaration.

* 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.

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.

From-SVN: r62245
This commit is contained in:
Richard Sandiford 2003-02-01 13:09:41 +00:00 committed by Richard Sandiford
parent 3123c967cc
commit 271bd540d1
16 changed files with 40 additions and 70 deletions

View 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

View 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

View 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

View 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

View 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:

View 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;
}

View 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

View 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;
}
}

View 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

View 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;

View 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.

View File

@ -1,7 +1,6 @@
// Origin: asharji@uwaterloo.ca
// { dg-do compile }
// { dg-options "-fvolatile" }
typedef __SIZE_TYPE__ size_t;

View File

@ -1,7 +1,6 @@
// Origin: asharji@uwaterloo.ca
// { dg-do compile }
// { dg-options "-fvolatile" }
class bar {
public :

View File

@ -1,7 +1,6 @@
// Origin: asharji@uwaterloo.ca
// { dg-do compile }
// { dg-options "-fvolatile" }
typedef __SIZE_TYPE__ size_t;

View 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,

View 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)