Skip to content
Snippets Groups Projects
Commit b303a23b authored by sayle's avatar sayle
Browse files

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



git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121522 138bc75d-0d04-0410-961f-82ee72b054a4
parent 3d77819c
No related branches found
No related tags found
No related merge requests found
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);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment