[patch] Fix aliasing problem with fortran
Steven Bosscher
stevenb@suse.de
Mon May 16 23:01:00 GMT 2005
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
More information about the Fortran
mailing list