Commit 870cc33b by Richard Stallman

(build_indirect_ref): Avoid *& short-cut if -fvolatile.

From-SVN: r3475
parent a73f14a3
...@@ -1109,7 +1109,9 @@ build_indirect_ref (ptr, errorstring) ...@@ -1109,7 +1109,9 @@ build_indirect_ref (ptr, errorstring)
register tree type = TREE_TYPE (pointer); register tree type = TREE_TYPE (pointer);
if (TREE_CODE (type) == POINTER_TYPE) if (TREE_CODE (type) == POINTER_TYPE)
{
if (TREE_CODE (pointer) == ADDR_EXPR if (TREE_CODE (pointer) == ADDR_EXPR
&& !flag_volatile
&& (TREE_TYPE (TREE_OPERAND (pointer, 0)) && (TREE_TYPE (TREE_OPERAND (pointer, 0))
== TREE_TYPE (type))) == TREE_TYPE (type)))
return TREE_OPERAND (pointer, 0); return TREE_OPERAND (pointer, 0);
...@@ -1140,6 +1142,7 @@ build_indirect_ref (ptr, errorstring) ...@@ -1140,6 +1142,7 @@ build_indirect_ref (ptr, errorstring)
TREE_THIS_VOLATILE (ref) = TYPE_VOLATILE (t) || flag_volatile; TREE_THIS_VOLATILE (ref) = TYPE_VOLATILE (t) || flag_volatile;
return ref; return ref;
} }
}
else if (TREE_CODE (pointer) != ERROR_MARK) else if (TREE_CODE (pointer) != ERROR_MARK)
error ("invalid type argument of `%s'", errorstring); error ("invalid type argument of `%s'", errorstring);
return error_mark_node; return error_mark_node;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment