Commit 31120e8f by Roger Sayle Committed by Roger Sayle

trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate NON_LVALUE_EXPR…

trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate NON_LVALUE_EXPR nodes and useless type conversions.


	* trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
	NON_LVALUE_EXPR nodes and useless type conversions.

From-SVN: r121522
parent 093253be
2007-02-02 Roger Sayle <roger@eyesopen.com>
* trans.c (gfc_build_array_ref): Use STRIP_TYPE_NOPS to eliminate
NON_LVALUE_EXPR nodes and useless type conversions.
2007-02-02 Paul Thomas <pault@gcc.gnu.org> 2007-02-02 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30284 PR fortran/30284
......
...@@ -302,6 +302,9 @@ gfc_build_array_ref (tree base, tree offset) ...@@ -302,6 +302,9 @@ gfc_build_array_ref (tree base, tree offset)
if (DECL_P (base)) if (DECL_P (base))
TREE_ADDRESSABLE (base) = 1; TREE_ADDRESSABLE (base) = 1;
/* Strip NON_LVALUE_EXPR nodes. */
STRIP_TYPE_NOPS (offset);
return build4 (ARRAY_REF, type, base, offset, NULL_TREE, NULL_TREE); return build4 (ARRAY_REF, type, base, offset, NULL_TREE, NULL_TREE);
} }
......
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