+2019-05-05 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/90344
+ * frontend-passes.c (create_var): Bring into sync with gcc 8.
+
2019-04-14 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87352
if (e->expr_type == EXPR_CONSTANT || is_fe_temp (e))
return gfc_copy_expr (e);
+ /* Creation of an array of unknown size requires realloc on assignment.
+ If that is not possible, just return NULL. */
+ if (flag_realloc_lhs == 0 && e->rank > 0 && e->shape == NULL)
+ return NULL;
+
ns = insert_block ();
if (vname)
}
deferred = 0;
- if (e->ts.type == BT_CHARACTER && e->rank == 0)
+ if (e->ts.type == BT_CHARACTER)
{
gfc_expr *length;
else
{
symbol->attr.allocatable = 1;
+ symbol->ts.u.cl->length = NULL;
+ symbol->ts.deferred = 1;
deferred = 1;
}
}
result = gfc_get_expr ();
result->expr_type = EXPR_VARIABLE;
- result->ts = e->ts;
+ result->ts = symbol->ts;
result->ts.deferred = deferred;
result->rank = e->rank;
result->shape = gfc_copy_shape (e->shape, e->rank);
+2019-05-05 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/90344
+ * gfortran.dg/pr90344.f90: New test
+
2019-04-30 Srinath Parvathaneni <srinath.parvathaneni@arm.com>
PR target/90075
--- /dev/null
+! { dg-do compile }
+! { dg-additional-options "-ffrontend-optimize" }
+! PR 90344 - this used to ICE.
+! Test case by Urban Jost.
+module M_xterm
+contains
+ elemental function func1(ch) result(res)
+ character,intent(in) :: ch
+ logical :: res
+ res=.true.
+ end function func1
+ elemental function func2(ch) result(res)
+ character,intent(in) :: ch
+ logical :: res
+ res=.false.
+ end function func2
+ pure function s2a(string) RESULT (array)
+ character(len=*),intent(in) :: string
+ character(len=1) :: array(len(string))
+ forall(i=1:len(string)) array(i) = string(i:i)
+ end function s2a
+ subroutine sub1()
+ write(*,*)all(func1(s2a('ABCDEFG')).or.func2(s2a('ABCDEFG')))
+ end subroutine sub1
+end module M_xterm