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

            Bug ID: 100424
           Summary: Inline virtual function not emitted with
                    -fsanitize=undefined -O2
           Product: gcc
           Version: 10.3.1
            Status: UNCONFIRMED
          Keywords: link-failure
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org
  Target Milestone: ---

Created attachment 50753
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50753&action=edit
Gzip compressed preprocessed source

The testcase
libstdc++-v3/testsuite/20_util/monotonic_buffer_resource/release.cc fails to
link with -std=gnu++17 -fsanitize=undefined -O2

/usr/bin/ld: /tmp/ccrPcmjT.o: in function `test04()':
release.cc:(.text+0x63c9): undefined reference to
`std::pmr::monotonic_buffer_resource::do_allocate(unsigned long, unsigned
long)'
collect2: error: ld returned 1 exit status


The function is defined inline in that file, so should get emitted.

Reply via email to