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


Hi Paul,

Paolo Bonzini wrote on 24.07.2007 09:07:36:
> >> 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).
Hmm, I am uncertain to move the gfc_type_for_mode for getting the proper 
sizetype, because AFAICS it would return the nearest type, which means it 
returns an 'unsigned int' for 32-bit instead of the 'unsigned long' type 
node. Therefore I think my updated patch makes thinks more correct.
Do you know, if 16-bit targets are currently supported by gfortan ?

> 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.
Maybe you are the right person to comment on this ?

Cheers,
 i.A. Kai Tietz

|  (\_/)  This is Bunny. Copy and paste Bunny
| (='.'=) into your signature to help him gain
| (")_(") world domination.

------------------------------------------------------------------------------------------
  OneVision Software Entwicklungs GmbH & Co. KG
  Dr.-Leo-Ritter-StraÃe 9 - 93049 Regensburg
  Tel: +49.(0)941.78004.0 - Fax: +49.(0)941.78004.489 - www.OneVision.com
  Commerzbank Regensburg - BLZ 750 400 62 - Konto 6011050
  Handelsregister: HRA 6744, Amtsgericht Regensburg
  KomplementÃrin: OneVision Software Entwicklungs Verwaltungs GmbH
  Dr.-Leo-Ritter-StraÃe 9 â 93049 Regensburg
  Handelsregister: HRB 8932, Amtsgericht Regensburg - GeschÃftsfÃhrer: 
Ulrike DÃhler, Manuela Kluger


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