This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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] PR88929 - ICE on building MPICH 3.2 with GCC 9 with ISO_Fortran_binding


On Wed, Jan 23, 2019 at 07:43:48PM +0000, Paul Richard Thomas wrote:
> 
> Bootstrapped and regtested on FC28/x86_64 - OK for trunk?
> 

Yes with minor fixes.


> Index: gcc/fortran/trans-array.c
> ===================================================================
> *** gcc/fortran/trans-array.c	(revision 268193)
> --- gcc/fortran/trans-array.c	(working copy)
> *************** gfc_conv_descriptor_rank (tree desc)
> *** 293,298 ****
> --- 293,314 ----
>   

Can you put a brief comment here that describes what the
function is doing?

>   tree
> + gfc_conv_descriptor_elem_len (tree desc)
> + {
> +   tree tmp;
> +   tree dtype;
> + 
> +   dtype = gfc_conv_descriptor_dtype (desc);
> +   tmp = gfc_advance_chain (TYPE_FIELDS (TREE_TYPE (dtype)),
> + 			   GFC_DTYPE_ELEM_LEN);
> +   gcc_assert (tmp!= NULL_TREE

space after tmp

> *************** gfc_conv_gfc_desc_to_cfi_desc (gfc_se *p
> *** 4950,4958 ****
>         /* All the temporary descriptors are marked as DECL_ARTIFICIAL. If
>   	 the expression type is different from the descriptor type, then
>   	 the offset must be found (eg. to a component ref or substring)
> ! 	 and the dtype updated.  */
> !       type = gfc_typenode_for_spec (&e->ts);
> !       if (DECL_ARTIFICIAL (parmse->expr)
>   	  && type != gfc_get_element_type (TREE_TYPE (parmse->expr)))
>   	{
>   	  /* Obtain the offset to the data.  */
> --- 4952,4965 ----
>         /* All the temporary descriptors are marked as DECL_ARTIFICIAL. If
>   	 the expression type is different from the descriptor type, then
>   	 the offset must be found (eg. to a component ref or substring)
> ! 	 and the dtype updated.  Assumed type entities are only allowed
> ! 	 to be dummies in fortran. They therefore lack the  decl specific
> ! 	 appendiges and so must be treated differently from other fortran
> ! 	 entities passed to CFI descriptors in the interface decl.  */

fortran is normally spelled as Fortran.
Extra space in "lack the  decl"

> + 
> +       /* Intent in requires a temporary for the data. Assumed types do not
> + 	 work with the standard temporary generation schemes. */

I would prefer INTENT(IN) here.  Your call.

> +       if (e->expr_type == EXPR_VARIABLE && fsym->attr.intent == INTENT_IN)
> + 	{

-- 
Steve


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