On 09/10/2014 06:47 PM, Jan Hubicka wrote:
Again - I think main problem is that we provide a middle end a function body that it is not allowed to use. We do not really have a concept of function definitions that we may not use and worse yet, we are preventing that just in one special case - i.e. in the speculative devirtualization.
Because that special case is the only time we want to prevent it, as I argued in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58678#c19
My patch shouldn't change any behavior except for fixing this LTO bug, since implicitly-declared member functions always have vague linkage. It seems to me a simple, safe fix.
Jason