[LLVMbugs] [Bug 4113] New: ModulePass requires FunctionPass that requires TargetData: Assertion `0 && "ERROR: Bad TargetData ctor used. " " Tool did not specify a TargetData to use?"' failed.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Apr 30 10:52:38 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=4113

           Summary: ModulePass requires FunctionPass that requires
                    TargetData: Assertion `0 && "ERROR: Bad TargetData ctor
                    used.  " "Tool did not specify a TargetData to use?"'
                    failed.
           Product: new-bugs
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: new bugs
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=2914)
 --> (http://llvm.org/bugs/attachment.cgi?id=2914)
foo2.cpp

See attached testcase:

x.bc is any module that has a targetdata.

When running functionpass only all is good, and targetdata  is found,
Scalarevolution has it too:
$ opt -load=../../../Debug/lib/Foo.so -bar x.bc -disable-output

When running modulepass it complains targetdata is not available:
$ opt -load=../../../Debug/lib/Foo.so -foobar x.bc -disable-output

opt: /home/edwin/llvm-svn/llvm/include/llvm/Target/TargetData.h:114:
llvm::TargetData::TargetData(): Assertion `0 && "ERROR: Bad TargetData ctor
used.  " "Tool did not specify a TargetData to use?"' failed.
0   opt             0x0000000000a7162c
1   opt             0x0000000000a71b0d
2   libpthread.so.0 0x00007fa3f6ca67b0
3   libc.so.6       0x00007fa3f5fc6115 gsignal + 53
4   libc.so.6       0x00007fa3f5fc7633 abort + 387
5   libc.so.6       0x00007fa3f5fbf159 __assert_fail + 233
6   opt             0x000000000095e64a llvm::Pass*
llvm::callDefaultCtor<llvm::TargetData>() + 0
7   opt             0x000000000095e668 llvm::Pass*
llvm::callDefaultCtor<llvm::TargetData>() + 30
8   opt             0x0000000000a00cf6 llvm::PassInfo::createPass() const + 128
9   opt             0x00000000009fa20a
llvm::PMTopLevelManager::schedulePass(llvm::Pass*) + 280
10  opt             0x0000000000a05948
llvm::FunctionPassManagerImpl::add(llvm::Pass*) + 36
11  opt             0x00000000009fa48a
llvm::MPPassManager::addLowerLevelRequiredPass(llvm::Pass*, llvm::Pass*) + 370
12  opt             0x00000000009fb36d llvm::PMDataManager::add(llvm::Pass*,
bool) + 845
13  opt             0x00000000009fb7a6
llvm::ModulePass::assignPassManager(llvm::PMStack&, llvm::PassManagerType) +
132
14  opt             0x0000000000a05803
llvm::PassManagerImpl::addTopLevelPass(llvm::Pass*) + 227
15  opt             0x00000000009fa2e6
llvm::PMTopLevelManager::schedulePass(llvm::Pass*) + 500
16  opt             0x0000000000a05922 llvm::PassManagerImpl::add(llvm::Pass*)
+ 36
17  opt             0x00000000009fa30f llvm::PassManager::add(llvm::Pass*) + 33
18  opt             0x00000000006feb07
19  opt             0x0000000000700613 main + 3002
20  libc.so.6       0x00007fa3f5fb25a6 __libc_start_main + 230
21  opt             0x00000000006f0fe9
Aborted


-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list