aboutsummaryrefslogtreecommitdiff
path: root/gcc/jit/dummy-frontend.c
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2015-07-07 19:22:01 +0000
committerDavid Malcolm <dmalcolm@gcc.gnu.org>2015-07-07 19:22:01 +0000
commitbada4bed71933a5170b41585b6fb52a45eaf5e8a (patch)
tree2097da040daac8508208920be68b0d086cc49b03 /gcc/jit/dummy-frontend.c
parent712cb0bbf3228eb87d18d98c34dc19c9cfb4dd18 (diff)
downloadgcc-bada4bed71933a5170b41585b6fb52a45eaf5e8a.zip
gcc-bada4bed71933a5170b41585b6fb52a45eaf5e8a.tar.gz
gcc-bada4bed71933a5170b41585b6fb52a45eaf5e8a.tar.bz2
PR jit/66779: fix segfault
gcc/jit/ChangeLog: PR jit/66779 * dummy-frontend.c (jit_langhook_type_for_mode): Ensure that we handle modes QI, HI, SI, DI, TI. gcc/testsuite/ChangeLog: PR jit/66779 * jit.dg/all-non-failing-tests.h: Add test-pr66779.c. * jit.dg/test-pr66779.c: New testcase. From-SVN: r225522
Diffstat (limited to 'gcc/jit/dummy-frontend.c')
-rw-r--r--gcc/jit/dummy-frontend.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/jit/dummy-frontend.c b/gcc/jit/dummy-frontend.c
index 8001382..3ddab50 100644
--- a/gcc/jit/dummy-frontend.c
+++ b/gcc/jit/dummy-frontend.c
@@ -154,6 +154,17 @@ jit_langhook_type_for_mode (enum machine_mode mode, int unsignedp)
if (mode == TYPE_MODE (double_type_node))
return double_type_node;
+ if (mode == TYPE_MODE (intQI_type_node))
+ return unsignedp ? unsigned_intQI_type_node : intQI_type_node;
+ if (mode == TYPE_MODE (intHI_type_node))
+ return unsignedp ? unsigned_intHI_type_node : intHI_type_node;
+ if (mode == TYPE_MODE (intSI_type_node))
+ return unsignedp ? unsigned_intSI_type_node : intSI_type_node;
+ if (mode == TYPE_MODE (intDI_type_node))
+ return unsignedp ? unsigned_intDI_type_node : intDI_type_node;
+ if (mode == TYPE_MODE (intTI_type_node))
+ return unsignedp ? unsigned_intTI_type_node : intTI_type_node;
+
if (mode == TYPE_MODE (integer_type_node))
return unsignedp ? unsigned_type_node : integer_type_node;