Commit 0f0707d1 by Roger Sayle Committed by Roger Sayle

trans-array.c (gfc_trans_array_constructor_value): Make the static const "data"…

trans-array.c (gfc_trans_array_constructor_value): Make the static const "data" array as TREE_READONLY.


	* trans-array.c (gfc_trans_array_constructor_value): Make the
	static const "data" array as TREE_READONLY.
	* trans-stmt.c (gfc_trans_character_select): Likewise.

From-SVN: r120501
parent c96111c0
2007-01-05 Roger Sayle <roger@eyesopen.com> 2007-01-05 Roger Sayle <roger@eyesopen.com>
* trans-array.c (gfc_trans_array_constructor_value): Make the
static const "data" array as TREE_READONLY.
* trans-stmt.c (gfc_trans_character_select): Likewise.
2007-01-05 Roger Sayle <roger@eyesopen.com>
* trans-array.c (gfc_conv_loop_setup): Test whether the loop * trans-array.c (gfc_conv_loop_setup): Test whether the loop
stride is one, to avoid fold_build2 introducing a useless stride is one, to avoid fold_build2 introducing a useless
NON_LVALUE_EXPR node. NON_LVALUE_EXPR node.
......
...@@ -1224,6 +1224,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type, ...@@ -1224,6 +1224,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type,
TREE_STATIC (tmp) = 1; TREE_STATIC (tmp) = 1;
TREE_CONSTANT (tmp) = 1; TREE_CONSTANT (tmp) = 1;
TREE_INVARIANT (tmp) = 1; TREE_INVARIANT (tmp) = 1;
TREE_READONLY (tmp) = 1;
DECL_INITIAL (tmp) = init; DECL_INITIAL (tmp) = init;
init = tmp; init = tmp;
......
...@@ -1445,6 +1445,7 @@ gfc_trans_character_select (gfc_code *code) ...@@ -1445,6 +1445,7 @@ gfc_trans_character_select (gfc_code *code)
TREE_CONSTANT (tmp) = 1; TREE_CONSTANT (tmp) = 1;
TREE_INVARIANT (tmp) = 1; TREE_INVARIANT (tmp) = 1;
TREE_STATIC (tmp) = 1; TREE_STATIC (tmp) = 1;
TREE_READONLY (tmp) = 1;
DECL_INITIAL (tmp) = init; DECL_INITIAL (tmp) = init;
init = tmp; init = tmp;
......
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