From 92d5f5ab3c36e05f10fc3445f0bf4b38e48be8fb Mon Sep 17 00:00:00 2001 From: Eric Botcazou Date: Mon, 14 Sep 2015 07:05:51 +0000 Subject: [PATCH] utils2.c (gnat_rewrite_reference): Add another acceptable pattern for the RHS. * gcc-interface/utils2.c (gnat_rewrite_reference) : Add another acceptable pattern for the RHS. From-SVN: r227735 --- gcc/ada/ChangeLog | 5 +++++ gcc/ada/gcc-interface/utils2.c | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 60a7e692d37..e8276a4b76c 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,8 @@ +2015-09-14 Eric Botcazou + + * gcc-interface/utils2.c (gnat_rewrite_reference) : Add + another acceptable pattern for the RHS. + 2015-07-24 Micahel Darling PR other/66259 diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index 6a998d3ada9..e5c685bd08e 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -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: -- 2.30.2