<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - inline function - call without implementation"
   href="https://llvm.org/bugs/show_bug.cgi?id=28732">28732</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>inline function - call without implementation
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.8
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>regis.portalez@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=16816" name="attach_16816" title="resulting llvm IR">attachment 16816</a> <a href="attachment.cgi?id=16816&action=edit" title="resulting llvm IR">[details]</a></span>
resulting llvm IR

I'm using clang 3.8 (built for x64 in release mode with visual 2015 on windows
10) on windows, compiling for linux target. 

the compilation line is the following: 


clang -g -S -emit-llvm -x c -std=c99 -target i686-pc-linux -o zou.ll -c main.c


in the resulting ll, there is a call to method which is declared but has no
implementation. 

the input c code is : 

extern void exit (int);

inline void f (int x) {}

int main ()
{
  f (7);
  exit (0);
}

and the resulting ll (full version attached): 

; Function Attrs: nounwind
define i32 @main() #0 !dbg !4 {
  %1 = alloca i32, align 4
  store i32 0, i32* %1, align 4
  call void @f(i32 7), !dbg !11
  call void @exit(i32 0) #3, !dbg !12
  unreachable, !dbg !12
                                                  ; No predecessors!
  %3 = load i32, i32* %1, align 4, !dbg !13
  ret i32 %3, !dbg !13
}

declare void @f(i32) #1


PS: it seems to happen when compiling from linux to linux as well</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>