Re: [RFC][PR61839]Convert CST BINOP COND_EXPR to COND_EXPR ? (CST BINOP 1) : (CST BINOP 0)

2016-08-10 Thread kugan
Hi Richard, On 09/08/16 20:22, Richard Biener wrote: On Tue, Aug 9, 2016 at 4:51 AM, Kugan Vivekanandarajah wrote: Hi Richard, Thanks for the review. On 29 April 2016 at 20:47, Richard Biener wrote: On Sun, Apr 17, 2016 at

Re: Fwd: [PATCH, doc/ARM] Remove false affirmation that Thumb cannot use an FPU

2016-08-10 Thread Sandra Loosemore
On 08/10/2016 09:51 AM, Thomas Preudhomme wrote: diff --git a/gcc/doc/fragments.texi b/gcc/doc/fragments.texi index b6d8541c8ca820fa732363a05221e2cd4d1251c2..a060635c9cee7374d9d187858ac87acdd08860f2 100644 --- a/gcc/doc/fragments.texi +++ b/gcc/doc/fragments.texi @@ -117,12 +117,15 @@

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Sandra Loosemore
On 08/10/2016 04:06 AM, Paolo Bonzini wrote: === --- gcc/doc/invoke.texi (revision 239276) +++ gcc/doc/invoke.texi (working copy) @@ -4914,6 +4914,12 @@ construct, known from C++, was introduced with ISO C99 and is by default

Re: [PATCH] objc: update documetation and add test-case of constructor/destructor attr.

2016-08-10 Thread Sandra Loosemore
On 08/10/2016 03:11 AM, Martin Liška wrote: Hi. Following patch clarifies usage of ctor and dtor attributes for Objective C. Patch survives (on x86_64-linux-gnu): make -k check-objc RUNTESTFLAGS="execute.exp" Ready for trunk? The documentation fix looks fine, but probably an objc maintainer

Re: protected alloca class for malloc fallback

2016-08-10 Thread Trevor Saunders
On Thu, Aug 11, 2016 at 02:03:29AM +0900, Oleg Endo wrote: > On Tue, 2016-08-09 at 13:41 -0400, Trevor Saunders wrote: > > > If what you want is the ability to put the buffer on the stack > > instead of the heap then I think a stack_string class that > > interoperates with your string class is

[v3 PATCH] Implement C++17 make_from_tuple.

2016-08-10 Thread Ville Voutilainen
I was in the middle of doing this, so here's the patch before I commit the string_view one. Tested on Linux-x64. 2016-08-11 Ville Voutilainen Implement C++17 make_from_tuple. * include/std/tuple (__make_from_tuple_impl, make_from_tuple): New. *

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-10 Thread kugan
Hi, On 10/08/16 20:28, Richard Biener wrote: On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: I see it now. The problem is we are just looking at (-1) being in the ops list for passing changed to rewrite_expr_tree

Re: C++ PATCH for C++17 constexpr if

2016-08-10 Thread Jason Merrill
On Wed, Aug 10, 2016 at 5:57 PM, Jason Merrill wrote: > This patch implements the C++17 constexpr if feature. The primary use > is in templates, where the non-taken branch of the constexpr > if-statement is not instantiated. But it can also be used outside of > templates,

C++ PATCH for C++17 constexpr if

2016-08-10 Thread Jason Merrill
This patch implements the C++17 constexpr if feature. The primary use is in templates, where the non-taken branch of the constexpr if-statement is not instantiated. But it can also be used outside of templates, where the branches are parsed and discarded, and discarded return statements are not

Re: [PATCH] Add mark_spam.py script

2016-08-10 Thread Martin Liška
On 08/10/2016 10:49 PM, Joseph Myers wrote: The latest spam bugs have spam attachments as well. I'm not sure if the API can delete attachments, but it would be helpful for the script to do as much as possible with them (change filenames, descriptions, MIME types, mark them as obsolete). I'm

Re: [PATCH] Add mark_spam.py script

2016-08-10 Thread Joseph Myers
The latest spam bugs have spam attachments as well. I'm not sure if the API can delete attachments, but it would be helpful for the script to do as much as possible with them (change filenames, descriptions, MIME types, mark them as obsolete). -- Joseph S. Myers jos...@codesourcery.com

[PATCH] Fix caret locations in format_type_warning (PR c/72857)

2016-08-10 Thread David Malcolm
In r239253 I introduced a bug in c-format.c:format_type_warning. In that patch I removed these lines from format_type_warning: - unsigned int offset_loc = type->offset_loc; [...snip...] - loc = location_from_offset (loc, offset_loc); which used the location from type->offset_loc. Instead, I

Go patch committed

2016-08-10 Thread Ian Lance Taylor
This patch to the Go frontend by Marek Polacek fixes one missing break statement and adds a couple of "fall through" comments to fix the Go frontend for -Wimplicit-fallthrough. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE

Re: protected alloca class for malloc fallback

2016-08-10 Thread Richard Biener
On August 10, 2016 8:00:20 PM GMT+02:00, Jeff Law wrote: >On 08/10/2016 04:04 AM, Richard Biener wrote: >> On Tue, Aug 9, 2016 at 3:17 PM, Aldy Hernandez >wrote: >>> On 08/05/2016 01:55 PM, Richard Biener wrote: >>> >>> Hi Richard. >>> Please don't use

Re: protected alloca class for malloc fallback

2016-08-10 Thread Jeff Law
On 08/10/2016 04:04 AM, Richard Biener wrote: On Tue, Aug 9, 2016 at 3:17 PM, Aldy Hernandez wrote: On 08/05/2016 01:55 PM, Richard Biener wrote: Hi Richard. Please don't use std::string. For string building you can use obstacks. Alright let's talk details then so I

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread Pedro Alves
On 08/10/2016 06:51 PM, ayush goel wrote: > On 10 August 2016 at 11:19:42 PM, Pedro Alves (pal...@redhat.com) wrote: >> On 08/10/2016 06:33 PM, ayush goel wrote: >> >>> I can see mkconfig.sh being invoked inside gcc/Makefile.in with >>> different arguments to create the gcc header files (config.h

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread ayush goel
On 10 August 2016 at 11:19:42 PM, Pedro Alves (pal...@redhat.com) wrote: > On 08/10/2016 06:33 PM, ayush goel wrote: > > > I can see mkconfig.sh being invoked inside gcc/Makefile.in with > > different arguments to create the gcc header files (config.h etc). > > So I guess I’ll copy all the

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread Pedro Alves
On 08/10/2016 06:33 PM, ayush goel wrote: > I can see mkconfig.sh being invoked inside gcc/Makefile.in with > different arguments to create the gcc header files (config.h etc). > So I guess I’ll copy all the definitions from gnulib/config.h inside > mkconfig.sh and try and test the system. What

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread ayush goel
> # auto-host.h is the file containing items generated by autoconf and is > # the first file included by config.h. > # If host=build, it is correct to have bconfig include auto-host.h > # as well. If host!=build, we are in error and need to do more > # work to find out the build config parameters.

Re: [PATCH, LRA] PR71680, Reload of slow mems

2016-08-10 Thread Vladimir N Makarov
On 08/09/2016 04:41 AM, Alan Modra wrote: On Tue, Aug 02, 2016 at 11:02:56PM +0930, Alan Modra wrote: This is a patch for a problem in lra, triggered by the rs6000 backend not allowing SImode in floating point registers. Ping? https://gcc.gnu.org/ml/gcc-patches/2016-08/msg00113.html Note

Re: Ping^2 Re: Implement C _FloatN, _FloatNx types [version 5]

2016-08-10 Thread Paul Richard Thomas
Dear Joseph, The fortran part is OK. I have put FX in copy since he was instrumental in the fortran implementation. However, I find it hard to imagine that he will object to the renaming. Thanks Paul On 10 August 2016 at 13:33, Joseph Myers wrote: > Ping^2. This

Re: protected alloca class for malloc fallback

2016-08-10 Thread Oleg Endo
On Tue, 2016-08-09 at 13:41 -0400, Trevor Saunders wrote: > If what you want is the ability to put the buffer on the stack > instead of the heap then I think a stack_string class that > interoperates with your string class is the thing you want. I'd avoid a separate stack_string class.

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread Pedro Alves
On 08/10/2016 05:31 PM, ayush goel wrote: > On 10 August 2016 at 7:36:41 PM, Pedro Alves (pal...@redhat.com) wrote: > So I was getting the exact same error as above and that is precisely > why I included "-I../gnulib” in the include path. I figured the > compiler wasn’t able to find config.h and

Re: [PATCH, rs6000] Fix vec_construct vectorization cost to be somewhat more accurate

2016-08-10 Thread Bill Schmidt
Sorry for the long delay on getting back to this. I took a look at the suggested test cases with the cost model available, and did some SPEC testing to validate the model. I found that it is still important to model the 4xfloat case separately to account for conversion from 64-bit to 32-bit in

Re: [v3 PATCH] Implement LWG 2758.

2016-08-10 Thread Ville Voutilainen
On 10 August 2016 at 19:06, Paolo Carlini wrote: >> Implement LWG 2758. > > If I understand correctly this touches only the new C++17 members and in any > case, a recent commit by Jon disabled the extern template strings in C++17 > mode, thus there are no

Re: [Revert][AArch64] PR 63521 Define REG_ALLOC_ORDER/HONOR_REG_ALLOC_ORDER

2016-08-10 Thread Vladimir N Makarov
On 08/08/2016 01:04 PM, Jiong Wang wrote: [...] There is very tiny performance regression on SPEC2K6INT 464.h264ref. Checking the codegen, there are some bad instruction scheduling, it looks to me caused by REG_ALLOC_ORDER is not used consistently inside IRA that parts of the code are using

Re: [PATCH] Use TImode for piecewise move in 64-bit mode

2016-08-10 Thread H.J. Lu
On Wed, Aug 10, 2016 at 9:26 AM, H.J. Lu wrote: > On Wed, Aug 10, 2016 at 8:55 AM, Uros Bizjak wrote: >> On Wed, Aug 10, 2016 at 5:32 PM, H.J. Lu wrote: >>> Use TImode for piecewise move in 64-bit mode. When vector register >>> is

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread ayush goel
On 10 August 2016 at 7:36:41 PM, Pedro Alves (pal...@redhat.com) wrote: > On 08/10/2016 02:40 PM, ayush goel wrote: > > On 9 August 2016 at 2:20:59 PM, Pedro Alves (pal...@redhat.com) wrote: > > > I wasn’t aware of this. Thanks for pointing this out. > > It’s strange however, I didn’t see anything

Re: [PATCH][AArch64] Add legitimize_address_displacement hook

2016-08-10 Thread Wilco Dijkstra
Richard Earnshaw wrote: > OK.  But please enhance the comment with some explanation as to WHY > you've chosen to use just two base pairings rather than separate bases > for each access size. OK here is the updated patch which also handles unaligned accesses which further improves the benefit:

Re: [PATCH][AArch64 - v2] Simplify eh_return implementation

2016-08-10 Thread Wilco Dijkstra
I noticed it would still be a good idea to add an extra barrier in the epilog as the scheduler doesn't appear to handle aliases of frame accesses properly. This patch simplifies the handling of the EH return value. We force the use of the frame pointer so the return location is always at FP +

Re: [PATCH] Use TImode for piecewise move in 64-bit mode

2016-08-10 Thread H.J. Lu
On Wed, Aug 10, 2016 at 8:55 AM, Uros Bizjak wrote: > On Wed, Aug 10, 2016 at 5:32 PM, H.J. Lu wrote: >> Use TImode for piecewise move in 64-bit mode. When vector register >> is used for piecewise move, we don't increase stack_alignment_needed >> since

Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-10 Thread Bernd Edlinger
On 08/10/16 14:29, Richard Biener wrote: > On Tue, 9 Aug 2016, Bernd Edlinger wrote: >> We know that the difference between the innermost ref >> and the outer ref is byte-aligned, but we do not know >> that the same is true for offset between the COMPONENT_REF >> and the outer ref. >> >> I mean

Re: [PATCH][AArch64] Improve stack adjustment

2016-08-10 Thread Wilco Dijkstra
Richard Earnshaw wrote: > I see you've added a default argument for your new parameter.  I think > doing that is fine, but I have two comments about how we might use that > in this case. > > Firstly, if this parameter is suitable for having a default value, then > I think the preceding one should

Re: [v3 PATCH] Implement LWG 2758.

2016-08-10 Thread Paolo Carlini
Hi Ville, On 10/08/2016 09:50, Ville Voutilainen wrote: Tested on Linux-x64. 2016-08-10 Ville Voutilainen Implement LWG 2758. If I understand correctly this touches only the new C++17 members and in any case, a recent commit by Jon disabled the extern

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
On 10/08/2016 17:58, Joseph Myers wrote: > On Wed, 10 Aug 2016, Paolo Bonzini wrote: > >> There are indeed many pedwarn(loc, 0, ...) occurrences in C++ (most, but >> not all, are "foo only available with -std=bar" which in the C front-end >> would use OPT_Wpedantic, OPT_W*compat be enabled by

[PATCH PR69848]Introduce special conditional reduction CONST_COND_REDUCTION

2016-08-10 Thread Bin Cheng
Hi, This patch fixes the inefficient code generated by vectorizer as reported by PR69848. It introduces new conditional reduction type CONST_COND_REDUCTION. As a result, we don't need to compute index vector in loop; also the epilog reduction code can be simplified using single

[PATCH PR69848]Avoid not insn by inverting comparison code in vcond patterns

2016-08-10 Thread Bin Cheng
Hi, This is a follow up patch for previous vcond patches. In previous ones, we rely on combiner to simplify "X = !Y; Z = X ? A : B" into "Z = Y ? B : A". That works for some cases, but not all of them, for example, case in PR69848. The reason could be in combiner, but more likely in bsl

[PATCH testsuite]Require vect_cond_mixed for test case gcc.dg/vect/pr56541.c

2016-08-10 Thread Bin Cheng
Hi, Due to some reasons, tree-if-conv.c now factors floating point comparison out of cond_expr, resulting in mixed types in it. This does help CSE on common comparison operations. Only problem is that test gcc.dg/vect/pr56541.c now requires vect_cond_mixed to be vectorized. This patch

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Joseph Myers
On Wed, 10 Aug 2016, Paolo Bonzini wrote: > There are indeed many pedwarn(loc, 0, ...) occurrences in C++ (most, but > not all, are "foo only available with -std=bar" which in the C front-end > would use OPT_Wpedantic, OPT_W*compat be enabled by specific flags such > as -Wvariadic-macros). In C

Fwd: [PATCH, ARM] Use a MULTILIB_REQUIRED approach for aprofile multilib

2016-08-10 Thread Thomas Preudhomme
Forwarding to gcc-patches which I forgot past patch #1 --- Begin Message --- Hi, Currently, the Makefile fragment for ARM aprofile multilib is using a substractive approach. It specifies a set of options to be combined (eg. -march=armv7-a,armv7ve,armv8-a, with

Re: [PATCH] Use TImode for piecewise move in 64-bit mode

2016-08-10 Thread Uros Bizjak
On Wed, Aug 10, 2016 at 5:32 PM, H.J. Lu wrote: > Use TImode for piecewise move in 64-bit mode. When vector register > is used for piecewise move, we don't increase stack_alignment_needed > since vector register spill isn't required for piecewise move. Since >

Fwd: [PATCH] genmultilib: improve error reporting for MULTILIB_REUSE

2016-08-10 Thread Thomas Preudhomme
Forwarding to gcc-patches which I forgot past patch #1 --- Begin Message --- Hi, It was discovered while working on ARM's aprofile multilib Makefile fragment that some REUSE rules were mentioning on the RHS options not in MULTILIB_OPTIONS. This is not supposed to happen and leads to

Fwd: [PATCH, doc/ARM] Remove false affirmation that Thumb cannot use an FPU

2016-08-10 Thread Thomas Preudhomme
Forwarding to gcc-patches which I forgot past patch #1 --- Begin Message --- GCC documentation for MULTILIB_EXCEPTIONS states that ARM processors cannot use hardware floating-point in Thumb execution state. This is incorrect since ARMv7E-M processors can do just that. This patch replace this

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
On 10/08/2016 17:33, Joseph Myers wrote: > On Wed, 10 Aug 2016, Paolo Bonzini wrote: > >> - stuff that is not enabled by anything should use OPT_Wpedantic, and > > No, lots of pedwarns are for usages that are (a) dubious enough we want to > diagnose them by default, and (b) required to be

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Joseph Myers
On Wed, 10 Aug 2016, Paolo Bonzini wrote: > - stuff that is not enabled by anything should use OPT_Wpedantic, and No, lots of pedwarns are for usages that are (a) dubious enough we want to diagnose them by default, and (b) required to be diagnosed by ISO C so must become errors with

[PATCH] Use TImode for piecewise move in 64-bit mode

2016-08-10 Thread H.J. Lu
Use TImode for piecewise move in 64-bit mode. When vector register is used for piecewise move, we don't increase stack_alignment_needed since vector register spill isn't required for piecewise move. Since stack_realign_needed is set to true by checking stack_alignment_estimated set by pseudo

Re: [PATCH] Allow relayout_decl on FIELD_DECLs (PR c/72816)

2016-08-10 Thread Joseph Myers
On Wed, 10 Aug 2016, Jakub Jelinek wrote: > 2016-08-10 Jakub Jelinek > > PR c/72816 > * c-decl.c (grokdeclarator): When adding TYPE_DOMAIN for flexible > array member through typedef, for orig_qual_indirect == 0 clear > orig_qual_type. > > *

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
On 10/08/2016 17:24, Manuel López-Ibáñez wrote: > Perhaps we need something like -Wextra-pedantic, for things that are > undefined by ISO C but defined by GNU. Thus, they would not trigger > pedwarns and no error with -pedantic-errors. I think this is overengineering it a bit. If they are

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Manuel López-Ibáñez
On 10 August 2016 at 15:44, Paolo Bonzini wrote: > > > On 10/08/2016 16:42, Manuel López-Ibáñez wrote: >> > > My only fear is that people not using -Wpedantic nor -pedantic-errors >> > > expect that GNU extensions work. This is a GNU extension that defines >> > > something that

Re: [PATCH] Allow relayout_decl on FIELD_DECLs (PR c/72816)

2016-08-10 Thread Jakub Jelinek
On Mon, Aug 08, 2016 at 11:04:32AM +, Joseph Myers wrote: > On Sat, 6 Aug 2016, Jakub Jelinek wrote: > > > --- gcc/testsuite/gcc.dg/pr72816.c.jj 2016-08-06 13:06:45.046003282 > > +0200 > > +++ gcc/testsuite/gcc.dg/pr72816.c 2016-08-06 13:07:57.217093845 +0200 > > @@ -0,0 +1,9 @@ > >

Re: Implement -Wimplicit-fallthrough: the rest

2016-08-10 Thread Marek Polacek
On Fri, Jul 29, 2016 at 05:26:19PM +, Joseph Myers wrote: > On Fri, 22 Jul 2016, Marek Polacek wrote: > > > gcc/go/ > > * go-system.h (go_fallthrough): Define. > > * gofrontend/escape.cc (Escape_analysis_assign::assign): Add > > go_fallthrough. > > * gofrontend/expressions.cc

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
On 10/08/2016 16:42, Manuel López-Ibáñez wrote: > > > My only fear is that people not using -Wpedantic nor -pedantic-errors > > > expect that GNU extensions work. This is a GNU extension that defines > > > something that is undefined according to ISO. Enabling the warning > > > with -Wextra is

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Manuel López-Ibáñez
On 10 August 2016 at 13:06, Paolo Bonzini wrote: > > > On 10/08/2016 13:31, Manuel López-Ibáñez wrote: >> My only fear is that people not using -Wpedantic nor -pedantic-errors >> expect that GNU extensions work. This is a GNU extension that defines >> something that is undefined

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread Pedro Alves
On 08/10/2016 03:06 PM, Pedro Alves wrote: > Since you're problably going to use sed to patch the files, including > some new file instead of config.h should be about the same work. Note, above I was assuming that if you include the gnulib config.h file in system.h, then you're going to move the

[PATCH][RFC] Fix PR72851 by "randomizing" SSA propagator worklist extraction

2016-08-10 Thread Richard Biener
The following randomizes SSA propagator worklist processing to make the processing order less likely hit the worst-case as in the PR. Ideally we'd process it in stmt order but that adds overhead to the idea of a SSA propagator that makes it very much not appealing. Using a queue rather than a

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread Pedro Alves
On 08/10/2016 03:05 PM, Manuel López-Ibáñez wrote: > On 10 August 2016 at 14:40, ayush goel wrote: >> On 9 August 2016 at 2:20:59 PM, Pedro Alves (pal...@redhat.com) wrote: >>> the scheme of configuring gnulib in a separate directory as borrowed from >>> gdb >>> requires

Re: [PATCH][RFC] Add the ability to record sub-timevars (-ftime-report-details)

2016-08-10 Thread Alexander Monakov
On Wed, 10 Aug 2016, David Malcolm wrote: > Looks like inside a pop there's a lazy allocation of a map, and a > get_or_insert. Could this make -ftime-report have an impact on the > timing? -ftime-report already has a great impact on timing because it adds a syscall on each timevar change (which

Re: [PATCH][RFC] Add the ability to record sub-timevars (-ftime-report-details)

2016-08-10 Thread Richard Biener
On Wed, 10 Aug 2016, David Malcolm wrote: > On Wed, 2016-08-10 at 14:04 +0200, Richard Biener wrote: > > The following patch adds the ability to record time spent in utility > > to the pass using it. For things like CFG cleanup, alias stmt > > walking > > or DF infrastructure work it is

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread Pedro Alves
On 08/10/2016 02:40 PM, ayush goel wrote: > On 9 August 2016 at 2:20:59 PM, Pedro Alves (pal...@redhat.com) wrote: > I wasn’t aware of this. Thanks for pointing this out. > It’s strange however, I didn’t see anything failing while > building/testing my system. If I comment out the include on

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread Manuel López-Ibáñez
On 10 August 2016 at 14:40, ayush goel wrote: > On 9 August 2016 at 2:20:59 PM, Pedro Alves (pal...@redhat.com) wrote: >> the scheme of configuring gnulib in a separate directory as borrowed from gdb >> requires including two config.h headers -- the gnulib client's, and

Re: [PATCH][RFC] Add the ability to record sub-timevars (-ftime-report-details)

2016-08-10 Thread Alexander Monakov
> Index: gcc/doc/invoke.texi > === > --- gcc/doc/invoke.texi (revision 238469) > +++ gcc/doc/invoke.texi (working copy) [snip] > @@ -12543,6 +12543,10 @@ print some statistics about each pass wh > Makes the compiler print

[PATCH v3] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
From: Paolo Bonzini clang recently added a new warning -Wexpansion-to-defined, which warns when `defined' is used outside a #if expression (including the case of a macro that is then used in a #if expression). While I disagree with their inclusion of the warning to -Wall, I

Re: [PATCH][RFC] Add the ability to record sub-timevars (-ftime-report-details)

2016-08-10 Thread David Malcolm
On Wed, 2016-08-10 at 14:04 +0200, Richard Biener wrote: > The following patch adds the ability to record time spent in utility > to the pass using it. For things like CFG cleanup, alias stmt > walking > or DF infrastructure work it is currently not visible which pass is > responsible for the

Re: [PATCH build/doc] Replacing libiberty with gnulib

2016-08-10 Thread ayush goel
On 9 August 2016 at 2:20:59 PM, Pedro Alves (pal...@redhat.com) wrote: > On 08/06/2016 05:34 AM, ayush goel wrote: > > On 5 August 2016 at 4:09:00 AM, Pedro Alves (pal...@redhat.com) wrote: > >> On 08/02/2016 12:38 AM, Manuel López-Ibáñez wrote: > >>> > >>> If there is something wrong or missing,

[PATCH, ARM] Fix aprofile multilib mappings

2016-08-10 Thread Thomas Preudhomme
Hi, Mappings (MULTILIB_MATCHES and MULTILIB_REUSE) in ARM aprofile multilib suffer from a number of issues: * missing mapping of -mcpu=cortex-a7 to -march=armv7-a * typo on vfpv3-d16-fp16 (MULTILIB_MATCHES uses vfpv3-fp16-d16 instead) * missing mapping for neon-fp16, fpv5-d16 and fp-armv8 to

Re: [PATCH 1/4] Cherry-pick fprofile-generate-atomic from google/gcc-4_9 branch

2016-08-10 Thread Nathan Sidwell
On 08/05/16 09:43, Martin Liška wrote: On 08/05/2016 03:14 PM, Nathan Sidwell wrote: On 08/05/16 08:48, Martin Liška wrote: Ok, after all the experimenting and inventing "almost" thread-safe code, I incline to not to include __gcov_one_value_profiler_body_atomic counter. The final solution

Re: [PATCH, RFC] gcov: dump in a static dtor instead of in an atexit handler

2016-08-10 Thread Nathan Sidwell
On 08/10/16 08:53, Nathan Sidwell wrote: I think this is a good idea, but we should document the changed behavior. (I don't think the current behaviour's documented). oh, gcov_exit is a user callable routine. You'll have to keep it available.

Re: [PATCH, RFC] gcov: dump in a static dtor instead of in an atexit handler

2016-08-10 Thread Nathan Sidwell
On 08/10/16 06:43, Martin Liška wrote: Hello. There are multiple PRs (mentioned in ChangeLog) which suffer from missing capability of gcov to save counters for functions with constructor/destructor attributes. I done that by simply replacing atexit handler (gcov_exit) with a new static

[PATCH] Add test coverage for PR gcov-profile/35590

2016-08-10 Thread Martin Liška
Hi. Following patch makes better test-coverage for cases mentioned in the PR. The PR is resolved, I'll close it as soon as the patch is accepted. Survives make check -k -j10 RUNTESTFLAGS="tree-prof.exp" on x86_64-linux-gnu. Ready for trunk? Thanks, Martin >From

Re: [Patch, tentative, reload] Make push_reload work with more types of subregs?

2016-08-10 Thread Senthil Kumar Selvaraj
Bernd Schmidt writes: > On 08/08/2016 05:26 PM, Senthil Kumar Selvaraj wrote: > >> I picked out the commit where you'd added SYMBOL_REF handling (rev >> #190252), and patched that with the below code. Bootstrapped and >> regtested on x86_64-pc-linux - the results were identical with and >>

Re: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-10 Thread Richard Biener
On Tue, 9 Aug 2016, Bernd Edlinger wrote: > On 08/09/16 22:48, Eric Botcazou wrote: > >> I think from Eric's comment in get_inner_ref it can be possible > >> in Ada that the outer object is accidentally byte-aligned > >> but the inner reference is not. In that case I think it is > >> better to

Re: AW: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-10 Thread Eric Botcazou
> I tried to translate the c-test case to an equivalent ada test case with > my not-so-fluent Ada speak... > > So here is a test case that *actually* hits the if ((boff % BITS_PER_UNIT) > != 0) code path. I see, well done then. > Before my patch there was an unaligned SImode access, and with >

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
On 10/08/2016 13:31, Manuel López-Ibáñez wrote: > My only fear is that people not using -Wpedantic nor -pedantic-errors > expect that GNU extensions work. This is a GNU extension that defines > something that is undefined according to ISO. Enabling the warning > with -Wextra is just annoying

[PATCH][RFC] Add the ability to record sub-timevars (-ftime-report-details)

2016-08-10 Thread Richard Biener
The following patch adds the ability to record time spent in utility to the pass using it. For things like CFG cleanup, alias stmt walking or DF infrastructure work it is currently not visible which pass is responsible for the time spent there. With -ftime-report-details you now get alias

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Joseph Myers
On Wed, 10 Aug 2016, Manuel López-Ibáñez wrote: > Thus, my opinion is that the current definition of -Wpedantic is too > restrictive and it should contain the "in some cases where there is > undefined behavior at compile-time". And thus, this should be a Yes, it should. -- Joseph S. Myers

Re: Use verify_oacc_routine_clauses for Fortran (was: Use verify_oacc_routine_clauses for C/C++)

2016-08-10 Thread Thomas Schwinge
Hi Cesar! On Tue, 9 Aug 2016 08:54:46 -0700, Cesar Philippidis wrote: > On 08/01/2016 08:29 AM, Thomas Schwinge wrote: > > > On Mon, 01 Aug 2016 17:21:37 +0200, I wrote: > >> Some checking of OpenACC clauses currently done in the front ends should > >> be moved later,

Re: [RFC] ipa bitwise constant propagation

2016-08-10 Thread Prathamesh Kulkarni
On 10 August 2016 at 14:14, Prathamesh Kulkarni wrote: > On 9 August 2016 at 23:43, Martin Jambor wrote: >> Hi, >> >> On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: >>> On 9 August 2016 at 16:39, Martin Jambor

Ping^2 Re: Implement C _FloatN, _FloatNx types [version 5]

2016-08-10 Thread Joseph Myers
Ping^2. This patch (non-C-front-end parts) is still pending review. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Manuel López-Ibáñez
On 10 August 2016 at 11:06, Paolo Bonzini wrote: > While I disagree with their inclusion of the warning to -Wall, I think > it is a good addition overall. First, it is a logical extension of the > existing warning for breaking defined across a macro and its caller. > Second, it

Re: [Patch, libfortran] Multi-threaded random_number

2016-08-10 Thread Janne Blomqvist
Hi, thanks for the Ok. However, moments before committing I got cold feet and started digging around; it unfortunately seems that TLS (_Thread_local) is not supported on all targets. So I'll have to copy-paste some configure magic from libgomp/libjava/etc., and provide workarounds for such

[PATCH, RFC] gcov: dump in a static dtor instead of in an atexit handler

2016-08-10 Thread Martin Liška
Hello. There are multiple PRs (mentioned in ChangeLog) which suffer from missing capability of gcov to save counters for functions with constructor/destructor attributes. I done that by simply replacing atexit handler (gcov_exit) with a new static destructor (__gcov_exit), which has priority

Re: protected alloca class for malloc fallback

2016-08-10 Thread Richard Biener
On Wed, Aug 10, 2016 at 12:12 PM, Aldy Hernandez wrote: > On 08/10/2016 06:04 AM, Richard Biener wrote: >> >> On Tue, Aug 9, 2016 at 3:17 PM, Aldy Hernandez wrote: >>> >>> On 08/05/2016 01:55 PM, Richard Biener wrote: >>> >>> Hi Richard. >>> Please don't

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-10 Thread Richard Biener
On Wed, Aug 10, 2016 at 10:57 AM, Jakub Jelinek wrote: > On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: >> I see it now. The problem is we are just looking at (-1) being in the ops >> list for passing changed to rewrite_expr_tree in the case of multiplication >> by

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-08-10 Thread Richard Biener
On Wed, Aug 10, 2016 at 10:16 AM, Jakub Jelinek wrote: > On Tue, Aug 09, 2016 at 07:10:34PM +0200, Richard Biener wrote: >> >In some cases like location of file scope vars, or this >> >DW_AT_string_length, >> >you really need to adjust late the debug info created early, there is

Re: [PATCH] toplev.c: set FILE * globals to NULL after fclose

2016-08-10 Thread Richard Biener
On Wed, Aug 10, 2016 at 3:25 AM, David Malcolm wrote: > Successfully bootstrapped on x86_64-pc-linux-gnu. > > OK for trunk? Ok. Richard. > gcc/ChangeLog: > * toplev.c (finalize): Set aux_info_file, asm_out_file, and > stack_usage_file to NULL after fclose

Re: protected alloca class for malloc fallback

2016-08-10 Thread Aldy Hernandez
On 08/10/2016 06:04 AM, Richard Biener wrote: On Tue, Aug 9, 2016 at 3:17 PM, Aldy Hernandez wrote: On 08/05/2016 01:55 PM, Richard Biener wrote: Hi Richard. Please don't use std::string. For string building you can use obstacks. Alright let's talk details then so I

[PATCH v2] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
clang recently added a new warning -Wexpansion-to-defined, which warns when `defined' is used outside a #if expression (including the case of a macro that is then used in a #if expression). While I disagree with their inclusion of the warning to -Wall, I think it is a good addition overall.

Re: protected alloca class for malloc fallback

2016-08-10 Thread Richard Biener
On Tue, Aug 9, 2016 at 3:17 PM, Aldy Hernandez wrote: > On 08/05/2016 01:55 PM, Richard Biener wrote: > > Hi Richard. > >> Please don't use std::string. For string building you can use obstacks. > > > Alright let's talk details then so I can write things up in a way you >

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-10 Thread kugan
On 10/08/16 18:57, Jakub Jelinek wrote: On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: I see it now. The problem is we are just looking at (-1) being in the ops list for passing changed to rewrite_expr_tree in the case of multiplication by negate. If we have combined (-1), as in the

[PATCH] objc: update documetation and add test-case of constructor/destructor attr.

2016-08-10 Thread Martin Liška
Hi. Following patch clarifies usage of ctor and dtor attributes for Objective C. Patch survives (on x86_64-linux-gnu): make -k check-objc RUNTESTFLAGS="execute.exp" Ready for trunk? Thanks, Martin >From 0fcb15e50905a95d8e824aed45d961b5ddc46479 Mon Sep 17 00:00:00 2001 From: marxin

Re: [PR72835] Incorrect arithmetic optimization involving bitfield arguments

2016-08-10 Thread Jakub Jelinek
On Wed, Aug 10, 2016 at 08:51:32AM +1000, kugan wrote: > I see it now. The problem is we are just looking at (-1) being in the ops > list for passing changed to rewrite_expr_tree in the case of multiplication > by negate. If we have combined (-1), as in the testcase, we will not have > the (-1)

AW: [PATCH] Fix unaligned access when predictive commoning (PR 71083)

2016-08-10 Thread Bernd Edlinger
On 08/10/16, Bernd Edlinger wrote: >On 08/09/16 22:48, Eric Botcazou wrote: >>> I think from Eric's comment in get_inner_ref it can be possible >>> in Ada that the outer object is accidentally byte-aligned >>> but the inner reference is not. In that case I think it is >>> better to generate a

Re: [PATCH] cpp/c: Add -Wexpansion-to-defined

2016-08-10 Thread Paolo Bonzini
On 10/08/2016 02:48, Manuel López-Ibáñez wrote: > TL;DR If the warning is enabled by -Wpedantic, it should be an error > with -Werror=pedantic and it should use cpp_pedwarning. Whether it > should be enabled by -Wpedantic is more difficult to say. > > -pedantic is equivalent to -Wpedantic. If

Re: [RFC] ipa bitwise constant propagation

2016-08-10 Thread Prathamesh Kulkarni
On 9 August 2016 at 23:43, Martin Jambor wrote: > Hi, > > On Tue, Aug 09, 2016 at 05:17:31PM +0530, Prathamesh Kulkarni wrote: >> On 9 August 2016 at 16:39, Martin Jambor wrote: >> >> ... >> >> >> Instead of storing arg's precision and sign, we should store >>

Re: [PATCH] Fix early debug regression with DW_AT_string_length (PR debug/71906)

2016-08-10 Thread Jakub Jelinek
On Tue, Aug 09, 2016 at 07:10:34PM +0200, Richard Biener wrote: > >In some cases like location of file scope vars, or this > >DW_AT_string_length, > >you really need to adjust late the debug info created early, there is > >no > >workaround for that. > > I suppose the workaround is to fix/extend

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

2016-08-10 Thread Andre Vieira (lists)
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 Extensions: Requirements on Development Tools document I linked >> in the email above and subsequent

[v3 PATCH] Implement LWG 2758.

2016-08-10 Thread Ville Voutilainen
Tested on Linux-x64. 2016-08-10 Ville Voutilainen Implement LWG 2758. * include/bits/basic_string.h (append(__sv_type, size_type, size_type)): Turn into a template, change parameter type, constrain, add a conversion to __sv_type from the