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

            Bug ID: 96721
           Summary: [11 Regression] pseudo-destructor calls on pointers
                    since r11-2238
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: needs-bisection, needs-reduction
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, slyfox at gcc dot gnu.org,
                    unassigned at gcc dot gnu.org, webrown.cpp at gmail dot com
        Depends on: 96717
  Target Milestone: ---

+++ This bug was initially created as a clone of Bug #96717 +++

In

typedef int *T;

void
foo (T a)
{
  if (a)
    return;
  a.~T ();
}

int
main ()
{
  int p;
  foo (&p);
  foo (nullptr);
  return 0;
}

since r11-2238-ge443d8213864ac337c29092d4767224f280d2062 the pseudo-destructor
is emitted on what the pointer points to rather than on the pointer itself.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96717
[Bug 96717] -flifetime-dse=2 breaks webkit-gtk-2.28.4

Reply via email to