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
This commit is contained in:
Roger Sayle 2007-01-05 21:23:05 +00:00 committed by Roger Sayle
parent c96111c00d
commit 0f0707d106
3 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -1224,6 +1224,7 @@ gfc_trans_array_constructor_value (stmtblock_t * pblock, tree type,
TREE_STATIC (tmp) = 1;
TREE_CONSTANT (tmp) = 1;
TREE_INVARIANT (tmp) = 1;
TREE_READONLY (tmp) = 1;
DECL_INITIAL (tmp) = init;
init = tmp;

View File

@ -1445,6 +1445,7 @@ gfc_trans_character_select (gfc_code *code)
TREE_CONSTANT (tmp) = 1;
TREE_INVARIANT (tmp) = 1;
TREE_STATIC (tmp) = 1;
TREE_READONLY (tmp) = 1;
DECL_INITIAL (tmp) = init;
init = tmp;