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]

Re: [Patch, fortran] PR42309 - Problem with a pointer array passed to a subroutine


On 02/03/2010 06:51 AM, Paul Richard Thomas wrote:
> This is another one of our serious bugs and yet another that can only
> be properly fixed by array descriptor reform.

I have to admit that - while I do not like reformitis - I am longing for
that reform. I think those issues count for about 40% of the serious
bugs. (Issues of multiple DECL/-fwhole-file is a close second.)

> A dummy, pointer
> argument is expected to have unity lbounds, with an appropriate
> offset, and this patch makes it so.  The fix has the advantage of
> fixing, if not a corner case, certainly something quite unusual;
> therefore, the likelihood of regression is small..... on geological
> timescales.
>
> Bootstrapped and regtested on FC9/x86_64 - OK for trunk and 4.4?
>   

OK and thanks for the patch!

Tobias

PS: There are currently 116 P1-to-P3 regressions; 27 P1, 9 are
unclassified (P3). Many P1 regressions seem to be graphite related and
currently all 4.5-only regressions are P1, though some will be
downgraded. The PRs get slowly fixed, but new ones still tickle in,
though the fix rate seems to be currently slightly higher.

> 2010-02-03  Paul Thomas  <pault@gcc.gnu.org>
>
> 	PR fortran/42309
> 	* trans-expr.c (gfc_conv_subref_array_arg): Add new argument
> 	'formal_ptr'. If this is true, give returned descriptor unity
> 	lbounds, in all dimensions, and the appropriate offset.
> 	(gfc_conv_procedure_call); If formal is a pointer, set the last
> 	argument of gfc_conv_subref_array_arg to true.
> 	* trans.h : Add last argument for gfc_conv_subref_array_arg.
> 	* trans-io.c (set_internal_unit, gfc_trans_transfer): Set the
> 	new arg of gfc_conv_subref_array_arg to false.
> 	* trans-stmt.c (forall_make_variable_temp): The same.
>
> 2010-02-03  Paul Thomas  <pault@gcc.gnu.org>
>
> 	PR fortran/42309
> 	* gfortran.dg/subref_array_pointer_4.f90 : New test.
>   


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