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: ICE for fortran reasoned by wrong sizetype size for x86_64 mingw32 target



You should not introduce dependence on the target defines in the front-ends. I suggest that you try instead

set_sizetype (gfc_type_for_mode (Pmode, 1));

This would not work, because the type fields used by gfc_type_for_mode are not initialized at this point. They are initialized by gfc_init_types () 6 lines down. I would suggest to do this by using the TREE_MODE of both types to make the correct choice.

While undoubtedly better, this may still be unsatisfactory because some ports may use 16-bit pointers too (I'm not sure if the Fortran run-time library runs there).


The Fortran maintainers could accept this patch and I've no intention to object, but you may also try moving gfc_init_types up, or set_sizetype down, so that you can use gfc_type_for_mode.

Paolo


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