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: c99 complex multiplication and division


On Sat, Feb 12, 2005 at 12:29:22PM +0100, Laurent GUERBY wrote:
> This breaks Ada bootstrap on all platforms
> (may be a latent front-end bug).

Fixed.


r~


        * utils.c (gnat_type_for_mode): Return NULL for COMPLEX modes;
        validate SCALAR_INT_MODE_P before calling gnat_type_for_size.

Index: utils.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ada/utils.c,v
retrieving revision 1.90
diff -u -p -r1.90 utils.c
--- utils.c	10 Feb 2005 13:53:21 -0000	1.90
+++ utils.c	12 Feb 2005 20:01:28 -0000
@@ -1828,10 +1828,14 @@ gnat_type_for_mode (enum machine_mode mo
     return NULL_TREE;
   else if (mode == VOIDmode)
     return void_type_node;
-  else if (GET_MODE_CLASS (mode) == MODE_FLOAT)
+  else if (COMPLEX_MODE_P (mode))
+    return NULL_TREE;
+  else if (SCALAR_FLOAT_MODE_P (mode))
     return float_type_for_precision (GET_MODE_PRECISION (mode), mode);
-  else
+  else if (SCALAR_INT_MODE_P (mode))
     return gnat_type_for_size (GET_MODE_BITSIZE (mode), unsignedp);
+  else
+    gcc_unreachable ();
 }
 
 /* Return the unsigned version of a TYPE_NODE, a scalar type.  */


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