From: Eric Botcazou Date: Mon, 14 Sep 2015 07:05:51 +0000 (+0000) Subject: utils2.c (gnat_rewrite_reference): Add another acceptable pattern for the RHS. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=92d5f5ab3c36e05f10fc3445f0bf4b38e48be8fb;p=gcc.git 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 --- 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: