This is the mail archive of the
mailing list for the GCC project.
Re: ICE for fortran reasoned by wrong sizetype size for x86_64 mingw32 target
- From: Paolo Bonzini <paolo dot bonzini at lu dot unisi dot ch>
- To: Kai Tietz <Kai dot Tietz at onevision dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 24 Jul 2007 09:07:36 +0200
- Subject: Re: ICE for fortran reasoned by wrong sizetype size for x86_64 mingw32 target
- References: <OF0288A3E1.5314921E-ONC1257322.00229958-C1257322.0025A8D3@onevision.de>
- Reply-to: bonzini at gnu dot org
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.