This is the mail archive of the gcc-bugs@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]

[Bug jit/66779] jit segfault


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.


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