This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug jit/66779] jit segfault
- From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 06 Jul 2015 16:07:23 +0000
- Subject: [Bug jit/66779] jit segfault
- Auto-submitted: auto-generated
- References: <bug-66779-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66779
David Malcolm <dmalcolm at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2015-07-06
Ever confirmed|0 |1
--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Root cause is here (in expr.c):
11035 tree type = lang_hooks.types.type_for_mode (mode, unsignedp);
where the langhook returns NULL, leading to a segfault.
11034 enum tree_code tcode = code == NE ? NE_EXPR : EQ_EXPR;
11035 tree type = lang_hooks.types.type_for_mode (mode, unsignedp);
11036 tree temp = fold_build2_loc (loc, BIT_AND_EXPR, TREE_TYPE
(arg1),
11037 gimple_assign_rhs1 (srcstmt),
11038 gimple_assign_rhs2 (srcstmt));
11039 temp = fold_single_bit_test (loc, tcode, temp, arg1, type);
(gdb) p mode
$2 = QImode
(gdb) p unsignedp
$3 = 0
Guarded by:
11031 if (srcstmt
11032 && integer_pow2p (gimple_assign_rhs2 (srcstmt)))
Fix is to handle the missing modes in jit_langhook_type_for_mode.