[LLVMbugs] [Bug 1364] NEW: Assertion failure in PassManager
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Apr 27 22:27:31 PDT 2007
http://llvm.org/bugs/show_bug.cgi?id=1364
Summary: Assertion failure in PassManager
Product: libraries
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Core LLVM classes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: babic.domagoj at gmail.com
The following piece of code:
#include "llvm/Pass.h"
#include "llvm/Analysis/Dominators.h"
#include "llvm/Analysis/PostDominators.h"
using namespace llvm;
class PathExpressions : public FunctionPass {
public:
virtual void getAnalsisUsage(AnalysisUsage &AU) const {
AU.addRequired<DominatorTree>();
AU.addRequired<PostDominatorTree>();
}
virtual bool runOnFunction(Function &F) {
DominatorTree &DT = getAnalysis<DominatorTree>();
PostDominatorTree &PDT = getAnalysis<PostDominatorTree>();
return false;
}
};
namespace {
RegisterPass<PathExpressions> P("pathexpr", "Compute path expressions.");
} // End of anonymous namespace
-----
when compiled as a loadable module triggers an assertion:
opt -load=out.so -disable-output -disable-verify -debug-pass=Details -pathexpr
anybc.bc
Pass Arguments: -pathexpr
Target Data Layout
ModulePass Manager
FunctionPass Manager
Compute path expressions.
-- Compute path expressions.
0x114f2b0 Executing Pass 'Function Pass Manager' on Module 'anybc.bc...
0xe32bf0 Executing Pass 'Compute path expressions.' on Function
'control_printf...
opt: /work/projects/llvm/include/llvm/PassAnalysisSupport.h:191: AnalysisType&
llvm::Pass::getAnalysisID(const llvm::PassInfo*) const [with AnalysisType =
llvm::DominatorTree]: Assertion `ResultPass && "getAnalysis*() called on an
analysis that was not " "'required' by pass!"' failed.
opt((anonymous namespace)::PrintStackTrace()+0x17)[0xa20ba7]
opt((anonymous namespace)::SignalHandler(int)+0x10e)[0xa20e76]
Domagoj
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list