https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99565
Bug ID: 99565
Summary: Bogus identical branches warning when returning
references to union members
Product: gcc
Version: 11.0
URL: https://godbolt.org/z/9qaz9W
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: johelegp at gmail dot com
CC: johelegp at gmail dot com
Target Milestone: ---
See https://godbolt.org/z/9qaz9W.
```C++
struct A {
union {
int a;
int b;
};
int& x() { return 0 ? a : b; }
};
```