blob: 7474cd6e6f248cd7731e91df7f9b027127417406 [file] [log] [blame]
#Source:
##include <stdio.h>
#static inline int inctwo (int *a) {
# printf ("%d\n",(*a)++);
# return (*a)++;
#}
#static inline int inc (int *a) {
# printf ("%d\n",inctwo(a));
# return (*a)++;
#}
#
#
#int main () {
# int x = 1;
# return inc(&x);
#}
#
#Build as : clang -g -O2 addr.c
RUN: mkdir -p %t/.debug
RUN: llvm-objcopy --keep-section=.debug_info %p/Inputs/addr.exe %t/.debug/addr
RUN: llvm-objcopy --strip-debug --add-gnu-debuglink=%t/.debug/addr %p/Inputs/addr.exe %t/addr.exe
RUN: llvm-symbolizer -print-address -obj=%t/addr.exe < %p/Inputs/addr.inp | FileCheck %s
#CHECK: 0x40054d
#CHECK: {{[/\]+}}tmp{{[/\]+}}x.c:14:0