public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113908] New: [14 Regression] bogus access error with new-expr of current non-template class with implicitly deleted copy ctor
@ 2024-02-13 13:57 ppalka at gcc dot gnu.org
  2024-02-13 13:59 ` [Bug c++/113908] [14 Regression] bogus access error with new-expr of current non-template class with implicitly deleted copy ctor since r14-557 ppalka at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-02-13 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113908
           Summary: [14 Regression] bogus access error with new-expr of
                    current non-template class with implicitly deleted
                    copy ctor
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

struct B {
  B() = default;
private:
  B(const B&);
};

struct A {
  B b;

  template<class T>
  static void f() { new A(); }
};

int main() {
  A::f<int>();
}

<stdin>: In instantiation of ‘static void A::f() [with T = int]’:
<stdin>:15:12:   required from here
<stdin>:11:27: error: ‘B::B(const B&)’ is private within this context
<stdin>:4:3: note: declared private here
<stdin>:11:27: error: ‘B::B(const B&)’ is private within this context
<stdin>:4:3: note: declared private here

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-02-14 15:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-13 13:57 [Bug c++/113908] New: [14 Regression] bogus access error with new-expr of current non-template class with implicitly deleted copy ctor ppalka at gcc dot gnu.org
2024-02-13 13:59 ` [Bug c++/113908] [14 Regression] bogus access error with new-expr of current non-template class with implicitly deleted copy ctor since r14-557 ppalka at gcc dot gnu.org
2024-02-13 14:01 ` jakub at gcc dot gnu.org
2024-02-14 15:21 ` cvs-commit at gcc dot gnu.org
2024-02-14 15:22 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).