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

2016-10-13 Thread Rainer Orth
Hi Martin, > Good! How does it look with the former solaris targets that does not support > prioritized ctors? still no failures there, neither with ld (which lacks constructor priority support) nor with gld (which has it). Only Solaris 12 shows the failures, both with ld and gld (both of which

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

2016-10-13 Thread Martin Liška
On 10/13/2016 04:31 PM, Rainer Orth wrote: > Hi Martin, > >> Good! How does it look with the former solaris targets that does not support >> prioritized ctors? > > still no failures there, neither with ld (which lacks constructor > priority support) nor with gld (which has it). Only Solaris 12

[PATCH] Fold __builtin_str{n}{case}cmp functions (simplified version 4)

2016-10-13 Thread Martin Liška
Simplified version that just supports only null-terminated strings. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 41c49024a02cff43774903206ad77b2ae161e81a Mon Sep 17 00:00:00 2001 From: marxin Date: Thu, 13 Oct 2016

[PATCH] Replace non-constexpr decrement in std::chrono::floor

2016-10-13 Thread Jonathan Wakely
Decrementing a duration is not constexpr (yet ... I made an NB comment about it). I'm not sure if these functions are correct for floating-point durations, because we could end up with a duration which is very very slightly lower of higher than the desired value, but then we subtract 1.0 from

[PATCH, libfortran] PR 48587 Newunit allocator

2016-10-13 Thread Janne Blomqvist
Currently GFortran newer reuses unit numbers allocated with NEWUNIT=, instead having a simple counter that is decremented each time such a unit is opened. For a long running program which repeatedly opens files with NEWUNIT= and closes them, the counter can wrap around and cause an abort. This

[PATCH] Fix PR77937

2016-10-13 Thread Bill Schmidt
The previous patch for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937 is necessary, but not sufficient in all cases. It allows -1 to be used with a pointer increment, which we really do not want given that this is generally not profitable. Disable this case for now. We can add logic later

Re: [PATCH] Replace non-constexpr decrement in std::chrono::floor

2016-10-13 Thread Jonathan Wakely
On 13/10/16 15:24 +0100, Jonathan Wakely wrote: Decrementing a duration is not constexpr (yet ... I made an NB comment about it). I'm not sure if these functions are correct for floating-point durations, because we could end up with a duration which is very very slightly lower of higher than

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-13 Thread Allan Sandfeld Jensen
On Tuesday 11 October 2016, Jakub Jelinek wrote: > Hi! > > The following patch introduces difference warning levels for > -Wimplicit-fallthrough warning, so projects can choose if they want to > honor only attributes (-Wimplicit-fallthrough=5), or what kind of comments. > =4 is very picky and

Re: [patch] aarch64-*-freebsd* support for gcc.

2016-10-13 Thread Jeff Law
On 10/12/2016 01:43 PM, Andreas Tobler wrote: libgcc: 2016-10-10 Andreas Tobler * config.host: Add support for aarch64-*-freebsd*. gcc: 2016-10-10 Andreas Tobler * config.gcc: Add aarch64-*-freebsd* support. * config.host:

[PATCH] Introduce -fprofile-update=maybe-atomic

2016-10-13 Thread Martin Liška
Hello. As it's very hard to guess from GCC driver whether a target supports atomic updates for GCOV counter or not, I decided to come up with a new option value (maybe-atomic), that would be transformed in a corresponding value (single or atomic) in tree-profile.c. The GCC driver selects the

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

2016-10-13 Thread Martin Liška
On 10/13/2016 04:04 PM, Rainer Orth wrote: > no, it's from r240990 unlike I'm completely mistaken. However, current > trunk bootstraps are running as we speak. > > Rainer Good! How does it look with the former solaris targets that does not support prioritized ctors? Thanks, Martin

[PATCH] Check \0-termination of string in c_getstr (simplified version)

2016-10-13 Thread Martin Liška
Hello. After receiving feedback from Richi and Wilco Dijkstra, I decided to fully not support not null-terminated strings. It brings more complications and the code has started to be overengineered. Thus c_getstr accepts only such strings and as a bonus it returns length of a string. Patch can

[PATCH, GCC/ARM 2/2] Allow combination of aprofile and rmprofile multilibs

2016-10-13 Thread Thomas Preudhomme
Hi ARM maintainers, This patchset aims at adding multilib support for R and M profile ARM architectures and allowing it to be built alongside multilib for A profile ARM architectures. This specific patch is concerned with the latter. The patch works by moving the bits shared by both aprofile

Re: [PATCH] Tweaks to print_rtx_function

2016-10-13 Thread Bernd Schmidt
On 10/13/2016 04:08 PM, David Malcolm wrote: I thought it might be useful to brainstorm [1] some ideas on this, so here are various possible ways it could be printed for this use-case: * Offset by LAST_VIRTUAL_REGISTER + 1 (as in the patch), and printed just as a number, giving: (reg:SI 3)

Re: [patch, avr, pr71676 and pr71678] Issues with casesi expand

2016-10-13 Thread Georg-Johann Lay
On 13.10.2016 13:44, Pitchumani Sivanupandi wrote: On Monday 26 September 2016 08:19 PM, Georg-Johann Lay wrote: On 26.09.2016 15:19, Pitchumani Sivanupandi wrote: Attached patch for PR71676 and PR71678. PR71676 is for AVR target that generates wrong code when switch case index is more than

[Fortran, patch, caf] Add unimplemented message for polymorphic objects with allocatable/pointer components

2016-10-13 Thread Andre Vehreschild
Hi all, attached patch adds an unimplemented message, when a polymorphic coarray object with allocatable/pointer components is declared for coarray mode library. This is just an ad-hoc solution until handling those constructs is implemented. There are already some prs that address ICEs caused by

[PATCH] Use normal mode containers in searchers

2016-10-13 Thread Jonathan Wakely
We never want the searchers to use the debug mode or profile mode containers. * include/experiumental/functional (boyer_moore_searcher) (__boyer_moore_map_base, __boyer_moore_array_base): Qualify containers with _GLIBCXX_STD_C. * include/std/functional: Likewise.

Re: [PATCH] Omit INSN_LOCATION from compact dumps

2016-10-13 Thread Bernd Schmidt
On 10/13/2016 05:52 PM, David Malcolm wrote: Alternatively, it seems that we might want an additional flag for this. Probably - I imagine most testcases won't care (it's obviously easier to read without locations) but some will. The writing side is maybe less interesting than the reading

[PATCH] Create the *logue in the same order as before (PR77962)

2016-10-13 Thread Segher Boessenkool
PR77962 shows Go failing on 32-bit x86. This happens because the i386 port requires the split stack prologue to be created before the normal prologue, and my previous patch changed it to be the other way around. This patch changes it back. Things will be exactly as before for targets that do

[PATCH] Omit INSN_LOCATION from compact dumps

2016-10-13 Thread David Malcolm
On Thu, 2016-10-13 at 12:21 +0200, Bernd Schmidt wrote: > On 10/12/2016 10:37 PM, David Malcolm wrote: > > It didn't pass, due to this change: > > > > (print_rtx_operand_code_i): When printing source locations, > > wrap > > xloc.file in quotes. [...snip...] > [...] > > The following is

Re: [PATCH GCC]Simplify (convert)(X op const) -> (convert)X op (convert)const by match

2016-10-13 Thread Jeff Law
On 10/12/2016 02:48 AM, Richard Biener wrote: On Tue, Oct 11, 2016 at 11:34 PM, Marc Glisse wrote: On Tue, 11 Oct 2016, Bin Cheng wrote: We missed folding (convert)(X op const) -> (convert)X op (convert)const for unsigned narrowing because of reason reported at

[PATCH] Fold __builtin_memchr (simplified version 4)

2016-10-13 Thread Martin Liška
Simplified version that supports only valid null-terminated string constants. Apart from that, I added checking for constant folding of expressions that have side effects. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From

[PATCH] Test folding of str{n}{case}cmp and memchr (simplified version 4)

2016-10-13 Thread Martin Liška
Simplified version of tests, where I added tests for side effects. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 83da10e2bd4f4e36028ca33d7d3a0472e8b46d7a Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 16 Aug 2016

[PATCH, GCC/ARM 1/2] Add multilib support for embedded bare-metal targets

2016-10-13 Thread Thomas Preudhomme
Hi ARM maintainers, This patchset aims at adding multilib support for R and M profile ARM architectures and allowing it to be built alongside multilib for A profile ARM architectures. This specific patch adds the t-rmprofile multilib Makefile fragment for the former objective. Multilib are

Re: [ping * 2] remove optab functions for [us]divmod_optab in optabs.def

2016-10-13 Thread Bernd Schmidt
On 10/13/2016 07:18 PM, Prathamesh Kulkarni wrote: On 13 October 2016 at 16:56, Bernd Schmidt wrote: On 10/06/2016 07:43 AM, Prathamesh Kulkarni wrote: Pinging patch: https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01038.html If I understand correctly this is a latent

Re: [PATCH] Remove a few -Wno-error from Makefile.in

2016-10-13 Thread Jeff Law
On 10/13/2016 12:09 PM, Marek Polacek wrote: I thought I had already done this, but apparently not. I added these because of -Wimplicit-fallthrough, but they're no longer needed, so remove it to not suppress any possible useful warnings. Bootstrapped/regtested on x86_64-linux, ppc64-linux and

Re: [PATCH] Remove a few -Wno-error from Makefile.in

2016-10-13 Thread Bernd Schmidt
On 10/13/2016 08:09 PM, Marek Polacek wrote: I thought I had already done this, but apparently not. I added these because of -Wimplicit-fallthrough, but they're no longer needed, so remove it to not suppress any possible useful warnings. Bootstrapped/regtested on x86_64-linux, ppc64-linux

Go patch committed: don't get backend version of redefinition

2016-10-13 Thread Ian Lance Taylor
This patch to the Go frontend changes it to not try to get the backend version of a redefinition. A redefinition is an error anyhow, and getting the backend version can cause the compiler to crash as it walks over a list of statements for the second time. No test case added as I don't think it's

[PATCH] Change test to use VERIFY not assert

2016-10-13 Thread Jonathan Wakely
This used to pass because included , but it doesn't now. The test wasn't failing because the stdc++.h PCH included , but it fails without PCH. * testsuite/26_numerics/random/default_random_engine.cc: Use VERIFY instead of assert. Tested x86_64-linux, committed to trunk. commit

Re: [PATCH] Create the *logue in the same order as before (PR77962)

2016-10-13 Thread Segher Boessenkool
On Thu, Oct 13, 2016 at 03:15:37PM +, Segher Boessenkool wrote: > Bootstrapping+testing on powerpc64-linux {-m64,-m32}, all languages; > and on x86_64-linux all,go,obj-c++ (i.e. no ada). > > Is this okay for trunk if testing succeeds? And sorry for the breakage. No new failures for either.

[PATCH] Add missing header in testcase

2016-10-13 Thread Jonathan Wakely
Another one that fails without PCH. * testsuite/experimental/algorithm/sample.cc: Add missing header. Tested x86_64-linux, committed to trunk. commit b6ba4386fc81777bd4a06b2807b03b38f7f85d76 Author: Jonathan Wakely Date: Thu Oct 13 17:42:03 2016 +0100 Add

[PATCH] Avoid #include in other headers

2016-10-13 Thread Jonathan Wakely
The header is pretty large, especially in C++17 mode because the searchers include and . This tweaks other headers to avoid including it unnecessarily. We could reduce things much further by splitting std::function and std::reference_wrapper into their own headers, which I'm working on. This

[committed, arm, testsuite] fix dg-skip-if logic in Xscale-specific tests

2016-10-13 Thread Sandra Loosemore
I noticed that two Xscale-specific tests, gcc.target/arm/scd42-1.c and gcc.target/arm/scd42-2.c, were incorrectly being run in test configurations explicitly specifying some other incompatible -mcpu. The similar test gcc.target/arm/scd42-3.c was correctly being skipped in that case, so I

[PATCH] DWARF: make signedness explicit for enumerator const values

2016-10-13 Thread Pierre-Marie de Rodat
Hello, Currently, the DWARF description does not specify the signedness of the representation of enumeration types. This is a problem in some contexts where DWARF consumers need to determine if value X is greater than value Y. For instance in Ada: type Enum_Type is ( A, B, C, D); for

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-10-13 Thread Martin Sebor
No worries: I've refreshed your patch on top of Thomas Preud'homme's for PR testsuite/77710 and found that one more bit is needed to fix this completely. 32-bit Solaris shows three more warnings: /vol/gcc/src/hg/trunk/local/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c:1355:3:

[PATCH][AArch64] Use new target pass registration framework for FMA steering pass

2016-10-13 Thread Kyrill Tkachov
Hi all, This patch moves the aarch64-specific FMA steering pass registration into the new framework that Jakub introduced. With this patch the RTL dump for the steering pass is now numbered properly so that it appears after the regrename pass, rather than getting a dump number that puts it

Re: [PATCH] Create the *logue in the same order as before (PR77962)

2016-10-13 Thread Jeff Law
On 10/13/2016 09:15 AM, Segher Boessenkool wrote: PR77962 shows Go failing on 32-bit x86. This happens because the i386 port requires the split stack prologue to be created before the normal prologue, and my previous patch changed it to be the other way around. This patch changes it back.

Re: [ping * 2] remove optab functions for [us]divmod_optab in optabs.def

2016-10-13 Thread Prathamesh Kulkarni
On 13 October 2016 at 16:56, Bernd Schmidt wrote: > On 10/06/2016 07:43 AM, Prathamesh Kulkarni wrote: >> >> Pinging patch: https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01038.html > > > If I understand correctly this is a latent issue where nonexistant libfunc > names are

[PATCH] Qualify use of std::declval to avoid ADL

2016-10-13 Thread Jonathan Wakely
* include/experimental/propagate_const (element_type): Qualify declval. Tested x86_64-linux, committted to trunk. commit 1df5cda6740d67ac7074fbbf03178d25b45549bb Author: Jonathan Wakely Date: Thu Oct 13 17:39:18 2016 +0100 Qualify use of std::declval

Re: [PATCH, libfortran] PR 48587 Newunit allocator

2016-10-13 Thread Jerry DeLisle
On 10/13/2016 08:16 AM, Janne Blomqvist wrote: Currently GFortran newer reuses unit numbers allocated with NEWUNIT=, instead having a simple counter that is decremented each time such a unit is opened. I am going to have to study this a bit. After I added the newunit stack, the units are

[PATCH] Remove a few -Wno-error from Makefile.in

2016-10-13 Thread Marek Polacek
I thought I had already done this, but apparently not. I added these because of -Wimplicit-fallthrough, but they're no longer needed, so remove it to not suppress any possible useful warnings. Bootstrapped/regtested on x86_64-linux, ppc64-linux and aarch64-linux, ok for trunk? 2016-10-13 Marek

Re: [PATCH] Allow `make tags` to work from top-level directory

2016-10-13 Thread Jeff Law
On 10/06/2016 07:21 AM, Eric Gallager wrote: The libdecnumber, libgcc, and libobjc subdirectories are missing TAGS targets in their Makefiles. The attached patch causes them to be skipped when running `make tags`. ChangeLog entry: 2016-10-06 Eric Gallager *

Re: RFC: Split into smaller pieces

2016-10-13 Thread Jonathan Wakely
On 13/10/16 19:19 +0100, Jonathan Wakely wrote: On 13/10/16 18:34 +0100, Jonathan Wakely wrote: Code which doesn't need the whole of should include the relevant header instead. This means that we don't need to pull the whole of (and and ) into just because shared_ptr wants to use

Re: RFC: Split into smaller pieces

2016-10-13 Thread Jonathan Wakely
Apparently this got spam-filtered and didn't make it to the lists... On 13/10/16 18:34 +0100, Jonathan Wakely wrote: This splits the large (2200 lines) header into smaller pieces, so there are separate headers for: - std::less, std::equal_to etc. (already in their own header) - std::__invoke

Re: [PATCH] Test cases for PR77937

2016-10-13 Thread Rainer Orth
Hi Bill, > Here are torture test cases for > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf > kindly provided the source for the tests and verified the correct > dejagnu options on x86_64-pc-linux-gnu. Committed. > > Thanks, > Bill > > > 2016-10-13 Bill Schmidt

[PATCH] Test cases for PR77937

2016-10-13 Thread Bill Schmidt
Here are torture test cases for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77937. Markus Trippelsdorf kindly provided the source for the tests and verified the correct dejagnu options on x86_64-pc-linux-gnu. Committed. Thanks, Bill 2016-10-13 Bill Schmidt

Re: RFC: Split into smaller pieces

2016-10-13 Thread Jonathan Wakely
On 13/10/16 18:34 +0100, Jonathan Wakely wrote: Code which doesn't need the whole of should include the relevant header instead. This means that we don't need to pull the whole of (and and ) into just because shared_ptr wants to use reference_wrapper in one place. This reduces from

[v3] Remove 'test' variables from a few more testsuite dirs

2016-10-13 Thread Paolo Carlini
Hi, nothing especially interesting here... Tested x86_64-linux. Thanks, Paolo. // 2016-10-13 Paolo Carlini * testsuite/24_iterators/container_access.cc: Remove 'test' variables. * testsuite/24_iterators/istream_iterator/2.cc:

Re: [PATCH, libfortran] PR 48587 Newunit allocator

2016-10-13 Thread Jerry DeLisle
On 10/13/2016 08:16 AM, Janne Blomqvist wrote: Currently GFortran newer reuses unit numbers allocated with NEWUNIT=, instead having a simple counter that is decremented each time such a unit is opened. For a long running program which repeatedly opens files with NEWUNIT= and closes them, the

Re: PR35503 - warn for restrict pointer

2016-10-13 Thread Prathamesh Kulkarni
On 7 October 2016 at 10:33, Prathamesh Kulkarni wrote: > On 22 September 2016 at 23:15, Joseph Myers wrote: >> On Thu, 22 Sep 2016, Prathamesh Kulkarni wrote: >> >>> Would that be acceptable ? I am not sure how to make %Z check if the >>>

Re: [PATCH v4] PR48344: Fix unrecognizable insn error with -fstack-limit-register=r2

2016-10-13 Thread Andreas Schwab
I've committed this to fix the ICE. Andreas. * config/m68k/m68k.c (m68k_option_override): Check opt_fstack_limit_symbol_arg and opt_fstack_limit_register_no instead of stack_limit_rtx. * gcc.target/m68k/stack-limit-1.c: Expect warning on line 0. diff --git

Re: [PATCH] PR68212, Correct frequencies/counts when unrolling

2016-10-13 Thread Jeff Law
On 09/20/2016 03:27 PM, Pat Haugen wrote: The following patch corrects frequency/count values computed when generating the switch blocks/peeled loop copies before the loop. The two main problem areas were for the peeled copies duplicate_loop_to_header_edge was not using the preheader

Re: [PATCH] Don't peel extra copy of loop in unroller for loops with exit at end

2016-10-13 Thread Jeff Law
On 09/22/2016 01:10 PM, Pat Haugen wrote: I noticed the loop unroller peels an extra copy of the loop before it enters the switch block code to round the iteration count to a multiple of the unroll factor. This peeled copy is only needed for the case where the exit test is at the beginning of

Re: [C++ PATCH] RFC: implement P0386R2 - C++17 inline variables

2016-10-13 Thread Jason Merrill
On Tue, Oct 11, 2016 at 9:39 AM, Jakub Jelinek wrote: > Here is an attempt to implement C++17 inline variables. > Bootstrapped/regtested on x86_64-linux and i686-linux. > > The main question is if the inline variables, which are vague linkage, > should be !DECL_EXTERNAL or

Re: [PATCH] Allow `make tags` to work from top-level directory

2016-10-13 Thread Eric Gallager
On 10/13/16, Jeff Law wrote: > On 10/06/2016 07:21 AM, Eric Gallager wrote: >> The libdecnumber, libgcc, and libobjc subdirectories are missing TAGS >> targets in their Makefiles. The attached patch causes them to be >> skipped when running `make tags`. >> >> ChangeLog entry: >>

Re: [PATCH] Remove x86 pcommit instruction

2016-10-13 Thread H.J. Lu
On Thu, Oct 13, 2016 at 5:09 AM, Andrew Senkevich wrote: > 2016-10-11 20:09 GMT+03:00 H.J. Lu : >> On Tue, Oct 11, 2016 at 10:04 AM, Andrew Senkevich >> wrote: >>> 2016-10-06 1:07 GMT+03:00 H.J. Lu

Re: PING [PATCH] accept flexible arrays in struct in unions (c++/71912 - [6/7 regression])

2016-10-13 Thread Martin Sebor
On 10/12/2016 07:43 AM, Jason Merrill wrote: On Tue, Oct 11, 2016 at 9:45 PM, Martin Sebor wrote: Are there any other changes you want me to make to the patch? I leave this weekend for the WG14 meeting and would like to get this change finalized and hopefully committed before

Re: Questionable code in gcov-io.c

2016-10-13 Thread Andrew Pinski
On Wed, Oct 12, 2016 at 11:24 AM, Nathan Sidwell wrote: > On 10/12/16 11:04, Andreas Schwab wrote: > >> Do we still need to call fstat? I don't think it can ever fail here. > > > Update removing the fstat. Survived a profiled bootstrap, so I'll commit > tomorrow, unless there

Re: [PATCH, libfortran] PR 48587 Newunit allocator

2016-10-13 Thread Dominique d'Humières
With the patch, the following code integer :: i, j i = -10 write(unit=i,fmt=*, iostat=j) 10 print *, j end fails at run time with Assertion failed: (ind >= 0 && ind < newunit_size), function newunit_free, file ../../../work/libgfortran/io/unit.c, line 966. Without the patch the output is

Re: Set nonnull attribute to ptr_info_def based on VRP

2016-10-13 Thread kugan
Hi Richard, On 13/10/16 20:44, Richard Biener wrote: On Thu, Oct 13, 2016 at 6:49 AM, kugan wrote: Hi Richard, what does this try to do? Preserve info VRP computed across PTA? I think we didn't yet sort out the nonlocal/escaped vs. null handling

Re: [ipa-vrp] Use get/set_ptr_nonnull in ipa-vrp

2016-10-13 Thread kugan
Hi Honza, On 12/10/16 22:16, Jan Hubicka wrote: Hi, This patch uses the get/set_ptr_nonnull so that ipa-vrp also propagates nonnull ranges for pinter. Bootstrapped and regression tested this with other patched without any new regressions on x86_64-linux-gnu. Is this OK for trunk? Thanks,

[patch, fortran] PR77972 ICE on broken character continuation with -Wall etc.

2016-10-13 Thread Jerry DeLisle
This patch is straight forward. We were sending bogus locus info to the diagnostics machinery and catch an assert in error,c. The patch avoids doing this. Regression tested on x86-64-linux. OK for trunk? Regards, Jerry 2016-10-13 Jerry DeLisle * scanner.c

Re: [patch, fortran] PR77972 ICE on broken character continuation with -Wall etc.

2016-10-13 Thread Steve Kargl
On Thu, Oct 13, 2016 at 07:04:04PM -0700, Jerry DeLisle wrote: > This patch is straight forward. We were sending bogus locus info to the > diagnostics machinery and catch an assert in error,c. > > The patch avoids doing this. > > Regression tested on x86-64-linux. > > OK for trunk? > Yes,

Re: [Patch, reload, tentative, PR 71627] Tweak conditions in find_valid_class_1

2016-10-13 Thread Senthil Kumar Selvaraj
Bernd Schmidt writes: > On 09/16/2016 09:02 PM, Senthil Kumar Selvaraj wrote: >> Does this make sense? I ran a reg test for the avr target with a >> slightly older version of this patch, it did not show any regressions. >> If this is the right fix, I'll make sure to run reg tests on x86_64

[PATCH] More early LTO dwarf2out bits

2016-10-13 Thread Richard Biener
This merges a few more bits guarding stuff with ! early_dwarf, mostly to avoid creating locations that involve addresses of decls early but also to avoid wasting work for BLOCK_NONLOCALIZED_VARs. Bootstrapped and tested on x86_64-unknown-linux-gnu, gdb testsuite tested on the same arch (from the

Re: PING! [Fortran, Patch, PR72832, v1] [6/7 Regression] [OOP] ALLOCATE with SOURCE fails to allocate requested dimensions

2016-10-13 Thread Andre Vehreschild
Hi Steve, thanks for the review. Committed as r241088 on trunk. Letting it mature for one week in trunk before backporting to gcc-6. Regards, Andre On Wed, 12 Oct 2016 10:18:29 -0700 Steve Kargl wrote: > On Wed, Oct 12, 2016 at 11:50:10AM +0200,

[PATCH] Do not merge BBs with a different EH landing pads (PR, tree-optimization/77943)

2016-10-13 Thread Martin Liška
Hi. Following patch adds code that is already present in IPA ICF. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin >From 542c318af84ca561661b42baca3da7c340971dd8 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 12 Oct 2016

Re: [RFC] Possible folding opportunities for string built-ins

2016-10-13 Thread Richard Biener
On Wed, Oct 12, 2016 at 3:48 PM, Martin Liška wrote: > Hi. > > As you probably mentioned, simple folding improvement has grown to multiple > patches > and multiple iterations. Apart from that, I also noticed that we do not do > the best > for couple of cases and I would like to

RE: [PATCH] [ARC] New option handling, refurbish multilib support.

2016-10-13 Thread Claudiu Zissulescu
Hi Andrew, > Sorry it's taken s long to review this patch. > This is understandable, it is a quite large patch and changes a lot of items. > In general I like this, and think it's a step in the right direction. > I have a few pretty minor concerns, but hopefully nothing too > contentious. >

Re: [vrp] use get_ptr_nonnull in tree-vrp

2016-10-13 Thread Richard Biener
On Thu, Oct 13, 2016 at 6:38 AM, kugan wrote: > Hi Richard, > > > On 13/10/16 05:53, kugan wrote: >> >> Hi Richard, >> >> On 12/10/16 23:24, Richard Biener wrote: >>> >>> On Wed, Oct 12, 2016 at 8:56 AM, kugan >>> wrote:

Re: [PATCH] Don't unnecessarily create stack protector guard decls and MEMs (PR target/77957)

2016-10-13 Thread Richard Biener
On Thu, 13 Oct 2016, Jakub Jelinek wrote: > Hi! > > PR77957 is likely a rs6000 backend bug where a useless memory load causes > .LCTOC0 undefined reference in the end at -O0 and as such should be fixed, > but I think it is completely unnecessary to create those loads at all > if we know we are

Re: [PATCH] Fix PR77826

2016-10-13 Thread Richard Biener
On Wed, 12 Oct 2016, Richard Biener wrote: > On Wed, 12 Oct 2016, Marc Glisse wrote: > > > On Wed, 12 Oct 2016, Richard Biener wrote: > > > > > So with doing the same on GENERIC I hit > > > > > > FAIL: g++.dg/cpp1y/constexpr-array4.C -std=c++14 (test for excess errors) > > > > > > with the

Re: [PATCH, GCC] Move MEMMODEL_* and enum memmodel from coretypes.h to memmodel.h

2016-10-13 Thread Richard Biener
On Wed, 12 Oct 2016, Joseph Myers wrote: > On Wed, 12 Oct 2016, Thomas Preudhomme wrote: > > > This patch is a follow up of [1] which aims to have all memory model related > > declarations in memmodel.h. To achieve that, this patch moves memory model > > related declaration from coretypes.h into

[PATCH] Fix exception-specification of std::invoke

2016-10-13 Thread Jonathan Wakely
The arguments to the is_nothrow_callable traits were not adding && to the types, so they failed with anything that formed an invalid function type. * include/bits/invoke.h (__invoke): Fix exception-specification. * include/std/functional (invoke): Likewise. *

Re: [PATCH] - improve sprintf buffer overflow detection (middle-end/49905)

2016-10-13 Thread Rainer Orth
Hi Martin, >> as it happens, I'd already started bootstraps with your patch before >> your mail arrived :-) > > Thanks for your help getting to the bottom of this! > >> >> We're left with >> >> FAIL: gcc.dg/tree-ssa/builtin-sprintf-warn-1.c (test for excess errors) >> FAIL:

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

2016-10-13 Thread Kyrill Tkachov
On 12/10/16 17:49, Martin Sebor wrote: On 10/12/2016 06:43 AM, Kyrill Tkachov wrote: On 12/10/16 11:18, Kyrill Tkachov wrote: On 12/10/16 10:57, Kyrill Tkachov wrote: On 11/10/16 20:19, Jakub Jelinek wrote: On Tue, Oct 11, 2016 at 01:11:04PM -0600, Martin Sebor wrote: Also, the pattern

Re: [PATCH] Do not merge BBs with a different EH landing pads (PR, tree-optimization/77943)

2016-10-13 Thread Richard Biener
On Thu, Oct 13, 2016 at 9:40 AM, Martin Liška wrote: > Hi. > > Following patch adds code that is already present in IPA ICF. > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. > > Ready to be installed? Ok, though technically this is conservative and we

Re: C++ PATCH for c++/77742 (-Waligned-new and placement new)

2016-10-13 Thread Andreas Schwab
FAIL: g++.dg/cpp1z/aligned-new7.C (test for excess errors) Excess errors: /daten/aranym/gcc/gcc-20161013/gcc/testsuite/g++.dg/cpp1z/aligned-new7.C:13:41: warning: requested alignment 8 is larger than 2 [-Wattributes] Andreas. -- Andreas Schwab, SUSE Labs, sch...@suse.de GPG Key fingerprint

Re: [PATCH] Do not merge BBs with a different EH landing pads (PR, tree-optimization/77943)

2016-10-13 Thread Martin Liška
On 10/13/2016 10:46 AM, Richard Biener wrote: > On Thu, Oct 13, 2016 at 9:40 AM, Martin Liška wrote: >> Hi. >> >> Following patch adds code that is already present in IPA ICF. >> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. >> >> Ready to be

Re: [PATCH GCC 2/9]Add interface reseting original copy tables in cfg.c

2016-10-13 Thread Bin.Cheng
On Wed, Sep 7, 2016 at 1:20 PM, Jeff Law wrote: > On 09/06/2016 12:50 PM, Bin Cheng wrote: >> >> Hi, >> This simple patch adds interface reseting original copy table in cfg.c. >> This will be used in rewriting vect_do_peeling_* functions in vectorizer so >> that we don't need to

Re: [patch, avr, pr71676 and pr71678] Issues with casesi expand

2016-10-13 Thread Pitchumani Sivanupandi
On Monday 26 September 2016 08:19 PM, Georg-Johann Lay wrote: On 26.09.2016 15:19, Pitchumani Sivanupandi wrote: Attached patch for PR71676 and PR71678. PR71676 is for AVR target that generates wrong code when switch case index is more than 16 bits. Switch case index of larger than SImode

Re: Set nonnull attribute to ptr_info_def based on VRP

2016-10-13 Thread Richard Biener
On Thu, Oct 13, 2016 at 6:49 AM, kugan wrote: > Hi Richard, > >> >> what does this try to do? Preserve info VRP computed across PTA? >> >> I think we didn't yet sort out the nonlocal/escaped vs. null handling >> properly >> (or how PTA should handle

Re: [PATCH] Fix -Wimplicit-fallthrough ICE (PR c/77946)

2016-10-13 Thread Marek Polacek
On Thu, Oct 13, 2016 at 01:25:22AM +0200, Jakub Jelinek wrote: > Hi! > > Seems 2 functions in varasm.c just use TREE_PUBLIC on LABEL_DECLs together > with other kinds of decls, but as TREE_PUBLIC on LABEL_DECLs means now > something different, it breaks badly. > While I could change those 2

Re: [PATCH] Tweaks to print_rtx_function

2016-10-13 Thread Bernd Schmidt
On 10/12/2016 11:04 PM, David Malcolm wrote: This patch implements: * the renumbering of non-virtual pseudos, using LAST_VIRTUAL_REGISTER + 1 as a base. * omitting the edge "(flags)" directive if there aren't any Bootstrap & regrtest in progress. OK for trunk if they pass? I tend to think

Re: fix -fmax-errors & notes

2016-10-13 Thread Nathan Sidwell
On 10/11/16 16:07, David Malcolm wrote: This logic is running when the next diagnostic is about to be emitted. But what if the user has selected -Wfatal-errors and there's a single error and no further diagnostics? Could this change the observable behavior? (I'm trying to think of a case

Re: [PATCH GCC 9/9]Prove no-overflow in computation of LOOP_VINFO_NITERS and improve code generation

2016-10-13 Thread Bin.Cheng
On Mon, Sep 12, 2016 at 8:58 PM, Jeff Law wrote: > On 09/06/2016 12:54 PM, Bin Cheng wrote: >> >> Hi, >> LOOP_VINFO_NITERS is computed as LOOP_VINFO_NITERSM1 + 1, which could >> overflow in loop niters' type. Vectorizer needs to generate more code >> computing vectorized niters

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

2016-10-13 Thread Richard Biener
On Wed, Oct 12, 2016 at 3:52 PM, Martin Liška wrote: > On 10/04/2016 11:45 AM, Richard Biener wrote: >> On Thu, Sep 15, 2016 at 12:00 PM, Martin Liška wrote: >>> On 09/07/2016 02:09 PM, Richard Biener wrote: On Wed, Sep 7, 2016 at 1:37 PM, Martin Liška

Re: [PATCH] Fix -Wimplicit-fallthrough ICE (PR c/77946)

2016-10-13 Thread Bernd Schmidt
On 10/13/2016 01:25 AM, Jakub Jelinek wrote: Seems 2 functions in varasm.c just use TREE_PUBLIC on LABEL_DECLs together with other kinds of decls, but as TREE_PUBLIC on LABEL_DECLs means now something different, it breaks badly. Which functions are these? PR c/77946 * tree.h

Re: [patch] Fix GC issue triggered by arithmetic overflow checking

2016-10-13 Thread Eric Botcazou
> Yes. But that's not the only source for DECL_UID differences. Btw, > I see lots of FOR_EACH_HASH_TABLE_ELEMENT in var-tracking.c > but they don't look like their outcome is supposed to be dependent on > element ordering. This leads to NOTE_INSN_VAR_LOCATION notes emitted in a different order,

Re: [PATCH] Fix -Wimplicit-fallthrough ICE (PR c/77946)

2016-10-13 Thread Bernd Schmidt
On 10/13/2016 12:20 PM, Jakub Jelinek wrote: both relied on TREE_PUBLIC be actually false for LABEL_DECLs, because otherwise they have code later on that can't handle LABE_DECLs (plus callers also not expecting LABEL_DECLs might not bind locally or might not bind to the current def. Ok,

Re: [PATCH v4] PR48344: Fix unrecognizable insn error with -fstack-limit-register=r2

2016-10-13 Thread Bernd Schmidt
On 09/30/2016 10:02 PM, Andreas Schwab wrote: On Feb 11 2016, Kelvin Nilsen wrote: * opts-global.c (handle_common_deferred_options): Introduce and initialize two global variables to remember command-line options specifying a stack-limiting

Re: [patch] Fix GC issue triggered by arithmetic overflow checking

2016-10-13 Thread Eric Botcazou
> I guess it depends on whether temp$8 and temp$low overlap or not. I don't think so, the code is identical so that would be a more serious bug: struct cpp_num { cpp_num_part high; cpp_num_part low; bool unsignedp; bool overflow; }; I think it's just dwarf2out_var_location being

Re: [PATCH] Do not merge BBs with a different EH landing pads (PR, tree-optimization/77943)

2016-10-13 Thread Richard Biener
On Thu, Oct 13, 2016 at 11:15 AM, Martin Liška wrote: > On 10/13/2016 10:46 AM, Richard Biener wrote: >> On Thu, Oct 13, 2016 at 9:40 AM, Martin Liška wrote: >>> Hi. >>> >>> Following patch adds code that is already present in IPA ICF. >>> Patch can bootstrap on

Re: [PATCH] (v2) Add a "compact" mode to print_rtx_function

2016-10-13 Thread Bernd Schmidt
On 10/12/2016 10:37 PM, David Malcolm wrote: It didn't pass, due to this change: (print_rtx_operand_code_i): When printing source locations, wrap xloc.file in quotes. [...snip...] [...] The following is a revised version of the patch which updates this test case. Also ok. This

Re: [ping * 2] remove optab functions for [us]divmod_optab in optabs.def

2016-10-13 Thread Bernd Schmidt
On 10/06/2016 07:43 AM, Prathamesh Kulkarni wrote: Pinging patch: https://gcc.gnu.org/ml/gcc-patches/2016-09/msg01038.html If I understand correctly this is a latent issue where nonexistant libfunc names are stored (but not currently used). If that's correct, then OK. Bernd

Re: Compile-time improvement for if conversion.

2016-10-13 Thread Richard Biener
On Wed, Oct 12, 2016 at 3:37 PM, Yuri Rumyantsev wrote: > Richard, > > Here is updated patch . I avoided creation of new entry/exit blocks > but instead add check to border cases - do not consider also blocks > which are out of region. > > Any comments will be appreciated. I

Re: [patch] Fix GC issue triggered by arithmetic overflow checking

2016-10-13 Thread Richard Biener
On Thu, Oct 13, 2016 at 12:15 PM, Eric Botcazou wrote: >> Yes. But that's not the only source for DECL_UID differences. Btw, >> I see lots of FOR_EACH_HASH_TABLE_ELEMENT in var-tracking.c >> but they don't look like their outcome is supposed to be dependent on >> element

Re: [PATCH] Fix -Wimplicit-fallthrough ICE (PR c/77946)

2016-10-13 Thread Jakub Jelinek
On Thu, Oct 13, 2016 at 12:11:36PM +0200, Bernd Schmidt wrote: > On 10/13/2016 01:25 AM, Jakub Jelinek wrote: > >Seems 2 functions in varasm.c just use TREE_PUBLIC on LABEL_DECLs together > >with other kinds of decls, but as TREE_PUBLIC on LABEL_DECLs means now > >something different, it breaks

[PATCH] Fix exception-specifications for std::_Not_fn

2016-10-13 Thread Jonathan Wakely
The exception specifications for _Not_fn::operator() should consider whether operator! on the result can throw. * include/std/functional (_Not_fn): Make exception specifications depend on whether negating the result can throw. * testsuite/20_util/not_fn/1.cc: Move to ...

Re: [patch] Fix GC issue triggered by arithmetic overflow checking

2016-10-13 Thread Jakub Jelinek
On Thu, Oct 13, 2016 at 12:19:53PM +0200, Richard Biener wrote: > > (note 6350 6349 6351 (var_location temp (nil)) NOTE_INSN_VAR_LOCATION) > > (note 6351 6350 6352 (var_location temp$low (mem/c:DI (plus:SI (reg/f:SI 30 > > %fp) > > (const_int -112 [0xff90])) [10 MEM[(struct

  1   2   >