diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1992-12-28 06:10:05 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1992-12-28 06:10:05 -0500 |
commit | accdfaab89e2650d31adc0ea4f50205e11b58e43 (patch) | |
tree | 5a742aa3f061fae9900bb96a3b7b5976ad75d20d /gcc | |
parent | f94cc92f8c4338318b81f101d185d99eef6ae11d (diff) | |
download | gcc-accdfaab89e2650d31adc0ea4f50205e11b58e43.zip gcc-accdfaab89e2650d31adc0ea4f50205e11b58e43.tar.gz gcc-accdfaab89e2650d31adc0ea4f50205e11b58e43.tar.bz2 |
(build_indirect_ref): See volatility from flag_volatile.
From-SVN: r2974
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/c-typeck.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 46e6dac..b5d6a09 100644 --- a/gcc/c-typeck.c +++ b/gcc/c-typeck.c @@ -1121,8 +1121,9 @@ build_indirect_ref (ptr, errorstring) /* A de-reference of a pointer to const is not a const. It is valid to change it via some other pointer. */ TREE_READONLY (ref) = TYPE_READONLY (t); - TREE_SIDE_EFFECTS (ref) = TYPE_VOLATILE (t) || TREE_SIDE_EFFECTS (pointer); - TREE_THIS_VOLATILE (ref) = TYPE_VOLATILE (t); + TREE_SIDE_EFFECTS (ref) + = TYPE_VOLATILE (t) || TREE_SIDE_EFFECTS (pointer) || flag_volatile; + TREE_THIS_VOLATILE (ref) = TYPE_VOLATILE (t) || flag_volatile; return ref; } else if (TREE_CODE (pointer) != ERROR_MARK) |