<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/105936>105936</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Ubuntu clang version 18.1.3 (1ubuntu1) crashes while building Boost 1.86.0
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          valiko-ua
      </td>
    </tr>
</table>

<pre>
    Requested files are attached.
Note that I replaced my username with "username" in them.
The crash is reproducible on my side (tried twice).

```
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0.      Program arguments: clang++ -fvisibility-inlines-hidden -fPIC -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -m64 --target=x86_64-pc-linux -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_LOCALE_DYN_LINK=1 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 -DBOOST_LOCALE_SOURCE -DBOOST_LOCALE_WITH_ICONV=1 -DBOOST_LOCALE_WITH_ICU=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_NO_LIB=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DNDEBUG -I. -I/home/username/prj/config/libraries/boost/boost_1_86_0/libs/locale/src -I/usr/include -c -o bin.v2/libs/locale/build/clang-linux-18/release/x86_64/threading-multi/visibility-hidden/shared/date_time.o /home/username/prj/config/libraries/boost/boost_1_86_0/libs/locale/src/boost/locale/shared/date_time.cpp
1.      ./boost/date_time/gregorian/greg_weekday.hpp:41:69: current parser token '{'
2.      ./boost/date_time/gregorian/greg_weekday.hpp:18:1: parsing namespace 'boost'
3.      ./boost/date_time/gregorian/greg_weekday.hpp:19:1: parsing namespace 'boost::gregorian'
4.      ./boost/date_time/gregorian/greg_weekday.hpp:41:3: parsing struct/union/class body 'boost::gregorian::greg_weekday'
5.      ./boost/date_time/constrained_value.hpp:42:30: instantiating class definition 'boost::CV::constrained_value<boost::CV::simple_exception_policy<unsigned short, 0, 6, boost::gregorian::bad_weekday>>'
6.      ./boost/date_time/constrained_value.hpp:87:30: instantiating class definition 'boost::CV::simple_exception_policy<unsigned short, 0, 6, boost::gregorian::bad_weekday>'
7.      ./boost/type_traits/is_base_of.hpp:30:48: instantiating class definition 'boost::is_base_of<std::exception, boost::gregorian::bad_weekday>'
8.      ./boost/type_traits/is_base_of.hpp:20:14: instantiating class definition 'boost::detail::is_base_of_imp<std::exception, boost::gregorian::bad_weekday>'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0  libLLVM.so.18.1 0x000075ffb9da63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 63
1  libLLVM.so.18.1      0x000075ffb9da44f9 llvm::sys::RunSignalHandlers() + 89
2  libLLVM.so.18.1 0x000075ffb9cf0227
3  libc.so.6            0x000075ffb8845320
4 libc.so.6            0x000075ffb88a9bbc
5  libc.so.6 0x000075ffb88abfb1
6  libc.so.6            0x000075ffb88ad7e2 malloc + 418
7  libclang-cpp.so.18.1 0x000075ffc188d6fd
8  libclang-cpp.so.18.1 0x0000555d903443b0
clang++: error: clang frontend command failed with exit code 139 (use -v to see invocation)
Ubuntu clang version 18.1.3 (1ubuntu1)
Target: x86_64-pc-linux
Thread model: posix
InstalledDir: /usr/bin
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/date_time-4c33b0.cpp
clang++: note: diagnostic msg: /tmp/date_time-4c33b0.sh
clang++: note: diagnostic msg: 

********************

    "clang++" -fvisibility-inlines-hidden -fPIC -pthread -O3 -Wall -fvisibility=hidden -Wno-inline -m64 --target=x86_64-pc-linux  -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_COBALT_USE_STD_PMR=1 -DBOOST_LOCALE_DYN_LINK=1 -DBOOST_LOCALE_NO_WINAPI_BACKEND=1 -DBOOST_LOCALE_SOURCE -DBOOST_LOCALE_WITH_ICONV=1 -DBOOST_LOCALE_WITH_ICU=1 -DBOOST_THREAD_BUILD_DLL=1 -DBOOST_THREAD_NO_LIB=1 -DBOOST_THREAD_POSIX -DBOOST_THREAD_USE_DLL=1 -DNDEBUG   -I"." -I"/home/username/prj/config/libraries/boost/boost_1_86_0/libs/locale/src" -I"/usr/include"  -c -o "bin.v2/libs/locale/build/clang-linux-18/release/x86_64/threading-multi/visibility-hidden/shared/date_time.o" "/home/username/prj/config/libraries/boost/boost_1_86_0/libs/locale/src/boost/locale/shared/date_time.cpp"

...failed clang-linux.compile.c++ bin.v2/libs/locale/build/clang-linux-18/release/x86_64/threading-multi/visibility-hidden/shared/date_time.o...
```
[files.zip](https://github.com/user-attachments/files/16736706/files.zip)

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsWF9z2rgW_zTKyxl7bNkQ88ADfzfMUsgkpL17XzyydQBtbclXkmmzn_6ObENISjtp005flmFskM5_nSP9jpgxYicRh6Q3Jr3pFavtXunhgRXio_JqdpUp_ji8w__VaCxy2IoCDTCNwKxl-R65T4IpCUYrZRHsnllYgMaqYDlyKB-hNqglKxE-CbsHQulxgFAKQoLdY9mJ2OwRcs3MHoRxMrTidS6yAkFJJ8oIjkBoYrVADvaTyJHQQcfcPftB923-3i5no_sZmDorhQUGWb1zgpW2YBXsra0MiUaEzgmd74Td15mfq5LQeVEcji-v0upvzC2hc2FMjYbQOTDJQci8qLlz-mh2xvKPVjNn1gSqxoMcjUEORtW6HXaczBiVC-biqWsJJteisp0f95blH4HXZeUsa4YCnwSDW612mpXA9K4uUVpnOOQFkztCx4SOwdsehBGZKIR99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