summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
87080ba)
PR fortran/29410
* trans-intrinsic.c (gfc_conv_intrinsic_array_transfer):
Change over to create VIEW_CONVERT_EXPR instead of using an
ADDR_EXPR, a cast and then an indirect reference
2006-10-30 Andrew Pinski <pinskia@gmail.com>
PR Fortran/29410
* gfortran.fortran-torture/execute/transfer1.f90: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118186
138bc75d-0d04-0410-961f-
82ee72b054a4
+2006-10-30 Andrew Pinski <pinskia@gmail.com>
+
+ PR fortran/29410
+ * trans-intrinsic.c (gfc_conv_intrinsic_array_transfer):
+ Change over to create VIEW_CONVERT_EXPR instead of using an
+ ADDR_EXPR, a cast and then an indirect reference
+
2006-10-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a
2006-10-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
* trans-intrinsic.c (gfc_conv_intrinsic_loc): Make LOC return a
/* Scalar transfer statement.
/* Scalar transfer statement.
- TRANSFER (source, mold) = *(typeof<mold> *)&source. */
+ TRANSFER (source, mold) = VIEW_CONVERT_EXPR<typeof<mold> >source. */
static void
gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr)
static void
gfc_conv_intrinsic_transfer (gfc_se * se, gfc_expr * expr)
arg = arg->next;
type = gfc_typenode_for_spec (&expr->ts);
arg = arg->next;
type = gfc_typenode_for_spec (&expr->ts);
- ptr = convert (build_pointer_type (type), ptr);
if (expr->ts.type == BT_CHARACTER)
{
if (expr->ts.type == BT_CHARACTER)
{
+ ptr = convert (build_pointer_type (type), ptr);
gfc_init_se (&argse, NULL);
gfc_conv_expr (&argse, arg->expr);
gfc_add_block_to_block (&se->pre, &argse.pre);
gfc_init_se (&argse, NULL);
gfc_conv_expr (&argse, arg->expr);
gfc_add_block_to_block (&se->pre, &argse.pre);
- se->expr = build_fold_indirect_ref (ptr);
+ tree tmp = build_fold_indirect_ref (ptr);
+ se->expr = fold_build1 (VIEW_CONVERT_EXPR, type, tmp);
+2006-10-30 Andrew Pinski <pinskia@gmail.com>
+
+ PR Fortran/29410
+ * gfortran.fortran-torture/execute/transfer1.f90: New test.
+
2006-10-30 Joseph Myers <joseph@codesourcery.com>
* lib/target-supports.exp (check_function_available): Declare
2006-10-30 Joseph Myers <joseph@codesourcery.com>
* lib/target-supports.exp (check_function_available): Declare
--- /dev/null
+program chop
+ integer ix, iy
+ real x, y
+ x = 1.
+ y = x
+ ix = transfer(x,ix)
+ iy = transfer(y,iy)
+ print '(2z20.8)', ix, iy
+ if (ix /= iy) call abort
+end program chop