<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 - Semantics of __attribute__((target("...")) on platforms without the feature"
   href="https://bugs.llvm.org/show_bug.cgi?id=33610">33610</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Semantics of __attribute__((target("...")) on platforms without the feature
          </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>Documentation
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Intrinsics in the AVX headers are annotated with
__attribute__((__target__("avx"))) and have no preconditions. 

The documentation of the target attribute is here:
<a href="https://clang.llvm.org/docs/AttributeReference.html#target-gnu-target">https://clang.llvm.org/docs/AttributeReference.html#target-gnu-target</a>

It doesn't specify any pre/post conditions either.

What are the semantics of calling such a function on a target that does not
support the feature specified by the target attribute?

In practice I can get a SIGILL exception, but am I guaranteed to get one (and
can I reliably catch it?)? That is, is this defined or implementation defined
behavior? If is so, how and where is it defined? Otherwise, is this undefined
behavior? And if so, where is this undefined(clang, llvm, the assembler, the
cpu)?</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>