[Jiří Paleček] [PATCH][C++] Fix constant reference in a lambda (PR c++/53488)

2012-08-27 Thread Dodji Seketeli
Let's CC Jason. ---BeginMessage--- Hello, I've been investigating a bug in gcc I came across recently and after some difficulties, I have produced a patch that actually fixes that behavior. However, I don't think the patch is very good and I would really appreciate your help in making it

PING^2: [PATCH] PR preprocessor/53469 - argument tokens of _Pragma miss virtual location

2012-08-27 Thread Dodji Seketeli
PING^2. Dodji Seketeli do...@redhat.com writes: Hello, Consider this short test snippet: -8--- #define STRINGIFY(x) #x #define TEST(x) \ _Pragma(STRINGIFY(GCC diagnostic ignored -Wunused-local-typedefs)) \ typedef int myint;

Re: random numbers in bulk

2012-08-27 Thread Marc Glisse
On Sun, 26 Aug 2012, Ulrich Drepper wrote: On Sun, Aug 26, 2012 at 1:36 PM, Jonathan Wakely jwakely@gmail.com wrote: But I've just seen Paolo's suggestion for a __generate_impl that both use, and I prefer that idea. How about the following. I introduced a __generate_impl() member

Re: PING^2: [PATCH] PR preprocessor/53469 - argument tokens of _Pragma miss virtual location

2012-08-27 Thread Jakub Jelinek
On Mon, Aug 27, 2012 at 09:52:04AM +0200, Dodji Seketeli wrote: PING^2. This is ok for trunk. Thanks. Bootstrapped and tested on x86_64-unknown-linux-gnu against trunk. libcpp/ PR preprocessor/53469 * directives.c (do_pragma): Use the virtual location for the pragma

[Patch, test] Enable to prune warnings for tests defined in one exp file

2012-08-27 Thread Terry Guo
Hello, This patch intends to provide a chance to prune common warning messages for tests defined in an exp file. It can avoid adding dg-prune to such cases one by one. The story behind this patch is that when torture cases in arm.exp with various arch/cpu options, there are always warnings on

Re: random numbers in bulk

2012-08-27 Thread Paolo Carlini
On 08/27/2012 02:44 AM, Ulrich Drepper wrote: On Sun, Aug 26, 2012 at 1:36 PM, Jonathan Wakely jwakely@gmail.com wrote: But I've just seen Paolo's suggestion for a __generate_impl that both use, and I prefer that idea. How about the following. I introduced a __generate_impl() member

Re: random numbers in bulk

2012-08-27 Thread Paolo Carlini
On 08/27/2012 11:46 AM, Paolo Carlini wrote: (the advance patch is also pending, I guess). I meant discard of course. Paolo.

[SH] mov[si,hi]_index_disp

2012-08-27 Thread Christian Bruel
Hi Oleg, Your movhi_index_disp and movsi_index_disp split patterns match several times with the same bodies and names. I suppose it is a merge glitch during your commit ? Cheers Christian

Re: [Patch, Fortran] Plug memory leaks; fix tree-check ICE for PR

2012-08-27 Thread Tobias Burnus
On 08/26/2012 08:12 PM, Tobias Burnus wrote: This patch fixes one ICE and several memory leaks. But there are more. I have now committed the patch with the following additional patch * module.c (mio_symbol): Don't increase sym-refs for its use in sym-formal_ns-proc_name. The

Re: [SH] mov[si,hi]_index_disp

2012-08-27 Thread Oleg Endo
On 27 Aug 2012, at 12:55, Christian Bruel christian.br...@st.com wrote: Hi Oleg, Your movhi_index_disp and movsi_index_disp split patterns match several times with the same bodies and names. I suppose it is a merge glitch during your commit ? Hm, it seems there is a typo in the name of

Re: random numbers in bulk

2012-08-27 Thread Ulrich Drepper
On Mon, Aug 27, 2012 at 5:46 AM, Paolo Carlini paolo.carl...@oracle.com wrote: One last observation from me: I think we are being a little inconsistent in terms of inlining. I see some __generate_impl with a non-trivial body inline whereas other, with a tad smaller body, in random.tcc. For the

Re: [Patch, Fortran] Plug memory leaks; fix tree-check ICE for PR

2012-08-27 Thread Mikael Morin
On 27/08/2012 14:14, Tobias Burnus wrote: On 08/26/2012 08:12 PM, Tobias Burnus wrote: This patch fixes one ICE and several memory leaks. But there are more. I have now committed the patch with the following additional patch * module.c (mio_symbol): Don't increase sym-refs for its

Re: [PATCH, ARM] Constant vector permute for the Neon vext insn

2012-08-27 Thread Christophe Lyon
[ Richard, sorry for the duplicate message where I omitted the mailing-list] On 24 August 2012 10:40, Richard Earnshaw rearn...@arm.com wrote: Has this been tested for big-endian? Hi, While improving my tests and trying to turn them into execution tests, I realized that vector initialization

Re: [Patch, Fortran] Plug memory leaks; fix tree-check ICE for PR

2012-08-27 Thread Tobias Burnus
On 08/27/2012 03:19 PM, Mikael Morin wrote: as you seem to be very much into memory issues, Well, it started as middle-end project by Steven Bosscher and others which looked at memory issues due to http://gcc.gnu.org/PR54146 (a program using attribute((flatten)), which essentially causes

Re: [Patch, Fortran] Plug memory leaks; fix tree-check ICE for PR

2012-08-27 Thread Mikael Morin
On 27/08/2012 17:11, Tobias Burnus wrote: could you add comments in gfortran.h telling which pointers account for reference counting? As far as I remember for symbols, there are: gfc_symtree::n::sym; gfc_namespace::proc_name; Well, I have still not gained a full overview about refs,

Re: [PATCH] Fix bug in scheduler's handling of DEBUG_INSNs

2012-08-27 Thread Vladimir Makarov
On 08/23/2012 06:08 PM, Maxim Kuvyrkov wrote: This patch fixes an ICE in sched-deps.c due to a dereference of an empty list. The problem is in handling of DEBUG_INSNs and its peculiarity of disregarding requests to free dependence lists in certain cases. This patch fixes up an instance of

Re: Inline hints

2012-08-27 Thread Martin Jambor
Hi, On Sun, Aug 19, 2012 at 07:43:45AM +0200, Jan Hubicka wrote: * gcc.dg/ipa/iinline-1.c: Update testcase to test inline hints. * ipa-inline.c (want_inline_small_function_p): Bypass inline limits for hinted functions. (edge_badness): Dump hints; decrease

[MIPS, committed] Fix segfault in vr4130_align_insns

2012-08-27 Thread Richard Sandiford
This fixes a segfault seen in the fix-vr4130* cases when run with -O3 -mabi=64. The problem was caused by vr4130_align_insns simulating zero-length ghost gp instructions, even though the idea is that the scheduler should ignore them. (These instructions postdate the vr4130 stuff by quite some

[MIPS, committed] Handle SYMBOL_REF SET_SRCs for R_MIPS_JALR hints

2012-08-27 Thread Richard Sandiford
mips_pic_call_symbol_from_set has code to get the symbol associated with a %call16 reloc, and can also get the symbol from a REG_EQUAL or REG_EQUIV note. But in call-3.c, which tests a call to hidden symbol, we have a plain: (set (reg ...) (symbol_ref ...)) This patch handles that case too.

Re: [C++ Patch] PR 54191

2012-08-27 Thread Jason Merrill
Let's do away with ba_quiet entirely and instead pass tf_none in cases where we would have set ba_quiet. #define DERIVED_FROM_P(PARENT, TYPE) \ - (lookup_base ((TYPE), (PARENT), ba_any, NULL) != NULL_TREE) + (lookup_base ((TYPE), (PARENT), ba_any, NULL, tf_warning_or_error) \ + !=

[MIPS, committed] Turn gcc.target/mips into a torture-style test

2012-08-27 Thread Richard Sandiford
As an experiment, I tried removing all the explicit -O flags from gcc.target/mips and making it cycle through the usual torture options instead. This showed up a fair few bugs, which I've tried to fix with today's and yesterday's patches. Even though it does add to the testing time, I think it's

[MIPS, committed] Tighten gcc.target/mips regexps

2012-08-27 Thread Richard Sandiford
The patch to make gcc.target/mips use gcc-dg triggered some false failures for -O3 -g, where the file's pathname was included in the output and happened to match some of the scan-assembler-not regexps. This patch tightens the regexps by: - making sure that register names are prefixed by $. -

[MIPS, committed] Add missing NOMIPS16s to gcc.target/mips

2012-08-27 Thread Richard Sandiford
A NOMIPS16 janitorial. Tested on mipsisa64-elf, mips64-elf and mips64-linux-gnu. Applied. Richard gcc/testsuite/ * gcc.target/mips/ext_ins.c, gcc.target/mips/octeon-pop-2.c, gcc.target/mips/pr54240.c, gcc.target/mips/stack-1.c, gcc.target/mips/unaligned-1.c: Add

Re: Merge C++ conversion into trunk (6/6 - gdb tree macro support)

2012-08-27 Thread Andreas Schwab
Diego Novillo dnovi...@google.com writes: +# Skip all inline functions in tree.h. +# These are used in accessor macros. +# Note that this is added at the end because older gdb versions +# do not understand the 'skip' command. +skip tree.h (gdb) skip tree.h No function found named tree.h.

Re: [PATCH, MIPS] add new peephole for 74k dspr2

2012-08-27 Thread Richard Sandiford
Sandra Loosemore san...@codesourcery.com writes: On 08/19/2012 11:22 AM, Richard Sandiford wrote: Not sure whether a peephole is the right choice here. In practice, I'd imagine these opportunities would only come from a DImode move of $0 into a doubleword register, so we could simply emit

PR 43852: new configure option --disable-libstdcxx-verbose

2012-08-27 Thread Jonathan Wakely
Unless anyone has objections I'm going to commit this to trunk, implementing Sebastian's idea to disable the verbose terminate handler and the pure virtual function called message, which write to stderr when a process terminates. This allows embedded systems to avoid pulling in the demangler and

Re: [Patch, test] Enable to prune warnings for tests defined in one exp file

2012-08-27 Thread Mike Stump
On Aug 27, 2012, at 1:14 AM, Terry Guo wrote: This patch intends to provide a chance to prune common warning messages for tests defined in an exp file. Is it OK to trunk? Ok. If you can find where to document this... :-) That'd be nice.

Re: [C++ Patch] PR 54191

2012-08-27 Thread Paolo Carlini
On 08/27/2012 06:28 PM, Jason Merrill wrote: Let's do away with ba_quiet entirely and instead pass tf_none in cases where we would have set ba_quiet. Thanks for the feedback. Indeed, as I tried to explain in an older message, that was also my understanding. The practical difficulty with the

[TILE-Gx, committed] fix atomic op latency

2012-08-27 Thread Walter Lee
This patch properly sets the latency of atomic ops to the approximate latency of a remote memory operation. * config/tilegx/sync.md (atomic_compare_and_swap_baremode, atomic_exchange_baremode, atomic_fetch_fetchop_name_baremode): Set type to X1_remote. *

Re: [google] Modification of gcov pmu format to reduce gcda size bloat (issue 6427063)

2012-08-27 Thread cmang
On 2012/08/24 23:20:21, davidxl wrote: On Fri, Aug 24, 2012 at 3:56 PM, mailto:cm...@google.com wrote: http://codereview.appspot.com/6427063/diff/11002/gcc/gcov-io.h File gcc/gcov-io.h (right): http://codereview.appspot.com/6427063/diff/11002/gcc/gcov-io.h#newcode688 gcc/gcov-io.h:688:

Re: [google] Modification of gcov pmu format to reduce gcda size bloat (issue 6427063)

2012-08-27 Thread Teresa Johnson
On Mon, Aug 27, 2012 at 10:55 AM, cm...@google.com wrote: On 2012/08/24 23:20:21, davidxl wrote: On Fri, Aug 24, 2012 at 3:56 PM, mailto:cm...@google.com wrote: http://codereview.appspot.com/6427063/diff/11002/gcc/gcov-io.h File gcc/gcov-io.h (right):

Re: [C++ Patch] PR 54191

2012-08-27 Thread Jason Merrill
On 08/27/2012 01:36 PM, Paolo Carlini wrote: Thanks for the feedback. Indeed, as I tried to explain in an older message, that was also my understanding. The practical difficulty with the mapping (which you can also guess from the current structure of get_delta_difference_1, the if (kind ==

[TILE-Gx, committed] bfins instruction fix

2012-08-27 Thread Walter Lee
This patch stops trying to represent the bfins instruction with the insv pattern, because it causes an extra copy when bfins reuses one of its inputs. * config/tilegx/tilegx.md (*bfins): Rename to insn_bfins. (insn_bfins): Delete. Index: gcc/config/tilegx/tilegx.md

Re: [EXTERNAL] Re: [Fortran] PR37336 - FIINAL patch [1/n]: Implement the finalization wrapper subroutine

2012-08-27 Thread Rouson, Damian
Hi Mikael, Is this patch approved? I realize it's not the final step (no pun intended), but I will be very excited to see this hit the trunk. Supporting FINAL will have broad impact on my work and the work of others writing modern Fortran libraries and applications. Damian On 8/25/12 1:42 PM,

[TILE-Gx/TILEPro, committed] mcount typo

2012-08-27 Thread Walter Lee
This patch fixes a typo in the mcount function_profiler. * config/tilegx/tilegx.c (tilegx_function_profiler): Fix typo. config/tilepro/tilepro.c (tilepro_function_profiler): Ditto. Index: gcc/config/tilegx/tilegx.c

[Patch, Fortran, committed] Free leaks in dependency.c and trans-intrinsics.c

2012-08-27 Thread Tobias Burnus
Rather simple fix. The first one was leaking expr-value.integer, the second one sym-formal_ns. Build, tested and committed as Rev. 190728. Tobias Index: gcc/fortran/ChangeLog === --- gcc/fortran/ChangeLog (Revision 190714) +++

Re: [EXTERNAL] Re: [Fortran] PR37336 - FIINAL patch [1/n]: Implement the finalization wrapper subroutine

2012-08-27 Thread Mikael Morin
On 27/08/2012 20:20, Rouson, Damian wrote: Hi Mikael, Is this patch approved? There are a few overlooks to be fixed and the components walking code that I would like to see shared. Then I think it can go in. But there is no big stopper. Mikael

Re: [PATCH, ARM] Constant vector permute for the Neon vext insn

2012-08-27 Thread Janis Johnson
On 08/27/2012 08:02 AM, Christophe Lyon wrote: [ Richard, sorry for the duplicate message where I omitted the mailing-list] On 24 August 2012 10:40, Richard Earnshaw rearn...@arm.com wrote: Has this been tested for big-endian? Hi, While improving my tests and trying to turn them into

[patch] PR middle-end/54385

2012-08-27 Thread Steven Bosscher
Hello, With my patch to visit insns in topological order in init_alias_analysis, an issue in postreload-cse got exposed: Blocks may become unreachable between calls of reload_cse_regs_1 but no CFG cleanups are scheduled between them, resulting in an ICE in pre_and_rev_post_order_compute at an

Re: [MIPS, committed] Add missing COSTS_N_INSNS call.

2012-08-27 Thread Hans-Peter Nilsson
On Sun, 26 Aug 2012, Richard Sandiford wrote: I'm preparing a patch to turn gcc.target/mips into a torture-like testsuite. While on the subject of gcc.target/mips and its extensions, it also doesn't handle a build configured with --with-synci=yes. (Well, not on the 4.7 branch at least.) brgds,

Re: [patch] PR middle-end/54385

2012-08-27 Thread Eric Botcazou
This patch fixes the problem by deleting unreachable basic blocks if edges were purged during a reload-cse transformation on an insn. I didn't add a test case because reliably triggering problems this late in the pass pipeline is so hard. A pervasive idiom in the RTL land is to call

[patch, Fortran, committed] Free temporary variables

2012-08-27 Thread Tobias Burnus
Another obvious leakage fix: For if( e1 == NULL || e2 == NULL) one has to free the non-NULL expression (if there is one). Similarly, vector of type tree * has to be freed - we only need the elements of that vector. Build and tested on x86-64-linux. Committed as Rev. 190731 Tobias Index:

Re: [C++ Patch] PR 54191

2012-08-27 Thread Paolo Carlini
On 08/27/2012 08:04 PM, Jason Merrill wrote: On 08/27/2012 01:36 PM, Paolo Carlini wrote: Thanks for the feedback. Indeed, as I tried to explain in an older message, that was also my understanding. The practical difficulty with the mapping (which you can also guess from the current structure of

Re: [patch] PR middle-end/54385

2012-08-27 Thread Steven Bosscher
On Mon, Aug 27, 2012 at 10:32 PM, Eric Botcazou ebotca...@adacore.com wrote: This patch fixes the problem by deleting unreachable basic blocks if edges were purged during a reload-cse transformation on an insn. I didn't add a test case because reliably triggering problems this late in the pass

[PATCH, i386]: Fix PR 46254, reload failure with -fpic -mcmodel={medium|large} and __sync_val_compare_and_swap

2012-08-27 Thread Uros Bizjak
Hello! Attached patch fixes PR 46254. The problem was, that PIC code models, different than small PIC still consume %rbx, even in 64bit mode. The patch fixes this by enhancing atomic_compare_and_swapdwi_doubleword, so the same macroized pattern now handles PIC and non-PIC compilations for 32bit

[PATCH] Handle truncate of a memory location

2012-08-27 Thread Andrew Pinski
Hi, A truncate of a memory location can be simplified to a memory load just like what is done for a subreg of a memory load. This patch adds that simplification to simplify-rtx.c. OK? Bootstrapped and tested on mips64-linux-gnu with no regressions. Thanks, Andrew Pinski ChangeLog: *

[google] Modification of gcov pmu format to reduce gcda size bloat (issue6427063)

2012-08-27 Thread Chris Manghane
Moved pmu writing utilities to global header. The patch should be applied to google/main Tested with crosstools. 2012-08-27 Chris Manghane cm...@google.com * libgcc/pmu-profile.c (gcov_write_load_latency_infos): Removed unused function.

Re: [google] Modification of gcov pmu format to reduce gcda size bloat (issue 6427063)

2012-08-27 Thread davidxl
Ok for google branches. David http://codereview.appspot.com/6427063/

Re: [PATCH] Set correct source location for deallocator calls

2012-08-27 Thread Dehao Chen
ping Thanks, Dehao On Sat, Aug 18, 2012 at 6:02 AM, Dehao Chen de...@google.com wrote: Hi, Richard, Thanks for the review. I've addressed most of the issues except the java unittest (see comments below). The new patch is attached in the end of this email. Thanks, Dehao On Fri, Aug

re: [google/gcc-4_7, trunk] Fix problem with -fdebug-types-section and template instantiations

2012-08-27 Thread Sterling Augustine
Google ref b/7041390. 2012-08-25 Cary Coutant ccout...@google.com gcc/ * dwarf2out.c (is_template_instantiation): New function. (should_move_die_to_comdat): Reject types that are template instantiations. This patch is OK for google 4.7 Sterling

Re: [C++ Patch] PR 54191

2012-08-27 Thread Jason Merrill
OK. Jason

out-of-line and arch-specific random_device

2012-08-27 Thread Ulrich Drepper
Especially after Carlo's comment from earlier that attention is paid to not inlining unnecessarily it is surprising that the random_device code is inlined even though it is not a template class. How about not doing this and moving the definition into the library? This is done in the attached

[TILE-Gx, committed] support -mcmodel=MODEL

2012-08-27 Thread Walter Lee
This patch adds support for the -mcmodel=MODEL flag on TILE-Gx. The models supported are small and large. In the small model (default), distance for direct calls is limited to 500M in either direction. PC-relative addresses are 32 bits. Absolute addresses support the full address range. In

[Patch, Fortran, committed] Plug another memory leak

2012-08-27 Thread Tobias Burnus
That's probably the last patch of this kind for a while. By using formal_ns, the namespace is freed when the main symbol is freed. Committed as Rev. Tobias Index: gcc/fortran/ChangeLog === --- gcc/fortran/ChangeLog (Revision