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

            Bug ID: 98655
           Summary: ICE: verify_gimple failed (error: integral result type
                    precision does not match field size of
                    'bit_field_ref')
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: powerpc-*-linux-gnu

gcc-11.0.0-alpha20210110 snapshot (g:872373360dab259d51caa002ff1722ff84746d8b)
configured for rs6000 target ICEs when compiling the following testcase,
reduced from testsuite/gcc.target/i386/pr97521.c, w/ -O1 -fno-tree-forwprop:

typedef unsigned char __attribute__ ((__vector_size__ (8))) V;
typedef unsigned long long __attribute__ ((__vector_size__ (16))) W;

V
foo (W f)
{
  W g = ((W) { 0, 1 } < 1) <= (0 < f);

  return (V) (g[0]);
}

% powerpc-e300c3-linux-gnu-gcc-11.0.0 -O1 -fno-tree-forwprop -w -c mvzpqney.c
mvzpqney.c: In function 'foo':
mvzpqney.c:5:1: error: integral result type precision does not match field size
of 'bit_field_ref'
    5 | foo (W f)
      | ^~~
_10 = BIT_FIELD_REF <_9, 1, 0>;
mvzpqney.c:5:1: error: integral result type precision does not match field size
of 'bit_field_ref'
_12 = BIT_FIELD_REF <_11, 1, 0>;
mvzpqney.c:5:1: error: integral result type precision does not match field size
of 'bit_field_ref'
_16 = BIT_FIELD_REF <_15, 1, 1>;
mvzpqney.c:5:1: error: integral result type precision does not match field size
of 'bit_field_ref'
_18 = BIT_FIELD_REF <_17, 1, 1>;
during GIMPLE pass: veclower2
mvzpqney.c:5:1: internal compiler error: verify_gimple failed
0xe59f67 verify_gimple_in_cfg(function*, bool)
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20210110/work/gcc-11-20210110/gcc/tree-cfg.c:5467
0xd27b0e execute_function_todo
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20210110/work/gcc-11-20210110/gcc/passes.c:2042
0xd2821c do_per_function
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20210110/work/gcc-11-20210110/gcc/passes.c:1687
0xd2821c execute_todo
       
/var/tmp/portage/cross-powerpc-e300c3-linux-gnu/gcc-11.0.0_alpha20210110/work/gcc-11-20210110/gcc/passes.c:2096

Reply via email to