diff mbox

[fortran] Adjust fn spec for transfer_array

Message ID 1287246331.4082.7.camel@linux-fd1f.site
State New
Headers show

Commit Message

Thomas Koenig Oct. 16, 2010, 4:25 p.m. UTC
Hello world,

the attached one-letter patch fixes the fn spec for transfer_array,
because its array descriptor argument contains a pointer that can
(and will) be followed.  I am not aware of any test case that this
fixes, but it is a latent bug which may be exposed by some test case, or
maybe be more aggressive optimization later.

2010-10-16  Thomas Koenig  <tkoenig@gcc.gnu.org>

Regression-tested.  OK for trunk?

	Thomas

	* trans-io.c (gfc_build_io_library_fndecls):
	Array descriptor arguments to transfer_array can be
	dereferenced recursively.

Comments

Jerry DeLisle Oct. 16, 2010, 4:39 p.m. UTC | #1
On 10/16/2010 09:25 AM, Thomas Koenig wrote:
> Hello world,
>
> the attached one-letter patch fixes the fn spec for transfer_array,
> because its array descriptor argument contains a pointer that can
> (and will) be followed.  I am not aware of any test case that this
> fixes, but it is a latent bug which may be exposed by some test case, or
> maybe be more aggressive optimization later.
>
> 2010-10-16  Thomas Koenig<tkoenig@gcc.gnu.org>
>
> Regression-tested.  OK for trunk?
>
OK,

Thanks,

Jerry
Thomas Koenig Oct. 16, 2010, 6:48 p.m. UTC | #2
Hello Jerry,

> On 10/16/2010 09:25 AM, Thomas Koenig wrote:
> > Hello world,
> >
> > the attached one-letter patch fixes the fn spec for transfer_array,
> > because its array descriptor argument contains a pointer that can
> > (and will) be followed.  I am not aware of any test case that this
> > fixes, but it is a latent bug which may be exposed by some test case, or
> > maybe be more aggressive optimization later.
> >
> > 2010-10-16  Thomas Koenig<tkoenig@gcc.gnu.org>
> >
> > Regression-tested.  OK for trunk?
> >
> OK,
> 

Committed as rev. 165561.

Thanks for the review!

	Thomas
diff mbox

Patch

Index: trans-io.c
===================================================================
--- trans-io.c	(Revision 165559)
+++ trans-io.c	(Arbeitskopie)
@@ -366,7 +366,7 @@  gfc_build_io_library_fndecls (void)
 	void_type_node, 3, dt_parm_type, pvoid_type_node, gfc_int4_type_node);
 
   iocall[IOCALL_X_ARRAY] = gfc_build_library_function_decl_with_spec (
-	get_identifier (PREFIX("transfer_array")), ".wW",
+	get_identifier (PREFIX("transfer_array")), ".ww",
 	void_type_node, 4, dt_parm_type, pvoid_type_node,
 	integer_type_node, gfc_charlen_type_node);