Re: [IPCP] Remove unreachable code

2016-10-24 Thread Prathamesh Kulkarni
On 25 October 2016 at 04:16, kugan wrote: > Hi, > > I noticed that in ipcp_bits_lattice::meet_with we have: > > else if (TREE_CODE_CLASS (code) == tcc_unary) > > else if (code == NOP_EXPR) > > > Since TREE_CODE_CLASS for NOP_EXPR is tcc_unary,

Re: [PATCH, Fortran] Four small DEC extensions

2016-10-24 Thread Jerry DeLisle
On 10/24/2016 07:23 AM, Fritz Reese wrote: https://gcc.gnu.org/ml/fortran/2016-10/msg00087.html et. al. On 12/10/16 13:30, Fritz Reese wrote: Here I submit for review four small extensions to the GNU Fortran frontend for compatibility with legacy code. I figure it might be a nice change of

[PATCH, wwwdocs] Record diagnosing of r2 clobbers for PowerPC

2016-10-24 Thread Bill Schmidt
Hi, Following committed to wwwdocs per discussion in PR78095. Thanks, Bill Index: htdocs/gcc-7/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-7/changes.html,v

Re: Verify package integrity of downloaded prerequisites (partially fixes 61439)

2016-10-24 Thread Moritz Klammler
Jeff Law writes: > On 10/24/2016 02:44 AM, Richard Biener wrote: >> On Fri, Oct 7, 2016 at 3:10 PM, Moritz Klammler wrote: >>> I would like to bump my patch that makes the >>> `contrib/download_prerequisites` script verify the checksums of the >>> downloaded

Re: [PATCH] Add -Wshadow-local and -Wshadow-compatible-local.

2016-10-24 Thread Mark Wielaard
On Mon, Oct 24, 2016 at 04:26:49PM -0700, Jim Meyering wrote: > I have been using these new options (locally patched) to good effect. > While the vast majority of warning-triggering code has been > technically correct, using these has uncovered at least 4 or 5 real > bugs in code I care about.

Re: [PATCH] Add -Wshadow-local and -Wshadow-compatible-local.

2016-10-24 Thread Jim Meyering
On Wed, Sep 14, 2016 at 5:49 AM, Mark Wielaard wrote: > On Wed, 2016-09-14 at 05:39 -0700, Ian Lance Taylor wrote: >> On Wed, Sep 14, 2016 at 1:30 AM, Mark Wielaard wrote: >> > On Wed, 2016-09-14 at 00:00 -0400, Jason Merrill wrote: >> >> I wonder about spelling

[RFC] Handle unary pass-through jump functions for ipa-vrp

2016-10-24 Thread kugan
Hi, Attached RFC patch handles unary pass-through jump functions for ipa-vrp such that in the following case: int bar (int j) { foo (~j); foo (abs (j)); foo (j); return 0; } We can infer value ranges for argument foo from bar. See test-case vrp7.c in the patch. I will also try to

[IPCP] Remove unreachable code

2016-10-24 Thread kugan
Hi, I noticed that in ipcp_bits_lattice::meet_with we have: else if (TREE_CODE_CLASS (code) == tcc_unary) else if (code == NOP_EXPR) Since TREE_CODE_CLASS for NOP_EXPR is tcc_unary, if (code == NOP_EXPR) is unreachable and therefore removing it. I also don't think that we

Re: [rs6000] Add support for signed overflow arithmetic

2016-10-24 Thread Eric Botcazou
> And the generic one for div is as good as it gets as well I suppose? There is no support for div at all, only add/sub/neg/mul. -- Eric Botcazou

Re: [Patch ARM 4/4] Enable _Float16

2016-10-24 Thread Joseph Myers
On Mon, 24 Oct 2016, James Greenhalgh wrote: > Hi, > > Finally, having added support for single-step DFmode to HFmode conversions, > this patch adds support for _Float16 to the ARM back-end. Given the need for -mfp16-format=ieee (on some processors), you should be updating

Re: [Patch 2/4] [libgcc] Add double to half conversions.

2016-10-24 Thread Joseph Myers
On Mon, 24 Oct 2016, James Greenhalgh wrote: > Conversions from double precision floats to the ARM __fp16 are required > to round only once. I'd expect that when fixing this you need to update gcc.target/arm/fp16-rounding-ieee-1.c (and fp16-rounding-alt-1.c, I suppose) to expect rounding once.

Re: [rs6000] Add support for signed overflow arithmetic

2016-10-24 Thread Segher Boessenkool
On Mon, Oct 24, 2016 at 11:03:25PM +0200, Eric Botcazou wrote: > > Let's see. Completely untested. Inputs in regs 3 and 4, output in reg 3. > > 32-bit code all the way. > > > > add: > > eqv 9,3,4 > > add 3,3,4 > > xor 4,3,4 > > and. 4,9,4 > > blt > > > > sub: > > xor

Re: [patch, fortran] PR45516 - [F08] allocatable components of recursive type

2016-10-24 Thread Dominique d'Humières
Dear Paul, The patch works as expected. The following test now compiles but segfault at run time: program test_move_alloc type :: linked_list type(linked_list), allocatable :: link integer :: value end type linked_list type(linked_list) :: test test % value = 1

Re: [rs6000] Add support for signed overflow arithmetic

2016-10-24 Thread Eric Botcazou
> It's better than the generic branch sequence below, or yours. It still > sucks, obviously. OK, I thought you were talking about the double-width result. The non-branch sequence I posted is the generic non-branch sequence (that Ada was using). > Let's see. Completely untested. Inputs in

Re: [PATCH, ARM 2/7, ping3] Adapt atomic and exclusive load and store to ARMv8-M Baseline

2016-10-24 Thread Kyrylo Tkachov
> > Please set the predicable attribute to "no" for the v8mb alternative. > It wouldn't change any functionality as the ifcvt pass for conditional > execution > won't run for ARMv8-M Baseline but it's better to be explicit for > documentation > purposes. > Same for the other patterns where you

[Committed] PF fortran/71895 -- remove assert

2016-10-24 Thread Steve Kargl
The following patch was committed to cure an ICE. The gcc_assert() is converted into an "if ()" condition where gfc_internal_error() is called. gfc_internal_error() allows gfortran to exit gracefully instead of an ICE, because gfortran has already isssued an error message. 2016-10-24 Steven G.

Re: [PATCH] Emit DWARF5 DW_AT_reference and DW_AT_rvalue_reference

2016-10-24 Thread Jakub Jelinek
On Mon, Oct 24, 2016 at 02:34:04PM -0400, Jason Merrill wrote: > On Mon, Oct 24, 2016 at 10:29 AM, Jakub Jelinek wrote: > > This is another addition in DWARF5. The patch emits these attributes > > only for DW_TAG_subprogram for non-static ref-qualified member functions. > >

Re: [PATCH, v2] Fix computation of register limit for -fsched-pressure

2016-10-24 Thread Jeff Law
On 10/18/2016 01:47 PM, Pat Haugen wrote: The patch here, https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01872.html, attempted to scale down the register limit used by -fsched-pressure for the case where the block in question executes as frequently as the entry block to just the call_clobbered

Re: [PATCH] Fix bootstrap with --enable-languages=all,go

2016-10-24 Thread Jeff Law
On 10/19/2016 06:13 AM, Rainer Orth wrote: Hi Jakub, 2016-10-01 Rainer Orth * configure.ac (target_libraries): Readd target-boehm-gc. Restore --enable-objc-gc handling. * configure: Regenerate. This is incomplete. I guess it can be

Re: RFC [1/3] divmod transform v2

2016-10-24 Thread Jeff Law
On 10/24/2016 09:35 AM, Prathamesh Kulkarni wrote: On 24 October 2016 at 20:23, Jeff Law wrote: On 10/24/2016 01:28 AM, Richard Biener wrote: [ big snip ] + + /* Update all statements in stmts. + if stmt is lhs = op1 TRUNC_DIV_EXPR op2, change to lhs = REALPART_EXPR

Re: [PATCH] Emit DWARF5 DW_AT_reference and DW_AT_rvalue_reference

2016-10-24 Thread Jason Merrill
On Mon, Oct 24, 2016 at 10:29 AM, Jakub Jelinek wrote: > This is another addition in DWARF5. The patch emits these attributes > only for DW_TAG_subprogram for non-static ref-qualified member functions. > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? OK.

Re: [C++ PATCH] Use VAR_P (x) instead of TREE_CODE () == VAR_DECL in C++ FE

2016-10-24 Thread Jason Merrill
OK. On Mon, Oct 24, 2016 at 10:31 AM, Jakub Jelinek wrote: > Hi! > > Just a cleanup patch, most of the FE already uses these macros. > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > 2016-10-24 Jakub Jelinek > > *

Re: PR libgcc/78064: Add missing include directive to unwind-c.c

2016-10-24 Thread Jakub Jelinek
On Fri, Oct 21, 2016 at 12:14:50PM +0200, Florian Weimer wrote: > See > > https://gcc.gnu.org/ml/gcc/2016-10/msg00165.html > > for the background. This causes pthread_cond_wait in glibc to write out of > bounds on i386. > > Fix was suggested by Jim Wilson. > > Tested on

Re: [rs6000] Add support for signed overflow arithmetic

2016-10-24 Thread Segher Boessenkool
On Mon, Oct 24, 2016 at 06:14:48PM +0200, Eric Botcazou wrote: > > Maybe the best you can do is generate the double-width result, and then > > check if the upper halve is the sign extension of the lower halve. Maybe > > some trickery can help (for add/sub/neg at least). > > That's inefficient,

Re: [PATCH, ARM 2/7, ping3] Adapt atomic and exclusive load and store to ARMv8-M Baseline

2016-10-24 Thread Thomas Preudhomme
Hi Kyrill, On 24/10/16 17:40, Kyrill Tkachov wrote: Hi Thomas, On 24/10/16 09:04, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 14/10/16 14:48, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 03/10/16 17:42, Thomas Preudhomme wrote: Ping? Best regards, Thomas On

[PATCH] Five patches for std::experimental::filesystem

2016-10-24 Thread Jonathan Wakely
These implement DR resolutions and fix bugs. Fix error handling in filesystem::is_empty * src/filesystem/ops.cc (is_empty): Fix error handling. * testsuite/experimental/filesystem/operations/is_empty.cc: New test. PR71337 fix filesystem::temp_directory_path error

[Fortran, patch, pr78053, v1] [OOP] SELECT TYPE on CLASS(*) component for deferred length char arrays ICEs for -O > 0

2016-10-24 Thread Andre Vehreschild
Hi all, attached patch fixes an ICE in gfortran when an unlimited polymorphic entity was used to store a char array of deferred/assumed length. The patch typedefs the necessary type now copying the behavior from trans-array.c::gfc_trans_create_temp_array(). Furthermore does the patch now

Re: [PATCH, ARM 2/7, ping3] Adapt atomic and exclusive load and store to ARMv8-M Baseline

2016-10-24 Thread Kyrill Tkachov
Hi Thomas, On 24/10/16 09:04, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 14/10/16 14:48, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 03/10/16 17:42, Thomas Preudhomme wrote: Ping? Best regards, Thomas On 22/09/16 14:41, Thomas Preudhomme wrote: Hi, This patch

Re: [patch, fortran] PR45516 - [F08] allocatable components of recursive type

2016-10-24 Thread Andre Vehreschild
Hi Paul, On Mon, 24 Oct 2016 14:42:42 +0200 Paul Richard Thomas wrote: > Dear All, > > Please find attached the patch for allocatable components of recursive > type. The patch is pretty straightforward in that for the main part > they are treated exactly as their

Re: [Patch] Don't expand targetm.stack_protect_fail if it's NULL_TREE

2016-10-24 Thread Jiong Wang
On 24/10/16 16:22, Jeff Law wrote: On 10/20/2016 01:46 PM, Jiong Wang wrote: 2016-10-20 19:50 GMT+01:00 Jeff Law : On 10/20/2016 09:28 AM, Jiong Wang wrote: The current code suppose targetm.stack_protect_fail always generate something. But in case one target start to

[PATCH][AArch64] Cleanup add expander

2016-10-24 Thread Wilco Dijkstra
The add expander still contains some expansion code that was required for the previous prolog/epilog code, but which is no longer needed. I also noticed that the current version splits off immediates from frame addressing instructions, which doesn't seem a good idea. Avoiding this resulted in

Re: [PATCH][AArch64] Expand DImode constant stores to two SImode stores when profitable

2016-10-24 Thread Andrew Pinski
On Mon, Oct 24, 2016 at 7:27 AM, Kyrill Tkachov wrote: > Hi all, > > When storing a 64-bit immediate that has equal bottom and top halves we > currently > synthesize the repeating 32-bit pattern twice and perform a single X-store. > With this patch we synthesize the

Re: [patch, fortran] PR77828 Linking gfortran-7 compiled program with libgfortran of 5.x allowed but crashes

2016-10-24 Thread Jerry DeLisle
On 10/24/2016 07:49 AM, Janne Blomqvist wrote: On Mon, Oct 24, 2016 at 2:53 PM, Jerry DeLisle wrote: On 10/18/2016 04:48 PM, Jerry DeLisle wrote: Hi Folks, The attached patch does some minor cleanup and bumps the libgfortran version number. I have wanted to reorder

Re: [rs6000] Add support for signed overflow arithmetic

2016-10-24 Thread Eric Botcazou
> Maybe the best you can do is generate the double-width result, and then > check if the upper halve is the sign extension of the lower halve. Maybe > some trickery can help (for add/sub/neg at least). That's inefficient, even for additive operations. > You can also just FAIL the expander if

Re: [PATCH 0/7, GCC, V8M] ARMv8-M Security Extensions

2016-10-24 Thread Kyrill Tkachov
Hi Andre, On 24/08/16 12:02, Andre Vieira (lists) wrote: On 10/08/16 09:08, Andre Vieira (lists) wrote: On 09/08/16 17:47, Sandra Loosemore wrote: On 08/09/2016 06:01 AM, Andre Vieira (lists) wrote: [snip] The documentation is in the ARMV8-M Security Extensions in: ARM®v8-M Security

Re: [PATCH] Extend -Wint-in-bool-context to warn for multiplications

2016-10-24 Thread Jeff Law
On 10/23/2016 05:31 AM, Bernd Edlinger wrote: On 10/22/16 08:52, Bernd Edlinger wrote: > On 10/22/16 04:17, Martin Sebor wrote: >> On 10/21/2016 04:37 PM, Joseph Myers wrote: >>> The quoting in the diagnostic should be %<&&%>, not '&&'. >> >> Presumably same for '*' (i.e., %<*%>). >> >> But

Re: Verify package integrity of downloaded prerequisites (partially fixes 61439)

2016-10-24 Thread Jeff Law
On 10/24/2016 02:44 AM, Richard Biener wrote: On Fri, Oct 7, 2016 at 3:10 PM, Moritz Klammler wrote: I would like to bump my patch that makes the `contrib/download_prerequisites` script verify the checksums of the downloaded packages and augments it with a few additional

Re: RFC [3/3] divmod transform v2 - add test cases

2016-10-24 Thread Prathamesh Kulkarni
On 16 October 2016 at 11:31, Prathamesh Kulkarni wrote: > Hi, > This patch adds test-cases for divmod transform. > OK to commit ? ping https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01241.html Thanks, Prathamesh > > Thanks, > Prathamesh

Re: RFC [2/3] divmod transform v2 - override expand_divmod_libfunc for ARM port

2016-10-24 Thread Prathamesh Kulkarni
On 16 October 2016 at 11:30, Prathamesh Kulkarni wrote: > Hi, > This patch overrides expand_divmod_libfunc hook for ARM port. > I separated the SImode tests into separate file from DImode tests > because certain arm configs (cortex-15) have hardware div insn for >

Re: RFC [1/3] divmod transform v2

2016-10-24 Thread Prathamesh Kulkarni
On 24 October 2016 at 20:23, Jeff Law wrote: > On 10/24/2016 01:28 AM, Richard Biener wrote: > [ big snip ] > > >> >>> + >>> + /* Update all statements in stmts. >>> + if stmt is lhs = op1 TRUNC_DIV_EXPR op2, change to lhs = >>> REALPART_EXPR >>> +

Re: [PATCH v3] gcc/config/tilegx/tilegx.c (tilegx_function_profiler): Save r10 to stack before call mcount

2016-10-24 Thread Jeff Law
On 10/23/2016 12:11 PM, Bernd Edlinger wrote: Hi, I don't know much about tilegx, but I think the patch should work as is. This is because the Save r10 code is a bundle { addi sp, sp, -8 st sp, r10 } which stores r10 at [sp] and subtracts 8 from sp. The restore r10 code is actually

Re: [Patch] Don't expand targetm.stack_protect_fail if it's NULL_TREE

2016-10-24 Thread Jeff Law
On 10/20/2016 01:46 PM, Jiong Wang wrote: 2016-10-20 19:50 GMT+01:00 Jeff Law : On 10/20/2016 09:28 AM, Jiong Wang wrote: The current code suppose targetm.stack_protect_fail always generate something. But in case one target start to generate NULL_TREE, there will be ICE.

Re: RFA: Fail gracefully when registering info for an unknown plugin

2016-10-24 Thread Jeff Law
On 10/20/2016 08:19 AM, Nick Clifton wrote: Hi Guys, Whilst experimenting with writing a plugin for gcc I discovered that I could cause a segfault if I attempted to register a PLUGIN_INFO callback with any name other than the name of the plugin. The attached patch fixes this problem

Re: relax rule for flexible array members in 6.x (78039 - fails to compile glibc tests)

2016-10-24 Thread Jeff Law
On 10/21/2016 05:47 PM, Martin Sebor wrote: Bug 78039 complains that the fix for c++/71912 recently backported to the GCC 6 branch causes GCC 6 to reject Glibc tests that expect to be able to define structs with multiple flexible array members, despite it violating the C standard(*). The

Re: Implement -Wduplicated-branches (PR c/64279)

2016-10-24 Thread Martin Sebor
On 10/24/2016 08:44 AM, Marek Polacek wrote: On Mon, Oct 24, 2016 at 04:39:20PM +0200, Jakub Jelinek wrote: On Mon, Oct 24, 2016 at 04:34:40PM +0200, Marek Polacek wrote: On Mon, Oct 24, 2016 at 08:18:25AM -0600, Martin Sebor wrote: The case above is just a case where with -O GCC can figure

[PATCH] GIMPLE store merging pass

2016-10-24 Thread Kyrill Tkachov
Hi all, This is a slight update over [1] with Richard's feedback addressed. In terminate_all_aliasing_chains we now terminate the chain early if the destination is writing to a base offset by a variable amount. This avoids walking the store chain and performing more alias checks. The param

Re: [PATCH] Simplify conditions in EVRP, handle taken edge

2016-10-24 Thread Jeff Law
On 10/20/2016 12:10 AM, kugan wrote: Hi, On 20/10/16 02:54, Andrew Pinski wrote: On Wed, Oct 19, 2016 at 1:01 AM, Christophe Lyon wrote: On 18 October 2016 at 09:34, Richard Biener wrote: On Mon, 17 Oct 2016, Richard Biener wrote: This

Re: RFC [1/3] divmod transform v2

2016-10-24 Thread Jeff Law
On 10/24/2016 01:28 AM, Richard Biener wrote: [ big snip ] + + /* Update all statements in stmts. + if stmt is lhs = op1 TRUNC_DIV_EXPR op2, change to lhs = REALPART_EXPR + if stmt is lhs = op1 TRUNC_MOD_EXPR op2, change to lhs = IMAGPART_EXPR. */ I'd just emit a copy from RES to

Re: backport fix for c/71115 to branches?

2016-10-24 Thread Jeff Law
On 10/22/2016 10:28 AM, Martin Sebor wrote: Bug 71115 - [5/6 Regression] Missing warning: excess elements in struct initializer, was fixed on trunk but the bug is still open since the patch hasn't been backported to the affected branches. Is it okay to go ahead and backport it to 6.x and 5.x?

Re: [patch, fortran] PR77828 Linking gfortran-7 compiled program with libgfortran of 5.x allowed but crashes

2016-10-24 Thread Janne Blomqvist
On Mon, Oct 24, 2016 at 2:53 PM, Jerry DeLisle wrote: > On 10/18/2016 04:48 PM, Jerry DeLisle wrote: >> >> Hi Folks, >> >> The attached patch does some minor cleanup and bumps the libgfortran >> version >> number. I have wanted to reorder the dtp structure for many years

Re: [PATCH] Use VAR_P (x) instead of TREE_CODE () == VAR_DECL in fortran FE

2016-10-24 Thread Jeff Law
On 10/24/2016 08:34 AM, Jakub Jelinek wrote: Hi! This is a small cleanup patch, use VAR_P or VAR_OR_FUNCTION_DECL_P macros some more (similar patch has been done for gcc/ directory a few weeks ago). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-10-24 Jakub Jelinek

Re: [PATCH] Use VAR_P (x) instead of TREE_CODE () == VAR_DECL in config/i386

2016-10-24 Thread Jeff Law
On 10/24/2016 08:32 AM, Jakub Jelinek wrote: Hi! This is a small cleanup patch for i386 backend. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-10-24 Jakub Jelinek * config/i386/i386.c (ix86_in_large_data_p, ix86_expand_builtin): Use

Re: Implement -Wduplicated-branches (PR c/64279)

2016-10-24 Thread Marek Polacek
On Mon, Oct 24, 2016 at 04:39:20PM +0200, Jakub Jelinek wrote: > On Mon, Oct 24, 2016 at 04:34:40PM +0200, Marek Polacek wrote: > > On Mon, Oct 24, 2016 at 08:18:25AM -0600, Martin Sebor wrote: > > > > The case above is just a case where with -O GCC can figure out what the > > > > value > > > >

Re: Implement -Wduplicated-branches (PR c/64279)

2016-10-24 Thread Jakub Jelinek
On Mon, Oct 24, 2016 at 04:34:40PM +0200, Marek Polacek wrote: > On Mon, Oct 24, 2016 at 08:18:25AM -0600, Martin Sebor wrote: > > > The case above is just a case where with -O GCC can figure out what the > > > value > > > of a const-qualified variable is, see > > >

Re: Implement -Wduplicated-branches (PR c/64279)

2016-10-24 Thread Marek Polacek
On Mon, Oct 24, 2016 at 08:18:25AM -0600, Martin Sebor wrote: > > The case above is just a case where with -O GCC can figure out what the > > value > > of a const-qualified variable is, see decl_constant_value_for_optimization. > > Since the warning is implemented even before gimplifying,

[PATCH] Use VAR_P (x) instead of TREE_CODE () == VAR_DECL in fortran FE

2016-10-24 Thread Jakub Jelinek
Hi! This is a small cleanup patch, use VAR_P or VAR_OR_FUNCTION_DECL_P macros some more (similar patch has been done for gcc/ directory a few weeks ago). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-10-24 Jakub Jelinek *

[PATCH] Use VAR_P (x) instead of TREE_CODE () == VAR_DECL in config/i386

2016-10-24 Thread Jakub Jelinek
Hi! This is a small cleanup patch for i386 backend. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-10-24 Jakub Jelinek * config/i386/i386.c (ix86_in_large_data_p, ix86_expand_builtin): Use VAR_P (x) instead of TREE_CODE (x) ==

[C++ PATCH] Use VAR_P (x) instead of TREE_CODE () == VAR_DECL in C++ FE

2016-10-24 Thread Jakub Jelinek
Hi! Just a cleanup patch, most of the FE already uses these macros. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2016-10-24 Jakub Jelinek * cxx-pretty-print.c (pp_cxx_check_constraint): Use VAR_P (x) instead of TREE_CODE (x) ==

[PATCH] Emit DWARF5 DW_AT_reference and DW_AT_rvalue_reference

2016-10-24 Thread Jakub Jelinek
Hi! This is another addition in DWARF5. The patch emits these attributes only for DW_TAG_subprogram for non-static ref-qualified member functions. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? We really should emit it also for DW_TAG_subroutine_type for PMF types, the

[PATCH][ARM] Avoid partial overlaps in DImode shifts

2016-10-24 Thread Wilco Dijkstra
With -fpu=neon DI mode shifts are expanded after reload. DI mode registers can either fully or partially overlap. However the shift expansion code can only deal with the full overlap case, and generates incorrect code for partial overlaps. The fix is to add new variants that support either

[PATCH][AArch64] Expand DImode constant stores to two SImode stores when profitable

2016-10-24 Thread Kyrill Tkachov
Hi all, When storing a 64-bit immediate that has equal bottom and top halves we currently synthesize the repeating 32-bit pattern twice and perform a single X-store. With this patch we synthesize the 32-bit pattern once into a W register and store that twice using an STP. This reduces codesize

Re: [PATCH, Fortran] Four small DEC extensions

2016-10-24 Thread Fritz Reese
https://gcc.gnu.org/ml/fortran/2016-10/msg00087.html et. al. > On 12/10/16 13:30, Fritz Reese wrote: >> Here I submit for review four small extensions to the GNU Fortran >> frontend for compatibility with legacy code. I figure it might be a >> nice change of pace from my larger patches. Never

[C++ PATCH] Fix postfix-expression parsing (PR c++/78089)

2016-10-24 Thread Jakub Jelinek
Hi! While writing a testcase for __builtin_launder, I've noticed we don't parse __builtin_shuffle or __builtin_addressof properly (as well as do error recovery e.g. for typeid in constant expression etc.). The problem is that several spots would return something; from the first switch in

Re: Implement -Wduplicated-branches (PR c/64279)

2016-10-24 Thread Martin Sebor
On 10/24/2016 07:59 AM, Marek Polacek wrote: On Thu, Oct 20, 2016 at 02:21:42PM -0600, Martin Sebor wrote: --- gcc/testsuite/c-c++-common/Wduplicated-branches-1.c +++ gcc/testsuite/c-c++-common/Wduplicated-branches-1.c @@ -0,0 +1,187 @@ +/* PR c/64279 */ +/* { dg-do compile } */ +/* {

Re: Implement -Wduplicated-branches (PR c/64279) (v2)

2016-10-24 Thread Marek Polacek
On Thu, Oct 20, 2016 at 12:28:36PM +0200, Marek Polacek wrote: > I found a problem with this patch--we can't call do_warn_duplicated_branches > in > build_conditional_expr, because that way the C++-specific codes might leak > into > the hasher. Instead, I should use operand_equal_p, I think.

C++ and DWARF patches ping

2016-10-24 Thread Jakub Jelinek
Hi! I'd like to ping a couple of patches: - PR77886 http://gcc.gnu.org/ml/gcc-patches/2016-10/msg00524.html - fix -Wimplicit-fallthrough handling in templates - DWARF http://gcc.gnu.org/ml/gcc-patches/2016-10/msg01183.html - DW_AT_inline for C++17 inline variables - DWARF5

Re: Implement -Wduplicated-branches (PR c/64279)

2016-10-24 Thread Marek Polacek
On Thu, Oct 20, 2016 at 12:56:12PM -0600, Jeff Law wrote: > On 10/20/2016 08:37 AM, David Malcolm wrote: > > On Thu, 2016-10-20 at 16:24 +0200, Marek Polacek wrote: > > > On Thu, Oct 20, 2016 at 10:11:55AM -0400, Jason Merrill wrote: > > > > On Wed, Oct 19, 2016 at 7:07 AM, Marek Polacek

Re: Implement -Wduplicated-branches (PR c/64279)

2016-10-24 Thread Marek Polacek
On Thu, Oct 20, 2016 at 02:21:42PM -0600, Martin Sebor wrote: > > --- gcc/testsuite/c-c++-common/Wduplicated-branches-1.c > > +++ gcc/testsuite/c-c++-common/Wduplicated-branches-1.c > > @@ -0,0 +1,187 @@ > > +/* PR c/64279 */ > > +/* { dg-do compile } */ > > +/* { dg-options "-Wduplicated-branches

[Patch 3/4] Half to double precision conversions

2016-10-24 Thread James Greenhalgh
Hi, This patch adds the half-to-double conversions, both as library functions, or when supported in hardware, using the appropriate instructions. That means adding support for the __gnu_d2h_{ieee/alternative} library calls added in patch 2/4, and providing a more aggressive truncdfhf2 where we

[Patch ARM 4/4] Enable _Float16

2016-10-24 Thread James Greenhalgh
Hi, Finally, having added support for single-step DFmode to HFmode conversions, this patch adds support for _Float16 to the ARM back-end. That means making sure that only __fp16 promotes and adding similar hooks to those used in the AArch64 port giving the excess precision rules, and marking

[Patch 2/4] [libgcc] Add double to half conversions.

2016-10-24 Thread James Greenhalgh
Hi, Conversions from double precision floats to the ARM __fp16 are required to round only once. This patch adds a functions named __gnu_d2h_ieee and __gnu_d2h_alternative for double to __fp16 conversions in IEEE and ARM alternative format. The make use of the existing __gnu_float2h_internal

[Patch 1/4] [libgcc, ARM] Generalise float-to-half conversion function.

2016-10-24 Thread James Greenhalgh
Hi, I'm adapting this patch from work started by Matthew Wahab. Conversions from double precision floats to the ARM __fp16 are required to round only once. A conversion function for double to __fp16 to support this on soft-fp targets. This and the following patch add this conversion function by

[Patch 0/4] [ARM] Enable _Float16 on ARM

2016-10-24 Thread James Greenhalgh
Hi, This patch set builds on the AArch64 support for _Float16 that will be added once the patch set starting at https://gcc.gnu.org/ml/gcc-patches/2016-09/msg02383.html is accepted. Unlike the AArch64 support, we've not got too much to do, outside of setting up a single step conversions between

[PING] [PATCH, C++] Warn on redefinition of builtin functions (PR c++/71973)

2016-10-24 Thread Bernd Edlinger
Hi! I'd like to ping for my patch here: https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01348.html Thanks Bernd. On 10/17/16 21:18, Bernd Edlinger wrote: > On 10/17/16 20:05, Joseph Myers wrote: >> On Sun, 16 Oct 2016, Bernd Edlinger wrote: >> >>> Second, the declaration in the glibc header

Re: [PATCH][AArch64] Fix PR target/77822: Use tighter predicates for zero_extract patterns

2016-10-24 Thread Kyrill Tkachov
On 24/10/16 12:29, Kyrill Tkachov wrote: Ping. https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01321.html I just noticed my original ChangeLog entry was truncated. It is 2016-10-04 Kyrylo Tkachov PR target/77822 * config/aarch64/aarch64.md (*tb1): Use

Re: libgo patch committed: Rewrite interface code into Go

2016-10-24 Thread Rainer Orth
Hi Ian, > I committed this patch which should fix this problem. Bootstrapped > and ran Go testsuite on x86_64-pc-linux-gnu, which admittedly proves > little. It did fix it indeed: Solaris 10, 11, and 12 bootstraps are fine again. Thanks. Rainer --

[PATCH] Fix PR71491

2016-10-24 Thread Richard Biener
Committed. Richard. 2016-10-24 Richard Biener PR testsuite/71491 * gcc.dg/vect/slp-43.c: Adjust for !vect_hw_misalign. * gcc.dg/vect/slp-45.c: Likewise. Index: gcc/testsuite/gcc.dg/vect/slp-43.c

[patch, fortran] PR45516 - [F08] allocatable components of recursive type

2016-10-24 Thread Paul Richard Thomas
Dear All, Please find attached the patch for allocatable components of recursive type. The patch is pretty straightforward in that for the main part they are treated exactly as their pointer equivalents. The exception to this is the automatic deallocation of allocatable components. I tried to use

Re: [PATCH] PR77985: DWARF: Emit DW_AT_comp_dir in all cases, even if source is an absolute path

2016-10-24 Thread Ximin Luo
Richard Biener: > On Mon, Oct 24, 2016 at 12:53 PM, Ximin Luo wrote: >> Richard Biener: >>> On Fri, Oct 21, 2016 at 12:56 PM, Ximin Luo wrote: Richard Biener: > On Tue, Oct 18, 2016 at 2:35 PM, Ximin Luo wrote: >> >>

[PATCH] Make vector::data() return type consistent in C++98

2016-10-24 Thread Jonathan Wakely
At https://gcc.gnu.org/ml/libstdc++/2016-08/msg00123.html I suggested changing the non-standard return type of vector::data() in C++98 mode. Nobody objected, so I'm making that change. This removes a silent ABI incompatibility betwen C++98 mode and later modes, for std::vector::data()

Re: [RFC] Speed-up -fprofile-update=atomic

2016-10-24 Thread Martin Liška
On 10/17/2016 02:03 PM, Richard Biener wrote: > On Mon, Oct 17, 2016 at 1:46 PM, Martin Liška wrote: >> On 10/13/2016 11:43 AM, Richard Biener wrote: >>> On Wed, Oct 12, 2016 at 3:52 PM, Martin Liška wrote: On 10/04/2016 11:45 AM, Richard Biener wrote: >

Re: [PATCH] PR77985: DWARF: Emit DW_AT_comp_dir in all cases, even if source is an absolute path

2016-10-24 Thread Richard Biener
On Mon, Oct 24, 2016 at 12:53 PM, Ximin Luo wrote: > Richard Biener: >> On Fri, Oct 21, 2016 at 12:56 PM, Ximin Luo wrote: >>> Richard Biener: On Tue, Oct 18, 2016 at 2:35 PM, Ximin Luo wrote: > > Thanks, I'll add the

Re: [patch, fortran] PR77828 Linking gfortran-7 compiled program with libgfortran of 5.x allowed but crashes

2016-10-24 Thread Jerry DeLisle
On 10/18/2016 04:48 PM, Jerry DeLisle wrote: Hi Folks, The attached patch does some minor cleanup and bumps the libgfortran version number. I have wanted to reorder the dtp structure for many years now. Not strictly needed but it has bugged me forever. The bump is needed because of the

Re: [patch] Fix PHI optimization issue with boolean types

2016-10-24 Thread Richard Biener
On Mon, Oct 24, 2016 at 1:39 PM, Eric Botcazou wrote: >> > But integer_truep is just integer_onep for BOOLEAN_TYPEs. >> >> Yes, but it's more descriptive IMHO. > > At the cost of consistency with fits_to_tree_p though. > >> fits_to_tree_p avoids creating an INTEGER_CST in

Re: [rs6000] Add support for signed overflow arithmetic

2016-10-24 Thread Segher Boessenkool
On Mon, Oct 24, 2016 at 01:20:09PM +0200, Eric Botcazou wrote: > > You can use SO instead, but then you have to make sure it is clear before > > you run the OE=1 instruction. SO of course is the cheapest way to access > > overflow (it is copied to the CR field on any compare or recording insn). >

Re: [patch] Fix PHI optimization issue with boolean types

2016-10-24 Thread Eric Botcazou
> > But integer_truep is just integer_onep for BOOLEAN_TYPEs. > > Yes, but it's more descriptive IMHO. At the cost of consistency with fits_to_tree_p though. > fits_to_tree_p avoids creating an INTEGER_CST in ggc memory and thus is the > prefered way to test if you have a wide-int but not yet

Re: [PATCH][AArch64] Add function comments to some prologue/epilogue helpers

2016-10-24 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2016-10/msg00839.html Thanks, Kyrill On 12/10/16 11:23, Kyrill Tkachov wrote: Hi all, I'm looking at the aarch64 prologue and epilogue generation code and I noticed many of the helper functions don't have function comments so it makes it harder than

Re: [ada, testsuite] Parallelize check-gnat

2016-10-24 Thread Rainer Orth
Hi Jakub, > On Mon, Oct 24, 2016 at 11:12:20AM +0200, Rainer Orth wrote: >> Not really: on that SPARC T5 system, I have (sequential gnat.dg >> vs. acats with 19 partitions), all within a -j96 bootstrap: >> >> wall clock #tests >> >> gnat.dg 6505s = 108m

Re: [PATCH][AArch64] Fix PR target/77822: Use tighter predicates for zero_extract patterns

2016-10-24 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2016-10/msg01321.html Thanks, Kyrill On 17/10/16 17:15, Kyrill Tkachov wrote: Hi all, For the attached testcase the code ends up trying to extract bits outside the range of the normal register widths. The aarch64 patterns for ubfz and tbnz end up

Re: [PATCH][check_GNU_style.sh] More aggressively ignore dg-xxx directives

2016-10-24 Thread Kyrill Tkachov
On 24/10/16 12:01, Bernd Schmidt wrote: On 10/21/2016 10:59 PM, Mike Stump wrote: On Oct 21, 2016, at 12:47 PM, Martin Sebor wrote: The latest patch works as expected for me, both with an operand and with stdin. But since I'm not empowered to approve it one of the others

Re: [PATCH] Use SCEV in EVRP, fix single predecessor discovery

2016-10-24 Thread Richard Biener
On Fri, 21 Oct 2016, Richard Biener wrote: > > This makes us derive ranges for loop IVs in EVRP using > adjust_range_with_scevs. It also allows us to derive ranges from > conditions in loop preheaders (I think that's still broken because > we force simple preheaders and predecessor search

Re: [rs6000] Add support for signed overflow arithmetic

2016-10-24 Thread Eric Botcazou
> But not in the "Base" category. GCC should not generate mcrxr unless some > flag enabling the "Embedded" category is set (this can of course be set > via -mcpu=), or we have ISA 1.xx . It is probably nicer if we treat > mcrxr separately, with an -mmcrxr flag, with TARGET_MCRXR. OK, that makes

Re: [PATCH] 77864 Fix noexcept conditions for map/set default constructors

2016-10-24 Thread Jonathan Wakely
On 12/10/16 22:36 +0200, François Dumont wrote: On 10/10/2016 23:01, Tim Song wrote: Trying again...with a few edits. On Mon, Oct 10, 2016 at 3:24 PM, François Dumont wrote: @@ -602,24 +612,32 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION struct _Rb_tree_impl : public

Re: [PATCH][check_GNU_style.sh] More aggressively ignore dg-xxx directives

2016-10-24 Thread Bernd Schmidt
On 10/21/2016 10:59 PM, Mike Stump wrote: On Oct 21, 2016, at 12:47 PM, Martin Sebor wrote: The latest patch works as expected for me, both with an operand and with stdin. But since I'm not empowered to approve it one of the others reviewers will need to give it their

Re: [rs6000] Add support for signed overflow arithmetic

2016-10-24 Thread Segher Boessenkool
On Mon, Oct 24, 2016 at 11:54:27AM +0200, Eric Botcazou wrote: > > mcrxr does not exist anymore. It is not implemented in any IBM non-embedded > > CPU since POWER4. PA6T does not have it either. In some versions of the > > 2.0x ISA it does exist, but only in the optional "embedded" category. >

Re: [PATCH, RFC] Fix PR71915, PR71490: Handle casts on strides consistently

2016-10-24 Thread Richard Biener
On Fri, Oct 21, 2016 at 11:46 PM, Bill Schmidt wrote: > Hi, > > I've been meaning for some time now to do a better job handling strength > reduction candidates where the stride of the candidate and its basis > involves a cast (usually widening) from another type. The

Re: [PATCH] PR77985: DWARF: Emit DW_AT_comp_dir in all cases, even if source is an absolute path

2016-10-24 Thread Ximin Luo
Richard Biener: > On Fri, Oct 21, 2016 at 12:56 PM, Ximin Luo wrote: >> Richard Biener: >>> On Tue, Oct 18, 2016 at 2:35 PM, Ximin Luo wrote: Thanks, I'll add the Changelog entry. My computer isn't very powerful, so I didn't bootstrap it

Re: [v3 PATCH] Cross-port the latest resolution of LWG2756 and some bug-fixes to experimental::optional.

2016-10-24 Thread Jonathan Wakely
On 22/10/16 19:39 +0300, Ville Voutilainen wrote: On 22 October 2016 at 19:34, Ville Voutilainen wrote: Cross-port the latest resolution of LWG2756 and some bug-fixes to experimental::optional. PR libstc++/77288 PR libstdc++/77727 And yes, I'll

Re: [v3 PATCH] Cross-port exception-safety and move fixes of std::any to std::experimental::any.

2016-10-24 Thread Jonathan Wakely
On 24/10/16 02:35 +0300, Ville Voutilainen wrote: On 24 October 2016 at 02:33, Ville Voutilainen wrote: * include/std/any (operator=(const any&)): No sir, that's not what the patch modifies: 2016-10-24 Ville Voutilainen

[patch,avr] Fix PR71676 / PR71678: casesi not working for SImode / Dimode

2016-10-24 Thread Georg-Johann Lay
This fixes issues with casesi that originate from taking hard coded subreg:HI of the SImode switch value: * The subreg is cutting away the upper bytes which is wrong code if the switch actually operates on a value > 16 bits. * The hard-coded subreg will ICE on DImode because of nested

  1   2   >