<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/85148>85148</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang 18+ frontend crash on including a header file
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
Sid911
</td>
</tr>
</table>
<pre>
This issue is related to https://github.com/tcbrindle/flux/issues/174.
Initially tested on :
```
Ubuntu clang version 19.0.0 (++20240222031214+307409a8872f-1~exp1~20240222151237.1514)
Target: x86_64-pc-linux-gnu
Thread model: posix
```
Clang 19 backtrace can be accessed [here](https://gist.github.com/Sid911/a76b694a6c69656a5fb9957a2dec2551#file-flux_clang19_stacktrace-txt) with compiler explorer link to reproduce on clang 18 [here](https://flux.godbolt.org/z/8e87j7oM6)
The flux maintainer did patch a workaround in the related PR to the issue by bypassing using the iterator altogether and using internal `FLUX_FOR` macro but I doubt this compiler behavior is acceptable. I also have experienced this before in last 3 weeks while including some other header library unfortunately my memory is vague about what I was doing so I won't be able to reproduce it.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VF2r3DYQ_TXal2GNJX8_-CG3wRBoaUkT6NtlZI1t5cqSkeS7u33Iby_y7k2aUgLGRtJo5vjMOYMh6NkS9ax6YtX7E-5xcb7_U6uO85N06tZ_WnQAHcJOoAN4MhhJQXSwxLgFVrxjYmBimHVcdpmNbmViiKP02ipDTAyT2a9MDEeGwMTAmzJj-XuWv_tgddRozA0ihZTUWWDFO7ifsjp_PMfys9xt3GE0aGd4JR-0s8C7LM9yYKJl4omJJ5GLMhdC5AUXvGTiqcibMu-wbRsxnflXum7861sQr7gomoxXKbK7V_mEfqaYQFzb-rkuz9t4Ntru1_Ns90fI4gkVrE6RSYGbC_r6v5B_ObDyDiSOL9HjSDCiBUmA40ghkAJWPS3kiVXvmWj_S2iI2Q-s3rvCxIBNLeu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