Commit f32d300e authored by rguenth's avatar rguenth
Browse files

2011-08-26 Richard Guenther <rguenther@suse.de>

	* expr.c (string_constant): Handle &MEM_REF.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178100 138bc75d-0d04-0410-961f-82ee72b054a4
parent d5cbae34
2011-08-26 Richard Guenther <rguenther@suse.de>
* expr.c (string_constant): Handle &MEM_REF.
2011-08-26 Andrew Stubbs <ams@codesourcery.com>
 
* config/arm/arm.c (struct four_ints): New type.
......
......@@ -10168,6 +10168,17 @@ string_constant (tree arg, tree *ptr_offset)
fold_convert (sizetype, lower_bound));
}
}
else if (TREE_CODE (TREE_OPERAND (arg, 0)) == MEM_REF)
{
array = TREE_OPERAND (TREE_OPERAND (arg, 0), 0);
offset = TREE_OPERAND (TREE_OPERAND (arg, 0), 1);
if (TREE_CODE (array) != ADDR_EXPR)
return 0;
array = TREE_OPERAND (array, 0);
if (TREE_CODE (array) != STRING_CST
&& TREE_CODE (array) != VAR_DECL)
return 0;
}
else
return 0;
}
......
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