re PR fortran/71764 (ICE in gfc_trans_structure_assign)
2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/71764 * trans-expr.c (gfc_trans_structure_assign): Remove assert. * gfortran.dg/pr71764.f90: New test. From-SVN: r238156
This commit is contained in:
parent
cb0044dd6b
commit
70cdd4ae94
@ -1,3 +1,8 @@
|
||||
2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/71764
|
||||
* trans-expr.c (gfc_trans_structure_assign): Remove assert.
|
||||
|
||||
2016-07-07 Martin Liska <mliska@suse.cz>
|
||||
|
||||
* lang.opt (Wundefined-do-loop): New option.
|
||||
|
@ -7358,7 +7358,6 @@ gfc_trans_structure_assign (tree dest, gfc_expr * expr, bool init)
|
||||
{
|
||||
gfc_se se, lse;
|
||||
|
||||
gcc_assert (cm->backend_decl == NULL);
|
||||
gfc_init_se (&se, NULL);
|
||||
gfc_init_se (&lse, NULL);
|
||||
gfc_conv_expr (&se, gfc_constructor_first (expr->value.constructor)->expr);
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-07-07 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/71764
|
||||
* gfortran.dg/pr71764.f90: New test.
|
||||
|
||||
2016-07-07 Jakub Jelinek <jakub@redhat.com>
|
||||
Kai Tietz <ktietz70@googlemail.com>
|
||||
|
||||
|
34
gcc/testsuite/gfortran.dg/pr71764.f90
Normal file
34
gcc/testsuite/gfortran.dg/pr71764.f90
Normal file
@ -0,0 +1,34 @@
|
||||
! { dg-do run }
|
||||
! PR71764
|
||||
program p
|
||||
use iso_c_binding, only: c_ptr, c_null_ptr, c_ptr, c_associated, c_loc
|
||||
logical, target :: rls
|
||||
real, target :: t = 3.14
|
||||
type(c_ptr) :: nullptr,c
|
||||
real, pointer :: k
|
||||
nullptr = c_null_ptr
|
||||
c = nullptr
|
||||
rls = c_associated(c)
|
||||
if (rls) call abort
|
||||
if (c_associated(c)) call abort
|
||||
c = c_loc(rls)
|
||||
if (.not. c_associated(c)) call abort
|
||||
c = nullptr
|
||||
if (c_associated(c)) call abort
|
||||
c = c_loc(t)
|
||||
k => t
|
||||
call association_test(k, c)
|
||||
contains
|
||||
subroutine association_test(a,b)
|
||||
use iso_c_binding, only: c_associated, c_loc, c_ptr
|
||||
implicit none
|
||||
real, pointer :: a
|
||||
type(c_ptr) :: b
|
||||
if(c_associated(b, c_loc(a))) then
|
||||
return
|
||||
else
|
||||
call abort
|
||||
end if
|
||||
end subroutine association_test
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user