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

            Bug ID: 102281
           Summary: -ftrivial-auto-var-init=zero causes ice
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C++ code:

long _mm_set_epi64x___q0;
__attribute__((__vector_size__(2 * sizeof(long)))) long long _mm_set_epi64x() {
  return (__attribute__((__vector_size__(2 * sizeof(long)))) long long){
      _mm_set_epi64x___q0};
}

compiled by recent gcc and compiler flag -ftrivial-auto-var-init=zero,
does this:

$ /home/dcb/gcc/results/bin/gcc  -ftrivial-auto-var-init=zero bug756.cc
bug756.cc: In function ‘__vector(2) long long int _mm_set_epi64x()’:
bug756.cc:2:62: error: invalid operand in return statement
    2 | _attribute__((__vector_size__(2 * sizeof(long)))) long long
_mm_set_epi64x() {
      |                                                            
^~~~~~~~~~~~~~

D.2371

return D.2371;
bug756.cc:2:62: internal compiler error: ‘verify_gimple’ failed
0x105dc3a verify_gimple_in_seq(gimple*)
        ../../trunk.git/gcc/tree-cfg.c:5228

Taking the new flag off causes the code to compile ok:

$ /home/dcb/gcc/results/bin/gcc -c  bug756.cc
$

Reply via email to