aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-array.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/trans-array.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/trans-array.c')
-rw-r--r--gcc/fortran/trans-array.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index c350c3b..3e684ee 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -1022,8 +1022,8 @@ gfc_trans_create_temp_array (stmtblock_t * pre, stmtblock_t * post, gfc_ss * ss,
dynamic type. Generate an eltype and then the class expression. */
if (eltype == NULL_TREE && initial)
{
- if (POINTER_TYPE_P (TREE_TYPE (initial)))
- class_expr = build_fold_indirect_ref_loc (input_location, initial);
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (initial)));
+ class_expr = build_fold_indirect_ref_loc (input_location, initial);
eltype = TREE_TYPE (class_expr);
eltype = gfc_get_element_type (eltype);
/* Obtain the structure (class) expression. */