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

--- Comment #1 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> ---
Testcase needs a #include <stdbool.h> to compile, but otherwise confirmed from
GCC 4.9 through to trunk.

Note that it isn't immediately clear that this is valid code - operations on
poly128_t other than vreinterpret, vldrq, and vstrq are not defined by ACLE, so
the equality/inequality operators have no defined meaning (though ICEing is
still not correct).

Further reduced testcase:

  #include <arm_neon.h>
  int
  foo (poly128_t a, poly128_t b)
  {
    return a == b;
  }

Backtrace:

foo.c: In function 'main':
foo.c:11:16: internal compiler error: in expand_shift_1, at expmed.c:2450
   result = (r1 != r2);
            ~~~~^~~~~~
0x7ddece expand_shift_1
        .../gcc/expmed.c:2450
0x7de849 expand_shift(tree_code, machine_mode, rtx_def*, int, rtx_def*, int)
        .../gcc/expmed.c:2466
0x7e466a emit_store_flag(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode,
int, int)
        .../gcc/expmed.c:5826
0x7e4179 emit_store_flag(rtx_def*, rtx_code, rtx_def*, rtx_def*, machine_mode,
int, int)
        .../gcc/expmed.c:5670
0x7e4d65 emit_store_flag_force(rtx_def*, rtx_code, rtx_def*, rtx_def*,
machine_mode, int, int)
        .../gcc/expmed.c:5860
0x808724 do_store_flag
        .../gcc/expr.c:11408
0x808724 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        .../gcc/expr.c:9196
0x6e7e47 expand_gimple_stmt_1
        .../gcc/cfgexpand.c:3686
0x6e7e47 expand_gimple_stmt
        .../gcc/cfgexpand.c:3746
0x6e9dc5 expand_gimple_basic_block
        .../gcc/cfgexpand.c:5753
0x6ed427 execute
        .../gcc/cfgexpand.c:6368

Reply via email to