aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/simplify.c
diff options
context:
space:
mode:
authorTobias Burnus <burnus@net-b.de>2012-09-23 08:48:48 +0200
committerTobias Burnus <burnus@gcc.gnu.org>2012-09-23 08:48:48 +0200
commit99c25a87c6bd63d6b03e3792630ae61c166dcac9 (patch)
tree6fb6edff03b3f9b88751aee4639a84d409c9b04f /gcc/fortran/simplify.c
parent8856695d70f0c622d7154e95b52cd758f77c7e2c (diff)
downloadgcc-99c25a87c6bd63d6b03e3792630ae61c166dcac9.zip
gcc-99c25a87c6bd63d6b03e3792630ae61c166dcac9.tar.gz
gcc-99c25a87c6bd63d6b03e3792630ae61c166dcac9.tar.bz2
re PR fortran/54599 (Issues found in gfortran by the Coverity Scan)
2012-09-23 Tobias Burnus <burnus@net-b.de> * parse.c (parse_derived): Don't set attr.alloc_comp for pointer components with allocatable subcomps. PR fortran/54599 * resolve.c (resolve_fl_namelist): Remove superfluous NULL check. * simplify.c (simplify_min_max): Remove unreachable code. * trans-array.c (gfc_trans_create_temp_array): Change a condition into an assert. PR fortran/54618 * trans-expr.c (gfc_trans_class_init_assign): Guard re-setting of the _data by gfc_conv_expr_present. (gfc_conv_procedure_call): Fix INTENT(OUT) handling for allocatable BT_CLASS. 2012-09-23 Tobias Burnus <burnus@net-b.de> PR fortran/54618 * gfortran.dg/class_array_14.f90: New. From-SVN: r191649
Diffstat (limited to 'gcc/fortran/simplify.c')
-rw-r--r--gcc/fortran/simplify.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/fortran/simplify.c b/gcc/fortran/simplify.c
index 1c9dff2..2f96e90 100644
--- a/gcc/fortran/simplify.c
+++ b/gcc/fortran/simplify.c
@@ -4106,10 +4106,7 @@ simplify_min_max (gfc_expr *expr, int sign)
min_max_choose (arg->expr, extremum->expr, sign);
/* Delete the extra constant argument. */
- if (last == NULL)
- expr->value.function.actual = arg->next;
- else
- last->next = arg->next;
+ last->next = arg->next;
arg->next = NULL;
gfc_free_actual_arglist (arg);