summaryrefslogtreecommitdiff
path: root/gcc/tree-nested.c
diff options
context:
space:
mode:
authorhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-12 13:32:27 +0000
committerhainque <hainque@138bc75d-0d04-0410-961f-82ee72b054a4>2007-06-12 13:32:27 +0000
commit528571a4a3b948f6e06e8b23fc9c501de91da1ce (patch)
tree3259accf8e26823f3276d4d3a167b9abdebc6ce1 /gcc/tree-nested.c
parentde7d4e07e366628069dda0200f604b25d0793632 (diff)
downloadgcc-528571a4a3b948f6e06e8b23fc9c501de91da1ce.tar.gz
* tree-nested.c (convert_local_reference): Handle VIEW_CONVERT_EXPR.
Request walking the subtrees only, leaving the current is_lhs/val_only untouched. (convert_non_local_reference): Likewise. testsuite/ * gnat.dg/lhs_view_convert.adb: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@125646 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nested.c')
-rw-r--r--gcc/tree-nested.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/tree-nested.c b/gcc/tree-nested.c
index f26c9ba26ad..dbb146d0866 100644
--- a/gcc/tree-nested.c
+++ b/gcc/tree-nested.c
@@ -1035,6 +1035,13 @@ convert_nonlocal_reference (tree *tp, int *walk_subtrees, void *data)
walk_tree (tp, convert_nonlocal_reference, wi, NULL);
break;
+ case VIEW_CONVERT_EXPR:
+ /* Just request to look at the subtrees, leaving val_only and lhs
+ untouched. This might actually be for !val_only + lhs, in which
+ case we don't want to force a replacement by a temporary. */
+ *walk_subtrees = 1;
+ break;
+
case OMP_PARALLEL:
save_suppress = info->suppress_expansion;
if (convert_nonlocal_omp_clauses (&OMP_PARALLEL_CLAUSES (t), wi))
@@ -1313,6 +1320,13 @@ convert_local_reference (tree *tp, int *walk_subtrees, void *data)
wi->val_only = save_val_only;
break;
+ case VIEW_CONVERT_EXPR:
+ /* Just request to look at the subtrees, leaving val_only and lhs
+ untouched. This might actually be for !val_only + lhs, in which
+ case we don't want to force a replacement by a temporary. */
+ *walk_subtrees = 1;
+ break;
+
case OMP_PARALLEL:
save_suppress = info->suppress_expansion;
if (convert_local_omp_clauses (&OMP_PARALLEL_CLAUSES (t), wi))