On Wed, Feb 26, 2025 at 11:38 AM Jakub Jelinek <ja...@redhat.com> wrote: > > On Wed, Feb 26, 2025 at 10:45:37AM +0100, Richard Biener wrote: > > OK > > Unfortunately I've only bootstrapped/regtested it with normal checking. > Testing it with --enable-checking=release now shows that this patch just > moved the FAILs to a different symbol. And note that isn't even a LTO > build. > > The following patch which IMHO still makes sense, those methods are also > trivial, moves it even further. But the next problem is > _ZN22simple_diagnostic_path9add_eventEmP9tree_nodeiPKcz > and that method is IMHO too large for the header file to be defined inline, > and doesn't even have final override like the others, isn't virtual in the > abstract class. > So, I have really no idea why it isn't compiled in.
Hmm, so why isn't it part of libgccjit? I suppose C++ does not really support exposing a class but not exporting the classes ABI? > 2025-02-26 Jakub Jelinek <ja...@redhat.com> > > PR testsuite/116143 > * simple-diagnostic-path.h (simple_diagnostic_path::get_event): Define > inline. > (simple_diagnostic_path::get_thread): Likewise. > (simple_diagnostic_path::same_function_p): Likewise. > * simple-diagnostic-path.cc (simple_diagnostic_path::get_event): > Remove out of line definition. > (simple_diagnostic_path::get_thread): Likewise. > (simple_diagnostic_path::same_function_p): Likewise. > > --- gcc/simple-diagnostic-path.h.jj 2025-02-26 10:59:04.475354169 +0100 > +++ gcc/simple-diagnostic-path.h 2025-02-26 11:09:48.191388638 +0100 > @@ -101,14 +101,19 @@ class simple_diagnostic_path : public di > simple_diagnostic_path (pretty_printer *event_pp); > > unsigned num_events () const final override { return m_events.length (); } > - const diagnostic_event & get_event (int idx) const final override; > + const diagnostic_event & get_event (int idx) const final override > + { return *m_events[idx]; } > unsigned num_threads () const final override { return m_threads.length (); > } > const diagnostic_thread & > - get_thread (diagnostic_thread_id_t) const final override; > + get_thread (diagnostic_thread_id_t idx) const final override > + { return *m_threads[idx]; } > bool > same_function_p (int event_idx_a, > - int event_idx_b) const final override; > - > + int event_idx_b) const final override > + { > + return (m_events[event_idx_a]->get_fndecl () > + == m_events[event_idx_b]->get_fndecl ()); > + } > diagnostic_thread_id_t add_thread (const char *name); > > diagnostic_event_id_t add_event (location_t loc, tree fndecl, int depth, > --- gcc/simple-diagnostic-path.cc.jj 2025-02-26 10:59:04.476354155 +0100 > +++ gcc/simple-diagnostic-path.cc 2025-02-26 11:10:01.842198544 +0100 > @@ -41,29 +41,6 @@ simple_diagnostic_path::simple_diagnosti > add_thread ("main"); > } > > -/* Implementation of diagnostic_path::get_event vfunc for > - simple_diagnostic_path: simply return the event in the vec. */ > - > -const diagnostic_event & > -simple_diagnostic_path::get_event (int idx) const > -{ > - return *m_events[idx]; > -} > - > -const diagnostic_thread & > -simple_diagnostic_path::get_thread (diagnostic_thread_id_t idx) const > -{ > - return *m_threads[idx]; > -} > - > -bool > -simple_diagnostic_path::same_function_p (int event_idx_a, > - int event_idx_b) const > -{ > - return (m_events[event_idx_a]->get_fndecl () > - == m_events[event_idx_b]->get_fndecl ()); > -} > - > diagnostic_thread_id_t > simple_diagnostic_path::add_thread (const char *name) > { > > > Jakub >