[llvm-bugs] [Bug 28732] New: inline function - call without implementation
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Jul 27 00:54:34 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28732
Bug ID: 28732
Summary: inline function - call without implementation
Product: clang
Version: 3.8
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: regis.portalez at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16816
--> https://llvm.org/bugs/attachment.cgi?id=16816&action=edit
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
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160727/1b627277/attachment-0001.html>
More information about the llvm-bugs
mailing list