aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/expr.c
diff options
context:
space:
mode:
authorTobias Schlüter <tobi@gcc.gnu.org>2007-04-12 18:53:26 +0200
committerTobias Schlüter <tobi@gcc.gnu.org>2007-04-12 18:53:26 +0200
commit2f11881446ab72f0e85eedb8391ae47cd89d3244 (patch)
tree1be65cae232e27fb532bca1c95d395b50376e17f /gcc/fortran/expr.c
parent2d3649b23f90ddd51b968a00c8e8ab6ccf5bd93c (diff)
downloadgcc-2f11881446ab72f0e85eedb8391ae47cd89d3244.zip
gcc-2f11881446ab72f0e85eedb8391ae47cd89d3244.tar.gz
gcc-2f11881446ab72f0e85eedb8391ae47cd89d3244.tar.bz2
arith.c (gfc_arith_uplus): Rename to ...
* arith.c (gfc_arith_uplus): Rename to ... (gfc_arith_identity): ... this. (gfc_parentheses): New function. (gfc_uplus): Adapt to renamed function. * arith.h (gfc_parentheses): Add prototype. * expr.c (gfc_copy_expr): Deal with INTRINSIC_PARENTHESES. (simplifiy_intrinsic_op): Treat INTRINSIC_UPLUS separately from INTRINSIC_PARENTHESES. From-SVN: r123750
Diffstat (limited to 'gcc/fortran/expr.c')
-rw-r--r--gcc/fortran/expr.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c
index d3f57172..f2064fb 100644
--- a/gcc/fortran/expr.c
+++ b/gcc/fortran/expr.c
@@ -465,6 +465,7 @@ gfc_copy_expr (gfc_expr *p)
switch (q->value.op.operator)
{
case INTRINSIC_NOT:
+ case INTRINSIC_PARENTHESES:
case INTRINSIC_UPLUS:
case INTRINSIC_UMINUS:
q->value.op.op1 = gfc_copy_expr (p->value.op.op1);
@@ -771,8 +772,11 @@ simplify_intrinsic_op (gfc_expr *p, int type)
switch (p->value.op.operator)
{
- case INTRINSIC_UPLUS:
case INTRINSIC_PARENTHESES:
+ result = gfc_parentheses (op1);
+ break;
+
+ case INTRINSIC_UPLUS:
result = gfc_uplus (op1);
break;