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

            Bug ID: 103020
           Summary: ICE with V1TImode on x86_32
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com
  Target Milestone: ---

Following testcase:

--cut here--
typedef int __v1ti __attribute__((mode (V1TI)));

__v1ti foo (__v1ti a)
{
  return a + a;
}
--cut here--

ICEs with gcc -O2 -msse2 -m32:

v1ti.c:1:1: warning: specifying vector types with ‘__attribute__ ((mode))’ is
deprecated [-Wattributes]
    1 | typedef int __v1ti __attribute__((mode (V1TI)));
      | ^~~~~~~
v1ti.c:1:1: note: use ‘__attribute__ ((vector_size))’ instead
during RTL pass: expand
v1ti.c: In function ‘foo’:
v1ti.c:5:12: internal compiler error: in expand_shift_1, at expmed.c:2668
    5 |   return a + a;
      |          ~~^~~
0x66ec09 expand_shift_1
        /home/uros/git/gcc/gcc/expmed.c:2668
0xa948f5 expand_shift(tree_code, machine_mode, rtx_def*, poly_int<1u, long>,
rtx_def*, int)
        /home/uros/git/gcc/gcc/expmed.c:2683
0xa948f5 expand_mult(machine_mode, rtx_def*, rtx_def*, rtx_def*, int, bool)
        /home/uros/git/gcc/gcc/expmed.c:3522
0xaada10 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/uros/git/gcc/gcc/expr.c:10500
...

Similar testcase:

--cut here--
typedef int __v1ti __attribute__((mode (V1TI)));

__v1ti foo (__v1ti a)
{
  return a;
}
--cut here--

does not finish compilation.

When using TI and V2TI mode, the expected error is produced:

_.c:1:1: error: unable to emulate ‘TI’

or

_.c:1:1: error: unable to emulate ‘V2TI’

Reply via email to