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]

[Patch, Fortran] PR 45507: [4.6 Regression] Bogus Error: Can't convert TYPE(c_ptr) to INTEGER(4)


Hi all,

here is the fix for a regression which was introduced by my recent
patch for ALLOCATE with MOLD (r163744). The problem was caused by the
fact that I moved the code which generated the default initializers
from 'resolve_allocate_expr' to 'gfc_trans_allocate'. To fix it, I'm
moving the code back and put the generated initializer into
code->expr3 (which is otherwise used for SOURCE or MOLD), so that it
is available in 'gfc_trans_allocate'.

The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus


2010-09-03  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45507
	* resolve.c (resolve_allocate_expr): Generate default initializers
	already at this point, resolve them and put them into expr3, ...
	* trans-stmt.c (gfc_trans_allocate): ... instead of waiting until
	translation stage.


2010-09-03  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/45507
	* gfortran.dg/allocate_alloc_opt_12.f90: New.

Attachment: pr45507.diff
Description: Binary data

Attachment: allocate_alloc_opt_12.f90
Description: Binary data


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