summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-03 16:43:42 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-03-03 16:43:42 +0000
commit072866b64ffbe16bc34d0294c4b8bc9b4ec37ac3 (patch)
treee0ac34092b00fab8436a07f2c7efb7e65119157c /gcc/gimplify.c
parentb430e8d98964bc1866199ac6eb5faecdbd963be1 (diff)
downloadgcc-072866b64ffbe16bc34d0294c4b8bc9b4ec37ac3.tar.gz
PR fortran/39354
* gimplify.c (goa_stabilize_expr): Handle tcc_comparison, TRUTH_ANDIF_EXPR and TRUTH_ORIF_EXPR. * gfortran.dg/gomp/pr39354.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144575 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index ae12424589b..02d4923aa1e 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -6047,12 +6047,27 @@ goa_stabilize_expr (tree *expr_p, gimple_seq *pre_p, tree lhs_addr,
switch (TREE_CODE_CLASS (TREE_CODE (expr)))
{
case tcc_binary:
+ case tcc_comparison:
saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 1), pre_p, lhs_addr,
lhs_var);
case tcc_unary:
saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 0), pre_p, lhs_addr,
lhs_var);
break;
+ case tcc_expression:
+ switch (TREE_CODE (expr))
+ {
+ case TRUTH_ANDIF_EXPR:
+ case TRUTH_ORIF_EXPR:
+ saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 1), pre_p,
+ lhs_addr, lhs_var);
+ saw_lhs |= goa_stabilize_expr (&TREE_OPERAND (expr, 0), pre_p,
+ lhs_addr, lhs_var);
+ break;
+ default:
+ break;
+ }
+ break;
default:
break;
}