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

            Bug ID: 109731
           Summary: g++ eveluates delete's expressio more than once
           Product: gcc
           Version: 11.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gjl at gcc dot gnu.org
  Target Milestone: ---

Created attachment 54992
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54992&action=edit
C++ test case

The attached test case evaluates the last delete expression more than once,
which leads to a segmentation fault when the code is executed:

> g++ main-3.cpp -O2 && ./a.out

but it also occurs with -O0. Seen on:

g++ (Ubuntu 11.3.0-1ubuntu1~22.04) 11.3.0

g++ (GCC) 14.0.0 20230420 (experimental)

https://eel.is/c++draft/expr.delete#4

Reply via email to