[PATCH] Fix forwporp pattern (T)(P + A) - (T)P -> (T)A

2014-06-22 Thread Bernd Edlinger
ned overflow in (T)(P + A) - (T)P -> (T)A. Issue a strict overflow warning if appropriate. testsuite/ChangeLog: 2014-06-22 Bernd Edlinger * gcc.c-torture/execute/20140622-1.c: New test. patch-forwprop.diff Description: Binary data

Re: [i386] logical shift right in shrd

2014-06-22 Thread Uros Bizjak
On Sat, Jun 21, 2014 at 6:32 PM, Marc Glisse wrote: > Er, I am sorry, I don't know what happened, but when testing the backport to > 4.9 I got an obvious failure in the testsuite, which I am sure should also > happen on trunk, but somehow I didn't see it (I am almost sure I tested the > right bra

[PATCH] DWARFv5 Emit DW_TAG_atomic_type.

2014-06-22 Thread Mark Wielaard
The following is just a prototype to try out a new qualifier type tag proposed for DWARFv5. There is not even a draft yet of DWARFv5, so this is just based on a proposal that might or might not be adopted and/or changed http://dwarfstd.org/ShowIssue.php?issue=131112.1 I have a corresponding patch

[MIPS, committed] Fix some mips.c warnings

2014-06-22 Thread Richard Sandiford
Fixes unused "mode" and "in_p" argument names. Neither mips_move_to_gpr_cost nor mips_move_from_gpr_cost care about the mode now, so I just removed it. Thanks, Richard gcc/ * config/mips/mips.c (mips_move_to_gpr_cost): Remove mode argument. (mips_move_from_gpr_cost): Likewise.

[wwwdocs] convert contribute.html to https

2014-06-22 Thread Gerald Pfeifer
Convert references to gcc.gnu.org to use https. Shorten textual reference to GCC Bugzilla. Committed. Gerald Index: contribute.html === RCS file: /cvs/gcc/wwwdocs/htdocs/contribute.html,v retrieving revision 1.83 diff -u -r1.83 co

Re: [PATCH 6/6] rs6000: Merge the var_shift yes/no alternatives

2014-06-22 Thread Segher Boessenkool
> (define_insn "rotl3" > - [(set (match_operand:GPR 0 "gpc_reg_operand" "=r,r") > - (rotate:GPR (match_operand:GPR 1 "gpc_reg_operand" "r,r") > - (match_operand:GPR 2 "reg_or_cint_operand" "r,n")))] > + [(set (match_operand:GPR 0 "gpc_reg_operand" "=r") > + (rotate:GPR (m

Re: [C++ Patch] PR 33101

2014-06-22 Thread Paolo Carlini
Hi, On 06/15/2014 03:37 PM, Jason Merrill wrote: On 06/15/2014 01:01 AM, Paolo Carlini wrote: Committed... but, I don't think we are done yet, because it seems to me that DR577 means that in C++11 mode we have to accept the typedef?!? Hmm, apparently so. Might as well apply the DR to C++98 mo

Re: Another AIX Bootstrap failure

2014-06-22 Thread David Edelsohn
The new testcases also declare main() as "void", but "return 0". - David On Fri, Jun 20, 2014 at 10:43 PM, Jan Hubicka wrote: > Index: testsuite/gcc.dg/localalias.c > === > --- testsuite/gcc.dg/localalias.c (revision 0) > +++

Re: [PATCH 1/6] rs6000: Remove "O" alternative from lshrsi3

2014-06-22 Thread David Edelsohn
On Sat, Jun 21, 2014 at 10:46 PM, Segher Boessenkool wrote: > Nothing will ever generate RTL matching this alternative. Maybe long > ago this was needed, but not anymore. Can you provide some reference for that assertion? At some point GCC created shifts with zero shift count. It probably does

Re: [PATCH 1/6] rs6000: Remove "O" alternative from lshrsi3

2014-06-22 Thread Segher Boessenkool
> > Nothing will ever generate RTL matching this alternative. Maybe long > > ago this was needed, but not anymore. > > Can you provide some reference for that assertion? > > At some point GCC created shifts with zero shift count. It probably > does not, but does a generic optimization prevent th

Re: [PATCH 1/6] rs6000: Remove "O" alternative from lshrsi3

2014-06-22 Thread David Edelsohn
On Sat, Jun 21, 2014 at 10:46 PM, Segher Boessenkool wrote: > Nothing will ever generate RTL matching this alternative. Maybe long > ago this was needed, but not anymore. > > Bootstrapped and tested on powerpc64-linux, {-m64,-m64/-mtune=power8, > -m32,-m32/-mpowerpc64}, no regressions. Okay to a

Re: [PATCH 2/6] rs6000: Merge lshrsi3 and lshrdi3

2014-06-22 Thread David Edelsohn
On Sat, Jun 21, 2014 at 10:46 PM, Segher Boessenkool wrote: > For this create a new mode_attr "hH". > > Also change "i" constraints on the shift amount to "n", which better > describes what it really is (GCC takes the integer value of these > operands and does arithmetic on them; symbolic constant

Re: [PATCH 3/6] rs6000: Merge ashlsi3 and ashldi3

2014-06-22 Thread David Edelsohn
On Sat, Jun 21, 2014 at 10:46 PM, Segher Boessenkool wrote: > As the previous patch. > > Bootstrapped and tested on powerpc64-linux, {-m64,-m64/-mtune=power8, > -m32,-m32/-mpowerpc64}, no regressions. Okay to apply? > > > Segher > > > gcc/ > * config/rs6000/rs6000.md (ashlsi3, two anonymo

Re: [PATCH 4/6] rs6000: Merge rotlsi3 and rotldi3

2014-06-22 Thread David Edelsohn
On Sat, Jun 21, 2014 at 10:47 PM, Segher Boessenkool wrote: > This uses the rotl* extended mnemonics instead of the rlw*nm and rld*cl > mnemonics, because they are shorter and more importantly they look the > same for 32-bit and 64-bit. > > Bootstrapped and tested on powerpc64-linux, {-m64,-m64/-m

Re: [PATCH 5/6] rs6000: Merge ashrsi3 and ashrdi3

2014-06-22 Thread David Edelsohn
On Sat, Jun 21, 2014 at 10:47 PM, Segher Boessenkool wrote: > The last (and ugliest) kind of shift. > > Bootstrapped and tested on powerpc64-linux, {-m64,-m64/-mtune=power8, > -m32,-m32/-mpowerpc64}, no regressions. Okay to apply? > > > Segher > > > 2014-06-21 Segher Boessenkool > > gcc/ >

Re: [PATCH 6/6] rs6000: Merge the var_shift yes/no alternatives

2014-06-22 Thread David Edelsohn
On Sat, Jun 21, 2014 at 10:47 PM, Segher Boessenkool wrote: > All instructions that are "var_shift" for some alternative have the shift > amount as operands[2]. > > This patch introduces an attribute "maybe_var_shift". If that is set to > "yes", the default value of "var_shift" is set based on th

[doc] Remove duplicate -Wmaybe-uninitialized

2014-06-22 Thread Marc Glisse
Hello, a trivial patch to remove a duplicated option, you can see the second one 4 lines below in the patch. (the mixed use of single or double spaces in this list is strange) This was included in the bootstrap of another patch. 2014-06-23 Marc Glisse * doc/invoke.texi (Warning O

Warn when returning the address of a temporary (middle-end) v2

2014-06-22 Thread Marc Glisse
Hello, I followed the advice in this discussion: https://gcc.gnu.org/ml/gcc-patches/2014-04/msg00269.html and here is a new patch. I made an effort to isolate a path in at least one subcase so it doesn't look too strange that the warning is in this file. Computing the dominance info just to tw

Re: [PATCH] Fix up -march=native handling under KVM (PR target/61570)

2014-06-22 Thread Uros Bizjak
On Sat, Jun 21, 2014 at 8:07 PM, Jakub Jelinek wrote: >> > --- gcc/config/i386/driver-i386.c.jj2014-05-14 14:45:54.0 +0200 >> > +++ gcc/config/i386/driver-i386.c 2014-06-20 18:59:57.805006358 +0200 >> > @@ -745,6 +745,11 @@ const char *host_detect_local_cpu (int a >> >

Re: Another AIX Bootstrap failure

2014-06-22 Thread Jan Hubicka
> The new testcases also declare main() as "void", but "return 0". I fixed that with previous commit too (what happened is that I managed to copy wrong version of the files while testing that they fail on AIX. They indeed did fail, but for wrong versoin) Honza

Re: [C/C++ PATCH] Add -Wlogical-not-parentheses (PR c/49706)

2014-06-22 Thread Gerald Pfeifer
On Mon, 2 Jun 2014, Marek Polacek wrote: > * c-typeck.c (parser_build_binary_op): Warn when logical not is used > on the left hand side operand of a comparison. This... > +/* Warn about logical not used on the left hand side operand of a comparison. ...and this... > + warning_at (

Re: [patch] Update libstdc++ FAQ and ensure stable anchors in HTML docs

2014-06-22 Thread Gerald Pfeifer
On Mon, 9 Jun 2014, Jonathan Wakely wrote: This fairly tedious patch refreshes the FAQ, including adding some notes saying "This answer is old and probably no longer relevant" to several answers referring to problems in the GCC 3.x era. I'm wondering, should those old items be removed? GCC 3.x

[PATCH] Only transform rotate to rotatert and v.v. if target has both

2014-06-22 Thread Segher Boessenkool
Many targets do not have both rotate and rotatert. Of the 47 targets in the tree, 17 have both, 9 have only rotate, 2 have only rotatert, and 19 have neither (this is based on "grep -wil" so it can be slightly off). rs6000 has only rotate, and mips has only rotatert. For such targets simplifying

Re: [patch, mips] delete bit-rotten ADJUST_REG_ALLOC_ORDER definition

2014-06-22 Thread Sandra Loosemore
On 05/14/2014 12:49 PM, Richard Sandiford wrote: Jeff Law writes: On 05/13/14 14:11, Sandra Loosemore wrote: 2014-05-13 Catherine Moore Sandra Loosemore gcc/ * config/mips/mips.c (mips_order_regs_for_local_alloc): Delete. * config/mips/mips.h (ADJUST_REG_ALLO

RE: [Committed] [PATCH] PR61123 : Fix the ABI mis-matching error caused by LTO

2014-06-22 Thread Hale Wang
> -Original Message- > From: Jakub Jelinek [mailto:ja...@redhat.com] > Sent: 2014年6月21日 5:24 > To: Hale Wang > Cc: 'Mike Stump'; Richard Biener; Mike Stump; GCC Patches > Subject: Re: [Committed] [PATCH] PR61123 : Fix the ABI mis-matching error > caused by LTO > > On Fri, Jun 20, 2014 at

[Committed] [PATCH, loop2_invariant] Pre-check invariants

2014-06-22 Thread Zhenqiang Chen
On 18 June 2014 05:32, Jeff Law wrote: > On 06/11/14 03:35, Zhenqiang Chen wrote: >> >> >> Thanks for the comments. df_live seams redundant. >> >> With flag_ira_loop_pressure, the pass will call df_analyze () at the >> beginning, which can make sure all the DF info are correct. >> >> Can we guaran

Re: [PATCH] Trust TREE_ADDRESSABLE

2014-06-22 Thread Jan Hubicka
> > On Fri, 13 Jun 2014, Jan Hubicka wrote: > > > > > > > > > > When you extract the address and use it. For example when you > > > > do auto-parallelization and outline a part of your function it > > > > passes arrays as addresses. > > > > > > > > Or if you start to introduce address induction

Add used_by_single_function flag for static variables

2014-06-22 Thread Jan Hubicka
Hi, this is patch to add the used_by_single_function flag to varpool. In full generality it is a simple dataflow problem, since the variable may be referred by other variables as long as all of them are used by one function only. I have bootstrapped/regtested it on x86_64-linux and lto-bootstr

[PATCH, PR61554] ICE during CCP

2014-06-22 Thread Chung-Lin Tang
Hi Richard, In this change: https://gcc.gnu.org/ml/gcc-patches/2014-06/msg01278.html where substitute_and_fold() was changed to use a dom walker, the calls to purge dead EH edges during the walk can alter the dom-tree, and have chaotic results; the testcase in PR 61554 has some blocks traversed t

Re: Move DECL_INIT_PRIORITY/FINI_PRIORITY to symbol table

2014-06-22 Thread Jan Hubicka
> Jan Hubicka writes: > > > this patch moves init and fini priorities to symbol table instead of trees. > > They are already in on-side hashtables, but the hashtables are now maintaned > > by symbol table. This is needed for correctness with LTO. > > This breaks gcc.dg/initpri3.c. The construc

[PATCH, 1/10] two hooks for conditional compare (ccmp)

2014-06-22 Thread Zhenqiang Chen
Hi, The patch adds two hooks for backends to generate conditional compare instructions. * gen_ccmp_first is for the first compare. * gen_ccmp_next is for for the following compares. The patch is separated from https://gcc.gnu.org/ml/gcc-patches/2014-02/msg01407.html. And the original discussion

[PATCH, 2/10] prepare ccmp

2014-06-22 Thread Zhenqiang Chen
Hi, The patch makes several functions global, which will be used when expanding ccmp instructions. The other change in this patch is to check CCMP when turning code into jumpy sequence. OK for trunk? Thanks! -Zhenqiang ChangeLog: 2014-06-23 Zhenqiang Chen * cfgexpand.c (expand_gimp

[PATCH, 3/10] skip swapping operands used in ccmp

2014-06-22 Thread Zhenqiang Chen
Hi, Swapping operands in a ccmp will lead to illegal instructions. So the patch disables it in simplify_while_replacing. The patch is separated from https://gcc.gnu.org/ml/gcc-patches/2014-02/msg01407.html. To make it clean. The patch adds two files: ccmp.{c,h} to hold all new ccmp related funct