https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126977
--- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
A testcase that fails now too:
```
int bos (int z, void *p)
{
if (z)
return __builtin_object_size (p, 0);
else
return __builtin_object_size (p, 1);
}
```
A few more testcases for later on (but good to have now):
```
void prefetch (unsigned *x, int z)
{
if (z)
__builtin_prefetch (x, 1);
else
__builtin_prefetch (x, 0);
}
void *faddr (unsigned *x, int z)
{
if (z)
return __builtin_frame_address (1);
else
return __builtin_frame_address (0);
}
```
One which does not cause an error but most likely will cause other issues:
```
int expect_issue (long a, int z)
{
if (z)
return __builtin_expect (a, 1);
else
return __builtin_expect (a, 0);
}
```
Maybe ok but need to double check:
```
struct f
{
int a[2];
};
struct f1
{
char a[2];
};
int islock (long a, int z, void *p)
{
if (z)
return __atomic_is_lock_free (sizeof(struct f), p);
else
return __atomic_is_lock_free (sizeof(struct f1), p);
}
```
These are all from looking into builtins.cc.
I have not looked into the internal_functions yet.