Commit 321358d4 by Richard Guenther Committed by Richard Biener

expr.c (string_constant): Handle &MEM_REF.

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

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

From-SVN: r178100
parent c2b640a7
2011-08-26 Richard Guenther <rguenther@suse.de>
* expr.c (string_constant): Handle &MEM_REF.
2011-08-26 Andrew Stubbs <ams@codesourcery.com> 2011-08-26 Andrew Stubbs <ams@codesourcery.com>
* config/arm/arm.c (struct four_ints): New type. * config/arm/arm.c (struct four_ints): New type.
......
...@@ -10168,6 +10168,17 @@ string_constant (tree arg, tree *ptr_offset) ...@@ -10168,6 +10168,17 @@ string_constant (tree arg, tree *ptr_offset)
fold_convert (sizetype, lower_bound)); 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 else
return 0; 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