Commit bd0b34a8 by Richard Henderson Committed by Richard Henderson

utils.c (gnat_type_for_mode): Return NULL for COMPLEX modes...

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

From-SVN: r94946
parent c202a7f9
2005-02-12 Richard Henderson <rth@redhat.com>
* utils.c (gnat_type_for_mode): Return NULL for COMPLEX modes;
validate SCALAR_INT_MODE_P before calling gnat_type_for_size.
2005-02-10 Andreas Jaeger <aj@suse.de> 2005-02-10 Andreas Jaeger <aj@suse.de>
* init.c (__gnat_initialize): Mark parameter as unused. * init.c (__gnat_initialize): Mark parameter as unused.
......
...@@ -1828,10 +1828,14 @@ gnat_type_for_mode (enum machine_mode mode, int unsignedp) ...@@ -1828,10 +1828,14 @@ gnat_type_for_mode (enum machine_mode mode, int unsignedp)
return NULL_TREE; return NULL_TREE;
else if (mode == VOIDmode) else if (mode == VOIDmode)
return void_type_node; 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); 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); return gnat_type_for_size (GET_MODE_BITSIZE (mode), unsignedp);
else
gcc_unreachable ();
} }
/* Return the unsigned version of a TYPE_NODE, a scalar type. */ /* Return the unsigned version of a TYPE_NODE, a scalar type. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment