<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - inlining and constant propagation to intrinsics"
   href="https://bugs.llvm.org/show_bug.cgi?id=27177">bug 27177</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">CC</td>
           <td>
                
           </td>
           <td>richard-llvm@metafoo.co.uk
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>REOPENED
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>WONTFIX
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - inlining and constant propagation to intrinsics"
   href="https://bugs.llvm.org/show_bug.cgi?id=27177#c10">Comment # 10</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED WONTFIX - inlining and constant propagation to intrinsics"
   href="https://bugs.llvm.org/show_bug.cgi?id=27177">bug 27177</a>
              from <span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span></b>
        <pre>This incompatibility between clang and GCC has been known about for years, and
there are no plans to fix it, so I think we should mark this as wontfix to help
document the state of the world.

There are two obvious ways to fix the issue:
- Inline in the frontend before checking that certain intrinsic arguments are
constants
- Delay intrinsic argument checking until after inlining

Neither solution is acceptable. We aren't going to reinvent inlining in the
frontend, and delaying semantic checking makes program acceptance depend on
optimization level, which we try hard to avoid.

The way clang behaves today is predictable, if primitive: you have to pass
constants to intrinsics that require constant arguments. always_inline wrappers
that forward constant arguments, such as 'bla' in your example, are not
allowed.</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>