<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/77786>77786</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Clang doesn't define the typeinfo for _Float16
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ldionne
</td>
</tr>
</table>
<pre>
When libc++ defines `~__fundamental_type_info()`, Clang is supposed to emit the typeinfos for all fundamental types, which should include `_Float16`. But this doesn’t happen, as can be seen here: https://godbolt.org/z/EKTe8z3cf
Self-standing repro:
```
$ cat <<EOF | clang++ -xc++ - -c -o typeinfos.o && nm -omg typeinfos.o | c++filt | grep _Float16
namespace __cxxabiv1 {
struct __fundamental_type_info {
virtual ~__fundamental_type_info();
};
// This miraculously (compiler magic) emits the type_info's for:
// 1. all of the fundamental types
// 2. pointers to all of the fundamental types
// 3. pointers to all of the const fundamental types
__fundamental_type_info::~__fundamental_type_info()
{
}
}
EOF
```
Output is: nothing
Ouput should be: Something like
```
typeinfos.o: 0000000000000580 (__DATA,__const) external typeinfo for _Float16 const*
typeinfos.o: 0000000000000560 (__DATA,__const) external typeinfo for _Float16*
typeinfos.o: 0000000000000550 (__DATA,__const) external typeinfo for _Float16
typeinfos.o: 0000000000000927 (__TEXT,__const) external typeinfo name for _Float16 const*
typeinfos.o: 0000000000000924 (__TEXT,__const) external typeinfo name for _Float16*
typeinfos.o: 0000000000000922 (__TEXT,__const) external typeinfo name for _Float16
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJykVU9zo7gT_TTtS5ddIP6ZAwfbMZffIYdx1W9vlBANaFdIFBLZZA772bcETsaZmUyyGcqFLXe_1-L1E82tlZ0mKiA5QnK34bPrzVSoRhqtaVOb5qn4f08alawFsCOwIzbUSk0WIQ3-qap21g0fSDuuKvc0UiV1a4DtgeWQBsBOeFJcdygt2nkcjaUGnUEapEP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