mirror of git://gcc.gnu.org/git/gcc.git
re PR fortran/71862 (ICE in gfc_add_component_ref, at fortran/class.c:241)
2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/71862 * class.c: Remove assert. Iterate over component only if non-null. 2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/71862 * gfortran.dg/pr71862.f90: New test. From-SVN: r238774
This commit is contained in:
parent
0d48446ff3
commit
9cd74e8fa8
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/71862
|
||||||
|
* class.c: Remove assert. Iterate over component only if non-null.
|
||||||
|
|
||||||
2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
|
2016-07-22 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/71935
|
PR fortran/71935
|
||||||
|
|
|
||||||
|
|
@ -238,12 +238,14 @@ gfc_add_component_ref (gfc_expr *e, const char *name)
|
||||||
/* Avoid losing memory. */
|
/* Avoid losing memory. */
|
||||||
gfc_free_ref_list (*tail);
|
gfc_free_ref_list (*tail);
|
||||||
c = gfc_find_component (derived, name, true, true, tail);
|
c = gfc_find_component (derived, name, true, true, tail);
|
||||||
gcc_assert (c);
|
|
||||||
for (ref = *tail; ref->next; ref = ref->next)
|
if (c) {
|
||||||
;
|
for (ref = *tail; ref->next; ref = ref->next)
|
||||||
ref->next = next;
|
;
|
||||||
if (!next)
|
ref->next = next;
|
||||||
e->ts = c->ts;
|
if (!next)
|
||||||
|
e->ts = c->ts;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2016-07-26 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/71862
|
||||||
|
* gfortran.dg/pr71862.f90: New test.
|
||||||
|
|
||||||
2016-07-26 Martin Sebor <msebor@redhat.com>
|
2016-07-26 Martin Sebor <msebor@redhat.com>
|
||||||
|
|
||||||
* gcc.dg/atomic/pr71675.c: Replace the unsupported c11 target
|
* gcc.dg/atomic/pr71675.c: Replace the unsupported c11 target
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,16 @@
|
||||||
|
! { dg-do compile }
|
||||||
|
program p
|
||||||
|
type t
|
||||||
|
integer :: n = 0
|
||||||
|
integer, pointer :: q => null()
|
||||||
|
end type
|
||||||
|
type(t) :: x
|
||||||
|
print *, associated(x%q)
|
||||||
|
x = f()
|
||||||
|
print *, associated(x%q)
|
||||||
|
contains
|
||||||
|
function f() result (z) ! { dg-error "must be dummy, allocatable or pointer" }
|
||||||
|
class(t) :: z
|
||||||
|
print *, associated(z%q)
|
||||||
|
end
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue