[Patch] SFINAE on is_same first in variant's _Tp&& constructor

2017-05-19 Thread Tim Shen via gcc-patches
This fixes PR libstdc++/80737. I actually can't come up with a minimal test case, because I suspect that there is a front-end bug in GCC. See discussions in the bug. Tested on x86_64-linux-gnu. Thanks! -- Regards, Tim Shen commit 6f362991f025069328c4901d95b657d498aad250 Author: Tim Shen

Re: [PATCH] Limit perf data buffer during profiling

2017-05-19 Thread Jeff Law
On 05/18/2017 02:39 AM, Richard Biener wrote: > On Thu, May 18, 2017 at 10:35 AM, Aldy Hernandez wrote: >> Andi Kleen writes: >> >>> From: Andi Kleen >>> >>> With high -j parallelism the autofdo tests can randomly fail. >>> autofdo

Re: MinGW compilation warnings in libiberty's waitpid.c

2017-05-19 Thread DJ Delorie
Please try this patch, since my mingw environment is old: Index: libiberty/ChangeLog === --- libiberty/ChangeLog (revision 248307) +++ libiberty/ChangeLog (working copy) @@ -1,3 +1,7 @@ +2017-05-19 Eli Zaretskii + +

Re: MinGW compilation warnings in libiberty's include/environ.h

2017-05-19 Thread DJ Delorie
Pedro Alves writes: > That sounds to me like the root issue that should be fixed, > so that these fallback definitions don't come into into play at all. > I.e., why isn't HAVE_ENVIRON_DECL defined on mingw when > setenv.o is built? Sounds like a decl check is missing > in

Re: MinGW compilation warnings in libiberty's include/environ.h

2017-05-19 Thread DJ Delorie
Fix committed. As Pedro noted, the correct way to request a change is to make the change in your local checked out repo, and run "svn diff" (or "git diff"). That makes sure that the fix is what you intended, and that you don't have other unexpected changes (especially in regenerated files, like

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread DJ Delorie
Pedro Alves writes: > Ah, yeah. AFAICS, all the declaration checks in libiberty.h are > HAVE_DECL checks. This suggests to me that this declaration guard > should be HAVE_DECL too [1]. Except the ones in the $funcs list, which includes strnlen. I think in the old days,

Re: [PATCH 2/2] [testsuite] PR 80759 Remove gas extensions from do-test.S, fix other problems

2017-05-19 Thread Daniel Santos
Thanks you for your assistance Rainer! On 05/19/2017 04:03 AM, Rainer Orth wrote: unfortunately, it still doesn't, as explained in the PR. The multilib support is still wrong/non-existant. I guess I thought for some reason that would magically appear in TEST_ALWAYS_FLAGS. :) I've

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Pedro Alves
On 05/19/2017 11:31 PM, DJ Delorie wrote: > > Right, I meant, libiberty's configure, gcc's configure, binutils' > configure, and gdb's configure, all need to agree on whether strnlen is > a HAVE or a HAVE_DECL type symbol. If they don't, the header can't > provide "one" working solution. > Ah,

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread DJ Delorie
Right, I meant, libiberty's configure, gcc's configure, binutils' configure, and gdb's configure, all need to agree on whether strnlen is a HAVE or a HAVE_DECL type symbol. If they don't, the header can't provide "one" working solution.

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Pedro Alves
On 05/19/2017 10:56 PM, DJ Delorie wrote: > > Eli Zaretskii writes: >> It should use HAVE_STRNLEN instead, because that's the only >> strnlen-related macro defined in config.g when strnlen is probed by >> the configure script. > > Ah, but gcc's configure defines HAVE_DECL_STRNLEN.

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread DJ Delorie
Eli Zaretskii writes: > It should use HAVE_STRNLEN instead, because that's the only > strnlen-related macro defined in config.g when strnlen is probed by > the configure script. Ah, but gcc's configure defines HAVE_DECL_STRNLEN. Header guards need to be coordinated across all the

Re: [PATCH] warn on mem calls modifying objects of non-trivial types (PR 80560)

2017-05-19 Thread Jason Merrill
On Fri, May 19, 2017 at 4:07 PM, Martin Sebor wrote: > On 05/19/2017 01:07 PM, Jason Merrill wrote: >> >> On Tue, May 16, 2017 at 5:39 PM, Martin Sebor wrote: >>> >>> On 05/16/2017 01:41 PM, Jason Merrill wrote: >>> I'm still not convinced we need to

RE: [PATCH][Aarch64] Add support for overflow add and sub operations

2017-05-19 Thread Michael Collison
Christophe, I had a type in the two test cases: "addcs" should have been "adcs". I caught this previously but submitted the previous patch incorrectly. Updated patch attached. Okay for trunk? -Original Message- From: Christophe Lyon [mailto:christophe.l...@linaro.org] Sent: Friday,

Re: [PATCH] warn on mem calls modifying objects of non-trivial types (PR 80560)

2017-05-19 Thread Martin Sebor
On 05/19/2017 01:07 PM, Jason Merrill wrote: On Tue, May 16, 2017 at 5:39 PM, Martin Sebor wrote: On 05/16/2017 01:41 PM, Jason Merrill wrote: I'm still not convinced we need to consider standard-layout at all. I agree. The patch doesn't make use of

Re: [config PATCH] --enable-languages

2017-05-19 Thread Mike Stump
On May 19, 2017, at 9:59 AM, Nathan Sidwell wrote: > > --enable-languages=all confused me, because as RichardB said, 'it really > means default'. So this patch does 2 things > 1) allow --enable-languages=default to mean what =all does now. > 2) change =all to mean all available

Re: [PATCH] Prevent extract_muldiv from introducing an overflow (PR sanitizer/80800)

2017-05-19 Thread Alexander Monakov
On Fri, 19 May 2017, Joseph Myers wrote: > On Fri, 19 May 2017, Alexander Monakov wrote: > > (to be precise, if the multiplication is done in a signed type and the > > middle > > constant factor was a negated power of two, the sign change needs to remain: > > > > a * -4 * b * 2 > > > >

Re: Default std::vector default and move constructor

2017-05-19 Thread François Dumont
Hi On 15/05/2017 21:31, Marc Glisse wrote: The __fill_bvector part of the fill overload for vector could do with some improvements as well. Looping is unnecessary, one just needs to produce the right mask and and or or with it, that shouldn't take more than 4 instructions or so. I have

c-warn PATCH to silence warnings about std::byte in switch

2017-05-19 Thread Jason Merrill
It doesn't make sense to warn about a switch case not being an enumerator if the enum type has no enumerators; such a type is being used as an opaque typedef rather than a true enumerated type. This usage makes more sense with C++11 enums with explicitly specified underlying type, but I don't

Re: [PATCH] PR c++/80544 strip cv-quals from cast results

2017-05-19 Thread Jason Merrill
On Thu, Apr 27, 2017 at 12:59 PM, Jonathan Wakely wrote: > I also tried to add a warning like EDG's (see the PR) but it gave a > false positive for direct-list-init of scoped enums (P0138R2, r240449) > because that code goes through build_c_cast to perform the conversion, > so

Re: [PATCH] warn on mem calls modifying objects of non-trivial types (PR 80560)

2017-05-19 Thread Jason Merrill
On Tue, May 16, 2017 at 5:39 PM, Martin Sebor wrote: > On 05/16/2017 01:41 PM, Jason Merrill wrote: > >> I'm still not convinced we need to consider standard-layout at all. > > I agree. The patch doesn't make use of is_standard_layout_p(). > It defines its own helper called

Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-19 Thread Sheldon Lobo
On 05/19/2017 02:45 PM, Eric Botcazou wrote: This 4/4 commit needs to contain gcc/config/sparc/sparc.c, gcc/ChangeLog, gcc/testsuite/gcc.target/sparc/niagara7-align.c and gcc/testsuite/ChangeLog. The rule is that you put the ChangeLog entry into the ChangeLog file of the directory where the

Re: RFA: PATCH to check for overflow in make_tree_vec_stat

2017-05-19 Thread Jason Merrill
On Fri, May 19, 2017 at 5:14 AM, Richard Biener wrote: > On Fri, May 19, 2017 at 4:32 AM, Jason Merrill wrote: >> A patch I've been putting together ran into strange memory corruption >> issues which turned out to be because the calculation in >>

Re: [PATCH] [ARC] Recognise add_n and sub_n in combine again

2017-05-19 Thread Claudiu Zissulescu
Hi It looks alright. No questions to ask, if you need me to upstream it please ping me. Cheers, Claudiu On Mon, May 15, 2017 at 7:07 PM, Graham Markall wrote: > Hi Claudiu, > > I ran the gcc testsuite with EZsim for NPS-400: > > $ ./EZsim_linux_x86_64 --version >

Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-19 Thread Eric Botcazou
> The rule is that you put the ChangeLog entry into the ChangeLog file of the > directory where the change is made, or that of the parent directory if there > is none, recursively. The filename in that ChangeLog file must be relative > to the directory when the ChangeLog file is. ...where... --

Re: [PATCH 4/4] Set function alignment for M7 to 8 bytes.

2017-05-19 Thread Eric Botcazou
> Just so I am clear, gcc/testsuite/ChangeLog needs to be > checked into the patch (but gcc/ChangeLog is not)? This 4/4 commit needs to contain gcc/config/sparc/sparc.c, gcc/ChangeLog, gcc/testsuite/gcc.target/sparc/niagara7-align.c and gcc/testsuite/ChangeLog. The rule is that you put the

Re: [PATCH] Prevent extract_muldiv from introducing an overflow (PR sanitizer/80800)

2017-05-19 Thread Joseph Myers
On Fri, 19 May 2017, Alexander Monakov wrote: > On Fri, 19 May 2017, Marek Polacek wrote: > > > I think it's possible to keep this folding, note that it's valid to > > > transform to > > > > > > (n * 1 * z) * 50 > > > > > > (i.e. accumulate multiplications on the outermost factor) > >

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-19 Thread Dominique d'Humières
> Le 19 mai 2017 à 19:26, Bernd Edlinger a écrit : > > No, unfortunately it looks like incremental does not work in this case. > > You can try to remove gcc/s-gtyp-input, maybe it un-breaks your > build. However, I gave up at that point and did a full bootstrap >

Re: MinGW compilation warnings in libiberty's include/environ.h

2017-05-19 Thread Eli Zaretskii
> Cc: gdb-patc...@sourceware.org > From: Pedro Alves > Date: Fri, 19 May 2017 16:51:30 +0100 > > So again there's a system header that defines the symbol > but for some reason libiberty still wants to declare/define > it is if it weren't? Yes. AFAICS, libiberty's configure

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-19 Thread Bernd Edlinger
On 05/19/17 19:05, Dominique d'Humières wrote: > Hi Bernd, > > Your patches are causing troubles when I try to do "incremental updates »: > > After revision r248290 it fails with > > ../../work/gcc/cp/init.c:4916:10: fatal error: gt-cp-init.h: No such file or > directory > #include

Re: MinGW compilation warnings in libiberty's waitpid.c

2017-05-19 Thread Eli Zaretskii
> Cc: gdb-patc...@sourceware.org > From: Pedro Alves > Date: Fri, 19 May 2017 16:36:46 +0100 > > So I wonder whether we could just unconditionally remove the waitpid > replacement instead. That's probably the best path forward.

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-19 Thread Dominique d'Humières
Hi Bernd, Your patches are causing troubles when I try to do "incremental updates »: After revision r248290 it fails with ../../work/gcc/cp/init.c:4916:10: fatal error: gt-cp-init.h: No such file or directory #include "gt-cp-init.h » and after r248242 with

[config PATCH] --enable-languages

2017-05-19 Thread Nathan Sidwell
--enable-languages=all confused me, because as RichardB said, 'it really means default'. So this patch does 2 things 1) allow --enable-languages=default to mean what =all does now. 2) change =all to mean all available languages. 2.1) jit is included in =all if -enable-host-shared is given. If

[PATCH] Remove gen_cell_microcode, warn_cell_microcode

2017-05-19 Thread Segher Boessenkool
-mno-gen-cell-microcode is a pain to handle correctly: it causes different code generation for some very basic patterns, even patterns specific to that option. It also requires marking up many patterns, which is a pain when adding new patterns or modifying existing ones (first non-trivial step is

Re: [PATCH] Prevent extract_muldiv from introducing an overflow (PR sanitizer/80800)

2017-05-19 Thread Richard Biener
On May 19, 2017 5:47:10 PM GMT+02:00, Alexander Monakov wrote: >On Fri, 19 May 2017, Marek Polacek wrote: >> > I think it's possible to keep this folding, note that it's valid to >transform to >> > >> > (n * 1 * z) * 50 >> > >> > (i.e. accumulate multiplications on

[C++ Patch] Replace a few more error + error with error + inform

2017-05-19 Thread Paolo Carlini
Hi, while looking into some bugs (eg, c++/71464) I noticed a few more of those consecutive errors, which I propose to adjust per the below patchlet. The second case in add_method is a bit tricky because in principle we'd really like to be more specific (eg, clang talks about constructors

Re: libbacktrace patch: fix memory allocation buglet on DWARF line table with zero dirs

2017-05-19 Thread Ian Lance Taylor via gcc-patches
On Fri, May 19, 2017 at 6:18 AM, Than McIntosh wrote: > > I wrote: > == The attached patch to libbacktrace is intended to fix a memory > == allocation bug involving reading of line table information. > > I've revised my previous patch to include a new test ("edtest") that >

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Pedro Alves
On 05/19/2017 04:40 PM, Eli Zaretskii wrote: >> Cc: gdb-patc...@sourceware.org, Thomas Schwinge >> From: Pedro Alves >> Date: Fri, 19 May 2017 16:22:55 +0100 >> >> But then, xstrndup.c has at the top: >> >> #ifdef HAVE_STRING_H >> #include >> #else >>

[PATCH GCC]Check tieable TRUNCATE only if inner rtx is register

2017-05-19 Thread Bin Cheng
Hi, Revision 247881 possibly exposes bug in RTL or ARM backend, while the change itself may be incomplete too. Given a TRUNCATE rtx with complicated sub-rtx, backend may want to know the complicated sub-rtx happens in context of TRUNCATE in order to give different costs. This patch adds

Re: [patch, fortran] PR80333 Namelist dtio write of array of class does not traverse the array

2017-05-19 Thread Jerry DeLisle
On 05/18/2017 07:06 PM, Steve Kargl wrote: On Thu, May 18, 2017 at 05:16:45PM -0700, Jerry DeLisle wrote: 2017-05-18 Paul Thomas PR fortran/80333 * trans-io.c (nml_get_addr_expr): If we are dealing with class type data set tmp tree to get that

Re: MinGW compilation warnings in libiberty's include/environ.h

2017-05-19 Thread Pedro Alves
On 05/08/2017 04:25 PM, Eli Zaretskii wrote: > When compiling libiberty (as part of GDB) with MinGW on MS-Windows, I > see the following warning: > > gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. > -I./../include -W -Wall -Wwrite-strings -Wc++-compat

Re: [PATCH] Prevent extract_muldiv from introducing an overflow (PR sanitizer/80800)

2017-05-19 Thread Alexander Monakov
On Fri, 19 May 2017, Marek Polacek wrote: > > I think it's possible to keep this folding, note that it's valid to > > transform to > > > > (n * 1 * z) * 50 > > > > (i.e. accumulate multiplications on the outermost factor) (to be precise, if the multiplication is done in a signed type

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Eli Zaretskii
> Cc: gdb-patc...@sourceware.org, Thomas Schwinge > From: Pedro Alves > Date: Fri, 19 May 2017 16:22:55 +0100 > > But then, xstrndup.c has at the top: > > #ifdef HAVE_STRING_H > #include > #else > # ifdef HAVE_STRINGS_H > # include > # endif >

Re: MinGW compilation warnings in libiberty's waitpid.c

2017-05-19 Thread Pedro Alves
On 05/08/2017 04:27 PM, Eli Zaretskii wrote: > When compiling libiberty (as part of GDB) with MinGW on MS-Windows, I > see the following warning: > > gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. > -I./../include -W -Wall -Wwrite-strings -Wc++-compat

Re: [PATCH] Prevent extract_muldiv from introducing an overflow (PR sanitizer/80800)

2017-05-19 Thread Marek Polacek
On Fri, May 19, 2017 at 01:57:24PM +0300, Alexander Monakov wrote: > On Fri, 19 May 2017, Richard Biener wrote: > > > On Fri, 19 May 2017, Marek Polacek wrote: > > > > > On Fri, May 19, 2017 at 09:58:45AM +0200, Richard Biener wrote: > > > > On Fri, 19 May 2017, Marek Polacek wrote: > > > > > >

Re: MinGW compilation warnings in libiberty's xstrndup.c

2017-05-19 Thread Pedro Alves
[Adding Thomas] On 05/08/2017 04:30 PM, Eli Zaretskii wrote: > When compiling libiberty (as part of GDB) with MinGW on MS-Windows, I > see the following warning: > > gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. > -I./../include -W -Wall -Wwrite-strings -Wc++-compat

Re: [PATCH] Introduce symtab_node::dump_{asm_,}name functions.

2017-05-19 Thread Jan Hubicka
> Hello. > > We repeat all over following patterns: > > fprintf (dump_file, "Removing speculative call %s/%i => %s/%i\n", > xstrdup_for_dump (edge->caller->name ()), > edge->caller->order, > xstrdup_for_dump

Re: [PATCH] Avoid signed overflow in num_get::_M_extract_int (PR libstdc++/67214)

2017-05-19 Thread Jonathan Wakely
On 18/05/17 19:10 +0800, Xi Ruoyao wrote: This UB has been hiding so long... Indeed! Thanks for the patch. 2017-03-11  Xi Ruoyao   PR libstdc++/67214 * include/bits/locale_facets.tcc (_M_extract_int):   Add explicit conversion to avoid signed

Re: [PATCH] Move symtab_node::dump_table to symbol_table::dump

2017-05-19 Thread Jan Hubicka
> Hello. > > Following mechanical change moves the function to symbol_table where one would > expect such a function. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? OK, thanks! Honza > Martin > >From

[PATCH] Introduce symtab_node::dump_{asm_,}name functions.

2017-05-19 Thread Martin Liška
Hello. We repeat all over following patterns: fprintf (dump_file, "Removing speculative call %s/%i => %s/%i\n", xstrdup_for_dump (edge->caller->name ()), edge->caller->order, xstrdup_for_dump (e2->callee->name

[PATCH] Move symtab_node::dump_table to symbol_table::dump

2017-05-19 Thread Martin Liška
Hello. Following mechanical change moves the function to symbol_table where one would expect such a function. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From f12a6fc831eb0d78d57572b8fcbb9f170d84d773 Mon Sep 17 00:00:00 2001 From:

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-19 Thread Bernd Edlinger
On 05/19/17 16:10, Nathan Sidwell wrote: > On 05/19/2017 10:05 AM, Bernd Edlinger wrote: > >> hwi cannot be the root cause of the problem, >> because it can only be long_integer_type_node >> or long_long_integer_type_node, otherwise >> an error would be triggered. > > that's the error I made

[C++ PATCH] OVERLOAD iterators #8

2017-05-19 Thread Nathan Sidwell
This patch gets the remaining stragglers outside of name-lookup. Nothing particularly exciting here. Remaining patches will be primarily in name-lookup.c, with a few in cp-tree.h, tree.c and the parser. These will be the patches that are the significant changes (all this lot was just ground

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-19 Thread Nathan Sidwell
On 05/19/2017 10:05 AM, Bernd Edlinger wrote: hwi cannot be the root cause of the problem, because it can only be long_integer_type_node or long_long_integer_type_node, otherwise an error would be triggered. that's the error I made with the static fns. PCH moves things around, so anything

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-19 Thread Bernd Edlinger
On 05/19/17 09:51, Richard Biener wrote: > On Thu, 18 May 2017, Bernd Edlinger wrote: > >> Hi, >> >> unfortunately the first patch was still insufficient. I identified many >> more relatively new places where static tree objects are invisible to >> GC. >> >> Nathan, whatever you are doing,

Re: OpenACC 2.5 default (present) clause

2017-05-19 Thread Thomas Schwinge
Hi! On Wed, 10 May 2017 17:48:36 +0200, Jakub Jelinek wrote: > On Fri, Apr 07, 2017 at 05:08:55PM +0200, Thomas Schwinge wrote: > > OpenACC 2.5 added a default (present) clause, which "causes all arrays or > > variables of aggregate data type used in the compute construct that

Re: OpenACC 2.5 default (present) clause

2017-05-19 Thread Thomas Schwinge
Hi! On Wed, 10 May 2017 17:48:36 +0200, Jakub Jelinek wrote: > On Fri, Apr 07, 2017 at 05:08:55PM +0200, Thomas Schwinge wrote: > > OpenACC 2.5 added a default (present) clause, which "causes all arrays or > > variables of aggregate data type used in the compute construct that

Re: OpenACC default clause maintenance

2017-05-19 Thread Thomas Schwinge
Hi! On Wed, 29 Mar 2017 00:19:30 +0200, Jakub Jelinek wrote: > On Tue, Mar 28, 2017 at 11:35:35AM +0200, Thomas Schwinge wrote: > > I noticed that in C++, for a directive like: > > > > #pragma acc parallel default (hello) > > > > ... we currently print two error messages

ping [PATCH] [MSP430] Fix PR78849: ICE on initialization of global struct containing __int20 array

2017-05-19 Thread Jozef Lawrynowicz
Original post: https://gcc.gnu.org/ml/gcc-patches/2017-04/msg01030.html The attached patch fixes an issue for the msp430 target where the TYPE_SIZE of the __int20 type was set using the precision (20 bits) instead of the in-memory size (32 bits) of the type. This bug caused an ICE as reported in

Re: [HSA, PATCH] Load an HSA runtime via dlopen mechanism

2017-05-19 Thread Thomas Schwinge
Hi! On Sun, 9 Apr 2017 18:22:00 +0200, Martin Jambor wrote: > On Wed, Apr 05, 2017 at 10:11:34AM +0200, Thomas Schwinge wrote: > > I ran into a case where the libgomp hsa plugin wouldn't load. The > > following patch helped me to quickly diagnose and then fix that. OK for > >

Re: [RFC] propagate malloc attribute in ipa-pure-const pass

2017-05-19 Thread Jan Hubicka
> > * LTO and memory management > This is a general question about LTO and memory management. > IIUC the following sequence takes place during normal LTO: > LGEN: generate_summary, write_summary > WPA: read_summary, execute ipa passes, write_opt_summary > > So I assumed it was OK in LGEN to

Re: libbacktrace patch: fix memory allocation buglet on DWARF line table with zero dirs

2017-05-19 Thread Than McIntosh via gcc-patches
Hi again, I wrote: == The attached patch to libbacktrace is intended to fix a memory == allocation bug involving reading of line table information. I've revised my previous patch to include a new test ("edtest") that verifies the fix. Thanks, Than --- Patch (take 2): diff --git a/Makefile.am

Re: [PATCH] Enable by default -Werror just for bootstrap-debug.mk.

2017-05-19 Thread Richard Biener
On Fri, May 19, 2017 at 2:56 PM, Martin Liška wrote: > On 05/19/2017 01:24 PM, Richard Biener wrote: >> On Wed, May 17, 2017 at 10:45 AM, Martin Liška wrote: >>> Hi. >>> >>> As discussed on IRC some time ago, there are configurations that produce >>>

Re: [RFC] propagate malloc attribute in ipa-pure-const pass

2017-05-19 Thread Jan Hubicka
> > struct D: B { > > char buf[32]; > > virtual void* f (unsigned n) { > > if (n < 32) > > return n <= 32 ? buf : B::f (n); > > } > > > > Breaking foo's attribute malloc constraint. > > > > In other words, I think virtual functions need to be excluded > > from the list

Re: [PATCH] Enable by default -Werror just for bootstrap-debug.mk.

2017-05-19 Thread Martin Liška
On 05/19/2017 01:24 PM, Richard Biener wrote: > On Wed, May 17, 2017 at 10:45 AM, Martin Liška wrote: >> Hi. >> >> As discussed on IRC some time ago, there are configurations that produce >> -Werror=maybe-uninitialized >> and other warnings that break bootstrap. So that, the

Re: [PATCH GCC8][31/33]Set range information for niter bound of vectorized loop

2017-05-19 Thread Richard Biener
On Mon, May 15, 2017 at 5:58 PM, Bin.Cheng wrote: > On Thu, May 11, 2017 at 12:02 PM, Richard Biener > wrote: >> On Tue, Apr 18, 2017 at 12:54 PM, Bin Cheng wrote >>> Hi, >>> Based on vect_peeling algorithm, we know for sure

Re: [PING][PATCH, GCC/ARM] Only test tls-disable-literal-pool.c if target supports native TLS

2017-05-19 Thread Kyrill Tkachov
Hi Prakhar, On 19/05/17 13:29, Prakhar Bahuguna wrote: On 11/05/2017 14:54:37, Prakhar Bahuguna wrote: tls-disable-literal-pool.c should only be run if the toolchain and target support native thread-local storage rather than emulated TLS. This patch also improves the matching of the error

Re: Turn inline_edge_summary into ipa_call_summary

2017-05-19 Thread Jan Hubicka
> > and way way more (C, Ada, ...). Assuming that the ipa-predicate.[ch] > patch was really only cosmetic, this only leaves your patch in this rev > range. > > Please fix. Hi, I apologize for the breakage. I already commited a fix before lunch but seems my email did not get through. I am

Re: [PATCH][C fam] Fix PR80593, bogus strict-aliasing warnings

2017-05-19 Thread Richard Biener
On Fri, 19 May 2017, Marek Polacek wrote: > On Thu, May 18, 2017 at 01:00:39PM +0200, Richard Biener wrote: > > > > The following reverts an earlier change of mine (2008) to explicitely > > warn about accessing alias-set zero memory with alias-set non-zero. > > That was supposed to catch the

[PING][PATCH, GCC/ARM] Only test tls-disable-literal-pool.c if target supports native TLS

2017-05-19 Thread Prakhar Bahuguna
On 11/05/2017 14:54:37, Prakhar Bahuguna wrote: > tls-disable-literal-pool.c should only be run if the toolchain and target > support native thread-local storage rather than emulated TLS. This patch also > improves the matching of the error message. > > testsuite/ChangeLog: > > 2017-05-11

Re: [PATCH][C fam] Fix PR80593, bogus strict-aliasing warnings

2017-05-19 Thread Marek Polacek
On Thu, May 18, 2017 at 01:00:39PM +0200, Richard Biener wrote: > > The following reverts an earlier change of mine (2008) to explicitely > warn about accessing alias-set zero memory with alias-set non-zero. > That was supposed to catch the case in g++.dg/warn/Wstrict-aliasing-6.C > which is > >

Re: [PATCH] [Aarch64] Variable shift count truncation issues

2017-05-19 Thread Wilco Dijkstra
Richard Sandiford wrote: > Insn patterns shouldn't check can_create_pseudo_p, because there's no > guarantee that the associated split happens before RA. In this case it > should be safe to reuse operand 0 after RA if you change it to: The goal is to only create and split this pattern before

[PATCH] PR libstdc++/80796 Add new std::search overload for C++17

2017-05-19 Thread Jonathan Wakely
When I copied the searchers from std::experimental to std I forgot to add the new std::search overload. PR libstdc++/80796 * include/bits/stl_algo.h (search): Add new overload for C++17. * testsuite/25_algorithms/search/searcher.cc: New. Tested powerpc64le-linux,

Re: Turn inline_edge_summary into ipa_call_summary

2017-05-19 Thread Rainer Orth
Hi Jan, > this patch makes edge summaries to use call_summary template and renames them > as they are not inliner specific for few years. > > Bootstrapped/regtested x86_64-linux. > > Honza > > * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list, >

[PATCH] rs6000: Make constant formation a tiny bit better

2017-05-19 Thread Segher Boessenkool
If we cannot load a constant into a register in one insn, and that constant is a valid mask (for rotate instructions), we currently prefer to load -1 and then mask it. This patch makes us not do that if instead we could use two add or or instructions, since those are sometimes faster on certain

Re: [PATCH] Enable by default -Werror just for bootstrap-debug.mk.

2017-05-19 Thread Richard Biener
On Wed, May 17, 2017 at 10:45 AM, Martin Liška wrote: > Hi. > > As discussed on IRC some time ago, there are configurations that produce > -Werror=maybe-uninitialized > and other warnings that break bootstrap. So that, the patch makes -Werror > just for default (boostrap-debug)

[PATCH] Fix PR80821

2017-05-19 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-05-19 Richard Biener PR build/80821 * genmatch.c (dt_node::gen_kids_1): Add missing scope around predicate evaluation. Index: gcc/genmatch.c

Re: Remove unused "default_kind" member from gcc/omp-low.c's "struct omp_context"

2017-05-19 Thread Thomas Schwinge
Hi! Ping. On Fri, 31 Mar 2017 17:05:29 +0200, I wrote: > It would appear that ever since the first version of gcc/omp-low.c got > committed to GCC trunk (more than ten years ago), it extraced OpenMP > default clause data that it doesn't actually use for anything. OK to > commit the following

Re: OpenACC 2.5 kernels construct: num_gangs, num_workers, vector_length clauses

2017-05-19 Thread Thomas Schwinge
Hi! Ping. On Thu, 11 May 2017 14:26:51 +0200, I wrote: > [...] support the num_gangs, num_workers, vector_length > clauses for the OpenACC 2.5 kernels construct. OK for trunk? > > commit a689c52cde71960bc08ae30c3f88980f66fdd0b8 > Author: Thomas Schwinge > Date: Thu

Re: [PATCH] Try harder to fix recently introduced crashes in ggc_collect

2017-05-19 Thread Nathan Sidwell
On 05/19/2017 03:51 AM, Richard Biener wrote: you are commoning 'hwi' here. Also a bad (very short) name for a global (even if static). I'll leave review to Nathan anyway. IMHO the C FE changes are obvious, with the fixing of the hwi name I guess. I'll go rename fn1..6 in the C++ FE once

Re: Runtime checking of OpenACC parallelism dimensions clauses

2017-05-19 Thread Thomas Schwinge
Hi! Ping. On Thu, 11 May 2017 14:24:05 +0200, I wrote: > OK for trunk? > > commit 0ba48b4faf85420fbe12971afdd6e0afe70778bb > Author: Thomas Schwinge > Date: Fri May 5 16:41:59 2017 +0200 > > Runtime checking of OpenACC parallelism dimensions clauses > >

Re: [PATCH] [Aarch64] Variable shift count truncation issues

2017-05-19 Thread Christophe Lyon
Hi Michael, On 19 May 2017 at 09:21, Richard Sandiford wrote: > Thanks for doing this. Just a couple of comments about the .md stuff: > > Michael Collison writes: >> diff --git a/gcc/config/aarch64/aarch64.md

Re: [PATCH][Aarch64] Add support for overflow add and sub operations

2017-05-19 Thread Christophe Lyon
Hi Michael, On 19 May 2017 at 07:12, Michael Collison wrote: > Hi, > > This patch improves code generations for builtin arithmetic overflow > operations for the aarch64 backend. As an example for a simple test case such > as: > > Sure for a simple test case such as:

Re: [PATCH] Prevent extract_muldiv from introducing an overflow (PR sanitizer/80800)

2017-05-19 Thread Alexander Monakov
On Fri, 19 May 2017, Richard Biener wrote: > On Fri, 19 May 2017, Marek Polacek wrote: > > > On Fri, May 19, 2017 at 09:58:45AM +0200, Richard Biener wrote: > > > On Fri, 19 May 2017, Marek Polacek wrote: > > > > > > > extract_muldiv folds > > > > > > > > (n * 1 * z) * 50 > > > > > > >

Re: [PATCH] Prevent extract_muldiv from introducing an overflow (PR sanitizer/80800)

2017-05-19 Thread Richard Biener
On Fri, 19 May 2017, Marek Polacek wrote: > On Fri, May 19, 2017 at 09:58:45AM +0200, Richard Biener wrote: > > On Fri, 19 May 2017, Marek Polacek wrote: > > > > > extract_muldiv folds > > > > > > (n * 1 * z) * 50 > > > > > > to > > > > > > (n * 50) * z > > > > > > which is a

[PATCH][2/2] early LTO debug, main part

2017-05-19 Thread Richard Biener
This is a repost of the main part of the early LTO debug support. The only changes relative to the last post is in the dwarf2out.c pieces due to Jasons review and Jakubs introduction of DW_OP_GNU_variable_value. I've also adjusted testcases for fallout (the asan backtraces do give files / line

Re: [PATCH] Prevent extract_muldiv from introducing an overflow (PR sanitizer/80800)

2017-05-19 Thread Marek Polacek
On Fri, May 19, 2017 at 09:58:45AM +0200, Richard Biener wrote: > On Fri, 19 May 2017, Marek Polacek wrote: > > > extract_muldiv folds > > > > (n * 1 * z) * 50 > > > > to > > > > (n * 50) * z > > > > which is a wrong transformation to do, because it may introduce an overflow. > >

[PATCH 7/7] [ARC] Test against frame_pointer_needed in arc_can_eliminate.

2017-05-19 Thread Claudiu Zissulescu
arc_can_eliminate is using arc_frmae_pointer_required() which is wrong as the frame_pointer_needed can be set on different conditions. Fix it by calling arc_frame_pointer_needed(). gcc/ 2017-01-09 Claudiu Zissulescu * config/arc/arc.c (arc_can_eliminate): Test

[PATCH 5/7] [ARC] Update (non)commutative_binary_comparison patterns.

2017-05-19 Thread Claudiu Zissulescu
gcc/ 2016-12-20 Claudiu Zissulescu * config/arc/arc.md (commutative_binary_comparison): Remove 'I' constraint. It is not valid for the pattern. (noncommutative_binary_comparison): Likewise. --- gcc/config/arc/arc.md | 16 1 file

[PATCH][1/2] Early LTO debug, simple-object part

2017-05-19 Thread Richard Biener
This is a repost (unchanged) of the simple-object ELF support for early LTO debug transfer from IL object to a separate debug-only object file. Bootstrapped and tested on x86_64-unknown-linux-gnu. Richard. 2017-05-19 Richard Biener include/ *

[PATCH 6/7] [ARC] Prevent moving stores to the frame before the stack adjustment.

2017-05-19 Thread Claudiu Zissulescu
From: Claudiu Zissulescu If the stack pointer is needed, emit a special barrier that will prevent the scheduler from moving stores to the frame before the stack adjustment. 2017-01-03 Claudiu Zissulescu * config/arc/arc.c

[PATCH 2/7] [ARC] Avoid use of hard registers before reg-alloc.

2017-05-19 Thread Claudiu Zissulescu
gcc/ 2017-04-10 Claudiu Zissulescu * config/arc/arc.md (mulsi3): Avoid use of hard registers before reg-alloc when having mul64 or mul32x16 instructions. (mulsidi3): Likewise. (umulsidi3): Likewise. (mulsi32x16): New pattern.

[PATCH 1/7] [ARC] Make mulsi for A700 pattern commutative.

2017-05-19 Thread Claudiu Zissulescu
gcc/ 2016-11-10 Claudiu Zissulescu * config/arc/arc.md (mulsi3_700): Make it commutative. --- gcc/config/arc/arc.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/arc/arc.md b/gcc/config/arc/arc.md index 71d076c..db5867c 100644 ---

[PATCH 4/7] [ARC] Change predicate movv2hi to avoid scaled addresses.

2017-05-19 Thread Claudiu Zissulescu
From: Claudiu Zissulescu 2016-12-17 Claudiu Zissulescu * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid scaled addresses. --- gcc/config/arc/simdext.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/7] [ARC] Allow r30 to be used by the reg-alloc.

2017-05-19 Thread Claudiu Zissulescu
gcc/ 2016-12-12 Claudiu Zissulescu * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to be used by the reg-alloc. --- gcc/config/arc/arc.c | 9 - gcc/config/arc/arc.h | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff

[PATCH 0/7] [ARC] Patterns update and fixes

2017-05-19 Thread Claudiu Zissulescu
From: claziss Hi Andrew, Please fing a set of 7 small patches which are upgrating/fixing wrong patterns. Please let me know if you need more info. Cheers, Claudiu Claudiu Zissulescu (7): [ARC] Make mulsi for A700 pattern commutative. [ARC] Avoid use of hard

Re: [PING][PATCH][2/2] Early LTO debug -- main part

2017-05-19 Thread Richard Biener
Late response now that I'm finished refreshing the patches. On Mon, Nov 28, 2016 at 6:20 PM, Jason Merrill wrote: > On Thu, Nov 24, 2016 at 8:50 AM, Richard Biener wrote: >>> > + /* ??? We can't annotate types late, but for LTO we may not >>> > +

Re: [PATCH 2/3] Simplify wrapped binops

2017-05-19 Thread Richard Biener
On Fri, May 19, 2017 at 12:13 PM, Bin.Cheng wrote: > On Fri, May 19, 2017 at 11:09 AM, Robin Dapp wrote: >>> I can guess what is happening here. It's a 40 bits unsigned long long >>> field, (s.b-8) will be like: >>> _1 = s.b >>> _2 = _1 +

Re: [PATCH 2/3] Simplify wrapped binops

2017-05-19 Thread Bin.Cheng
On Fri, May 19, 2017 at 11:09 AM, Robin Dapp wrote: >> I can guess what is happening here. It's a 40 bits unsigned long long >> field, (s.b-8) will be like: >> _1 = s.b >> _2 = _1 + 0xf8 >> Also get_range_info returns value range [0, 0xFF] for _1. >>

Re: [PATCH 2/3] Simplify wrapped binops

2017-05-19 Thread Robin Dapp
> I can guess what is happening here. It's a 40 bits unsigned long long > field, (s.b-8) will be like: > _1 = s.b > _2 = _1 + 0xf8 > Also get_range_info returns value range [0, 0xFF] for _1. > You'd need to check if _1(with range [0, 0xFF]) + 0xf8 > overflows

Re: RFA: PATCH to check for overflow in make_tree_vec_stat

2017-05-19 Thread Richard Biener
On Fri, May 19, 2017 at 4:32 AM, Jason Merrill wrote: > A patch I've been putting together ran into strange memory corruption > issues which turned out to be because the calculation in > make_tree_vec_stat was overflowing and allocating a small TREE_VEC > instead of a large one.

  1   2   >