[Bug demangler/79976] long list of demangle failures

2017-03-13 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79976

--- Comment #7 from Markus Trippelsdorf  ---
One big chunk of failures is due to the following:

markus@x4 tmp % cat mangl.ii
struct C;
template  struct B {
  template  operator B();
  T *operator->();
};
struct D {
  B tmp;
  template  void m_fn1(T p1) { tmp = p1; }
};
struct E;
void fn1() {
  B l;
  B m;
  l->m_fn1(m);
}

markus@x4 tmp % g++ -O2 -c mangl.ii && nm -C mangl.o
 T fn1()
 U B::operator->()
 U _ZN1BI1EEcvS_IT_EI1CEEv

markus@x4 tmp % llvm-cxxfilt _ZN1BI1EEcvS_IT_EI1CEEv
B::operator B()


The second  in "B" is not handled.

[Bug demangler/79976] long list of demangle failures

2017-03-09 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79976

Markus Trippelsdorf  changed:

   What|Removed |Added

 CC||jason at gcc dot gnu.org

--- Comment #6 from Markus Trippelsdorf  ---
Jason's idea doesn't help much. 
For the demangler failures of the testsuite there are only 9 less (<2%).

[Bug demangler/79976] long list of demangle failures

2017-03-09 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79976

--- Comment #5 from Markus Trippelsdorf  ---
Created attachment 40935
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40935=edit
list of testsuite demangler failures

[Bug demangler/79976] long list of demangle failures

2017-03-09 Thread palves at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79976

--- Comment #4 from Pedro Alves  ---
That's a good point.  Maybe a mangling/demangling hash/cache would help with
that, though can't beat 0 work.

[Bug demangler/79976] long list of demangle failures

2017-03-09 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79976

Markus Trippelsdorf  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2017-03-09
 Ever confirmed|0   |1

--- Comment #3 from Markus Trippelsdorf  ---
The patch slows down the compiler immensely, so I don't think it should be
enabled by flag_checking. A new -enable-checking= option would be best.

I will test if Jason's suggestion makes any difference.

[Bug demangler/79976] long list of demangle failures

2017-03-09 Thread palves at redhat dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79976

--- Comment #2 from Pedro Alves  ---
Thanks for looking at that!

I'd love for that patch to me merged, but realistically, I don't know when I'd
have time to champion it, and it's been almost 3 years...  If someone picks it
up and runs with it, it's much appreciated.

FYI, Jason provided feedback in the following month:
 https://gcc.gnu.org/ml/gcc-patches/2014-06/msg00082.html

but I never followed through, and I have no other local changes.

[Bug demangler/79976] long list of demangle failures

2017-03-09 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79976

--- Comment #1 from Markus Trippelsdorf  ---
Created attachment 40932
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40932=edit
Pedro's patch updated for trunk