2 // { dg-additional-options "-fstrict-aliasing" }
4 template <typename = void> struct Optional {
5 auto is_present() const { const bool &p = inner.present; return p; }
6 auto set_present() { if (not is_present()) inner.present = true; }
11 using inner_t = InnerType;
15 template <typename WrappedType> struct Wrapper {
16 auto operator-> () { return value; }
20 void __attribute__((noipa)) foo(Optional<>& x) {}
26 Wrapper<Optional<>> wo = {&buf};
28 auto x = wo->is_present();