<html>
    <head>
      <base href="https://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 --- - Clang fails in insertDAGNode"
   href="https://llvm.org/bugs/show_bug.cgi?id=31045">31045</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang fails in insertDAGNode
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>Vsevolod.Livinskij@frtk.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=17605" name="attach_17605" title="Reduced reproducer.">attachment 17605</a> <a href="attachment.cgi?id=17605&action=edit" title="Reduced reproducer.">[details]</a></span>
Reduced reproducer.

vlivinsk@victory:~/workspace/yarpgen/found/scalar/clang/S_2764373472/d1$
clang++ -v
clang version 4.0.0 (trunk 286273)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/vlivinsk/workspace/llvm/bin-trunk/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.0.0
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64
vlivinsk@victory:~/workspace/yarpgen/found/scalar/clang/S_2764373472/d1$
clang++ -std=c++11 repr.cpp -O3 -c
In file included from repr.cpp:1:
./init.h:6:8: warning: width of bit-field 'member_1_2' (11 bits) exceeds the
width of its type; value will be truncated to 8 bits
      [-Wbitfield-width]
  char member_1_2 : 11;
       ^
./init.h:17:8: warning: width of bit-field 'member_3_7' (18 bits) exceeds the
width of its type; value will be truncated to 8 bits
      [-Wbitfield-width]
  char member_3_7 : 18;
       ^
repr.cpp:6:26: warning: '&' within '^' [-Wbitwise-op-parentheses]
        -var_58 - var_44 & struct_obj_8.member_4_5.member_3_4.member_2_5 ^
        ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
repr.cpp:6:26: note: place parentheses around the '&' expression to silence
this warning
        -var_58 - var_44 & struct_obj_8.member_4_5.member_3_4.member_2_5 ^
                         ^
        (                                                               )
repr.cpp:9:44: warning: '&' within '^' [-Wbitwise-op-parentheses]
          var_12 & struct_obj_2.member_2_5 &
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
repr.cpp:9:44: note: place parentheses around the '&' expression to silence
this warning
          var_12 & struct_obj_2.member_2_5 &
                                           ^
repr.cpp:8:74: warning: '^' within '|' [-Wbitwise-op-parentheses]
      bool(struct_obj_5.member_4_5.member_3_7 & struct_obj_1.member_6_1) ^
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
repr.cpp:8:74: note: place parentheses around the '^' expression to silence
this warning
      bool(struct_obj_5.member_4_5.member_3_7 & struct_obj_1.member_6_1) ^
                                                                         ^
#0 0x0000000001441b08 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1441b08)
#1 0x000000000143f75e llvm::sys::RunSignalHandlers()
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x143f75e)
#2 0x000000000143f8d2 SignalHandler(int)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x143f8d2)
#3 0x00007fd82e0233e0 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x113e0)
#4 0x00000000009e183a insertDAGNode(llvm::SelectionDAG&, llvm::SDValue,
llvm::SDValue) [clone .isra.209] [clone .constprop.314]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9e183a)
#5 0x00000000009e7f02 (anonymous
namespace)::X86DAGToDAGISel::matchAddressRecursively(llvm::SDValue, (anonymous
namespace)::X86ISelAddressMode&, unsigned int) [clone .constprop.306]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9e7f02)
#6 0x00000000009ed725 (anonymous
namespace)::X86DAGToDAGISel::matchAdd(llvm::SDValue, (anonymous
namespace)::X86ISelAddressMode&, unsigned int) [clone .constprop.307]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9ed725)
#7 0x00000000009e6bde (anonymous
namespace)::X86DAGToDAGISel::matchAddressRecursively(llvm::SDValue, (anonymous
namespace)::X86ISelAddressMode&, unsigned int) [clone .constprop.306]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9e6bde)
#8 0x00000000009edb6d (anonymous
namespace)::X86DAGToDAGISel::selectLEAAddr(llvm::SDValue, llvm::SDValue&,
llvm::SDValue&, llvm::SDValue&, llvm::SDValue&, llvm::SDValue&) [clone
.constprop.296]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9edb6d)
#9 0x00000000009ee37c (anonymous
namespace)::X86DAGToDAGISel::CheckComplexPattern(llvm::SDNode*, llvm::SDNode*,
llvm::SDValue, unsigned int, llvm::SmallVectorImpl<std::pair<llvm::SDValue,
llvm::SDNode*> >&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9ee37c)
#10 0x0000000001b3b56e llvm::SelectionDAGISel::SelectCodeCommon(llvm::SDNode*,
unsigned char const*, unsigned int)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b3b56e)
#11 0x00000000009ea10f (anonymous
namespace)::X86DAGToDAGISel::Select(llvm::SDNode*)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9ea10f)
#12 0x0000000001b33f75 llvm::SelectionDAGISel::DoInstructionSelection()
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b33f75)
#13 0x0000000001b37daf llvm::SelectionDAGISel::CodeGenAndEmitDAG()
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b37daf)
#14 0x0000000001b4230c
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b4230c)
#15 0x0000000001b44529
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) [clone
.part.722] [clone .constprop.746]
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1b44529)
#16 0x00000000009eecf4 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x9eecf4)
#17 0x0000000000d3e475
llvm::MachineFunctionPass::runOnFunction(llvm::Function&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0xd3e475)
#18 0x000000000104b4d3 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x104b4d3)
#19 0x000000000104b59c llvm::FPPassManager::runOnModule(llvm::Module&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x104b59c)
#20 0x000000000104b03d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x104b03d)
#21 0x00000000015cfb58 clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions
const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction,
std::unique_ptr<llvm::raw_pwrite_stream,
std::default_delete<llvm::raw_pwrite_stream> >)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x15cfb58)
#22 0x0000000001c06bf3
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1c06bf3)
#23 0x0000000001fe9f28 clang::ParseAST(clang::Sema&, bool, bool)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1fe9f28)
#24 0x0000000001c02039 clang::CodeGenAction::ExecuteAction()
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x1c02039)
#25 0x00000000019181e6 clang::FrontendAction::Execute()
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x19181e6)
#26 0x00000000018ea416
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x18ea416)
#27 0x000000000199dbc2
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x199dbc2)
#28 0x0000000000922cb8 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) (/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x922cb8)
#29 0x00000000008e5104 main
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x8e5104)
#30 0x00007fd82cfaa830 __libc_start_main
/build/glibc-Qz8a69/glibc-2.23/csu/../csu/libc-start.c:325:0
#31 0x000000000091f689 _start
(/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0+0x91f689)
Stack dump:
0.      Program arguments:
/home/vlivinsk/workspace/llvm/bin-trunk/bin/clang-4.0 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name repr.cpp
-mrelocation-model static -mthread-model posix -fmath-errno -masm-verbose
-mconstructor-aliases -munwind-tables -fuse-init-array -target-cpu x86-64
-momit-leaf-frame-pointer -dwarf-column-info -debugger-tuning=gdb
-coverage-notes-file
/home/vlivinsk/workspace/yarpgen/found/scalar/clang/S_2764373472/d1/repr.gcno
-resource-dir /home/vlivinsk/workspace/llvm/bin-trunk/bin/../lib/clang/4.0.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/x86_64-linux-gnu/c++/5.4.0
-internal-isystem
/usr/lib/gcc/x86_64-linux-gnu/5.4.0/../../../../include/c++/5.4.0/backward
-internal-isystem /usr/local/include -internal-isystem
/home/vlivinsk/workspace/llvm/bin-trunk/bin/../lib/clang/4.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-std=c++11 -fdeprecated-macro -fdebug-compilation-dir
/home/vlivinsk/workspace/yarpgen/found/scalar/clang/S_2764373472/d1
-ferror-limit 19 -fmessage-length 135 -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -o
repr.o -x c++ repr.cpp
1.      <eof> parser at end of file
2.      Code generation
3.      Running pass 'Function Pass Manager' on module 'repr.cpp'.
4.      Running pass 'X86 DAG->DAG Instruction Selection' on function '@_Z1av'
clang-4.0: error: unable to execute command: Segmentation fault (core dumped)
clang-4.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 4.0.0 (trunk 286273)
Target: x86_64-unknown-linux-gnu
Thread model: posix</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>