Commit f6a35e89 by Henry Linjamäki Committed by Pekka Jääskeläinen

[BRIGFE] Fix PR 82771.

From-SVN: r254265
parent 12e9c8ce
2017-10-31 Henry Linjamäki <henry.linjamaki@parmance.com>
* brig-lang.c (brig_langhook_type_for_mode): Fix PR 82771.
2017-10-23 Richard Sandiford <richard.sandiford@linaro.org> 2017-10-23 Richard Sandiford <richard.sandiford@linaro.org>
* brig-lang.c (brig_langhook_type_for_mode): Use scalar_int_mode * brig-lang.c (brig_langhook_type_for_mode): Use scalar_int_mode
......
...@@ -280,9 +280,9 @@ brig_langhook_type_for_mode (machine_mode mode, int unsignedp) ...@@ -280,9 +280,9 @@ brig_langhook_type_for_mode (machine_mode mode, int unsignedp)
scalar_int_mode imode; scalar_int_mode imode;
scalar_float_mode fmode; scalar_float_mode fmode;
if (is_int_mode (mode, &imode)) if (is_float_mode (mode, &fmode))
{ {
switch (GET_MODE_BITSIZE (imode)) switch (GET_MODE_BITSIZE (fmode))
{ {
case 32: case 32:
return float_type_node; return float_type_node;
...@@ -291,15 +291,15 @@ brig_langhook_type_for_mode (machine_mode mode, int unsignedp) ...@@ -291,15 +291,15 @@ brig_langhook_type_for_mode (machine_mode mode, int unsignedp)
default: default:
/* We have to check for long double in order to support /* We have to check for long double in order to support
i386 excess precision. */ i386 excess precision. */
if (imode == TYPE_MODE (long_double_type_node)) if (fmode == TYPE_MODE (long_double_type_node))
return long_double_type_node; return long_double_type_node;
gcc_unreachable (); gcc_unreachable ();
return NULL_TREE; return NULL_TREE;
} }
} }
else if (is_float_mode (mode, &fmode)) else if (is_int_mode (mode, &imode))
return brig_langhook_type_for_size (GET_MODE_BITSIZE (fmode), unsignedp); return brig_langhook_type_for_size (GET_MODE_BITSIZE (imode), unsignedp);
else else
{ {
/* E.g., build_common_builtin_nodes () asks for modes/builtins /* E.g., build_common_builtin_nodes () asks for modes/builtins
......
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