This is the mail archive of the gcc-bugs@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]

[Bug fortran/40598] Some missed optimizations in array assignment



------- Comment #8 from pault at gcc dot gnu dot org  2009-07-01 10:51 -------
Richard,

> to set the upper bound correctly you have to build a new array type instead
> of re-using TREE_TYPE (dest).  The types TYPE_DOMAIN will specify the size
> of the slice.  Thus,
> 
>   slice_type = build_array_type (TREE_TYPE (TREE_TYPE (dest)),
>                                  build_index_type (build_int_cst
> (gfc_array_index_type, slice-size - 1)));

Brilliant! Thanks

Paul


-- 

pault at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40598


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