re PR fortran/63152 (needless initialization of local pointer arrays.)
2014-09-19 Joost VandeVondele <vondele@gcc.gnu.org> PR fortran/63152 * trans-array.c (gfc_trans_deferred_array): Only nullify allocatables. 2014-09-19 Joost VandeVondele <vondele@gcc.gnu.org> PR fortran/63152 * gfortran.dg/auto_char_dummy_array_1.f90: Fix undefined behavior. * gfortran.dg/pr63152.f90: New test. From-SVN: r215387
This commit is contained in:
parent
c9aa0007f8
commit
727dc1217d
@ -1,3 +1,8 @@
|
||||
2014-09-19 Joost VandeVondele <vondele@gcc.gnu.org>
|
||||
|
||||
PR fortran/63152
|
||||
* trans-array.c (gfc_trans_deferred_array): Only nullify allocatables.
|
||||
|
||||
2014-09-15 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* Make-lang.in (check_gfortran_parallelize): Change to just an upper
|
||||
|
@ -8647,8 +8647,8 @@ gfc_trans_deferred_array (gfc_symbol * sym, gfc_wrapped_block * block)
|
||||
type = TREE_TYPE (descriptor);
|
||||
}
|
||||
|
||||
/* NULLIFY the data pointer. */
|
||||
if (GFC_DESCRIPTOR_TYPE_P (type) && !sym->attr.save)
|
||||
/* NULLIFY the data pointer, for non-saved allocatables. */
|
||||
if (GFC_DESCRIPTOR_TYPE_P (type) && !sym->attr.save && sym->attr.allocatable)
|
||||
gfc_conv_descriptor_data_set (&init, descriptor, null_pointer_node);
|
||||
|
||||
gfc_restore_backend_locus (&loc);
|
||||
|
@ -1,3 +1,9 @@
|
||||
2014-09-19 Joost VandeVondele <vondele@gcc.gnu.org>
|
||||
|
||||
PR fortran/63152
|
||||
* gfortran.dg/auto_char_dummy_array_1.f90: Fix undefined behavior.
|
||||
* gfortran.dg/pr63152.f90: New test.
|
||||
|
||||
2014-09-19 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
PR c++/58328
|
||||
|
@ -11,6 +11,8 @@ end module global
|
||||
program oh_no_not_pr15908_again
|
||||
character(12), dimension(:), pointer :: ptr
|
||||
|
||||
nullify(ptr)
|
||||
|
||||
call a (ptr, 12)
|
||||
if (.not.associated (ptr) ) call abort ()
|
||||
if (any (ptr.ne."abc")) call abort ()
|
||||
|
Loading…
Reference in New Issue
Block a user