From: Richard Kenner Date: Mon, 28 Dec 1992 11:10:05 +0000 (-0500) Subject: (build_indirect_ref): See volatility from flag_volatile. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=accdfaab89e2650d31adc0ea4f50205e11b58e43;p=gcc.git (build_indirect_ref): See volatility from flag_volatile. From-SVN: r2974 --- diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c index 46e6dac0944..b5d6a09282a 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)