https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125869
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=122430
--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
This one is standalone and it fails too:
```
#include <stdint.h>
uintptr_t bar;
uintptr_t *
__attribute__ ((noinline, noclone))
get_bar (void)
{
return &bar;
}
int
main ()
{
if ((uintptr_t) get_bar () != 42)
__builtin_abort();
return 0;
}
```
I don't think the optimisation is valid for this variant unless
-fno-semantic-interposition is used, because an interposed get_bar could return
a pointer to some malloc'd memory that has 42?