https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113599

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2024-01-25
   Target Milestone|---                         |14.0
           Priority|P3                          |P1
            Version|unknown                     |14.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
            Summary|Wrong computation of member |[14 Regression] Wrong
                   |offset through              |computation of member
                   |pointer-to-member           |offset through
                   |                            |pointer-to-member since
                   |                            |r14-5503
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r14-5503-gd3f48f682271ed94ab6e9f6bc62418a62bd8ff26
Slightly shortened testcase which aborts on error:
struct A { void *a; };
struct B { void *b; };
struct C : public B, public A { A c; };
static C d;

int
main ()
{
  auto C::*e = &C::c;
  auto f = &(d.*e);
  auto g = &d.c;
  if (f != g)
    __builtin_abort ();
}

Reply via email to