<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: Times; "><pre></pre></span><div>It appears you filed PR 8538 about this, but didn't cc yourself.  You should look at it; I don't think this is a clang problem.</div><blockquote type="cite"><span class="Apple-style-span" style="font-family: Times; "><pre>It seems that the problem occurs from the optimization level. In the 2.7
version I was using -O0 and in 2.8 I tested the same benchmarks with -O3.

clang -O0 works fine, while clang -O3 makes redefinitions (probably it is
related to inlining) of the functions from stdlib.h, math.h and some other
libraries. To give one example, function atoi is defined in the generated
*.ll file: 

define i32 @atoi(i8* %__nptr) nounwind inlinehint {
entry:
  %call = tail call i64 @strtol(i8* nocapture %__nptr, i8** null, i32 10)
nounwind readonly
  %conv = trunc i64 %call to i32
  ret i32 %conv
}

although it is not defined in the original C file.

And clang redefines it in all the *.ll files it generates, from each C file
in the perlbench (SPEC CPU 2006).

Similarly for all the other functions, which appear in the end to be
redefined and give errors.

Am I on the right track with this errors? I need to use the -O3 optimization
level in my tests, so how can I avoid this problem?

Alexandra
-- </pre></span></blockquote><div><br></div></body></html>