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: Ada is still broken on AMD64 and IA64


Andreas Schwab <schwab@suse.de> writes:

>> ../rts/libgnat.a(s-stratt.o)(.text+0x832): In function `system.stream_attributes.i_llf':
>> /tmp/cvs/gcc-20031117/Build/gcc/ada/rts/s-stratt.adb:276: undefined reference to `__trunctfxf2'
>> ../rts/libgnat.a(s-stratt.o)(.text+0x1732): In function `system.stream_attributes.w_llf':
>> /tmp/cvs/gcc-20031117/Build/gcc/ada/rts/s-stratt.adb:555: undefined reference to `__extendxftf2'
>> collect2: ld returned 1 exit status
>
> Here is a patch:
>
> 2003-11-17  Andreas Schwab  <schwab@suse.de>
>
> 	* decl.c (gnat_to_gnu_entity) [case E_Floating_Point_Subtype]: Use
> 	the first fitting mode of same-sized modes.  Initialize precision
> 	of type from precision of mode, not bit size.

With this patch and a private patch by Honza (Honza, please submit
it), I can bootstrap ada again on AMD64.  Without the patch, I get the
same error as on ia64,

Andreas

> Index: gcc/ada/decl.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/ada/decl.c,v
> retrieving revision 1.21
> diff -u -p -a -u -p -a -r1.21 gcc/ada/decl.c
> --- gcc/ada/decl.c	4 Nov 2003 12:51:45 -0000	1.21
> +++ gcc/ada/decl.c	17 Nov 2003 22:44:25 -0000
> @@ -1368,14 +1368,15 @@ gnat_to_gnu_entity (Entity_Id gnat_entit
>  			      gnu_expr, definition);
>  
>  	for (mode = GET_CLASS_NARROWEST_MODE (MODE_FLOAT);
> -	     (GET_MODE_WIDER_MODE (mode) != VOIDmode
> +	     (GET_MODE_BITSIZE (mode) < esize
> +	      && GET_MODE_WIDER_MODE (mode) != VOIDmode
>  	      && GET_MODE_BITSIZE (GET_MODE_WIDER_MODE (mode)) <= esize);
>  	     mode = GET_MODE_WIDER_MODE (mode))
>  	  ;
>  
>  	gnu_type = make_node (REAL_TYPE);
>  	TREE_TYPE (gnu_type) = get_unpadded_type (Etype (gnat_entity));
> -	TYPE_PRECISION (gnu_type) = GET_MODE_BITSIZE (mode);
> +	TYPE_PRECISION (gnu_type) = GET_MODE_PRECISION (mode);
>  
>  	TYPE_MIN_VALUE (gnu_type)
>  	  = convert (TREE_TYPE (gnu_type),
>
> Andreas.

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


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