<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - ICE when bool is #defined/typedef'd"
   href="https://bugs.llvm.org/show_bug.cgi?id=42248">42248</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>ICE  when bool is #defined/typedef'd
          </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>enhancement
          </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>zhonghao@pku.org.cn
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>blitzrakete@gmail.com, dgregor@apple.com, erik.pilkington@gmail.com, llvm-bugs@lists.llvm.org, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>My clang is 9.0.0, and the code is:

typedef bool _Bool;
# define bool _Bool

#include <vector>
#include <iostream>
#include <cstring>
using namespace std;

class Test : public vector<string> {
public:
 Test (Test& that) {
 arr = std::move(that.arr);
 }
private:
 std::vector<int*> arr;
};

It triggers an ICE:

In file included from
/home/haozhong/project/approach/compilerpara/gcc/tmp/gcc_54207/code0.c.cpp:4:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/vector:60:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_algobase.h:63:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ext/numeric_traits.h:63:25:{63:7-63:24}:
error: expected member name or ';' after declaration specifiers
       static const bool __is_signed = __glibcxx_signed(_Value);
       ~~~~~~~~~~~~~~~~~ ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ext/numeric_traits.h:74:50:
error: expected unqualified-id
     const bool __numeric_traits_integer<_Value>::__is_signed;
                                                  ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ext/numeric_traits.h:106:25:{106:7-106:24}:
error: expected member name or ';' after declaration specifiers
       static const bool __is_signed = true;
       ~~~~~~~~~~~~~~~~~ ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ext/numeric_traits.h:115:51:
error: expected unqualified-id
     const bool __numeric_traits_floating<_Value>::__is_signed;
                                                   ^
In file included from
/home/haozhong/project/approach/compilerpara/gcc/tmp/gcc_54207/code0.c.cpp:4:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/vector:60:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_algobase.h:935:49:
error: expected unqualified-id
         && !__gnu_cxx::__numeric_traits<_ValueType1>::__is_signed
                                                        ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/stl_algobase.h:940:45:
error: non-type template argument is not a constant expression
       return std::__lexicographical_compare<__simple>::__lc(__first1, __last1,
                                             ^
In file included from
/home/haozhong/project/approach/compilerpara/gcc/tmp/gcc_54207/code0.c.cpp:5:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/iostream:39:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ostream:38:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/ios:44:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/basic_ios.h:37:
In file included from
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/locale_facets.h:2651:
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/locale_facets.tcc:472:57:
error: expected unqualified-id
          (__negative && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
                                                                ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/locale_facets.tcc:576:44:
error: expected unqualified-id
                && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)
                                                          ^
/usr/bin/../lib/gcc/x86_64-linux-gnu/7.4.0/../../../../include/c++/7.4.0/bits/locale_facets.tcc:899:48:
error: expected unqualified-id
                    && __gnu_cxx::__numeric_traits<_ValueT>::__is_signed)</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>