Re: rfa: shrink rtl_bb_info

2012-05-04 Thread Richard Guenther
On Thu, May 3, 2012 at 6:05 PM, Michael Matz wrote: > Hi, > > Richi made some good points about my last patch, related to struct > rtl_bb_info.  Even though it's not that important to shrink it (only few > BBs are in RTL mode) there's no need to waste space.  My last patch > created an unused poin

Re: [PATCH] Improve COND_EXPR expansion

2012-05-04 Thread Andrew Pinski
On Tue, May 1, 2012 at 9:45 AM, Richard Henderson wrote: > On 04/30/2012 08:22 PM, Andrew Pinski wrote: >> >> * expr.c (convert_tree_comp_to_rtx): New function. >> (expand_expr_real_2): Try using conditional moves for COND_EXPRs if they >> exist. >> * config/i386/i386.c (ix86_expand_int_movcc): Di

Re: [PATCH] Improve COND_EXPR expansion

2012-05-04 Thread Andrew Pinski
On Fri, May 4, 2012 at 12:29 AM, Andrew Pinski wrote: > On Tue, May 1, 2012 at 9:45 AM, Richard Henderson wrote: >> On 04/30/2012 08:22 PM, Andrew Pinski wrote: >>> >>> * expr.c (convert_tree_comp_to_rtx): New function. >>> (expand_expr_real_2): Try using conditional moves for COND_EXPRs if they

RE: [PING] iwMMXt patches

2012-05-04 Thread Xinyu Qi
> -Original Message- > From: Matt Turner [mailto:matts...@gmail.com] > To: Xinyu Qi > Cc: Ramana Radhakrishnan; GCC Patches > Subject: Re: [PING] iwMMXt patches > > On Thu, May 3, 2012 at 12:59 AM, Xinyu Qi wrote: > >> From: Matt Turner [mailto:matts...@gmail.com] > >> To: Xinyu Qi > >> C

Re: PR c++/24985 caret diagnostics for macro expansions

2012-05-04 Thread Dodji Seketeli
Manuel López-Ibáñez writes: > This patch enables caret diagnostics for macro expansions. So now we will get: > > /home/manuel/macro-clang.c:2:91: error: invalid operands to binary < > (have ‘struct mystruct’ and ‘float’) > #define MYMAX(A,B) __extension__ ({ __typeof__(A) __a = (A); > __typeof__

Re: improve collect2 to preserve a RO output as the linker does

2012-05-04 Thread Olivier Hainque
>> * collect2.c (may_unlink_output_file): New global. ... > This is OK. Installed, thanks :)

Re: fix spec function evaluations part of an outer string construction

2012-05-04 Thread Olivier Hainque
On May 3, 2012, at 22:50 , Joseph S. Myers wrote: >> -* gcc.c (eval_spec_function): Finalize/restore the current string >> obstack state as part of the context push/pop operations. > > OK. Installed, thanks :)

RE: Patch to enable --with-multilib-list for arm-none-eabi target

2012-05-04 Thread Terry Guo
Hello Joseph, Can you help to review this patch? The basic idea is to provide a set of predefined Multilib and enable user to select the required ones from --with-multilib-list. BR, Terry > -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org]

Re: patch ping: Add static branch predict heuristic of comparing IV to loop_bound variable

2012-05-04 Thread Jan Hubicka
> gcc/ChangeLog > 2012-05-04 Dehao Chen > > * predict.c (find_qualified_ssa_name): New > (find_ssa_name_in_expr): New > (find_ssa_name_in_assign_stmt): New > (is_comparison_with_loop_invariant_p): New > (is_bound_expr_similar): New > (predict_iv_comparison):

Re: [Patch, libfortran] Fix handling of temporary files

2012-05-04 Thread Tobias Burnus
Dear Janne, sorry for the really slow review. Janne Blomqvist wrote: > the attached patch implements some fixes for handling STATUS="SCRATCH" files. ... > Currently, we check [...] but not the POSIX and GNU standard TMPDIR [...] > If the program is privileged, we shouldn't trust path style enviro

Re: [patch] Fix PR target/48496 #2

2012-05-04 Thread Eric Botcazou
Jakub, > 2012-04-26 Eric Botcazou > > PR target/48496 > * recog.c (constrain_operands): If extra constraints are present, > accept pseudo-registers with equivalent memory locations during reload. Is this version OK with you? -- Eric Botcazou

Re: [patch] Fix PR target/48496 #2

2012-05-04 Thread Jakub Jelinek
On Fri, May 04, 2012 at 12:19:39PM +0200, Eric Botcazou wrote: > > 2012-04-26 Eric Botcazou > > > > PR target/48496 > > * recog.c (constrain_operands): If extra constraints are present, > > accept pseudo-registers with equivalent memory locations during reload. > > Is this versi

[PATCH] Fix PR53214

2012-05-04 Thread Richard Guenther
This fixes PR53214 - we should not mark flto-report, fwpa or ftrans as Optimization, otherwise you can control them with the optimize attribute and they get munged when streamed to ltrans units from WPA. Will commit this to trunk and 4.7 after giving it a round of testing. Richard. 2012-05-04

[patch] Fix plugin-enabled LTO with cross-native build

2012-05-04 Thread Eric Botcazou
Hi, we ran into a problem with plugin-enabled LTO and a cross-native build of the compiler for Windows: collect2.c isn't able to find the linker in LTO mode. The reason is that, at configure time, PLUGIN_LD is set to the $gcc_cv_ld, but the machinery in collect2.c is set up for suffixes instead:

Re: [Patch, libfortran] Fix handling of temporary files

2012-05-04 Thread Janne Blomqvist
On Fri, May 4, 2012 at 12:49 PM, Tobias Burnus wrote: > Dear Janne, > > sorry for the really slow review. > > Janne Blomqvist wrote: >> the attached patch implements some fixes for handling STATUS="SCRATCH" files. > ... >> Currently, we check [...] but not the POSIX and GNU standard TMPDIR [...] >

[PATCH] Fix PR50602

2012-05-04 Thread Richard Guenther
-freg-struct-return and -fpcc-struct-return are two common ABI options which have to be consistent in all input files when doing LTO (inconsistencies may lead to ICEs and "miscompiles"). Their setting needs to be determined from the linker inputs and its best to ignore those on the linker command

[PATCH] Fix PR53168

2012-05-04 Thread Richard Guenther
This fixes PR53168 - and removes some of the more odd code in phi-translation (I've added a testcase to make sure the intended PREs still happen). There is still some issues in phi translation I believe, but those are for later. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to tru

Re: [C++ Patch] fix semi-random template specialization ICE

2012-05-04 Thread Martin Jambor
Hi, On Thu, May 03, 2012 at 03:17:23PM -0300, Alexandre Oliva wrote: > I've recently started getting “libstdc++-v3/include/functional:2057:63: > internal compiler error: tree check: expected tree_vec, have error_mark > in comp_template_args_with_info, at cp/pt.c:7038” on i686-linux-gnu, > building

Re: [Patch, Fortran] PR53111 - fix -std=f95 diagnostic regression (constructor patch)

2012-05-04 Thread Paul Richard Thomas
Dear Tobias, The patch is OK for 4.7 and trunk - thanks. The commit of the PR41600 is delayed until tomorrow or Sunday because of PR53191. I have regtested a fix for it and, since it is 'obvious' I will commit it with the main patch. In fact, it extends the constraint C614 (see resolve_ref) to

[PATCH libcpp]: Avoid crash in interpret_float_suffix

2012-05-04 Thread Tristan Gingold
Hi, the function libcpp/expr.c:interpret_float_suffix allows its argument LEN to be 0, but in this case it tries to read before the buffer S. It is not a real issue, except in case of overflow: on VMS with 64bit pointers but 32bit size_t, the following code: s[len-1] is evaluated as s[0xf

[PATCH]: handle size_t /= ptr size in tree-ssa-strlen.c

2012-05-04 Thread Tristan Gingold
Hi, get_string_length assumes that precision of size_t is the same as precision of a pointer, which isn't always true at least on VMS. This patch simply add a conversion in case of mismatch. Tested on ia64/VMS by cross-bootstrapping. Bootstrapped and regtested on i386/GNU Linux. Ok for trunk ?

Re: [Patch, Fortran] PR53175 - Fix another fallout of the TREE_PUBLIC=0 module variable patch

2012-05-04 Thread Paul Richard Thomas
Dear Tobias, This is OK for trunk. Thanks for the patch. Paul On 3 May 2012 20:41, Tobias Burnus wrote: > A PRIVATE module variable, which is used in the specification expression of > a function result variable cannot be TREE_PUBLIC()=0, unless the function > itself is PRIVATE and also not acc

Re: [PATCH 2/2] Minor refactoring of tree-vect-patterns.c

2012-05-04 Thread Ulrich Weigand
Richard Guenther wrote: > On Mon, Apr 30, 2012 at 6:19 PM, Ulrich Weigand wrote: > > Hello, > > > > as a second step in refactoring this patch introduces a routine > > vect_find_single_use to determine whether a defining statement > > has one single use within the current vectorization domain. > >

RE: Patch to enable --with-multilib-list for arm-none-eabi target

2012-05-04 Thread Joseph S. Myers
On Fri, 4 May 2012, Terry Guo wrote: > Hello Joseph, > > Can you help to review this patch? The basic idea is to provide a set of > predefined Multilib and enable user to select the required ones from > --with-multilib-list. I'd think it ought to be ARM target maintainers who review this patch.

Re: [PATCH]: handle size_t /= ptr size in tree-ssa-strlen.c

2012-05-04 Thread Richard Guenther
On Fri, May 4, 2012 at 2:27 PM, Tristan Gingold wrote: > Hi, > > get_string_length assumes that precision of size_t is the same as precision > of a pointer, which isn't always true at least on VMS. > This patch simply add a conversion in case of mismatch. > > Tested on ia64/VMS by cross-bootstrap

[patch] PR tree-optimization/52633 - ICE due to vectorizer pattern detection collision

2012-05-04 Thread Ulrich Weigand
Richard Guenther wrote: > On Tue, 24 Apr 2012, Ulrich Weigand wrote: > > However, even so, it might actually be preferable to just handle such > > cases within vect_recog_widen_shift_pattern itself. Indeed, the routine > > already looks for another subsequent type cast, in order to handle > > unsi

Re: [PATCH]: handle size_t /= ptr size in tree-ssa-strlen.c

2012-05-04 Thread Tristan Gingold
On May 4, 2012, at 2:34 PM, Richard Guenther wrote: > On Fri, May 4, 2012 at 2:27 PM, Tristan Gingold wrote: >> Hi, >> >> get_string_length assumes that precision of size_t is the same as precision >> of a pointer, which isn't always true at least on VMS. >> This patch simply add a conversion

[PATCH] Properly check result of compute_all_dependences in prefetching

2012-05-04 Thread Richard Guenther
This is the last caller of compute_all_dependences that does not check its return value. Currently bootstrapping and testing on x86_64-unknown-linux-gnu. Richard. 2012-05-04 Richard Guenther * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Return whether we failed to

Re: [patch] PR tree-optimization/52633 - ICE due to vectorizer pattern detection collision

2012-05-04 Thread Richard Guenther
On Fri, 4 May 2012, Ulrich Weigand wrote: > Richard Guenther wrote: > > On Tue, 24 Apr 2012, Ulrich Weigand wrote: > > > However, even so, it might actually be preferable to just handle such > > > cases within vect_recog_widen_shift_pattern itself. Indeed, the routine > > > already looks for anot

Re: strengthen protection against REG_EQUIV/EQUAL on !REG set

2012-05-04 Thread Olivier Hainque
Hello Richard, Re $subject, at http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01515.html You suggested: >> Would be nice to use a single function that knows about the extra >> contraints here. Maybe something like the attached? << 2012-04-24 ... * rtl.h (set_for_reg_notes): Declare.

Re: patch ping: Add static branch predict heuristic of comparing IV to loop_bound variable

2012-05-04 Thread Dehao Chen
Hi, Honza, Thanks for the prompt response. Attached is the updated patch. Passed bootstrap and all regression tests. Thanks, Dehao Index: gcc/testsuite/gcc.dg/predict-3.c === --- gcc/testsuite/gcc.dg/predict-3.c(revision 0) +++

Re: [PATCH libcpp]: Avoid crash in interpret_float_suffix

2012-05-04 Thread Dodji Seketeli
Tristan Gingold a écrit: > the function libcpp/expr.c:interpret_float_suffix allows its argument > LEN to be 0, but in this case it tries to read before the buffer S. > It is not a real issue, except in case of overflow: on VMS with 64bit > pointers but 32bit size_t, the following code: s[len-1]

Re: strengthen protection against REG_EQUIV/EQUAL on !REG set

2012-05-04 Thread Richard Sandiford
Olivier Hainque writes: > Hello Richard, > > Re $subject, at http://gcc.gnu.org/ml/gcc-patches/2012-04/msg01515.html > > You suggested: >>> Would be nice to use a single function that knows about the extra >>> contraints here. Maybe something like the attached? > > << 2012-04-24 ... > > *

[Committed] S/390: Fix insn conditions of memory op patterns

2012-05-04 Thread Andreas Krebbel
Hi, the attached patch fixes a segfault which might occur when evaluating the insn conditions of three memory operation patterns in the s390 back-end after reloaded decided to pick an alternative where clobbering a scratch isn't necessary. Fixed by moving the mode check from the insn condition in

Re: [C++ Patch] PR 53166

2012-05-04 Thread Jason Merrill
OK. Jason

libgo patch committed: Update to Go 1.0.1 release

2012-05-04 Thread Ian Lance Taylor
This patch updates libgo to the Go 1.0.1 release. This is a relatively small collection of bug fixes, with no API changes. Bootstrapped and ran Go testsuite on x86_64-unknown-linux-gnu. Committed to mainline and 4.7 branch. Ian diff -r a152568e294a libgo/MERGE --- a/libgo/MERGE Thu May 03 22:2

Re: PR c++/24985 caret diagnostics for macro expansions

2012-05-04 Thread Jason Merrill
On 05/03/2012 08:30 PM, Manuel López-Ibáñez wrote: Do you have an opinion about the macro unwinder? I agree. Jason

Re: [Patch, fortran] PR 49010/24518 MOD/MODULO fixes, take 2

2012-05-04 Thread Mikael Morin
On 02/05/2012 21:22, Janne Blomqvist wrote: > PING #2 > > On Thu, Apr 26, 2012 at 12:20 AM, Janne Blomqvist > wrote: >> PING! >> >> On Thu, Apr 19, 2012 at 00:46, Janne Blomqvist >> wrote: >>> Hi, >>> >>> the attached patch implements a few fixes and cleanups for the MOD and >>> MODULO intrinsic

Re: strengthen protection against REG_EQUIV/EQUAL on !REG set

2012-05-04 Thread Olivier Hainque
On May 4, 2012, at 16:16 , Richard Sandiford wrote: > Sorry, was going to test this earlier, but got distracted by > lower-subreg stuff. No problem at all. I just happened to have had an opportunity to test as part of a series of miscellaneous other submissions. > I need to fix the subreg ha

Re: [PATCH] PR preprocessor/7263 - Avoid pedantic warnings on system headers macro tokens

2012-05-04 Thread Jason Merrill
It seems like for most of the declspecs, having both the location and a flag/count is unnecessary; instead of checking the flag, we can check whether the location is set. That won't work for the "long long long" check, but it should work for the others. You'll need to change _check_decl_spec

Re: [PATCH] PR preprocessor/7263 - Avoid pedantic warnings on system headers macro tokens

2012-05-04 Thread Dodji Seketeli
Jason Merrill writes: >> + decl_specs->locations[cpdw_builtin_type_spec] = location; >>if (!decl_specs->type) >> { >>decl_specs->type = type_spec; >>decl_specs->type_definition_p = false; >> - decl_specs->type_location = location; >> + decl_specs->locat

[PATCH, i386]: Fix PR 53228, target attributes in libcpp/lex.c cause illegal instructions to be used elsewhere

2012-05-04 Thread Uros Bizjak
Hello! There is a problem with TARGET_CMOVE handling, where in ix86_option_override_internal, we set TARGET_CMOVE behind option processing system back. This flag is not cleared during target attribute handling, and we emit CMOV elsewhere. Attached patch redefines TARGET_CMOVE as dynamic check, av

Re: [PATCH] Take branch misprediction effects into account when RTL loop unrolling (issue 6099055)

2012-05-04 Thread davidxl
It might be better to separate the data structure name change (niter_desc to loop_desc) into a different patch. Other than that, the patch looks good to me (for google branches only) Unroller really needs more heuristics like this instead of just looking at size. David http://codereview.appspot

[PATCH C/C++] Enable -Wunused-local-typedefs when -Wall or -Wunused is on

2012-05-04 Thread Dodji Seketeli
Hello, Now that the libstdc++ testsuite is run with -ftrack-macro-location by default, this patch triggers the -Wunused-local-typedefs warning when -Wunused (and -Wall) is turned on. The patch has been reviewed and accepted[1] a while ago, but was waiting for the -ftrack-macro-expansion work to g

Re: [PATCH C/C++] Enable -Wunused-local-typedefs when -Wall or -Wunused is on

2012-05-04 Thread Paolo Carlini
On 05/04/2012 06:40 PM, Dodji Seketeli wrote: Hello, Now that the libstdc++ testsuite is run with -ftrack-macro-location by default, this patch triggers the -Wunused-local-typedefs warning when -Wunused (and -Wall) is turned on. Yeah!!! Paolo.

Re: [PATCH] Improve COND_EXPR expansion

2012-05-04 Thread Richard Henderson
On 05/04/12 00:30, Andrew Pinski wrote: > +static rtx > +expand_cond_expr_using_cmove (tree treeop0, tree treeop1, tree treeop2) > +{ > +#ifdef HAVE_conditional_move You'll need ATTRIBUTE_UNUSED markers here. Otherwise ok. r~

Merge from gcc-4_7-branch to gccgo branch

2012-05-04 Thread iant
I've merged revision 187165 from gcc-4_7-branch to the gccgo branch. Ian

[patch] Remove ATTR_FLAGs for branch probabilities

2012-05-04 Thread Steven Bosscher
Hello, This patch removes some unused ATTR_FLAG values, that were added by Jeff in r3904 (sic) but apparently have never been used. The purpose of the flags is to pass an indication for the probability that a branch is taken to the "define_delay"s, but only the HP-PA port uses ATTR_FLAG, and even

Re: [PATCH] PR preprocessor/7263 - Avoid pedantic warnings on system headers macro tokens

2012-05-04 Thread Jason Merrill
On 05/04/2012 12:32 PM, Dodji Seketeli wrote: Jason Merrill writes: + decl_specs->locations[cpdw_builtin_type_spec] = location; if (!decl_specs->type) { decl_specs->type = type_spec; decl_specs->type_definition_p = false; - decl_specs->type_loca

Re: fix mem+32760 ICE on powerpc - provide/use predicates weaker than mode_dependent_address_p

2012-05-04 Thread David Edelsohn
This is achieved by the introduction of a TARGET_MAY_NARROW_ACCESS target hook, which defaults to !mode_dependent_address_p and is redefined for powerpc. The patch uses this hook directly instead of the former predicate in a couple of places where this was the intent already, as well as new "valid_

Re: [patch] Remove ATTR_FLAGs for branch probabilities

2012-05-04 Thread Richard Henderson
On 05/04/12 11:08, Steven Bosscher wrote: > * rtl.def (ATTR_FLAG): Remove probability indicating flags. > * genattr.c (main): Remove ATTR_FLAG_likely, ATTR_FLAG_unlikely, > ATTR_FLAG_very_likely, and ATTR_FLAG_very_unlikely. > * reorg.c (get_jump_flags): Do not set the remov

Go patch committed: Fix parse of for with possible composite literal

2012-05-04 Thread Ian Lance Taylor
This patch to the Go frontend fixes a bad parse. For code like for first := true; first; first = false { the frontend would erroneously assume that "false {" could be the start of a composite literal. It can't be, because composite literals in a for statement must be parenthesized. Bootstrap

[patch] Make reload_cse_regs static

2012-05-04 Thread Steven Bosscher
Hello, This patch makes reload_cse_regs static because it is never called outside of postreload.c. Will commit next week, after the usual testing and if no-one objects. Ciao! Steven * postreload.c (reload_cse_regs): Make static. * reload.h (reload_cse_regs): Remove prototype. I

Re: [patch] PR29442 - split insn-attrtab.c in three parts

2012-05-04 Thread Richard Henderson
On 05/04/12 06:54, Steven Bosscher wrote: > Attached is another attempt. It's a much larger patch because I've now > had to change all write_* functions in genattrtab.c to pass around a > FILE pointer. But it's not a gross as the first attempt. Hopefully you > agree :-) I do agree! > Bootstrapped

Another merge from gcc-4_7-branch to gccgo

2012-05-04 Thread Ian Lance Taylor
I have merged gcc-4_7-branch revision 187177 to gccgo branch. Ian

[C++ Patch] Minor cxx_eval_constant_expression clean-up

2012-05-04 Thread Paolo Carlini
Hi, I was having a look to c++/52282 and noticed the this code can be tidied a little bit (similarly to case ADDR_EXPR). Patch tested x86_64-linux. Ok? Thanks, Paolo. / 2012-05-04 Paolo Carlini * semantics.c (cxx_eval_constant_expression, case CONVERT_EXPR): T

Re: [PATCH 2/2] Minor refactoring of tree-vect-patterns.c

2012-05-04 Thread Ian Lance Taylor
On Fri, May 4, 2012 at 5:30 AM, Ulrich Weigand wrote: > Richard Guenther wrote: >> On Mon, Apr 30, 2012 at 6:19 PM, Ulrich Weigand wrote: >> > Hello, >> > >> > as a second step in refactoring this patch introduces a routine >> > vect_find_single_use to determine whether a defining statement >> >

Re: fix mem+32760 ICE on powerpc - provide/use predicates weaker than mode_dependent_address_p

2012-05-04 Thread Olivier Hainque
On May 4, 2012, at 20:42 , David Edelsohn wrote: > I cannot approve the common parts of the patch, but the rs6000 parts are okay. That's a good start, Thanks! > The new comment in rs6000_mode_dependent_address adapted from the > original comment above the hook should mention VSX in addition to

Re: [C++ Patch] Minor cxx_eval_constant_expression clean-up

2012-05-04 Thread Jason Merrill
OK. Jason

[PATCH] Take branch misprediction effects into account when RTL loop unrolling (issue6099055)

2012-05-04 Thread Teresa Johnson
On David's suggestion, I have removed the changes that rename niter_desc to loop_desc from this patch to focus the patch on the unrolling changes. I can submit a cleanup patch to do the renaming as soon as this one goes in. Bootstrapped and tested on x86_64-unknown-linux-gnu. Ok for trunk? Thank

Re: [C Patch]: pr52543

2012-05-04 Thread Georg-Johann Lay
Mike Stump schrieb: On May 3, 2012, at 12:50 PM, Georg-Johann Lay wrote: It's hardly possible to write proper rtx_costs for SET: 1) What should be the cost of (const_int 1) if you don't see the machine mode? Is it QI, is it HI, is it SI or whatever? You can choose to see the complete express