<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - SIGABRT in PowerPC/PPCISelLowering.cpp taking the address of a TLS variable"
   href="http://llvm.org/bugs/show_bug.cgi?id=18817">18817</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>SIGABRT in PowerPC/PPCISelLowering.cpp taking the address of a TLS variable
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.3
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: PowerPC
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>msebor@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Clang 3.3, 3.4, and the latest trunk abort on the small test case below. A
discussion of TLS support for PPC is in the now resolved <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - TLS for PowerPC not supported"
   href="show_bug.cgi?id=12593">Bug 12593</a>.

$ cat u.c && clang -cc1 -triple powerpc-unknown-linux -S -o/dev/null u.c
void f (void) {
    static __thread int i;
    void *p = &i;
}
only local-exec is currently supported for ppc32
UNREACHABLE executed at
/scratch/msebor/llvm/RELEASE_33/lib/Target/PowerPC/PPCISelLowering.cpp:1451!
0  clang           0x00000000020f3d82 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  clang           0x00000000020f3a14
2  libpthread.so.0 0x0000003cb8a0eb10
3  libc.so.6       0x0000003cb7e30265 gsignal + 53
4  libc.so.6       0x0000003cb7e31d10 abort + 272
5  clang           0x00000000020ddd0c
6  clang           0x00000000017c945e
llvm::PPCTargetLowering::LowerGlobalTLSAddress(llvm::SDValue,
llvm::SelectionDAG&) const + 2062
7  clang           0x00000000017dc6f5
llvm::PPCTargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&)
const + 501
8  clang           0x00000000019d790b
9  clang           0x00000000019d9fe9 llvm::SelectionDAG::Legalize() + 457
10 clang           0x00000000019a3d20
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 768
11 clang           0x00000000019a6da7
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 1943
12 clang           0x00000000019a8329
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 777
13 clang           0x00000000017c1e93
14 clang           0x000000000208d6df
llvm::FPPassManager::runOnFunction(llvm::Function&) + 655
15 clang           0x000000000208dbab
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
16 clang           0x000000000208de2b
llvm::MPPassManager::runOnModule(llvm::Module&) + 603
17 clang           0x000000000208e00f llvm::PassManagerImpl::run(llvm::Module&)
+ 223
18 clang           0x000000000094127c
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 2188
19 clang           0x000000000093f1ec
20 clang           0x0000000000aa59fb clang::ParseAST(clang::Sema&, bool, bool)
+ 507
21 clang           0x000000000093d82c clang::CodeGenAction::ExecuteAction() +
60
22 clang           0x00000000007cfce9 clang::FrontendAction::Execute() + 249
23 clang           0x00000000007b0510
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 352
24 clang           0x0000000000799515
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 1797
25 clang           0x0000000000793ad8 cc1_main(char const**, char const**, char
const*, void*) + 1208
26 clang           0x0000000000775568 main + 2152
27 libc.so.6       0x0000003cb7e1d994 __libc_start_main + 244
28 clang           0x000000000079287d
Stack dump:
0.    Program arguments:
/auto/compiler-dev/msebor/contrib/cel-5.50/llvm-3.3/bin/clang -cc1 -triple
powerpc-unknown-linux -S -o/dev/null u.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'u.c'.
4.    Running pass 'PowerPC DAG->DAG Pattern Instruction Selection' on function
'@f'
Aborted (core dumped)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>