<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 --- - Crash in Early-CSE with constants with leading empty structs"
   href="http://llvm.org/bugs/show_bug.cgi?id=22595">22595</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Crash in Early-CSE with constants with leading empty structs
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </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>bsteinbr@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>Created <span class=""><a href="attachment.cgi?id=13867" name="attach_13867" title="IR that causes a crash in Early-CSE">attachment 13867</a> <a href="attachment.cgi?id=13867&action=edit" title="IR that causes a crash in Early-CSE">[details]</a></span>
IR that causes a crash in Early-CSE

The attached testcase causes a crash in Early-CSE.

include/llvm/IR/DerivedTypes.h:291: llvm::Type*
llvm::StructType::getElementType(unsigned int) const: Assertion `N <
NumContainedTys && "Element number out of range!"' failed.
0  opt             0x000000000145dc52 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  opt             0x000000000145c0c1
2  libpthread.so.0 0x00007fe9e109d8d0
3  libc.so.6       0x00007fe9e02dd107 gsignal + 55
4  libc.so.6       0x00007fe9e02de4e8 abort + 328
5  libc.so.6       0x00007fe9e02d6226
6  libc.so.6       0x00007fe9e02d62d2
7  opt             0x0000000000607ce4
8  opt             0x00000000011716dd llvm::Type::getStructElementType(unsigned
int) const + 45
9  opt             0x000000000109518d
llvm::ConstantAggregateZero::getStructElement(unsigned int) const + 13
10 opt             0x0000000000d5ce25
llvm::ConstantFoldLoadFromConstPtr(llvm::Constant*, llvm::DataLayout const*) +
2149
11 opt             0x0000000000d61e82
llvm::ConstantFoldInstruction(llvm::Instruction*, llvm::DataLayout const*,
llvm::TargetLibraryInfo const*) + 466
12 opt             0x0000000000d97bae
llvm::SimplifyInstruction(llvm::Instruction*, llvm::DataLayout const*,
llvm::TargetLibraryInfo const*, llvm::DominatorTree const*,
llvm::AssumptionCache*) + 2110
13 opt             0x000000000131c730
14 opt             0x000000000131df4b
15 opt             0x0000000001159ea0
llvm::FPPassManager::runOnFunction(llvm::Function&) + 480
16 opt             0x000000000115a23b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
17 opt             0x000000000115a52f
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 719
18 opt             0x0000000000657161 main + 4401
19 libc.so.6       0x00007fe9e02c9b45 __libc_start_main + 245
20 opt             0x000000000067d9f1
Stack dump:
0.      Program arguments: bin/opt -early-cse empty-vec-crash.ll 
1.      Running pass 'Function Pass Manager' on module 'empty-vec-crash.ll'.
2.      Running pass 'Early CSE' on function '@crash_on_zeroinit'</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>