C++ PATCH for c++/70844, wrong -Wuseless-cast with inheriting constructor

2017-06-17 Thread Jason Merrill
Let's use warning_sentinel to suppress -Wuseless-cast for this conversion. Tested x86_64-pc-linux-gnu, applying to trunk and 7. commit 74a5be8e0ca159667f4b3e87a0b329345afaf0fa Author: Jason Merrill Date: Fri Jun 16 23:06:17 2017 -0400 PR c++/70844 - -Wuseless-cast and inheriting co

C++ PATCH for c++/60063, -Wunused-local-typedefs and attribute used

2017-06-17 Thread Jason Merrill
Attribute used isn't documented to apply to typedefs, but the implementation allows it. We should handle it the same way in a template, by applying it immediately rather than defer until instantiation time. Tested x86_64-pc-linux-gnu, applying to trunk and 7. commit 3c3deed6644421ec32a509df3ffdfc

Re: [PATCH, GCC/LTO, ping] Fix PR69866: LTO with def for weak alias in regular object file

2017-06-17 Thread Dominique d'Humières
The new test fails on darwin with the usual FAIL: gcc.dg/lto/pr69866 c_lto_pr69866_0.o-c_lto_pr69866_1.o link, -O0 -flto -flto-partition=none IMO it requires a /* { dg-require-alias "" } */ directive. TIA Dominique

Re: [PATCH] PR libstdc++/80893 Fix null dereference in vector

2017-06-17 Thread Jonathan Wakely
On 31/05/17 13:45 +0100, Jonathan Wakely wrote: vector does addressof(*ptr) where ptr is returned by allocate(n), but if n==0 that pointer might not be dereferencable. While testing the fix I also found some bugs in the __gnu_test::PointerBase helper that needed correcting. PR libstdc++

Prevent infinite recursion between simplification and CSE in FRE

2017-06-17 Thread Marc Glisse
Hello, see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80887#c10 for the context. FRE can go into an infinite recursion with some match.pd simplifications (that have been temporarily reverted). Limiting the depth of recursive calls is not a great solution, but it is simple and I don't have