[PATCH, i386]: Handle variable shifts in STV pass (PR 70799)

2017-04-23 Thread Uros Bizjak
Hello! Attached patch adds handling of variable shifts in STV pass. The patch detects when we are processing QImode count register of a scalar shift instruction, and zero-extends it from QImode to DImode, either from scalar register or vector register. The extension is necessary, since scalar shif

Re: [patch, libgfortran] PR80484 Three syntax errors involving derived-type I/O

2017-04-23 Thread Paul Richard Thomas
Hi Jerry, OK for trunk and 7-branch, when it reopens. Thanks for keeping Walt happy :-) Cheers Paul On 23 April 2017 at 03:28, Jerry DeLisle wrote: > Hi all, > > The attached patch fixes these issues. > > Regression tested on x86_64-pc-linux-gnu. New test attached. > > OK for Trunk (8)? I th

Re: [Patch, Fortran] PR 80121: Memory leak with derived-type intent(out) argument

2017-04-23 Thread Janus Weil
Hi Thomas, >> the patch in the attachment fixes a memory leak by auto-deallocating >> the allocatable components of an allocatable intent(out) argument. >> >> Regtests cleanly on x86_64-linux-gnu. Ok for trunk? > > OK for trunk. thanks for the review! Committed as r247083. > Also (because this

Re: [PATCH][ PR rtl-optimization/79286] Drop may_trap_p exception to testing dominance in update_equiv_regs

2017-04-23 Thread Bernd Edlinger
Hi Jeff, this patch tries to fix the handling of pic_offset_rtx + const(unspec(symbol_ref)+ const_int) in may_trap_p, and restores the original state of affairs in update_equiv_regs. What do you think is it OK to extract the symbol_ref out of the unspec in this way, or is does it need a target

[PATCH] Finish implementing P0426R1 "Constexpr for std::char_traits" for C++17

2017-04-23 Thread Pedro Alves
Hi! As I had suggested in PR c++/80265, here's a patch that uses __builtin_constant_p to tell whether we can defer to a constexpr algorithm, which avoids having to wait for compiler support. Unfortunately I ran out of cycles today to run a full bootstrap/regtest cycle, but constexpr_functions_c++

Re: [PATCH] Finish implementing P0426R1 "Constexpr for std::char_traits" for C++17

2017-04-23 Thread Pedro Alves
On 04/23/2017 06:54 PM, Pedro Alves wrote: > Hi! > > As I had suggested in PR c++/80265, here's a patch that uses > __builtin_constant_p to tell whether we can defer to a constexpr > algorithm, which avoids having to wait for compiler support. > > Unfortunately I ran out of cycles today to run a

[PATCH] Simplify quoting in diagnostics of C++ frontend

2017-04-23 Thread Volker Reichelt
Hi, the following patch simplifies quoting in diagnostics by using %qD instead of %<%D%> etc. Bootstrapped and regtested on x86_64-pc-linux-gnu. Btw, line 14563 in pt.c error ("enumerator value %E is outside the range of underlying " contains an unquoted %E. Shouldn't that be replaced with %qE

Let tree_single_nonzero_warnv_p use VRP

2017-04-23 Thread Marc Glisse
Hello, this patches teaches tree_expr_nonzero_warnv_p to handle SSA_NAME using range information and known (non-)zero bits, by delegating to expr_not_equal_to which already knows how to handle all that. This makes one strict overflow warning disappear. It isn't particularly surprising, since

X /[ex] 4 < Y /[ex] 4

2017-04-23 Thread Marc Glisse
Hello, we were missing this simplification on comparisons. Note that the testcase still does not simplify as much as one might like, we don't turn x+z gcc/ * match.pd (X/[ex]C CMP Y/[ex]C): New transformation. gcc/testsuite/ * gcc.dg/tree-ssa/cmpexactdiv-2.c: New file. -- Marc

Re: X /[ex] 4 < Y /[ex] 4

2017-04-23 Thread Jakub Jelinek
On Mon, Apr 24, 2017 at 08:24:48AM +0200, Marc Glisse wrote: > --- gcc/match.pd (revision 247083) > +++ gcc/match.pd (working copy) > @@ -1028,20 +1028,27 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > (simplify >(cmp (mult:c @0 @1) (mult:c @2 @1)) >(if (INTEGRAL_TYPE_P (TREE_TYPE (@