Re: [PATCH] Fix missed DSE opportunity with operator delete.

2016-04-22 Thread Mikhail Maltsev
On 04/20/2016 05:12 PM, Richard Biener wrote: > You have > > +static tree > +handle_free_attribute (tree *node, tree name, tree /*args*/, int /*flags*/, > + bool *no_add_attrs) > +{ > + tree decl = *node; > + if (TREE_CODE (decl) == FUNCTION_DECL > + &&

libgo patch committed: Commit final version of pkg-config support

2016-04-22 Thread Ian Lance Taylor
This patch updates gccgo to the final version of the gccgo pkg-config support committed to the gc repository. The patch to gc is https://golang.org/cl/18790, by Michael Hudson-Doyle. This fixes https://golang.org/issue/11739. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed

Go patch committed: expose the runtime code in a Call_expression

2016-04-22 Thread Ian Lance Taylor
This patch by Chris Manghane exposes the runtime function code in a Call_expression, in the cases where function call is to a runtime function. This isn't useful by itself but is a prerequisite for future work. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline.

Re: [Patch, regex, libstdc++/70745] Fix match_not_bow and match_not_eow

2016-04-22 Thread Tim Shen
On Fri, Apr 22, 2016 at 3:23 AM, Jonathan Wakely wrote: > OK for trunk. > > It is a small, safe change, so OK for the branches (6/5/4.9) too, but > let's wait a short while to make sure nobody finds any problems on > trunk (and gcc-6-branch is frozen for release right now anyway). Committed to

[committed] Fix asan typo (PR sanitizer/70712)

2016-04-22 Thread Jakub Jelinek
Hi! As the testcase below shows, -fsanitize=address has issues with correspondence of actual layout of vars in the stack (or heap) frame and what regions are considered to be pads (and which kind), if there are variables aligned to more than ASAN_RED_ZONE_SIZE (32 bytes). The bug is in a typo,

[PATCH] AARCH64: Remove spurious attribute __unused__ from NEON intrinsic

2016-04-22 Thread Wladimir J. van der Laan
The lane parameter is not unused, so should not be marked as such. The others were removed in https://patchwork.ozlabs.org/patch/272912/, but this one appears to have been missed. --- gcc/config/aarch64/arm_neon.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] Fixup nb_iterations_upper_bound adjustment for vectorized loops

2016-04-22 Thread Richard Biener
On Thu, Apr 21, 2016 at 6:09 PM, Ilya Enkovich wrote: > Hi, > > Currently when loop is vectorized we adjust its nb_iterations_upper_bound > by dividing it by VF. This is incorrect since nb_iterations_upper_bound > is upper bound for ( - 1) and therefore simple > dividing

Re: Inline across -ffast-math boundary

2016-04-22 Thread Richard Biener
On Thu, 21 Apr 2016, Jan Hubicka wrote: > Hi, > this patch implements the long promised logic to inline across -ffast-math > boundary when eitehr caller or callee has no fp operations in it. This is > needed to resolve code quality regression on Firefox with LTO where > -O3/-O2/-Ofast flags are

Re: [4.9/5/6: PATCH] Replace -skip-rax-setup with -mskip-rax-setup

2016-04-22 Thread Richard Biener
On Thu, Apr 21, 2016 at 4:52 PM, H.J. Lu wrote: > On Wed, Apr 20, 2016 at 5:56 AM, H.J. Lu wrote: >> This fixed a typo. Checked into trunk. >> >> H.J. >> --- >> Index: gcc/ChangeLog >> ===

Re: [RFC][PATCH][PR40921] Convert x + (-y * z * z) into x - y * z * z

2016-04-22 Thread Richard Biener
On Thu, Apr 21, 2016 at 1:12 PM, kugan wrote: > Hi Richard, > > > On 19/04/16 22:11, Richard Biener wrote: >> >> On Tue, Apr 19, 2016 at 1:36 PM, Richard Biener >> wrote: >>> >>> On Tue, Apr 19, 2016 at 1:35 PM, Richard Biener >>>

Re: [PATCH] AARCH64: Remove spurious attribute __unused__ from NEON intrinsic

2016-04-22 Thread James Greenhalgh
On Fri, Apr 22, 2016 at 07:59:41AM +0200, Wladimir J. van der Laan wrote: > The lane parameter is not unused, so should not be marked as such. > > The others were removed in https://patchwork.ozlabs.org/patch/272912/, > but this one appears to have been missed. The patch looks good to me, and is

Re: match.pd patch: u + 3 < u is u > UINT_MAX - 3

2016-04-22 Thread Marc Glisse
On Fri, 22 Apr 2016, Richard Biener wrote: On Fri, Apr 22, 2016 at 5:29 AM, Marc Glisse wrote: Hello, this optimizes a common pattern for unsigned overflow detection, when one of the arguments turns out to be a constant. There are more ways this could look like, (a + 42

Re: [PATCH GCC]Refactor IVOPT.

2016-04-22 Thread Richard Biener
On Thu, Apr 21, 2016 at 7:26 PM, Bin Cheng wrote: > Hi, > This patch refactors IVOPT in three major aspects: > Firstly it rewrites iv_use groups. Use group is originally introduced only > for address type uses, this patch makes it general to all (generic, compare, > address)

Re: match.pd patch: u + 3 < u is u > UINT_MAX - 3

2016-04-22 Thread Richard Biener
On Fri, Apr 22, 2016 at 5:29 AM, Marc Glisse wrote: > Hello, > > this optimizes a common pattern for unsigned overflow detection, when one of > the arguments turns out to be a constant. There are more ways this could > look like, (a + 42 <= 41) in particular, but that'll be

[PATCH 2/2] (header usage fix) include c++ headers in system.h

2016-04-22 Thread Szabolcs Nagy
Some gcc source files include standard headers after "system.h" but those headers may declare and use poisoned symbols, they also cannot be included before "system.h" because they might depend on macro definitions from there, so they must be included in system.h. This patch fixes the use of , , ,

Re: match.pd patch: min(-x, -y), min(~x, ~y)

2016-04-22 Thread Marc Glisse
On Fri, 22 Apr 2016, Kyrill Tkachov wrote: On 22/04/16 10:43, Kyrill Tkachov wrote: On 22/04/16 10:42, Marc Glisse wrote: On Fri, 22 Apr 2016, Kyrill Tkachov wrote: 2016-04-21 Marc Glisse gcc/ * match.pd (min(-x, -y), max(-x, -y), min(~x, ~y), max(~x, ~y)):

Re: match.pd patch: min(-x, -y), min(~x, ~y)

2016-04-22 Thread Kyrill Tkachov
On 22/04/16 11:34, Marc Glisse wrote: On Fri, 22 Apr 2016, Kyrill Tkachov wrote: On 22/04/16 10:43, Kyrill Tkachov wrote: On 22/04/16 10:42, Marc Glisse wrote: On Fri, 22 Apr 2016, Kyrill Tkachov wrote: 2016-04-21 Marc Glisse gcc/ * match.pd (min(-x, -y),

Re: Document OpenACC status for GCC 6

2016-04-22 Thread Thomas Schwinge
Hi! On Thu, 21 Apr 2016 12:19:31 -0600, Sandra Loosemore wrote: > On 04/21/2016 10:21 AM, Thomas Schwinge wrote: > > + Code will be offloaded onto multiple gangs, but executes with > > + just one worker, and a vector length of 1. > > "will be" (future) vs

Re: match.pd patch: min(-x, -y), min(~x, ~y)

2016-04-22 Thread Kyrill Tkachov
On 22/04/16 10:43, Kyrill Tkachov wrote: On 22/04/16 10:42, Marc Glisse wrote: On Fri, 22 Apr 2016, Kyrill Tkachov wrote: 2016-04-21 Marc Glisse gcc/ * match.pd (min(-x, -y), max(-x, -y), min(~x, ~y), max(~x, ~y)): New transformations. gcc/testsuite/ *

Re: [PATCH][AArch64][wwwdocs] Summarise some more AArch64 changes for GCC6

2016-04-22 Thread James Greenhalgh
On Thu, Apr 21, 2016 at 09:15:17AM +0100, Kyrill Tkachov wrote: > Hi all, > > Here's a proposed summary of the changes in the AArch64 backend for GCC 6. > If there's anything I've missed it's purely my oversight, feel free to add > entries or suggest improvements. For me, I'm mostly happy with

Re: [PATCH 1/2] (header usage fix) remove unused system header includes

2016-04-22 Thread Richard Biener
On Fri, Apr 22, 2016 at 12:02 PM, Szabolcs Nagy wrote: > These headers include "system.h" which already includes > and so including them after "system.h" > is a noop and including them before may cause problems > if they depend on gcc macros from system.h. > >

Re: [PATCH 2/2] (header usage fix) include c++ headers in system.h

2016-04-22 Thread Richard Biener
On Fri, Apr 22, 2016 at 12:02 PM, Szabolcs Nagy wrote: > Some gcc source files include standard headers after > "system.h" but those headers may declare and use poisoned > symbols, they also cannot be included before "system.h" > because they might depend on macro

Re: match.pd patch: min(-x, -y), min(~x, ~y)

2016-04-22 Thread Kyrill Tkachov
Hi Marc, On 21/04/16 11:32, Marc Glisse wrote: Hello, another simple transformation. Instead of the ":s", I had single_use (@2) || single_use (@3), but changed it for simplicity. There may be some patterns in match.pd where we want something like that though, as requiring single_use on many

Re: match.pd patch: min(-x, -y), min(~x, ~y)

2016-04-22 Thread Marc Glisse
On Fri, 22 Apr 2016, Kyrill Tkachov wrote: 2016-04-21 Marc Glisse gcc/ * match.pd (min(-x, -y), max(-x, -y), min(~x, ~y), max(~x, ~y)): New transformations. gcc/testsuite/ * gcc.dg/tree-ssa/minmax-2.c: New testcase. I see the new testcase failing on

Re: match.pd patch: min(-x, -y), min(~x, ~y)

2016-04-22 Thread Kyrill Tkachov
On 22/04/16 10:42, Marc Glisse wrote: On Fri, 22 Apr 2016, Kyrill Tkachov wrote: 2016-04-21 Marc Glisse gcc/ * match.pd (min(-x, -y), max(-x, -y), min(~x, ~y), max(~x, ~y)): New transformations. gcc/testsuite/ * gcc.dg/tree-ssa/minmax-2.c: New testcase.

[PATCH GCC]Improve tree ifconv by handling virtual PHIs which can be degenerated.

2016-04-22 Thread Bin Cheng
Hi, Tree if-conv has below code checking on virtual PHI nodes in if_convertible__phi_p: if (any_mask_load_store) return true; /* When there were no if-convertible stores, check that there are no memory writes in the branches of the loop to be if-converted. */ if

Re: [PATCH 2/2] (header usage fix) include c++ headers in system.h

2016-04-22 Thread James Greenhalgh
On Fri, Apr 22, 2016 at 11:02:48AM +0100, Szabolcs Nagy wrote: > Some gcc source files include standard headers after > "system.h" but those headers may declare and use poisoned > symbols, they also cannot be included before "system.h" > because they might depend on macro definitions from there, >

Re: [PATCH GCC]Improve tree ifconv by handling virtual PHIs which can be degenerated.

2016-04-22 Thread Bin.Cheng
On Fri, Apr 22, 2016 at 11:25 AM, Richard Biener wrote: > On Fri, Apr 22, 2016 at 12:07 PM, Bin Cheng wrote: >> Hi, >> Tree if-conv has below code checking on virtual PHI nodes in >> if_convertible__phi_p: >> >> if (any_mask_load_store) >>

Re: [PATCH GCC]Improve tree ifconv by handling virtual PHIs which can be degenerated.

2016-04-22 Thread Richard Biener
On Fri, Apr 22, 2016 at 12:33 PM, Bin.Cheng wrote: > On Fri, Apr 22, 2016 at 11:25 AM, Richard Biener > wrote: >> On Fri, Apr 22, 2016 at 12:07 PM, Bin Cheng wrote: >>> Hi, >>> Tree if-conv has below code checking on virtual

Re: [PATCH 08/18] make side_effects a vec

2016-04-22 Thread Trevor Saunders
On Thu, Apr 21, 2016 at 11:12:48PM -0600, Jeff Law wrote: > On 04/20/2016 12:22 AM, tbsaunde+...@tbsaunde.org wrote: > >From: Trevor Saunders > > > >gcc/ChangeLog: > > > >2016-04-19 Trevor Saunders > > > > * var-tracking.c (struct

C++ PATCH for c++/70744 (wrong-code with x ?: y extension)

2016-04-22 Thread Marek Polacek
This PR shows that we generate wrong code with the x ?: y extension in case the first operand contains either predecrement or preincrement. The problem is that we don't emit SAVE_EXPR, thus the operand is evaluated twice, which it should not be. While ++i or --i can be lvalues in C++, i++ or i--

[PATCH 1/2] (header usage fix) remove unused system header includes

2016-04-22 Thread Szabolcs Nagy
These headers include "system.h" which already includes and so including them after "system.h" is a noop and including them before may cause problems if they depend on gcc macros from system.h. ipa-icf-gimple.c includes after system.h which poisons various libc symbols which may cause problems

Re: [PATCH GCC]Improve tree ifconv by handling virtual PHIs which can be degenerated.

2016-04-22 Thread Richard Biener
On Fri, Apr 22, 2016 at 12:07 PM, Bin Cheng wrote: > Hi, > Tree if-conv has below code checking on virtual PHI nodes in > if_convertible__phi_p: > > if (any_mask_load_store) > return true; > > /* When there were no if-convertible stores, check > that there are no

Re: [Patch, regex, libstdc++/70745] Fix match_not_bow and match_not_eow

2016-04-22 Thread Jonathan Wakely
On 21/04/16 21:10 -0700, Tim Shen wrote: Bootstrapped and tested on x86-pc-linux-gnu debug. It is a conformance fix, but I don't think it's very important. I'm happy to backport it to gcc 5/4.9, but if it's not considered necessary, I'm Ok as well. OK for trunk. It is a small, safe change,

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread Uros Bizjak
On Thu, Apr 21, 2016 at 10:58 PM, H.J. Lu wrote: > Here is the updated patch with my standard_sse_constant_p change and > your SSE/AVX pattern change. I didn't include your > standard_sse_constant_opcode since it didn't compile nor is needed > for this purpose. H.J.,

[PATCH][AArch64] Improve aarch64_modes_tieable_p

2016-04-22 Thread Wilco Dijkstra
Improve modes_tieable by returning true in more cases: allow scalar access within vectors without requiring an extra move. Removing these moves helps the register allocator in deciding whether to use integer or FP registers on operations that can be done on both. This saves about 100 instructions

[PATCH, committed] Fortran cleanup-submodules

2016-04-22 Thread Dominique d'Humières
I have committed the following as obvious at revision r235367. Is it OK to back port it to the gcc-6 branch? Dominique Index: gcc/testsuite/ChangeLog === --- gcc/testsuite/ChangeLog (revision 235364) +++ gcc/testsuite/ChangeLog

Re: [PATCH] add support for placing variables in shared memory

2016-04-22 Thread Nathan Sidwell
On 04/21/16 10:25, Alexander Monakov wrote: On Thu, 21 Apr 2016, Nathan Sidwell wrote: On 04/20/16 12:58, Alexander Monakov wrote: Allow using __attribute__((shared)) to place static variables in '.shared' memory space. What is the rationale for a new attribute, rather than leveraging the

C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-04-22 Thread Bernd Schmidt
The PR is for a C++ form of the form const double val() const { ... } where the warning location is at the second const (by accident, in reality it's just past the function's declarator), while the first const is the one that we are warning about. This patch adds some logic to the C and C++

Re: C, C++: Fix PR 69733 (bad location for ignored qualifiers warning)

2016-04-22 Thread Jason Merrill
The C++ change is OK. Jason

Re: [PATCH] add support for placing variables in shared memory

2016-04-22 Thread Alexander Monakov
On Fri, 22 Apr 2016, Nathan Sidwell wrote: > On 04/21/16 10:25, Alexander Monakov wrote: > > On Thu, 21 Apr 2016, Nathan Sidwell wrote: > > > What is the rationale for a new attribute, rather than leveraging the > > > existing section(".shared") machinery? > > > > Section switching does not work

Re: [PATCH 2/2] (header usage fix) include c++ headers in system.h

2016-04-22 Thread David Edelsohn
On Fri, Apr 22, 2016 at 6:02 AM, Szabolcs Nagy wrote: > Some gcc source files include standard headers after > "system.h" but those headers may declare and use poisoned > symbols, they also cannot be included before "system.h" > because they might depend on macro

Re: [testsuite] gcc-dg: handle all return values when shouldfail is set

2016-04-22 Thread Christophe Lyon
ping? On 13 April 2016 at 10:21, Christophe Lyon wrote: > Hi, > > While investigating stability problems when running GCC validations, > I fixed DejaGnu to properly handle cases where it cannot parse the > testcase output: >

[PATCH] Load external function address via GOT slot

2016-04-22 Thread H.J. Lu
For -fno-plt, we load the external function address via the GOT slot so that linker won't create an PLT entry for extern function address. Tested on x86-64. I also built GCC with -fno-plt. It removes 99% PLT entries. OK for trunk? H.J. -- gcc/ PR target/pr67400 *

Re: C, C++: New warning for memset without multiply by elt size

2016-04-22 Thread Jason Merrill
This looks good, but can we move the code into c-common rather than duplicate it? Jason On Fri, Apr 22, 2016 at 9:30 AM, Bernd Schmidt wrote: > We had this problem in the C frontend until very recently: > > int array[some_count]; > memset (array, 0, some_count); > >

[patch] fix openacc data clause errors in c/c++ for PR70688

2016-04-22 Thread Cesar Philippidis
This patch makes the c and c++ FEs aware that acc data clauses are not omp maps. I've also taught those FEs that reduction clauses are not data clauses in openacc, which fixes PR70688. I don't really like how *finish_omp_clauses has default arguments for declare_simd, is_cilk and not is_oacc, but

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread H.J. Lu
On Fri, Apr 22, 2016 at 5:11 AM, Uros Bizjak wrote: > On Thu, Apr 21, 2016 at 10:58 PM, H.J. Lu wrote: > >> Here is the updated patch with my standard_sse_constant_p change and >> your SSE/AVX pattern change. I didn't include your >>

Re: [PATCH] Load external function address via GOT slot

2016-04-22 Thread Uros Bizjak
On Fri, Apr 22, 2016 at 2:54 PM, H.J. Lu wrote: > For -fno-plt, we load the external function address via the GOT slot > so that linker won't create an PLT entry for extern function address. > > Tested on x86-64. I also built GCC with -fno-plt. It removes 99% PLT > entries.

Re: C++ PATCH for c++/70744 (wrong-code with x ?: y extension)

2016-04-22 Thread Jason Merrill
On 04/22/2016 07:50 AM, Marek Polacek wrote: This PR shows that we generate wrong code with the x ?: y extension in case the first operand contains either predecrement or preincrement. The problem is that we don't emit SAVE_EXPR, thus the operand is evaluated twice, which it should not be.

[PATCH][AArch64] Fix shift attributes

2016-04-22 Thread Wilco Dijkstra
This patch fixes the attributes of integer immediate shifts which were incorrectly modelled as register controlled shifts. Also change EXTR attribute to being a rotate. OK for trunk? ChangeLog: 2016-04-22 Wilco Dijkstra * gcc/config/aarch64/aarch64.md

C, C++: New warning for memset without multiply by elt size

2016-04-22 Thread Bernd Schmidt
We had this problem in the C frontend until very recently: int array[some_count]; memset (array, 0, some_count); which forgets to multiply by sizeof int. The following patch implements a new warning option for this. Bootstrapped and tested (a while ago, will retest) on x86_64-linux. Ok

Re: C++ PATCH for range-for tweak

2016-04-22 Thread Jason Merrill
On 03/14/2016 10:57 PM, Jason Merrill wrote: On 03/14/2016 05:30 PM, Florian Weimer wrote: * Jason Merrill: P08184R0: Generalizing the Range-Based For Loop How can one resolve this reference? It's obviously not a PR number in GCC Bugzilla. I found this after some searching:

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread Uros Bizjak
On Fri, Apr 22, 2016 at 4:19 PM, H.J. Lu wrote: > On Fri, Apr 22, 2016 at 5:11 AM, Uros Bizjak wrote: >> On Thu, Apr 21, 2016 at 10:58 PM, H.J. Lu wrote: >> >>> Here is the updated patch with my standard_sse_constant_p change and >>>

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread H.J. Lu
On Fri, Apr 22, 2016 at 7:19 AM, H.J. Lu wrote: > On Fri, Apr 22, 2016 at 5:11 AM, Uros Bizjak wrote: >> On Thu, Apr 21, 2016 at 10:58 PM, H.J. Lu wrote: >> >>> Here is the updated patch with my standard_sse_constant_p change and >>>

Re: C, C++: New warning for memset without multiply by elt size

2016-04-22 Thread Jason Merrill
On Fri, Apr 22, 2016 at 11:24 AM, Bernd Schmidt wrote: > On 04/22/2016 03:57 PM, Jason Merrill wrote: >> This looks good, but can we move the code into c-common rather than >> duplicate it? > > Probably not without a fair amount of surgery, since the cdw_ and ds_ codes >

[PATCH][AArch64] Improve aarch64_case_values_threshold setting

2016-04-22 Thread Wilco Dijkstra
GCC expands switch statements in a very simplistic way and tries to use a table expansion even when it is a bad idea for performance or codesize. GCC typically emits extremely sparse tables that contain mostly default entries (something which currently cannot be tuned by backends). Additionally

Re: An abridged "Writing C" for the gcc web pages

2016-04-22 Thread Paul_Koning
> On Apr 22, 2016, at 12:21 PM, Bernd Schmidt wrote: > > (Apologies if you get this twice, the mailing list didn't like the html > attachment in the first attempt). > > We frequently get malformatted patches, and it's been brought to my attention > that some people

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread H.J. Lu
On Fri, Apr 22, 2016 at 7:50 AM, H.J. Lu wrote: > On Fri, Apr 22, 2016 at 7:19 AM, H.J. Lu wrote: >> On Fri, Apr 22, 2016 at 5:11 AM, Uros Bizjak wrote: >>> On Thu, Apr 21, 2016 at 10:58 PM, H.J. Lu wrote: >>>

Re: [PATCH][doc] Update documentation of AArch64 options

2016-04-22 Thread Wilco Dijkstra
Sandra Loosemore wrote: > > Can you please change all the incorrectly hyphenated "32-bit" and > "64-bit" uses in this section to "32 bits" and "64 bits" respectively? > ("n-bit" should only be hyphenated when it is used as an adjective > phrase immediately before the noun it modifies.) No

An abridged "Writing C" for the gcc web pages

2016-04-22 Thread Bernd Schmidt
(Apologies if you get this twice, the mailing list didn't like the html attachment in the first attempt). We frequently get malformatted patches, and it's been brought to my attention that some people don't even make the effort to read the GNU coding standards before trying to contribute

Re: An abridged "Writing C" for the gcc web pages

2016-04-22 Thread Jason Merrill
On 04/22/2016 12:42 PM, paul_kon...@dell.com wrote: On Apr 22, 2016, at 12:21 PM, Bernd Schmidt wrote: (Apologies if you get this twice, the mailing list didn't like the html attachment in the first attempt). We frequently get malformatted patches, and it's been

[PATCH] Verify __builtin_unreachable and __builtin_trap are not called with arguments

2016-04-22 Thread Martin Jambor
Hi, this patch adds verification that __builtin_unreachable and __builtin_trap are not called with arguments. The problem with calls to them with arguments is that functions like gimple_call_builtin_p return false on them, because they return true only when gimple_builtin_call_types_compatible_p

Re: [testsuite] gcc-dg: handle all return values when shouldfail is set

2016-04-22 Thread Jeff Law
On 04/13/2016 02:21 AM, Christophe Lyon wrote: Hi, While investigating stability problems when running GCC validations, I fixed DejaGnu to properly handle cases where it cannot parse the testcase output: http://lists.gnu.org/archive/html/dejagnu/2016-04/msg8.html This means that such cases

Re: C, C++: New warning for memset without multiply by elt size

2016-04-22 Thread Bernd Schmidt
On 04/22/2016 03:57 PM, Jason Merrill wrote: This looks good, but can we move the code into c-common rather than duplicate it? Probably not without a fair amount of surgery, since the cdw_ and ds_ codes are private to each frontend. Bernd

Re: [PATCH PR70715]Expand simple operations in IV.base and check if it's the control_IV

2016-04-22 Thread Bin.Cheng
On Fri, Apr 22, 2016 at 4:26 PM, Christophe Lyon wrote: > On 21 April 2016 at 11:03, Richard Biener wrote: >> On Wed, Apr 20, 2016 at 5:08 PM, Bin Cheng wrote: >>> Hi, >>> As reported in PR70715, GCC failed to prove

Re: [PATCH PR70715]Expand simple operations in IV.base and check if it's the control_IV

2016-04-22 Thread Christophe Lyon
On 21 April 2016 at 11:03, Richard Biener wrote: > On Wed, Apr 20, 2016 at 5:08 PM, Bin Cheng wrote: >> Hi, >> As reported in PR70715, GCC failed to prove no-overflows of IV([n]) for >> simple example like: >> int >> foo (char *p, unsigned n) >> {

[PATCH][AArch64] Adjust SIMD integer preference

2016-04-22 Thread Wilco Dijkstra
SIMD operations like combine prefer to have their operands in FP registers, so increase the cost of integer registers slightly to avoid unnecessary int<->FP moves. This improves register allocation of scalar SIMD operations. OK for trunk? ChangeLog: 2016-04-22 Wilco Dijkstra

Re: Compile libcilkrts with -funwind-tables (PR target/60290)

2016-04-22 Thread Jeff Law
On 04/06/2016 05:12 AM, Rainer Orth wrote: I've finally gotten around to analyzing this testsuite failure on 32-bit Solaris/x86: FAIL: g++.dg/cilk-plus/CK/catch_exc.cc -O1 -fcilkplus execution test FAIL: g++.dg/cilk-plus/CK/catch_exc.cc -O3 -fcilkplus execution test FAIL:

[PATCH][AArch64] print_operand should not fallthrough from register operand into generic operand

2016-04-22 Thread Wilco Dijkstra
Some patterns are using '%w2' for immediate operands, which means that a zero immediate is actually emitted as 'wzr' or 'xzr'. This not only changes an immediate operand into a register operand but may emit illegal instructions from legal RTL (eg. ORR x0, SP, xzr rather than ORR x0, SP, 0).

Re: [PATCH PR70715]Expand simple operations in IV.base and check if it's the control_IV

2016-04-22 Thread Kyrill Tkachov
Hi Christophe, On 22/04/16 16:26, Christophe Lyon wrote: On 21 April 2016 at 11:03, Richard Biener wrote: On Wed, Apr 20, 2016 at 5:08 PM, Bin Cheng wrote: Hi, As reported in PR70715, GCC failed to prove no-overflows of IV([n]) for simple

Re: C, C++: New warning for memset without multiply by elt size

2016-04-22 Thread Bernd Schmidt
On 04/22/2016 05:31 PM, Jason Merrill wrote: On Fri, Apr 22, 2016 at 11:24 AM, Bernd Schmidt wrote: On 04/22/2016 03:57 PM, Jason Merrill wrote: This looks good, but can we move the code into c-common rather than duplicate it? Probably not without a fair amount of

Re: An abridged "Writing C" for the gcc web pages

2016-04-22 Thread Mikhail Maltsev
On 04/22/2016 07:21 PM, Bernd Schmidt wrote: > (Apologies if you get this twice, the mailing list didn't like the html > attachment in the first attempt). > > We frequently get malformatted patches, and it's been brought to my attention > that some people don't even make the effort to read the

Re: C++ PATCH for c++/70744 (wrong-code with x ?: y extension)

2016-04-22 Thread Marek Polacek
On Fri, Apr 22, 2016 at 09:43:31AM -0400, Jason Merrill wrote: > On 04/22/2016 07:50 AM, Marek Polacek wrote: > >This PR shows that we generate wrong code with the x ?: y extension in case > >the > >first operand contains either predecrement or preincrement. The problem is > >that we don't emit

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread H.J. Lu
On Fri, Apr 22, 2016 at 10:29 AM, Uros Bizjak wrote: > On Fri, Apr 22, 2016 at 7:10 PM, Uros Bizjak wrote: >> On Fri, Apr 22, 2016 at 4:19 PM, H.J. Lu wrote: >>> On Fri, Apr 22, 2016 at 5:11 AM, Uros Bizjak wrote:

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread Uros Bizjak
On Fri, Apr 22, 2016 at 7:10 PM, Uros Bizjak wrote: > On Fri, Apr 22, 2016 at 4:19 PM, H.J. Lu wrote: >> On Fri, Apr 22, 2016 at 5:11 AM, Uros Bizjak wrote: >>> On Thu, Apr 21, 2016 at 10:58 PM, H.J. Lu wrote: >>>

Re: [PATCH 2/2] (header usage fix) include c++ headers in system.h

2016-04-22 Thread Pedro Alves
On 04/22/2016 11:02 AM, Szabolcs Nagy wrote: > Some gcc source files include standard headers after > "system.h" but those headers may declare and use poisoned > symbols, Couldn't gcc simply allow use of poisoned symbols in system headers? It sounds like it'd avoid these odd contortions. >

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread Uros Bizjak
On Fri, Apr 22, 2016 at 8:20 PM, H.J. Lu wrote: > On Fri, Apr 22, 2016 at 10:29 AM, Uros Bizjak wrote: >> On Fri, Apr 22, 2016 at 7:10 PM, Uros Bizjak wrote: >>> On Fri, Apr 22, 2016 at 4:19 PM, H.J. Lu wrote:

Re: [PATCH] Allow all 1s of integer as standard SSE constants

2016-04-22 Thread H.J. Lu
On Fri, Apr 22, 2016 at 11:57 AM, Uros Bizjak wrote: > On Fri, Apr 22, 2016 at 8:20 PM, H.J. Lu wrote: >> On Fri, Apr 22, 2016 at 10:29 AM, Uros Bizjak wrote: >>> On Fri, Apr 22, 2016 at 7:10 PM, Uros Bizjak wrote:

Re: [PATCH] Verify __builtin_unreachable and __builtin_trap are not called with arguments

2016-04-22 Thread Martin Jambor
Hi, On Fri, Apr 22, 2016 at 09:24:31PM +0200, Richard Biener wrote: > On April 22, 2016 7:04:31 PM GMT+02:00, Martin Jambor wrote: > >Hi, > > > >this patch adds verification that __builtin_unreachable and > >__builtin_trap are not called with arguments. The problem with calls >

Re: An abridged "Writing C" for the gcc web pages

2016-04-22 Thread Sandra Loosemore
On 04/22/2016 10:42 AM, paul_kon...@dell.com wrote: On Apr 22, 2016, at 12:21 PM, Bernd Schmidt wrote: (Apologies if you get this twice, the mailing list didn't like the html attachment in the first attempt). We frequently get malformatted patches, and it's been

Re: [PATCH PR70715]Expand simple operations in IV.base and check if it's the control_IV

2016-04-22 Thread Christophe Lyon
On 22 April 2016 at 17:38, Bin.Cheng wrote: > On Fri, Apr 22, 2016 at 4:26 PM, Christophe Lyon > wrote: >> On 21 April 2016 at 11:03, Richard Biener wrote: >>> On Wed, Apr 20, 2016 at 5:08 PM, Bin Cheng

Re: [PATCH] Verify __builtin_unreachable and __builtin_trap are not called with arguments

2016-04-22 Thread Richard Biener
On April 22, 2016 7:04:31 PM GMT+02:00, Martin Jambor wrote: >Hi, > >this patch adds verification that __builtin_unreachable and >__builtin_trap are not called with arguments. The problem with calls >to them with arguments is that functions like gimple_call_builtin_p >return

Re: C++ PATCH for c++/70744 (wrong-code with x ?: y extension)

2016-04-22 Thread Jason Merrill
On Fri, Apr 22, 2016 at 2:12 PM, Marek Polacek wrote: > On Fri, Apr 22, 2016 at 09:43:31AM -0400, Jason Merrill wrote: >> On 04/22/2016 07:50 AM, Marek Polacek wrote: >> >This PR shows that we generate wrong code with the x ?: y extension in case >> >the >> >first operand