[PR84682] disregard address constraints on non-addresses

2018-03-08 Thread Alexandre Oliva
LRA gets very confused when non-addresses are passed as operands to asms with address contraints. Even if other constraints are available, and the operand is a perfect fit for them, we'd still attempt to process the operand as an address, and fail miserably at that. Truth is, address constraints

Re: Fix some _GLIBCXX_DEBUG pretty printer errors

2018-03-08 Thread François Dumont
On 08/03/2018 19:11, Jonathan Wakely wrote: This caused a new regression for: std::forward_list flst; std::forward_list::iterator flstiter0; // { dg-final { note-test flstiter0 {non-dereferenceable iterator for std::forward_list}} } $1 = {_M_node = 0x0} got: $1 = {_M_node = 0x0} FAIL:

[C++ Patch] PR 71169 ("[7/8 Regression] ICE on invalid C++ code in pop_nested_class"), PR 71832 and more (Take 2)

2018-03-08 Thread Paolo Carlini
Hi again, eventually I'm back with sort-of a synthesis of the various ideas, thus something I believe very close in spirit to my original RFC, but much more direct, using CLASSTYPE_TI_ARGS (eh!) and Jason' helper. And I managed to see that we want to vec_safe_truncate the unparsed entities -

Re: [C++ PATCH] For -Wformat purposes use ellipsis args before class to pointer to class conversion (PR c++/84076)

2018-03-08 Thread Jakub Jelinek
On Thu, Mar 08, 2018 at 04:20:40PM -0500, Jason Merrill wrote: > On Thu, Mar 8, 2018 at 1:08 PM, Jakub Jelinek wrote: > > The reporter complains that -Wformat incorrectly reports std::string* passed > > to "%s" format rather than std::string, which is what the user did. > > > >

PR libstdc++/84769 qualify std::get and std::get_if to avoid ADL

2018-03-08 Thread Jonathan Wakely
PR libstdc++/84769 * include/std/variant (get<_Tp, _Types...>, get_if<_Tp, _Types...>): Qualify calls to get<_Np, Types...> and get_if<_Np, _Types...>. Tested powerpc64le-linux, committed to trunk, and will commit to gcc-7-branch too. commit

Use non-throwing is_directory in filesystem::create_directory

2018-03-08 Thread Jonathan Wakely
The create_dir helper was calling the throwing form of filesystem::is_directory instead of passing the error_code argument. Since std::filesystem::create_directory(const path&, error_code&) is noexcept, it would call std::terminate if an error occurred in is_directory. Passing the error_code also

Re: [PATCH] avoid warning for memcpy to self (PR 83456)

2018-03-08 Thread Martin Sebor
On 03/08/2018 01:59 AM, Richard Biener wrote: On Thu, Mar 8, 2018 at 12:01 AM, Martin Sebor wrote: I have become convinced that issuing -Wrestrict in gimple-fold for calls to memcpy() where the source pointer is the same as the destination causes more trouble than it's worth,

PR libstdc++/78420 Make std::less etc. yield total order for pointers

2018-03-08 Thread Jonathan Wakely
In order to meet the total order requirements of [comparisons] p2 we need to cast unrelated pointers to uintptr_t before comparing them. Those casts aren't allowed in constant expressions, so only cast when __builtin_constant_p says the result of the comparison is not a compile-time constant

[og7] Update nvptx_fork/join barrier placement

2018-03-08 Thread Cesar Philippidis
Nvidia Volta GPUs now support warp-level synchronization. As such, the semantics of legacy bar.sync instructions have slightly changed on newer GPUs. The PTX JIT will now, occasionally, emit a warpsync instruction immediately before a bar.sync for Volta GPUs. That implies that warps must be

Re: Fix some _GLIBCXX_DEBUG pretty printer errors

2018-03-08 Thread Jonathan Wakely
On 8 March 2018 at 21:32, François Dumont wrote: > On 08/03/2018 19:11, Jonathan Wakely wrote: >> >> This caused a new regression for: >> >>std::forward_list flst; >>std::forward_list::iterator flstiter0; >> // { dg-final { note-test flstiter0 {non-dereferenceable

Re: [RFC][PR82479] missing popcount builtin detection

2018-03-08 Thread Kugan Vivekanandarajah
Hi Richard and Bin, Thanks for your comments. I will revise the patch and post it as soon as stage-1 opens. Kugan On 7 March 2018 at 22:25, Bin.Cheng wrote: > On Wed, Mar 7, 2018 at 8:26 AM, Richard Biener > wrote: >> On Tue, Mar 6, 2018 at

Re: [C++ PATCH] Avoid -Wunused-function warning when a static function is only used from uninstantiated template (PR c++/80598)

2018-03-08 Thread Jakub Jelinek
On Thu, Mar 08, 2018 at 10:08:20AM -0500, Jason Merrill wrote: > On Wed, Mar 7, 2018 at 5:19 PM, Jakub Jelinek wrote: > > This testcase regressed when the mark_used call in finish_id_expression > > has been guarded with if (done). Wonder if we can't just mark it TREE_USED > >

Re: [PATCH] Fix dwarf2out regression introduced with LVUs (PR debug/84456)

2018-03-08 Thread Jason Merrill
OK. On Thu, Mar 8, 2018 at 1:14 PM, Jakub Jelinek wrote: > Hi! > > GCC 7 and earlier had in this spot > if (list && loc_list->first->next) > gen_llsym (list); > where we wanted to force loclist if we've seen more than one > NOTE_INSN_VAR_LOCATION for the decl, which means

Re: Fix some _GLIBCXX_DEBUG pretty printer errors

2018-03-08 Thread François Dumont
On 08/03/2018 19:11, Jonathan Wakely wrote: This caused a new regression for: std::forward_list flst; std::forward_list::iterator flstiter0; // { dg-final { note-test flstiter0 {non-dereferenceable iterator for std::forward_list}} } $1 = {_M_node = 0x0} got: $1 = {_M_node = 0x0} FAIL:

Re: [C++ PATCH] For -Wformat purposes use ellipsis args before class to pointer to class conversion (PR c++/84076)

2018-03-08 Thread Jason Merrill
On Thu, Mar 8, 2018 at 1:08 PM, Jakub Jelinek wrote: > The reporter complains that -Wformat incorrectly reports std::string* passed > to "%s" format rather than std::string, which is what the user did. > > This transformation of non-trivial copy init or dtor classes in ellipsis

Re: [C++ PATCH] Avoid -Wunused-function warning when a static function is only used from uninstantiated template (PR c++/80598)

2018-03-08 Thread Jason Merrill
OK. On Thu, Mar 8, 2018 at 12:53 PM, Jakub Jelinek wrote: > On Thu, Mar 08, 2018 at 10:08:20AM -0500, Jason Merrill wrote: >> On Wed, Mar 7, 2018 at 5:19 PM, Jakub Jelinek wrote: >> > This testcase regressed when the mark_used call in finish_id_expression >>

Re: [C++ PATCH] Don't redefine __* builtins (PR c++/84724)

2018-03-08 Thread Jason Merrill
On Thu, Mar 8, 2018 at 1:01 PM, Jakub Jelinek wrote: > The C FE just warns and doesn't override builtins, but C++ FE > on say int __builtin_trap (); will override the builtin, so later > builtin_decl_explicit will return the bogus user function which e.g. > doesn't have any

Re: [PATCH] Diagnose earlier invalid inline asm constraints (PR inline-asm/84742)

2018-03-08 Thread Jeff Law
On 03/08/2018 11:19 AM, Jakub Jelinek wrote: > Hi! > > We have many loops that use CONSTRAINT_LEN to skip over various constraint > characters, but we assume the constraints have valid length and don't walk > the individual characters to double check this. > > If that is not the case, when e.g.

[C++ PATCH] For -Wformat purposes use ellipsis args before class to pointer to class conversion (PR c++/84076)

2018-03-08 Thread Jakub Jelinek
Hi! The reporter complains that -Wformat incorrectly reports std::string* passed to "%s" format rather than std::string, which is what the user did. This transformation of non-trivial copy init or dtor classes in ellipsis is done by convert_arg_to_ellipsis; that function does many changes and

[C++ PATCH] Don't redefine __* builtins (PR c++/84724)

2018-03-08 Thread Jakub Jelinek
Hi! The C FE just warns and doesn't override builtins, but C++ FE on say int __builtin_trap (); will override the builtin, so later builtin_decl_explicit will return the bogus user function which e.g. doesn't have any merged attributes, can have different arguments or return type etc. This patch

[PATCH] Fix dwarf2out regression introduced with LVUs (PR debug/84456)

2018-03-08 Thread Jakub Jelinek
Hi! GCC 7 and earlier had in this spot if (list && loc_list->first->next) gen_llsym (list); where we wanted to force loclist if we've seen more than one NOTE_INSN_VAR_LOCATION for the decl, which means it is not possible to use a block form DW_AT_location. Alex has changed this to

[PATCH] Diagnose earlier invalid inline asm constraints (PR inline-asm/84742)

2018-03-08 Thread Jakub Jelinek
Hi! We have many loops that use CONSTRAINT_LEN to skip over various constraint characters, but we assume the constraints have valid length and don't walk the individual characters to double check this. If that is not the case, when e.g. 2 character constraint starting letter is followed by '\0',

Re: Fix some _GLIBCXX_DEBUG pretty printer errors

2018-03-08 Thread Jonathan Wakely
This caused a new regression for: std::forward_list flst; std::forward_list::iterator flstiter0; // { dg-final { note-test flstiter0 {non-dereferenceable iterator for std::forward_list}} } $1 = {_M_node = 0x0} got: $1 = {_M_node = 0x0} FAIL: libstdc++-prettyprinters/debug_cxx11.cc print

Re: [C++ Patch/RFC] PR 71169 ("[7/8 Regression] ICE on invalid C++ code in pop_nested_class"), PR 71832 and more

2018-03-08 Thread Paolo Carlini
Hi again, On 07/03/2018 21:49, Paolo Carlini wrote: ... If you ask my opinion, at the moment I still believe that the best solution would be doing something at parsing time, save the information, in a more elegant way, maybe adding a special "erroneous TREE_VEC" flag to the TREE_VECs. I don't

Re: [PATCH][AArch64][1/3] PR target/84164: Simplify subreg + redundant AND-immediate

2018-03-08 Thread Kyrill Tkachov
On 02/03/18 17:34, Jeff Law wrote: On 03/01/2018 08:19 AM, Kyrill Tkachov wrote: Ping. Thanks, Kyrill On 19/02/18 11:35, Kyrill Tkachov wrote: Ping. https://gcc.gnu.org/ml/gcc-patches/2018-02/msg00649.html CC'ing Eric and Jeff as the patch contains a simplify-rtx.c component that I'll

Re: [C++ PATCH] Avoid -Wunused-function warning when a static function is only used from uninstantiated template (PR c++/80598)

2018-03-08 Thread Jason Merrill
On Wed, Mar 7, 2018 at 5:19 PM, Jakub Jelinek wrote: > This testcase regressed when the mark_used call in finish_id_expression > has been guarded with if (done). Wonder if we can't just mark it TREE_USED > otherwise for the benefit of -Wunused-function and leave it >

Re: [PATCH] __builtin_early_constant_p (PR c++/78420)

2018-03-08 Thread Jason Merrill
On Wed, Mar 7, 2018 at 5:04 PM, Jakub Jelinek wrote: > - /* Don't fold __builtin_constant_p within a constexpr function. */ > - bool bi_const_p = (DECL_FUNCTION_CODE (fun) == BUILT_IN_CONSTANT_P); > + /* Don't fold __builtin_{,early_}constant_p within a constexpr function.

[PATCH] Fix PR84552

2018-03-08 Thread Richard Biener
The following fixes SCEV follow_copies_to_constant to properly deal with regions with not up-to-date SSA form as we are presented with by some passes like for example unrolling or graphite. follow_copies_to_constant can venture into sibling loops which is what those passes do not expect -- they

Re: [PATCH] [AArch64] Update L2 cache size on Falkor's prefetch tuning structure.

2018-03-08 Thread Luis Machado
On 03/08/2018 10:30 AM, James Greenhalgh wrote: On Thu, Mar 01, 2018 at 06:45:21PM +, Luis Machado wrote: Falkor's prefetch tuning structure still carries the L2 cache size value from early support code. This patch updates it to match the specifications. Even though the prefetcher is

Re: [PR84620] output symbolic entry_view as data2, not addr

2018-03-08 Thread Jakub Jelinek
On Thu, Mar 08, 2018 at 06:05:04AM -0300, Alexandre Oliva wrote: > On Mar 6, 2018, Jakub Jelinek wrote: > > > I'm afraid I haven't understood yet why we need labels instead of compiler > > assigned numbers for the views, > > The compiler can't determine points at which the

Re: [PATCH][AArch64][2/3] PR target/84164: Add ZERO_EXTRACT + LSHIFTRT pattern for BFXIL instruction

2018-03-08 Thread James Greenhalgh
On Thu, Feb 08, 2018 at 05:10:52PM +, Kyrill Tkachov wrote: > Hi all, > > This is a followup to the other PR target/84164 patch [1] that fixes the > testsuite regression > gcc.target/aarch64/bfxil_1.c. > The regression is that with the new subreg+masking simplification we no > longer match

Re: [PATCH][AArch64] PR target/84748: Mark *compare_cstore_insn as clobbering CC reg

2018-03-08 Thread James Greenhalgh
On Wed, Mar 07, 2018 at 05:39:41PM +, Kyrill Tkachov wrote: > Hi all, > > In this wrong-code PR the combine pass ends up moving a CC-using instruction > past a *compare_cstore_insn > insn_and_split. After reload the *compare_cstore_insn splitter ends up > generating a SUBS instruction that

Re: [PATCH][AARCH64]Fix immediate alternative of movhf_aarch64 pattern.

2018-03-08 Thread James Greenhalgh
On Wed, Mar 07, 2018 at 11:23:10AM +, Renlin Li wrote: > Hi all, > > For the immediate alternative, the constraint checks the operand with HF mode > while SImode is provided to the output template generation function. > > Before the change, this inconsistency causes an ICE compiling the new

Re: [PATCH] [AArch64] Update L2 cache size on Falkor's prefetch tuning structure.

2018-03-08 Thread James Greenhalgh
On Thu, Mar 01, 2018 at 06:45:21PM +, Luis Machado wrote: > Falkor's prefetch tuning structure still carries the L2 cache size value from > early support code. This patch updates it to match the specifications. > > Even though the prefetcher is currently disabled for Falkor, we have a patch >

Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp

2018-03-08 Thread Michael Matz
Hi, On Thu, 8 Mar 2018, Richard Biener wrote: > Or re-do the warning? Since in the other thread about setjmp side-effects > we concluded that setjmp has to preserve all call-saved regs? Even worse. On SPARC setjmp clobbers even more than just call-clobbered regs (!). Ciao, Michael.

Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp

2018-03-08 Thread Richard Biener
On Thu, Mar 8, 2018 at 2:22 PM, Richard Biener wrote: > On Thu, Mar 8, 2018 at 1:54 PM, Michael Matz wrote: >> Hi, >> >> On Wed, 7 Mar 2018, Peter Bergner wrote: >> >>> On 3/7/18 12:01 AM, Jeff Law wrote: >>> > I believe so by nature that the setjmp

Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp

2018-03-08 Thread Richard Biener
On Thu, Mar 8, 2018 at 1:54 PM, Michael Matz wrote: > Hi, > > On Wed, 7 Mar 2018, Peter Bergner wrote: > >> On 3/7/18 12:01 AM, Jeff Law wrote: >> > I believe so by nature that the setjmp dominates the longjmp sites and >> > thus also dominates the dispatcher. But it's something I

Re: [PATCH, rs6000] Fix PR83969: ICE in final_scan_insn, at final.c:2997

2018-03-08 Thread Peter Bergner
On 3/7/18 6:50 PM, Peter Bergner wrote: > This passed bootstrap and regtesting on powerpc64-linux, running the > testsuite in both 32-bit and 64-bit modes with no regressions. > Ok for trunk? FYI, this also passed bootstrap and regtesting on powerpc64le-linux without regressions also. Peter

Re: [RFA][PATCH][PR middle-end/61118] Improve tree CFG accuracy for setjmp/longjmp

2018-03-08 Thread Michael Matz
Hi, On Wed, 7 Mar 2018, Peter Bergner wrote: > On 3/7/18 12:01 AM, Jeff Law wrote: > > I believe so by nature that the setjmp dominates the longjmp sites and > > thus also dominates the dispatcher. But it's something I want to > > explicitly check before resubmitting. > > Are we sure a setjmp

Re: [PATCH] [AArch64] Update L2 cache size on Falkor's prefetch tuning structure.

2018-03-08 Thread Luis Machado
On 03/01/2018 03:45 PM, Luis Machado wrote: Falkor's prefetch tuning structure still carries the L2 cache size value from early support code. This patch updates it to match the specifications. Even though the prefetcher is currently disabled for Falkor, we have a patch waiting for GCC

Re: [PATCH 2/2] ifcvt: unfixed testcase for 2nd issue within PR tree-optimization/84178

2018-03-08 Thread Richard Biener
On Wed, Mar 7, 2018 at 7:56 PM, David Malcolm wrote: > Here's a testcase for the 2nd issue within PR tree-optimization/84178. > > With -03 -fno-tree-forwprop, trunk and gcc 7 segfault inside update_ssa > when called from version_loop_for_if_conversion when a loop is

Re: [PATCH] Improve boostrap-ubsan config (PR bootstrap/64914).

2018-03-08 Thread Martin Liška
PING^1 On 03/01/2018 12:53 PM, Martin Liška wrote: > On 03/01/2018 12:45 PM, Jakub Jelinek wrote: >> On Thu, Mar 01, 2018 at 12:41:37PM +0100, Martin Liška wrote: >>> I've been running periodically UBSAN bootstrap and as the runtime errors are >>> not causing failure of compiler I haven't noticed

Re: [PATCH][OBVIOUS] Fix ifunc detection.

2018-03-08 Thread Martin Liška
On 03/08/2018 10:15 AM, Martin Liška wrote: > On 03/02/2018 05:38 PM, Thomas Schwinge wrote: >> Hi! >> >> On Fri, 26 Jan 2018 16:24:48 +0100, Martin Liška wrote: >>> This fixes detection of ifunc target capability. >>> I'm going to install the patch. >> >> You could also just have

[PATCH] Fix PR84746

2018-03-08 Thread Richard Biener
The following fixes a bug where we lookup simplified expression results in the ANTIC_IN sets but we've simplified aready translated expressions so that lookup is bogus - we have to lookup in ANTIC_OUT instead. The following does this and makes sure the (partially constructed) set is available.

Re: [PATCH][OBVIOUS] Fix ifunc detection.

2018-03-08 Thread Martin Liška
On 03/02/2018 05:38 PM, Thomas Schwinge wrote: > Hi! > > On Fri, 26 Jan 2018 16:24:48 +0100, Martin Liška wrote: >> This fixes detection of ifunc target capability. >> I'm going to install the patch. > > You could also just have approved the patch I had sent two months before: >

Re: [PR84620] output symbolic entry_view as data2, not addr

2018-03-08 Thread Alexandre Oliva
On Mar 6, 2018, Jakub Jelinek wrote: > I'm afraid I haven't understood yet why we need labels instead of compiler > assigned numbers for the views, The compiler can't determine points at which the insn address changes reliably (or at all). It's impossible in the general

Re: Add "native" as a valid option value for -march= on arm (PR driver/83193).

2018-03-08 Thread Martin Liška
PING^1 On 02/22/2018 01:15 PM, Martin Liška wrote: > On 02/22/2018 11:59 AM, Kyrill Tkachov wrote: >> Hi Martin, >> >> On 22/02/18 08:51, Martin Liška wrote: >>> On 02/21/2018 10:23 AM, Kyrill Tkachov wrote: On arm we also support "native" as a value for -mcpu and -mtune. These are

Re: [PATCH] avoid warning for memcpy to self (PR 83456)

2018-03-08 Thread Richard Biener
On Thu, Mar 8, 2018 at 12:01 AM, Martin Sebor wrote: > I have become convinced that issuing -Wrestrict in gimple-fold > for calls to memcpy() where the source pointer is the same as > the destination causes more trouble than it's worth, especially > when inlining is involved, as

Re: [PATCH 1/2] tree-if-conv.c: fix ICE seen with -fno-tree-forwprop (PR tree-optimization/84178)

2018-03-08 Thread Richard Biener
On Wed, Mar 7, 2018 at 7:56 PM, David Malcolm wrote: > PR tree-optimization/84178 reports a couple of source files that ICE inside > ifcvt when compiled with -03 -fno-tree-forwprop (trunk and gcc 7). > > Both cases involve problems with ifcvt's per-BB gimplified predicates. >

Re: GCC 6 backports

2018-03-08 Thread Martin Liška
On 03/07/2018 10:41 AM, Martin Liška wrote: > Hi. > > Sending GCC 6 branch backports. > Patches can bootstrap on ppc64le-redhat-linux and survives regression tests. > I'm going to install the patches. > > Martin > Hi. There are 4 more patches I've tested. Martin