<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
 --></style><title>gccas bug; testcase enclosed (more
details)</title></head><body>
<div>this is a follow-up posting to my previous message that is
duplicated below.</div>
<div><br></div>
<div>we isolated the problem to the rewriting of sprintf calls into
strcpy calls. we aren't sure exactly what the problem is (since we
don't understand enough about llvm yet) that is causing a type cast to
be omitted, but now we have a workaround that we are using - we simply
avoid rewriting sprintf as strcpy. I'm sure the author will be able to
spot the problem in a few minutes whereas it would take us longer to
understand what should have been done instead.</div>
<div><br></div>
<div>John M-C</div>
<div><br></div>
<div><br></div>
<div><br></div>
<div><br></div>
<blockquote type="cite" cite>We are using LLVM from CVS and
encountered a bug in gccas. We used bugpoint to help pinpoint the
error.</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>command to repeat error:</blockquote>
<blockquote type="cite" cite><br>
<blockquote>opt bugpoint-passinput.bc -simplify-libcalls</blockquote>
</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>the offending file is
attached.</blockquote>
<blockquote type="cite" cite><br></blockquote>
<blockquote type="cite" cite>Unfortunately, bugpoint fell over while
trying to reduce the test case. It emitted the error
message:</blockquote>
<blockquote type="cite" cite><br>
<blockquote>Checking instruction '': Success!</blockquote>
<blockquote>PHINode should have one entry for each predecessor of its
parent basic block!</blockquote>
<blockquote>        %i.3 = phi int
[ %inc.11, %endif.5 ], [ 0, %endif.0 ], [ 0, %endif.0 ], [ 0, %endif.0
], [ 0, %endif.0 ], [ 0, %endif.0
]           <span
></span>   ; <int> [#uses=3]</blockquote>
<blockquote>Broken module found, compilation aborted!</blockquote>
<blockquote>Checking instruction 'tmp.208': bugpoint((anonymous
namespace)::PrintStackTrace()+0x1a)[0x873fada]</blockquote>
<blockquote>bugpoint((anonymous
namespace)::SignalHandler(int)+0xcb)[0x873fd4d]</blockquote>
<blockquote>[0xffffe420]</blockquote>
<blockquote>/lib/libc.so.6(abort+0x16d)[0xb7dd236d]</blockquote>
<blockquote>bugpoint((anonymous
namespace)::Verifier::abortIfBroken()+0xd5)[0x86fe6d3]</blockquote>
<blockquote>bugpoint((anonymous
namespace)::Verifier::runOnFunction(llvm::Function&)+0x57)[0x86fd<span
></span>d6f]</blockquote>
<blockquote
>bugpoint(llvm::PassManagerTraits<llvm::Function>::runPass(llvm<span
></span>::FunctionPass*,
llvm::Function*)+0x1f)[0x86e1905]</blockquote>
<blockquote
>bugpoint(llvm::PassManagerT<llvm::Function>::runOnUnit(llvm::F<span
></span>unction*)+0x5c3)[0x86d7657]</blockquote>
<blockquote
>bugpoint(llvm::PassManagerTraits<llvm::Function>::runOnFunctio<span
></span>n(llvm::Function&)+0x1f)[0x86d820d]</blockquote>
<blockquote
>bugpoint(llvm::FunctionPass::runOnModule(llvm::Module&)+0xa7)[0x<span
></span>868c7d7]</blockquote>
<blockquote
>bugpoint(llvm::PassManagerTraits<llvm::Module>::runPass(llvm::<span
></span>ModulePass*, llvm::Module*)+0x1f)[0x86e199b]</blockquote>
<blockquote
>bugpoint(llvm::PassManagerT<llvm::Module>::runOnUnit(llvm::Mod<span
></span>ule*)+0x5c3)[0x86d57e3]</blockquote>
<blockquote
>bugpoint(llvm::PassManagerTraits<llvm::Module>::runOnModule(ll<span
></span>vm::Module&)+0x1f)[0x86d6e77]</blockquote>
<blockquote
>bugpoint(llvm::PassManager::run(llvm::Module&)+0x23)[0x868bbe1<span
></span>]</blockquote>
<blockquote
>bugpoint(llvm::BugDriver::deleteInstructionFromProgram(llvm::Instruc<span
></span>tion const*, unsigned int)
const+0x366)[0x840696a]</blockquote>
<blockquote>bugpoint[0x83f6209]</blockquote>
<blockquote
>bugpoint(llvm::BugDriver::debugOptimizerCrash()+0x1cf)[0x83f6669]</blockquote
>
<blockquote>bugpoint(llvm::BugDriver::run()+0x5d)[0x83f3207]</blockquote
>
<blockquote>bugpoint(main+0xc7)[0x84149cf]</blockquote>
<blockquote>/lib/libc.so.6(__libc_start_main+0xb8)[0xb7dbd488]</blockquote
>
<blockquote>bugpoint[0x83f29c1]</blockquote>
<blockquote>Abort</blockquote>
</blockquote>
</body>
</html>