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] Fix aliasing problem with fortran


On Monday 16 May 2005 21:32, Zdenek Dvorak wrote:
> 	* trans-types.c (gfc_array_range_type): New variable.
> 	(gfc_init_types): Initialize gfc_array_range_type.
> 	(gfc_get_array_type_bounds): Use gfc_array_range_type.

This is OK, provided that ....

> *************** gfc_init_types (void)
> *** 528,533 ****
> --- 529,538 ----
>     pchar_type_node = build_pointer_type (gfc_character1_type_node);
>
>     gfc_array_index_type = gfc_get_int_type (gfc_index_integer_kind);
> +   gfc_array_range_type
> + 	  = build_range_type (gfc_array_index_type,
> + 			      build_int_cst (gfc_array_index_type, 0),
> + 			      NULL_TREE);


You explain here why gfc_index_zero_node can't be used (i.e. a one-liner
explaining that gfc_init_types is called before gfc_init_constants), just
to avoid future confusion about it.

Thanks for the patch.  I don't understand how you catch these things,
just amazing :-)

Gr.
Steven


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