https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66084

            Bug ID: 66084
           Summary: ICE:internal compiler error: in fold_convert_loc, at
                    fold-const.c:1974
           Product: gcc
           Version: 4.7.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zhongyunde at huawei dot com
  Target Milestone: ---

Created attachment 35509
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35509&action=edit
a small case compile with -O2 can reproduce the issue

bug issue:
crash1.c: In function 'func_32':
crash1.c:1128:1: internal compiler error: in fold_convert_loc, at
fold-const.c:1974
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


1972:         TREE_TYPE (orig), arg));
1973:      gcc_assert (TREE_CODE (orig) == VECTOR_TYPE
1974:             && "tree_int_cst_equal (TYPE_SIZE (type), TYPE_SIZE
(orig))");
1975:      return fold_build1_loc (loc, NOP_EXPR, type, arg);

testcase:
__attribute__ ((vector_size (16))) g_73 = {0x15FE687EL, 0x5827DF98L,
0xF8411272L, 0x235E695dL};
__attribute__ ((vector_size (16))) g_1124;

int func_1(void)
{  
    __attribute__ ((vector_size (16))) l_1117 = {0x15FE688EL, 0x5827DF98L,
0xF8411272L, 0x235E695EL};
    __attribute__ ((vector_size (16))) zhong = ( g_73  <= g_73);
        g_1124 = (((g_73 < l_1117) == zhong) << 9)    ;

    return 0;
}

Reply via email to