<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 --- - Assertion `Node2Index[SU->NodeNum] > Node2Index[I->getSUnit()->NodeNum] && "Wrong topological sorting"' failed."
   href="http://llvm.org/bugs/show_bug.cgi?id=17836">17836</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion `Node2Index[SU->NodeNum] > Node2Index[I->getSUnit()->NodeNum] && "Wrong topological sorting"' failed.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>regehr@cs.utah.edu
          </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>regehr@regehr-M51AC:~/z/reduce/r122$ clang -v
clang version 3.4 (trunk 194187)
Target: x86_64-unknown-linux-gnu
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.6
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.6.4
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/4.8.1
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8.1
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/4.8
regehr@regehr-M51AC:~/z/reduce/r122$ cat small.c
int a, d;
char b;
volatile int c;

void fn1 (void) {
  int *e = &a;
  for (b = 0; b >= 0; b--) {
    *e = 0;
    if (d)
      break;
    *e = c;
  }
}
regehr@regehr-M51AC:~/z/reduce/r122$ clang -O1 -c small.c
clang: /home/regehr/z/compiler-source/llvm/lib/CodeGen/ScheduleDAG.cpp:511:
void llvm::ScheduleDAGTopologicalSort::InitDAGTopologicalSorting(): Assertion
`Node2Index[SU->NodeNum] > Node2Index[I->getSUnit()->NodeNum] && "Wrong
topological sorting"' failed.
0  clang           0x00000000020d36f5 llvm::sys::PrintStackTrace(_IO_FILE*) +
37
1  clang           0x00000000020d3b53
2  libpthread.so.0 0x00007f1fa5cb0bb0
3  libc.so.6       0x00007f1fa4cc4f77 gsignal + 55
4  libc.so.6       0x00007f1fa4cc85e8 abort + 328
5  libc.so.6       0x00007f1fa4cbdd43
6  libc.so.6       0x00007f1fa4cbddf2
7  clang           0x0000000001c0f494
8  clang           0x0000000001ab8ca6
9  clang           0x0000000001a43c46
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 4198
10 clang           0x0000000001a42359
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 6249
11 clang           0x0000000001a3fdf7
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 1319
12 clang           0x0000000001b98e1c
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 124
13 clang           0x00000000020723a3
llvm::FPPassManager::runOnFunction(llvm::Function&) + 355
14 clang           0x000000000207261b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
15 clang           0x0000000002072964
llvm::MPPassManager::runOnModule(llvm::Module&) + 420
16 clang           0x0000000002072f8b llvm::PassManagerImpl::run(llvm::Module&)
+ 539
17 clang           0x00000000020730fa llvm::PassManager::run(llvm::Module&) +
10
18 clang           0x0000000000832507
clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions
const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::Module*,
clang::BackendAction, llvm::raw_ostream*) + 6167
19 clang           0x000000000082fe83
20 clang           0x0000000000997733 clang::ParseAST(clang::Sema&, bool, bool)
+ 515
21 clang           0x000000000082f2e2 clang::CodeGenAction::ExecuteAction() +
514
22 clang           0x00000000006a7c81 clang::FrontendAction::Execute() + 113
23 clang           0x0000000000685bad
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 909
24 clang           0x000000000066c1d5
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3029
25 clang           0x000000000066384f cc1_main(char const**, char const**, char
const*, void*) + 703
26 clang           0x000000000066a0e5 main + 9621
27 libc.so.6       0x00007f1fa4cafde5 __libc_start_main + 245
28 clang           0x00000000006634cd
Stack dump:
0.    Program arguments:
/home/regehr/z/compiler-install/llvm-r194187-install/bin/clang -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name small.c
-mrelocation-model static -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -target-linker-version
2.23.52.20130913 -momit-leaf-frame-pointer -coverage-file
/home/regehr/z/reduce/r122/small.o -resource-dir
/home/regehr/z/compiler-install/llvm-r194187-install/bin/../lib/clang/3.4
-internal-isystem /usr/local/include -internal-isystem
/home/regehr/z/compiler-install/llvm-r194187-install/bin/../lib/clang/3.4/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O1
-fdebug-compilation-dir /home/regehr/z/reduce/r122 -ferror-limit 19
-fmessage-length 127 -mstackrealign -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o small.o -x c
small.c 
1.    <eof> parser at end of file
2.    Code generation
3.    Running pass 'Function Pass Manager' on module 'small.c'.
4.    Running pass 'X86 DAG->DAG Instruction Selection' on function '@fn1'
clang: error: unable to execute command: Aborted (core dumped)
clang: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (trunk 194187)
Target: x86_64-unknown-linux-gnu
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/small-95483f.c
clang: note: diagnostic msg: /tmp/small-95483f.sh
clang: note: diagnostic msg: 

********************</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>