utils2.c (gnat_rewrite_reference): Add another acceptable pattern for the RHS.

* gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
	another acceptable pattern for the RHS.

From-SVN: r227735
This commit is contained in:
Eric Botcazou 2015-09-14 07:05:51 +00:00 committed by Eric Botcazou
parent e7d761337a
commit 92d5f5ab3c
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2015-09-14 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/utils2.c (gnat_rewrite_reference) <COMPOUND_EXPR>: Add
another acceptable pattern for the RHS.
2015-07-24 Micahel Darling <darlingm@gmail.com>
PR other/66259

View file

@ -2807,7 +2807,9 @@ gnat_rewrite_reference (tree ref, rewrite_fn func, void *data, tree *init)
gcc_assert (*init == NULL_TREE);
*init = TREE_OPERAND (ref, 0);
/* We expect only the pattern built in Call_to_gnu. */
gcc_assert (DECL_P (TREE_OPERAND (ref, 1)));
gcc_assert (DECL_P (TREE_OPERAND (ref, 1))
|| (TREE_CODE (TREE_OPERAND (ref, 1)) == COMPONENT_REF
&& DECL_P (TREE_OPERAND (TREE_OPERAND (ref, 1), 0))));
return TREE_OPERAND (ref, 1);
case CALL_EXPR: