<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - vector bool type may not be compatible with vector unsigned type in generic selection in C"
   href="https://bugs.llvm.org/show_bug.cgi?id=33342">33342</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>vector bool type may not be compatible with vector unsigned type in generic selection in C
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>westion717@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>void f(vector bool int);
void g(vector unsigned int);

#define example(X) \
  _Generic((X), \
  vector bool int            : f((vector bool int)X), \
  vector unsigned int        : g((vector unsigned int)X))


int main(){
vector unsigned int a;
vector bool int b;
example(a);
example(b);

}

clang -c -o a.o a.c  -fno-lax-vector-conversions
a.c:14:1: error: type '__vector unsigned int' (vector of 4 'unsigned int'
values) in generic association compatible with previously specified type
'__vector __bool unsigned int' (vector of 4 'unsigned int' values)
example(a);
^~~~~~~~~~
a.c:8:19: note: expanded from macro 'example'
  vector unsigned int        : g((vector unsigned int)X))
                  ^~~
a.c:14:1: note: compatible type '__vector __bool unsigned int' (vector of 4
'unsigned int' values) specified here
example(a);
^~~~~~~~~~
a.c:7:15: note: expanded from macro 'example'
  vector bool int            : f((vector bool int)X), \
              ^~~
a.c:15:1: error: type '__vector unsigned int' (vector of 4 'unsigned int'
values) in generic association compatible with previously specified type
'__vector __bool unsigned int' (vector of 4 'unsigned int' values)
example(b);
^~~~~~~~~~
a.c:8:19: note: expanded from macro 'example'
  vector unsigned int        : g((vector unsigned int)X))
                  ^~~
a.c:15:1: note: compatible type '__vector __bool unsigned int' (vector of 4
'unsigned int' values) specified here
example(b);
^~~~~~~~~~
a.c:7:15: note: expanded from macro 'example'
  vector bool int            : f((vector bool int)X), \
              ^~~
2 errors generated.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>