[c++-delayed-folding] cp_fold_r

2015-09-17 Thread Jason Merrill
I think we want to clear *walk_subtrees a lot more often in cp_fold_r; as it is, for most expressions we end up calling cp_fold on the full-expression, then uselessly on the subexpressions after we already folded the containing expression. Jason

[Bug c/67606] New: Missing optimization: load possible return value before early-out test

2015-09-17 Thread peter at cordes dot ca
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67606 Bug ID: 67606 Summary: Missing optimization: load possible return value before early-out test Product: gcc Version: 5.2.0 Status: UNCONFIRMED Severity: normal

[c++-delayed-folding] code review

2015-09-17 Thread Jason Merrill
@@ -216,6 +216,7 @@ libgcov-driver-tool.o-warn = -Wno-error libgcov-merge-tool.o-warn = -Wno-error gimple-match.o-warn = -Wno-unused generic-match.o-warn = -Wno-unused +insn-modes.o-warn = -Wno-error This doesn't seem to be needed anymore. @@ -397,11 +397,13 @@ convert_to_real (tree type,

Re: [PATCH, rs6000] Add expansions for min/max vector reductions

2015-09-17 Thread Richard Biener
On Wed, 16 Sep 2015, Alan Lawrence wrote: > On 16/09/15 17:10, Bill Schmidt wrote: > > > > On Wed, 2015-09-16 at 16:29 +0100, Alan Lawrence wrote: > > > On 16/09/15 15:28, Bill Schmidt wrote: > > > > 2015-09-16 Bill Schmidt > > > > > > > > *

[Bug middle-end/67606] Missing optimization: load possible return value before early-out test

2015-09-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67606 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug tree-optimization/67607] New: Failure to perform constant folding through type conversion

2015-09-17 Thread miyuki at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67607 Bug ID: 67607 Summary: Failure to perform constant folding through type conversion Product: gcc Version: 6.0 Status: UNCONFIRMED Keywords: missed-optimization

[Bug tree-optimization/67607] Failure to perform constant folding through type conversion

2015-09-17 Thread glisse at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67607 --- Comment #1 from Marc Glisse --- In general, for unsigned x, 1+(unsigned long)(x-1) can be simplified to x only if we know that x!=0, so we would need VRP information. Maybe this could be handled as part of the type-promotion work. VRP could

[Bug tree-optimization/67607] Failure to perform constant folding through type conversion

2015-09-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67607 Richard Biener changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[patch committed SH] Fix build failure

2015-09-17 Thread Kaz Kojima
I've committed the attached obvious fix for build failure for SH. object_allocator is changed so to remove the 2nd argument of its constructor. Regards, kaz -- 2015-09-17 Kaz Kojima * config/sh/sh.c (label_ref_list_d_pool): Adjust to

Re: [PATCH] Convert SPARC to LRA

2015-09-17 Thread David Miller
From: David Miller Date: Mon, 14 Sep 2015 11:30:29 -0700 (PDT) > There are some other issues I'm having troubles resolving for 64-bit > native bootstraps as well, and I am probably going to revert the LRA > sparc changes unless I can resolve them by the end of today. So I

Re: [PATCH, ARM]: Fix static interworking call

2015-09-17 Thread Kyrill Tkachov
On 17/09/15 09:46, Christian Bruel wrote: As obvious, bad operand number. OK for trunk ? Christian p1.patch 2015-09-18 Christian Bruel * config/arm/arm.md (*call_value_symbol): Fix operand for interworking. 2015-09-18 Christian

[Bug fortran/52846] [F2008] Support submodules

2015-09-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52846 --- Comment #27 from Paul Thomas --- Author: pault Date: Thu Sep 17 09:09:34 2015 New Revision: 227855 URL: https://gcc.gnu.org/viewcvs?rev=227855=gcc=rev Log: 2015-09-17 Paul Thomas PR fortran/52846 PR

[Bug fortran/67588] module.c heap use after free

2015-09-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67588 --- Comment #3 from Paul Thomas --- Author: pault Date: Thu Sep 17 09:09:34 2015 New Revision: 227855 URL: https://gcc.gnu.org/viewcvs?rev=227855=gcc=rev Log: 2015-09-17 Paul Thomas PR fortran/52846 PR

[Bug bootstrap/67597] [6 Regression] profiledbootstrap failure on ppc64le

2015-09-17 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67597 Alexandre Oliva changed: What|Removed |Added Status|NEW |ASSIGNED

Re: Openacc launch API

2015-09-17 Thread Bernd Schmidt
Since Jakub appears to be busy, I'll give my 2 cents. On 08/25/2015 03:29 PM, Nathan Sidwell wrote: I did rename the GOACC_parallel entry point to GOACC_parallel_keyed and provide a forwarding function. However, as the mkoffload data is incompatible, this is probably overkill. I've had to

Re: [PATCH v2][GCC] Algorithmic optimization in match and simplify

2015-09-17 Thread Richard Biener
On Thu, Sep 3, 2015 at 1:11 PM, Andre Vieira wrote: > On 01/09/15 15:01, Richard Biener wrote: >> >> On Tue, Sep 1, 2015 at 3:40 PM, Andre Vieira >> wrote: >>> >>> Hi Marc, >>> >>> On 28/08/15 19:07, Marc Glisse wrote:

[Bug fortran/67588] module.c heap use after free

2015-09-17 Thread zeccav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67588 --- Comment #5 from Vittorio Zecca --- I believe that use_list = module_list; at line module.c:805 is useless and can be expunged.

[PATCH] Improve genmatch errors

2015-09-17 Thread Richard Biener
For a misplaced :s like (simplify (plus (minus@1:s @1 @2) (minus @2 @0)) (plus @1 @0)) we were giving test.pd:2:16 error: not implemented: predicate on leaf operand (plus (minus@1:s @1 @2) (minus @2 @0)) ^ which is at least confusing. The following patch improves this to

Re: [PATCH] Target hook for disabling the delay slot filler.

2015-09-17 Thread Bernd Schmidt
On 09/17/2015 11:52 AM, Simon Dardis wrote: The profitability of using an ordinary branch over a delay slot branch depends on how the delay slot is filled. If a delay slot can be filled from an instruction preceding the branch or instructions proceeding that must be executed on both sides then

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/67465: Handle pairs of complex+simple blocks and empty blocks more gracefully

2015-09-17 Thread Rainer Orth
Hi Kyrill, > On 11/09/15 09:51, Rainer Orth wrote: >> Kyrill Tkachov writes: >> >>> On 10/09/15 12:43, Rainer Orth wrote: Hi Kyrill, > Rainer, could you please check that this patch still fixes the SPARC > regressions? unfortunately, it breaks

[Bug regression/67609] New: [Regression] Generates wrong code for SSE2 _mm_load_pd

2015-09-17 Thread bisqwit at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67609 Bug ID: 67609 Summary: [Regression] Generates wrong code for SSE2 _mm_load_pd Product: gcc Version: 5.2.1 Status: UNCONFIRMED Severity: major Priority: P3

[Bug tree-optimization/67351] Missed optimisation on 64-bit field compared to 32-bit

2015-09-17 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67351 Uroš Bizjak changed: What|Removed |Added Target Milestone|--- |6.0

[Bug regression/67609] [Regression] Generates wrong code for SSE2 _mm_load_pd

2015-09-17 Thread bisqwit at iki dot fi
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67609 --- Comment #1 from Joel Yliluoma --- For the record, changing _mm_load_pd(v) into _mm_set_pd(v[1],v[0]) will coax GCC into generating correct code. The bug is related to _mm_load_pd().

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-17 Thread Gerald Pfeifer
On Sun, 13 Sep 2015, Mark Wielaard wrote: > Slightly adjusted patch attached. Now it is explicit that the warning is > enabled by -Wunused-variable for C, but not C++. There are testcases for > both C and C++ to check the defaults. And the hardcoded override is > removed for C++, so the user could

[Bug testsuite/66530] libstdc++ testsuite links to incorrect shared libstdc++ library

2015-09-17 Thread jenny.hyphen.fa at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66530 --- Comment #8 from Jennifer Yao --- I know this is horribly belated, but I *just* got around to testing the patch proper, and I'm afraid to say that it does not appear to work. (My last comment verified that setting PATH instead of

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-09-17 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 Eric Botcazou changed: What|Removed |Added CC||bonzini at gnu dot org,

[Bug c++/67608] New: ICE when capturing a local 2D array

2015-09-17 Thread linesprower at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67608 Bug ID: 67608 Summary: ICE when capturing a local 2D array Product: gcc Version: 4.9.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++

[Bug c++/67608] ICE when capturing a local 2D array

2015-09-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67608 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed|

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-09-17 Thread bernds at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 --- Comment #18 from Bernd Schmidt --- FWIW I did some googling to refresh my memory, and this may be helpful: www.seas.harvard.edu/courses/cs252/2011sp/slides/Lec02-Dataflow.pdf It looks like you want exactly the available expressions problem

[Bug bootstrap/67597] [6 Regression] profiledbootstrap failure on ppc64le

2015-09-17 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67597 --- Comment #5 from Markus Trippelsdorf --- (In reply to Alexandre Oliva from comment #4) > Mine. AFAICT this is fixed in the git branch aoliva/pr64164, that moves rtl > allocation of parms and results back to assign_parms. Thanks. I can

[Bug middle-end/67490] [6 regression] FAIL: gcc.target/powerpc/pr16458-1.c scan-assembler-not cmpw

2015-09-17 Thread aoliva at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67490 Alexandre Oliva changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[Bug middle-end/65958] -fstack-check breaks alloca on architectures using generic stack checking

2015-09-17 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65958 --- Comment #5 from Eric Botcazou --- Author: ebotcazou Date: Thu Sep 17 11:06:57 2015 New Revision: 227860 URL: https://gcc.gnu.org/viewcvs?rev=227860=gcc=rev Log: PR middle-end/65958 * config/arm/linux-elf.h

[Bug tree-optimization/67351] Missed optimisation on 64-bit field compared to 32-bit

2015-09-17 Thread linux at carewolf dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67351 Allan Jensen changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subject to a TOCTOU race condition between the first exists test and the while loop during which a symlink loop can

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-09-17 Thread bonzini at gnu dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 --- Comment #19 from Paolo Bonzini --- LIVE provides live registers that MAY be initialized (are initialized on at least one path). The comments are all wrong! There's no code in GCC for must-initialized. Pierre's patch gets it right (except

[Bug fortran/67588] module.c heap use after free

2015-09-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67588 --- Comment #6 from Paul Thomas --- (In reply to Vittorio Zecca from comment #5) > I believe that > > use_list = module_list; > > at line module.c:805 is useless and can be expunged. I don't think so Up to that point, use_list is set to

Re: Repository for the conversion machinery

2015-09-17 Thread Eric S. Raymond
Richard Biener : > Not sure why we can't label the individual commits with Authors scraped > from the ChangeLog entries in that commit. Some commits even have > multiple authors after all! And if that fails I'd rather use the @gcc.gnu.org > identity. Because

Re: Repository for the conversion machinery

2015-09-17 Thread Richard Biener
On Thu, Sep 17, 2015 at 12:41 PM, Eric S. Raymond wrote: > Richard Biener : >> Not sure why we can't label the individual commits with Authors scraped >> from the ChangeLog entries in that commit. Some commits even have >> multiple authors after all!

Re: Repository for the conversion machinery

2015-09-17 Thread Eric S. Raymond
Richard Biener : > Maybe I'm missing sth but apart from the CVS imported revisions each > SVN revision should contain the actual change plus the changes to the > ChangeLog files (you can't count on the commit message itself I guess > as not all people replicate the

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 17/09/15 12:16 +0100, Jonathan Wakely wrote: So if we use a counter, what's a sane maximum? Is MAXSYMLINKS in the value the kernel uses? 20 seems quite low, I was thinking of a much higher number. Until very recently Linux seemed to hardcode it to 40:

Re: [PATCH] Fix default_binds_local_p_2 for extern protected data

2015-09-17 Thread Szabolcs Nagy
ping 2. this patch is needed for working visibility ("protected") attribute for extern data on targets using default_binds_local_p_2. https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01871.html On 10/08/15 12:04, Szabolcs Nagy wrote: ping. On 22/07/15 18:01, Szabolcs Nagy wrote: The commit

Re: [patch match.pd c c++]: Ignore results of 'shorten_compare' and move missing patterns in match.pd

2015-09-17 Thread Kai Tietz
2015-09-17 11:12 GMT+02:00 Richard Biener : > On Wed, Sep 16, 2015 at 9:51 PM, Jeff Law wrote: >> On 09/15/2015 03:42 AM, Kai Tietz wrote: > > 2015-09-08 Kai Tietz > > * gcc.dg/tree-ssa/vrp23.c: Adjust

Re: [PATCH WIP] Use Levenshtein distance for various misspellings in C frontend v2

2015-09-17 Thread Richard Biener
On Wed, Sep 16, 2015 at 5:45 PM, Manuel López-Ibáñez wrote: > On 16 September 2015 at 15:33, Richard Biener > wrote: >> On Wed, Sep 16, 2015 at 3:22 PM, Michael Matz wrote: if we suggest 'foo' instead of foz then we'll get a

****ping****: [Patch, fortran] PR40054 and PR63921 - Implement pointer function assignment - redux

2015-09-17 Thread Paul Richard Thomas
Could somebody review this please? Thanks Paul -- Forwarded message -- From: Paul Richard Thomas Date: 6 September 2015 at 18:40 Subject: Re: [Patch, fortran] PR40054 and PR63921 - Implement pointer function assignment - redux To: Dominique

[Bug rtl-optimization/50749] Auto-inc-dec does not find subsequent contiguous mem accesses

2015-09-17 Thread urjaman at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50749 Urja Rannikko changed: What|Removed |Added CC||urjaman at gmail dot com --- Comment

Re: [patch match.pd c c++]: Ignore results of 'shorten_compare' and move missing patterns in match.pd

2015-09-17 Thread Richard Biener
On Wed, Sep 16, 2015 at 9:51 PM, Jeff Law wrote: > On 09/15/2015 03:42 AM, Kai Tietz wrote: 2015-09-08 Kai Tietz * gcc.dg/tree-ssa/vrp23.c: Adjust testcase to reflect that pattern is matching now already within

[Bug fortran/67588] module.c heap use after free

2015-09-17 Thread pault at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67588 Paul Thomas changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

Re: Repository for the conversion machinery

2015-09-17 Thread Richard Biener
On Thu, Sep 17, 2015 at 4:57 AM, DJ Delorie wrote: > > "Frank Ch. Eigler" writes: >> That makes sense, but how many people are in cagney's shoes > > I am one of those people - I have two email addresses listed in > MAINTAINERS, with two sets of copyright papers

RE: [PATCH] Target hook for disabling the delay slot filler.

2015-09-17 Thread Simon Dardis
The profitability of using an ordinary branch over a delay slot branch depends on how the delay slot is filled. If a delay slot can be filled from an instruction preceding the branch or instructions proceeding that must be executed on both sides then it is profitable to use a delay slot branch.

[Bug tree-optimization/66142] Loop is not vectorized because not sufficient support for GOMP_SIMD_LANE

2015-09-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66142 --- Comment #21 from Richard Biener --- Ok, so if we fix SCCVN further we hit its (designed) limitation with stmt walking not following backedges (but the use is in a loop and the def outside). We avoid doing the work to determine if sth is loop

Re: Openacc launch API

2015-09-17 Thread Nathan Sidwell
On 09/17/15 05:36, Bernd Schmidt wrote: Fail how? Jakub has requested that it works but falls back to unaccelerated execution, can you confirm this is what you expect to happen with this patch? Yes, that is the failure mode. - if (num_waits) + va_start (ap, kinds); + /* TODO: This will

[Bug c/67570] comparison rules fails

2015-09-17 Thread ka_bena at yahoo dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67570 --- Comment #4 from BENAÏSSA ---  Thank you very much for your reply. Please do not take care of the first set of values for  MIN_NORMALIZED and in place you can test those new values.  MIN_NORMALIZED    1.755494 E-038  for float     

[Bug middle-end/67222] [4.9/5 Regression] ICE in gimple_call_arg with bogus posix_memalign

2015-09-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67222 --- Comment #5 from Marek Polacek --- Author: mpolacek Date: Thu Sep 17 12:50:54 2015 New Revision: 227862 URL: https://gcc.gnu.org/viewcvs?rev=227862=gcc=rev Log: PR middle-end/67222 * gimple-low.c (lower_stmt): Don't lower

[Bug target/67609] [5/6 Regression] Generates wrong code for SSE2 _mm_load_pd

2015-09-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67609 Richard Biener changed: What|Removed |Added Target||x86_64-*-*

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-09-17 Thread zadeck at naturalbridge dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 --- Comment #20 from Kenneth Zadeck --- >> On second thoughts, for the first point, maybe a native speaker understands >> "an available definition on any path" as "an available definition on one >> path, >> whatever it is", in which case the

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-09-17 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 --- Comment #21 from Eric Botcazou --- > LIVE provides live registers that MAY be initialized (are initialized on at > least one path). The comments are all wrong! > > There's no code in GCC for must-initialized. Pierre's patch gets it right

[Bug middle-end/67222] [4.9/5 Regression] ICE in gimple_call_arg with bogus posix_memalign

2015-09-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67222 Marek Polacek changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Martin Sebor
On 09/17/2015 05:16 AM, Jonathan Wakely wrote: On 16/09/15 17:42 -0600, Martin Sebor wrote: I see now the first exists test will detect symlink loops in the original path. But I'm not convinced there isn't a corner case that's subject to a TOCTOU race condition between the first exists test and

[Bug libstdc++/65913] [5 Regression] Linking failure without -latomic

2015-09-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65913 Jonathan Wakely changed: What|Removed |Added Target Milestone|--- |5.3 Summary|[5/6

Re: Repository for the conversion machinery

2015-09-17 Thread Jeff Law
On 09/17/2015 10:24 AM, Richard Earnshaw wrote: [ snip ] No, I'm not going to do that work; and personally, I don't think it's worth holding up the switch to wait for that to be done. Agreed. Jeff

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249)

2015-09-17 Thread Jeff Law
On 09/17/2015 10:05 AM, Marek Polacek wrote: The patch doesn't diagnose some more involved cases like the one below: if (i < 0) return 1; else if (!(i > 0 || i == 0)) return 2; even though it does diagnose some other such cases, including: if (i < 0) return 1; else if (!(i >= 0))

[Bug sanitizer/67513] ASAN: Not optimal shadow value check (unlikely condition checked in fast path)

2015-09-17 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67513 Marek Polacek changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed|

[AArch64][PATCH 3/5] Add atomic load-operate instructions.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 adds atomic swap and atomic load-operate instructions with optional memory ordering specifiers. This patch adds the ARMv8.1 atomic load-operate instructions. Tested the series for aarch64-none-linux-gnu with native bootstrap and make check. Also tested for aarch64-none-elf with

[C++ Patch/RFC] PR 67576 ("[4.9/5/6 Regression] expression of typeid( expression ) is evaluated twice")

2015-09-17 Thread Paolo Carlini
Hi, submitter noticed that the fix for c++/25466: https://gcc.gnu.org/ml/gcc-patches/2013-04/msg00553.html caused a double evaluation of the typeid, at least in some cases. I had a quick look and wondered if it could make sense to just use the new code when we are outside the

[patch] libstdc++/65913 Handle alignment in __atomic_is_lock_free

2015-09-17 Thread Jonathan Wakely
This fixes a 5/6 regression that causes atomic::is_lock_free() to require libatomic even on targets where the compiler knows the answer. The new test only runs on x86_64-linux and powerpc*-linux. It isn't actually OS-dependent but as long as it runs somewhere we should pick up regressions so

[Bug c/67611] strcpy BUG

2015-09-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67611 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|---

Re: [PATCH] Fix PR64078

2015-09-17 Thread Jeff Law
On 09/17/2015 09:00 AM, Marek Polacek wrote: On Wed, Sep 09, 2015 at 07:48:15PM +0200, Bernd Edlinger wrote: Hi, On Wed, 9 Sep 2015 09:31:33, Jeff Law wrote: You could probably make the function static or change its visibility via a function attribute (there's a visibility attribute which can

[Bug fortran/67588] module.c heap use after free

2015-09-17 Thread zeccav at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67588 --- Comment #7 from Vittorio Zecca --- use_list is local to the function gfc_match_submodule and it is already reinitialized in the for statement at line 806. So there is a duplication. On return at line 812 it is then lost. Maybe optimization

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-09-17 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 --- Comment #24 from Eric Botcazou --- Author: ebotcazou Date: Thu Sep 17 15:35:24 2015 New Revision: 227874 URL: https://gcc.gnu.org/viewcvs?rev=227874=gcc=rev Log: PR rtl-optimization/66790 * df-problems.c (LIVE): Amend

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-09-17 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 --- Comment #25 from Eric Botcazou --- Author: ebotcazou Date: Thu Sep 17 15:35:43 2015 New Revision: 227875 URL: https://gcc.gnu.org/viewcvs?rev=227875=gcc=rev Log: PR rtl-optimization/66790 * df-problems.c (LIVE): Amend

RE: Predictive commoning leads to register to register moves through memory.

2015-09-17 Thread Simon Dardis
I've since taken another look at this recently and I've tracked the issue down to tree-predcom.c, specifically ref_at_iteration almost always generating MEM_REFs. With MEM_REFs, GCC's RTL GCSE cannot compare them as equal and hence remove them. A previous version of the code did generate

[AArch64][PATCH 2/5] Add BIC instruction.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 adds atomic swap and atomic load-operate instructions with optional memory ordering specifiers. This patch adds an expander to generate a BIC instruction that can be explicitly called when implementing the atomic__fetch pattern to calculate the value to be returned by the

[Bug libstdc++/65913] [5/6 Regression] Linking failure without -latomic

2015-09-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65913 --- Comment #7 from Jonathan Wakely --- Author: redi Date: Thu Sep 17 15:46:04 2015 New Revision: 227878 URL: https://gcc.gnu.org/viewcvs?rev=227878=gcc=rev Log: Handle alignment in __atomic_is_lock_free gcc: 2015-09-17 Richard Henderson

[Ada] Language-defined checks and side effects in gigi

2015-09-17 Thread Eric Botcazou
As diagnosed by Richard B., emit_check wrongly resets the TREE_SIDE_EFFECTS flag on the COND_EXPR built for language-defined checks in Ada, leading to the omission of required checks in peculiar cases. Tested on x86_64-suse-linux, applied on the mainline. 2015-09-17 Eric Botcazou

Re: [patch] libstdc++/65913 Handle alignment in __atomic_is_lock_free

2015-09-17 Thread Richard Henderson
On 09/17/2015 07:04 AM, Jonathan Wakely wrote: > Handle alignment in __atomic_is_lock_free > > gcc: > > 2015-09-17 Richard Henderson > > PR libstdc++/65913 > * builtins.c (fold_builtin_atomic_always_lock_free): Handle fake > pointers

Re: [patch] libstdc++/67173 Fix filesystem::canonical for Solaris 10.

2015-09-17 Thread Jonathan Wakely
On 16/09/15 23:50 +0100, Jonathan Wakely wrote: On 16/09/15 19:58 +0100, Jonathan Wakely wrote: commit ef25038796485298ff8f040bc79e0d9a371171fa Author: Jonathan Wakely Date: Wed Sep 16 18:07:32 2015 +0100 Implement filesystem::canonical() without realpath PR

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249)

2015-09-17 Thread Marek Polacek
On Wed, Sep 16, 2015 at 02:59:12PM -0600, Martin Sebor wrote: > On 09/16/2015 09:59 AM, Marek Polacek wrote: > >This patch implements a new warning, -Wduplicated-cond. It warns for > >code such as > > > > if (x) > > // ... > > else if (x) > > // ... > > As usual, I like this

Re: Repository for the conversion machinery

2015-09-17 Thread Michael Matz
Hi, On Thu, 17 Sep 2015, Richard Earnshaw wrote: > None of this has any chance of working for any commits to the pre-egcs > sources. In those days there was no version control on the ChangeLog > file. > > My feeling is we could spend months ratholing on this particular problem > rather than

Re: [C/C++ PATCH] RFC: Implement -Wduplicated-cond (PR c/64249)

2015-09-17 Thread Martin Sebor
The patch currently issues a false positive for the test case below. I suspect the chain might need to be cleared after each condition that involves a side-effect. int foo (int a) { if (a) return 1; else if (++a) return 2; else if (a) return 3; return 0; } But the last

[AArch64][PATCH 1/5] Use atomic instructions for swap and fetch-update operations.

2015-09-17 Thread Matthew Wahab
Hello, ARMv8.1 adds atomic swap and atomic load-operate instructions with optional memory ordering specifiers. This patch series adds the instructions to GCC, making them available with -march=armv8.1-a or -march=armv8+lse, and uses them to implement the __sync and __atomic builtins. The

Re: [Aarch64] Use vector wide add for mixed-mode adds

2015-09-17 Thread James Greenhalgh
On Mon, Sep 07, 2015 at 06:54:30AM +0100, Michael Collison wrote: > This patch is designed to address code that was not being vectorized due > to missing widening patterns in the aarch64 backend. Code such as: > > int t6(int len, void * dummy, short * __restrict x) > { >len = len & ~31; >

[Bug c/67610] strcpy BUG

2015-09-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67610 Andrew Pinski changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Component|cp-tools

Re: Repository for the conversion machinery

2015-09-17 Thread Richard Earnshaw
On 17/09/15 16:15, Michael Matz wrote: > Hi, > > On Thu, 17 Sep 2015, Eric S. Raymond wrote: > >> All I can say is every time I've tried this it's been a nightmare, and >> when you say "apart from CVS imported revisions" my hair stands on end. >> And the GCC history is two and a half times

Re: Repository for the conversion machinery

2015-09-17 Thread Richard Earnshaw
On 17/09/15 17:08, Michael Matz wrote: > Hi, > > On Thu, 17 Sep 2015, Richard Earnshaw wrote: > >> None of this has any chance of working for any commits to the pre-egcs >> sources. In those days there was no version control on the ChangeLog >> file. >> >> My feeling is we could spend months

Re: [PATCH][RTL-ifcvt] PR rtl-optimization/67465: Handle pairs of complex+simple blocks and empty blocks more gracefully

2015-09-17 Thread Kyrill Tkachov
Hi Rainer, On 17/09/15 12:33, Rainer Orth wrote: Hi Kyrill, On 11/09/15 09:51, Rainer Orth wrote: Kyrill Tkachov writes: On 10/09/15 12:43, Rainer Orth wrote: Hi Kyrill, Rainer, could you please check that this patch still fixes the SPARC regressions?

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-17 Thread Mark Wielaard
On Thu, 2015-09-17 at 18:12 +0200, Bernd Schmidt wrote: > On 09/17/2015 02:01 PM, Gerald Pfeifer wrote: > > On Sun, 13 Sep 2015, Mark Wielaard wrote: > >> Slightly adjusted patch attached. Now it is explicit that the warning is > >> enabled by -Wunused-variable for C, but not C++. There are

Amend documentation of DF LIVE problem

2015-09-17 Thread Eric Botcazou
As discussed in the audit trail of PR rtl-optimization/66790, the doc of the DF_LIVE problem is confusing/wrong so the attached patch amends it. Approved by Kenneth and applied on all active branches. 2015-09-17 Eric Botcazou PR rtl-optimization/66790

[Bug rtl-optimization/66790] Invalid uninitialized register handling in REE

2015-09-17 Thread ebotcazou at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66790 --- Comment #26 from Eric Botcazou --- Author: ebotcazou Date: Thu Sep 17 15:35:58 2015 New Revision: 227876 URL: https://gcc.gnu.org/viewcvs?rev=227876=gcc=rev Log: PR rtl-optimization/66790 * df-problems.c (LIVE): Amend

[Bug c/67610] strcpy BUG

2015-09-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67610 Andrew Pinski changed: What|Removed |Added Resolution|INVALID |DUPLICATE --- Comment #3 from Andrew

[Bug c/67611] strcpy BUG

2015-09-17 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67611 --- Comment #2 from Andrew Pinski --- *** Bug 67610 has been marked as a duplicate of this bug. ***

Re: [PATCH] PR28901 -Wunused-variable ignores unused const initialised variables

2015-09-17 Thread Bernd Schmidt
On 09/17/2015 02:01 PM, Gerald Pfeifer wrote: On Sun, 13 Sep 2015, Mark Wielaard wrote: Slightly adjusted patch attached. Now it is explicit that the warning is enabled by -Wunused-variable for C, but not C++. There are testcases for both C and C++ to check the defaults. And the hardcoded

Re: [PATCH, rs6000] Add expansions for min/max vector reductions

2015-09-17 Thread Bill Schmidt
On Thu, 2015-09-17 at 09:18 -0500, Bill Schmidt wrote: > On Thu, 2015-09-17 at 09:39 +0200, Richard Biener wrote: > > On Wed, 16 Sep 2015, Alan Lawrence wrote: > > > > > On 16/09/15 17:10, Bill Schmidt wrote: > > > > > > > > On Wed, 2015-09-16 at 16:29 +0100, Alan Lawrence wrote: > > > > > On

[Bug target/67609] [5/6 Regression] Generates wrong code for SSE2 _mm_load_pd

2015-09-17 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67609 --- Comment #4 from Richard Biener --- (In reply to Uroš Bizjak from comment #3) > The doc says: > > When used as an lvalue, 'subreg' is a word-based accessor. > Storing to a 'subreg' modifies all the words of REG that >

Re: [PATCH, fortran] PR 53379 Backtrace on error termination

2015-09-17 Thread David Edelsohn
On Wed, Sep 9, 2015 at 12:12 AM, Ian Lance Taylor wrote: > Mike Stump writes: > >> Not a big issue, but slightly better if (O_CLOEXEC>>32) != 0 is also >> true. See, if AIX should ever define this to a sensible value, the >> above would disappear the

Re: Split up optabs.[hc]

2015-09-17 Thread Richard Sandiford
Bernd Schmidt writes: > On 09/14/2015 07:54 PM, Richard Sandiford wrote: >> This patch splits optabs up as follows: >> >>- optabs-query.[hc]: IL-independent functions for querying what a target >>can do natively. >>- optabs-tree.[hc]: tree and gimple query

Re: Openacc launch API

2015-09-17 Thread Nathan Sidwell
Updated patch addressing your points. Some further comments though ... + while (GOMP_LAUNCH_PACK (GOMP_LAUNCH_END, 0, 0) + != (tag = va_arg (ap, unsigned))) That's a somewhat non-idiomatic way to write this, with the constant first and not obviously a constant. I'd initialize a

[patch] Only do shrink_to_fit() when exceptions enabled

2015-09-17 Thread Jonathan Wakely
When exceptions are disabled a failed allocation while trying to shrink_to_fit() will abort the program. Since shrink_to_fit() is a non-binding request we should just ignore it rather than risk taking down the whole process. Tested powerpc64le-linux, committed to trunk. commit

Re: [C++] Coding rule enforcement

2015-09-17 Thread Ville Voutilainen
>>>+ else if (warn_multiple_inheritance) >>>+warning (OPT_Wmultiple_inheritance, >>>+ "%qT defined with multiple direct bases", ref); >>You don't need to guard the warning with a check of the warning flag; warning >>will only give the warning if the option is enabled. >the

Re: [patch] libstdc++/65142 Check read() result in std::random_device.

2015-09-17 Thread Jonathan Wakely
On 15/09/15 12:47 +0100, Jonathan Wakely wrote: On 11/09/15 14:44 +0100, Jonathan Wakely wrote: We should not silently ignore a failure to read from the random device. Tested powerpc64le-linux, committed to trunk. I'm going to commit this to the gcc-5 branch too. commit

[Bug libstdc++/65142] std::random_device Ignores Read Return Code (CVE-2015-5276)

2015-09-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65142 --- Comment #11 from Jonathan Wakely --- Author: redi Date: Thu Sep 17 15:06:42 2015 New Revision: 227872 URL: https://gcc.gnu.org/viewcvs?rev=227872=gcc=rev Log: Make std::random_device retry after short reads PR libstdc++/65142

  1   2   3   >