This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed] Fix PR fortran/24936


The problem here is that when Steven B. fixed gfc_trans_pointer_assign for the
type mismatch, he had missed the same problem in gfc_trans_pointer_assign_need_temp.


This patch which I am committing as obvious copies over the fold_convert
which Steven B. committed for gfc_trans_pointer_assign in:
2004-06-29  Steven Bosscher  <stevenb@suse.de>

Make sure types in assignments are compatible. Mostly mechanical.
* trans-const.h (gfc_index_one_node): New define.
...


to gfc_trans_pointer_assign_need_temp and this fixes the bug though there is still
a missing optimization as we really don't need a temporary here but that is a
different bug.


Committed to both the mainline and the 4.1 branch.

Thanks,
Andrew Pinski

ChangeLog:
	* trans-stmt.c (gfc_trans_pointer_assign_need_temp): Use fold_convert
	to avoid type mismatch.

* gfortran.dg/forall_3.f90: New test.


Attachment: fixforall.diff.txt
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]