RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-08 Thread Jason Merrill
This patch adds support for C++17 allocation of types with alignment greater than max_align_t using 'new'. This is on by default in C++17 and can also be enabled for other -std= with -falign-new. If a user wants to use a different boundary than alignof(max_align_t), perhaps because their malloc

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-08 Thread Marc Glisse
On Thu, 8 Sep 2016, Jason Merrill wrote: This patch adds support for C++17 allocation of types with alignment greater than max_align_t using 'new'. This is on by default in C++17 and can also be enabled for other -std= with -falign-new. Great :-) If a user wants to use a different boundary

[PATCH, testsuite]: Test compat _Complex varargs passing

2016-09-08 Thread Uros Bizjak
On Mon, Sep 5, 2016 at 1:45 PM, Joseph Myers wrote: > On Sun, 4 Sep 2016, Uros Bizjak wrote: > >> It looks that different handling of _Complex char, _Complex short and >> _Complex float is there on purpose. Is (was?) there a limitation in a >> c language standard that

Re: [PATCH] [PR libcpp/71681] Fix handling header.gcc in subdirectories

2016-09-08 Thread Thomas Schwinge
Hi! A few review comments: On Wed, 7 Sep 2016 20:19:20 +0300, Andris Pavenis wrote: > This patch fixes handling header.gcc in subdirectories when command line > option -remap has been > used. (I have not yet looked up what that mechanism actually does.) ;-) > Current

Re: Make max_align_t respect _Float128 [version 2]

2016-09-08 Thread Florian Weimer
On 09/07/2016 07:45 PM, Joseph Myers wrote: On Wed, 7 Sep 2016, Florian Weimer wrote: The existence of such a cut-off constant appears useful, but it's not clear if it should be tied to the fundamental alignment (especially, as this discussion shows, the fundamental alignment will be somewhat

Re: [PATCH][v3] GIMPLE store merging pass

2016-09-08 Thread Kyrill Tkachov
On 07/09/16 20:03, Bernhard Reutner-Fischer wrote: On September 6, 2016 5:14:47 PM GMT+02:00, Kyrill Tkachov wrote: Hi all, s/contigous/contiguous/ s/ where where/ where/ +struct merged_store_group +{ + HOST_WIDE_INT start; + HOST_WIDE_INT width; + unsigned

Re: Make max_align_t respect _Float128 [version 2]

2016-09-08 Thread Florian Weimer
On 09/07/2016 08:32 PM, Bernd Edlinger wrote: interesting. I just tried the test case from PR 77330 with _Decimal128. result: _Decimal128 did *not* trap with gcc4.8.4, but it does trap with gcc-7.0.0. Recent GCC versions rely on struct pointer alignment for struct member access, older

Re: [x86] Disable STV pass if -mstackrealign is enabled.

2016-09-08 Thread Eric Botcazou
> Is there a testcase to show the problem with -mincoming-stack-boundary= > on Linux? I don't know, 'svn annotate' will probably tell you. -- Eric Botcazou

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-08 Thread Jonathan Wakely
On 08/09/16 02:06 -0400, Jason Merrill wrote: This patch adds support for C++17 allocation of types with alignment greater than max_align_t using 'new'. This is on by default in C++17 and can also be enabled for other -std= with -falign-new. Nice. If a user wants to use a different boundary

Re: [patch, libgomp, OpenACC] Additional enter/exit data map handling

2016-09-08 Thread Chung-Lin Tang
On 2016/9/6 8:11 PM, Thomas Schwinge wrote: > Hi! > > On Mon, 29 Aug 2016 15:46:47 +0800, Chung-Lin Tang > wrote: >> this patch is a port of some changes from gomp-4_0-branch, >> including adding additional map type handling in OpenACC enter/exit data >> directives, and

Re: Make max_align_t respect _Float128 [version 2]

2016-09-08 Thread Florian Weimer
On 09/08/2016 01:56 PM, Mark Wielaard wrote: On Wed, Sep 07, 2016 at 04:21:29PM -0700, Paul Eggert wrote: On 09/07/2016 04:52 AM, Mark Wielaard wrote: If valgrind believes the memory isn't in valid memory then it will complain about an invalid access. But if the memory is accessible but

[committed] Fix ICE with safelen(0) in fortran (PR fortran/77516)

2016-09-08 Thread Jakub Jelinek
Hi! This patch fixes ICE on safelen(0). Not adding a warning for this in the FE, as it has been added already on gomp-4_5-branch, so when it is merged, the testcase will just need to be adjusted for the added warning. Tested on x86_64-linux, committed to trunk so far. 2016-09-08 Jakub Jelinek

Re: [PATCH] -fsanitize=thread fixes (PR sanitizer/68260)

2016-09-08 Thread Jakub Jelinek
On Wed, Sep 07, 2016 at 10:40:20PM +0200, Jakub Jelinek wrote: > On Wed, Sep 07, 2016 at 09:07:45AM +0200, Richard Biener wrote: > > > @@ -493,6 +504,8 @@ instrument_builtin_call (gimple_stmt_ite > > > if (!tree_fits_uhwi_p (last_arg) > > > || memmodel_base (tree_to_uhwi

Re: Make max_align_t respect _Float128 [version 2]

2016-09-08 Thread Mark Wielaard
Hi, I added Julian to the CC who will probably correct any mistakes I make. Or even might know a simple way to make valgrind detect this idiom. On Wed, Sep 07, 2016 at 04:21:29PM -0700, Paul Eggert wrote: > On 09/07/2016 04:52 AM, Mark Wielaard wrote: > > If valgrind believes the > > memory

Re: RFA (libstdc++): PATCH to implement C++17 over-aligned new

2016-09-08 Thread Jonathan Wakely
On 08/09/16 09:10 +0200, Marc Glisse wrote: Do we want a generic fallback implementation (similar to gcc/config/i386/gmm_malloc.h)? A windows version with _aligned_malloc / _aligned_free would also be possible. Making it work for MinGW would be nice. If there are other targets that don't

Re: Advice sought for debugging a lto1 ICE (was: Implement C _FloatN, _FloatNx types [version 6])

2016-09-08 Thread Thomas Schwinge
Hi! On Wed, 7 Sep 2016 14:23:18 +0200, Richard Biener wrote: > On Wed, Sep 7, 2016 at 1:52 PM, Thomas Schwinge > wrote: > > I trimmed the CC list -- I'm looking for advice about debugging a lto1 > > ICE. > > > > On Fri, 19 Aug 2016 11:05:59

Re: [PATCH][AArch64] Improve legitimize_address

2016-09-08 Thread Wilco Dijkstra
Christophe Lyon wrote: > After this patch, I've noticed a regression: > FAIL: gcc.target/aarch64/ldp_vec_64_1.c scan-assembler ldp\td[0-9]+, d[0-9] > You probably need to adjust the scan pattern. The original code was better and what we should generate. IVOpt chooses to use indexing eventhough it

Re: Make max_align_t respect _Float128 [version 2]

2016-09-08 Thread Bernd Schmidt
On 09/08/2016 01:21 AM, Paul Eggert wrote: Sure, attached. On Fedora 24 x86-64 (GCC 6.1.1 20160621, valgrind 3.11.0), when I compile with "gcc -O2 flexouch.c" and run with "valgrind ./a.out", valgrind complains "Invalid read of size 2". This is because GCC compiles "p->d[0] == 2 && p->d[1] ==

[committed] Fix ICE during fortran !$omp atomic write expansion (PR fortran/77500)

2016-09-08 Thread Jakub Jelinek
Hi! expr2 for atomic write or swap is not something we want to take appart, we just want to expand it as an rvalue as is, so we shouldn't be skipping its conversions. And, for the other cases, the patch adds function.isym check so that we don't ICE if there is a call to an external function

[PATCH][ARM][v2] Use snprintf rather than sprintf

2016-09-08 Thread Kyrill Tkachov
Hi all, This is a rebase and slight respin of [1] that I sent out last November to change all uses of sprintf to snprintf in the arm backend. Bootstrapped and tested on arm-none-linux-gnueabihf. Ok for trunk? Thanks, Kyrill [1] https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00937.html

Re: Make max_align_t respect _Float128 [version 2]

2016-09-08 Thread Florian Weimer
On 09/08/2016 02:26 PM, Bernd Schmidt wrote: On 09/08/2016 01:21 AM, Paul Eggert wrote: Sure, attached. On Fedora 24 x86-64 (GCC 6.1.1 20160621, valgrind 3.11.0), when I compile with "gcc -O2 flexouch.c" and run with "valgrind ./a.out", valgrind complains "Invalid read of size 2". This is

[PATCH] -fsanitize=thread fixes (PR sanitizer/68260, take 2)

2016-09-08 Thread Jakub Jelinek
On Thu, Sep 08, 2016 at 02:34:18PM +0200, Jakub Jelinek wrote: > I can split the patch into two, one dealing just with the > __atomic_clear/__atomic_test_and_set instrumentation and another for the > preexisting -fnon-call-exceptions ICEs. For the latter, one possibility > would be to error out

Re: [patch, libgomp, OpenACC] Additional enter/exit data map handling

2016-09-08 Thread Thomas Schwinge
Hi! On Thu, 8 Sep 2016 19:18:30 +0800, Chung-Lin Tang wrote: > On 2016/9/6 8:11 PM, Thomas Schwinge wrote: > > On Mon, 29 Aug 2016 15:46:47 +0800, Chung-Lin Tang > > wrote: > >> this patch is a port of some changes from gomp-4_0-branch, > >>

[PATCH][AArch64] Align FP callee-saves

2016-09-08 Thread Wilco Dijkstra
If the number of integer callee-saves is odd, the FP callee-saves use 8-byte aligned LDP/STP. Since 16-byte alignment may be faster on some CPUs, align the FP callee-saves to 16 bytes and use the alignment gap for the last FP callee-save when possible. Besides slightly different offsets for FP

Re: RFA: Small PATCH to add pow2p_hwi to hwint.h

2016-09-08 Thread Jeff Law
On 09/07/2016 11:56 PM, Jason Merrill wrote: Various places in GCC use negate, bit-and and compare to test whether an integer is a power of 2, but I think it would be clearer for this test to be wrapped in a function. OK for trunk? I think the canonical way we've written that is exact_log2

Re: Make max_align_t respect _Float128 [version 2]

2016-09-08 Thread Paul Eggert
On 09/08/2016 04:56 AM, Mark Wielaard wrote: I don't think there is anything valgrind can do to detect that compw really only depends on d[0] if the result is false. valgrind (with the default --partial-loads-ok=yes) could and should do the same thing with cmpw that it already does with cmpl.

Re: [x86] Disable STV pass if -mstackrealign is enabled.

2016-09-08 Thread H.J. Lu
On Wed, Sep 7, 2016 at 11:00 PM, Eric Botcazou wrote: >> Is there a testcase to show the problem with -mincoming-stack-boundary= >> on Linux? > > I don't know, 'svn annotate' will probably tell you. What should I look for with 'svn annotate' ? -- H.J.

Re: [PATCH][v3] GIMPLE store merging pass

2016-09-08 Thread Bernhard Reutner-Fischer
On 8 September 2016 at 10:31, Kyrill Tkachov wrote: > > On 07/09/16 20:03, Bernhard Reutner-Fischer wrote: >> >> On September 6, 2016 5:14:47 PM GMT+02:00, Kyrill Tkachov >> wrote: > Thanks, fixed all the above in my tree (will be

Re: RFA: Small PATCH to add pow2p_hwi to hwint.h

2016-09-08 Thread Jakub Jelinek
On Thu, Sep 08, 2016 at 08:53:26AM -0600, Jeff Law wrote: > On 09/07/2016 11:56 PM, Jason Merrill wrote: > > Various places in GCC use negate, bit-and and compare to test whether > > an integer is a power of 2, but I think it would be clearer for this > > test to be wrapped in a function. > > > >

Re: [PATCH][expmed.c] PR middle-end/77426 Delete duplicate condition in synth_mult

2016-09-08 Thread Jeff Law
On 09/07/2016 06:59 AM, Kyrill Tkachov wrote: Hi all, The duplicate mode check in synth can just be deleted IMO. It was introduced as part of r139821 that was a much larger change introducing size/speed differentiation to the RTL midend. So I think it's just a typo/copy-pasto. Tested on

Re: RFA: Small PATCH to add pow2p_hwi to hwint.h

2016-09-08 Thread Joseph Myers
On Thu, 8 Sep 2016, Jason Merrill wrote: > Various places in GCC use negate, bit-and and compare to test whether > an integer is a power of 2, but I think it would be clearer for this > test to be wrapped in a function. (x & -x) == x is also true for 0. Whatever the correct function semantics

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-08 Thread Jeff Law
On 08/30/2016 06:31 AM, Michael Matz wrote: Hi, On Fri, 26 Aug 2016, Bernd Schmidt wrote: And that comment puzzles me. Surely prologue and epilogue are executed only once currently, so how does frequency come into it? Again - please provide an example. int some_global; int foo (void) { if

Re: [PATCH 1/9] separate shrink-wrap: New command-line flag, status flag, hooks, and doc

2016-09-08 Thread Jeff Law
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: This patch adds a new command-line flag "-fshrink-wrap-separate", a status flag "shrink_wrapped_separate", hooks for abstracting the target components, and documentation for all those. 2016-06-07 Segher Boessenkool

Re: [PATCH 2/9] cfgcleanup: Don't confuse CFI when -fshrink-wrap-separate

2016-09-08 Thread Jeff Law
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: cfgcleanup would try to join noreturn paths with different components handled. This then fails in dwarf2cfi. 2016-06-07 Segher Boessenkool * cfgcleanup.c (outgoing_edges_match): Don't join noreturn calls

Re: [PATCH 1/9] separate shrink-wrap: New command-line flag, status flag, hooks, and doc

2016-09-08 Thread Jeff Law
On 08/29/2016 03:31 AM, Bernd Schmidt wrote: On 08/01/2016 03:42 AM, Segher Boessenkool wrote: +@deftypefn {Target Hook} void TARGET_SHRINK_WRAP_EMIT_PROLOGUE_COMPONENTS (sbitmap) +Emit prologue insns for the components indicated by the parameter. +@end deftypefn + +@deftypefn {Target Hook}

Re: [PATCH 6/9] sel-sched: Don't mess with register restores

2016-09-08 Thread Jeff Law
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: If selective scheduling copies register restores it confuses dwarf2cfi. 2016-06-07 Segher Boessenkool * sel-sched-ir.c (init_global_and_expr_for_insn): Don't copy instructions with a

Re: [x86] Disable STV pass if -mstackrealign is enabled.

2016-09-08 Thread Eric Botcazou
> What should I look for with 'svn annotate' ? "Disable STV" line 5959 of config/i386/i386.c. -- Eric Botcazou

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-08 Thread Jeff Law
On 08/26/2016 10:27 AM, Segher Boessenkool wrote: On Fri, Aug 26, 2016 at 05:03:34PM +0200, Bernd Schmidt wrote: On 08/26/2016 04:50 PM, Segher Boessenkool wrote: The head comment starts with +/* Separate shrink-wrapping + + Instead of putting all of the prologue and epilogue in one spot,

Re: [PATCH 3/9] dce: Don't dead-code delete separately wrapped restores

2016-09-08 Thread Jeff Law
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: Deleting restores (before a noreturn) that are dead confuses dwarf2cfi. 2016-06-07 Segher Boessenkool * dce.c (delete_unmarked_insns): Don't delete instructions with a REG_CFA_RESTORE note. I don't

Re: [PATCH v2 0/9] Separate shrink-wrapping

2016-09-08 Thread Jeff Law
On 08/26/2016 09:03 AM, Bernd Schmidt wrote: On 08/26/2016 04:50 PM, Segher Boessenkool wrote: The head comment starts with +/* Separate shrink-wrapping + + Instead of putting all of the prologue and epilogue in one spot, we + can put parts of it in places where those components are

Re: [PATCH 4/9] regrename: Don't rename restores

2016-09-08 Thread Jeff Law
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: A restore is supposed to restore some certain register. Restoring it into some other register will not work. Don't. 2016-06-07 Segher Boessenkool * regrename.c (build_def_use): Invalidate chains that

Re: [PATCH 7/9] cprop: Leave RTX_FRAME_RELATED_P instructions alone

2016-09-08 Thread Jeff Law
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: Doing cprop on frame-related instructions blows up spectacularly. So don't. 2016-06-07 Segher Boessenkool * regcprop.c (copyprop_hardreg_forward_1): Don't change RTX_FRAME_RELATED_P instructions.

Re: [PATCH 8/9] shrink-wrap: shrink-wrapping for separate components

2016-09-08 Thread Jeff Law
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: Deciding what blocks should run with a certain component active so that the total cost of executing the prologues (and epilogues) is optimal, is not a computationally feasible problem. Really? It's just a dataflow problem is it not and one that

Re: [PATCH 5/9] regrename: Don't run if function was separately shrink-wrapped

2016-09-08 Thread Jeff Law
On 07/31/2016 07:42 PM, Segher Boessenkool wrote: Unfortunately even after the previous patch there are still a few cases where regrename creates invalid code when used together with separate shrink-wrapping. At noreturn exits regrename thinks it can use all callee-saved registers, but that is

[PATCH 2/9] Add selftest::read_file

2016-09-08 Thread David Malcolm
This is used later in the kit by the selftests for final.c gcc/ChangeLog: * selftest.c (selftest::read_file): New function. (selftest::test_read_file): New function. (selftest::selftest_c_tests): Call test_read_file. * selftest.h (selftest::read_file): New decl.

[PATCH 3/9] selftest.h: add temp_override fixture

2016-09-08 Thread David Malcolm
We have a lot of global state in our code. Ideally we'd reduce the amount of such global state, but a prerequisite for sane refactoring is having automated testing in place to ensure that the refactoring doesn't break anything. However, the global state itself makes it hard to write such

[PATCH] PR fortran/77506

2016-09-08 Thread Steve Kargl
Regression tested on x86_64-*-freebsd. OK to commit? 2016-09-08 Steven G. Kargl PR fortran/77506 * array.c (gfc_match_array_constructor): CHARACTER(len=*) cannot appear in an array constructor. 2016-09-08 Steven G. Kargl

[PATCH 1/9] Introduce class rtx_reader

2016-09-08 Thread David Malcolm
Bundle up various global variables within gensupport.c into a class rtx_reader, with a view towards making it easier to run the code more than once in-process. gcc/ChangeLog: * genconstants.c (main): Introduce noop_reader and convert call to read_md_files to a method call.

[PATCH 8/9] final.c selftests

2016-09-08 Thread David Malcolm
gcc/ChangeLog: * final.c: Include selftest.h and selftest-rtl.h. (class selftest::temp_asm_out): New subclass of selftest::named_temp_file. (selftest::temp_asm_out::temp_asm_out): New ctor. (selftest::temp_asm_out::~temp_asm_out): New dtor. (class

[PATCH 0/9] RFC: selftests based on RTL dumps

2016-09-08 Thread David Malcolm
The current selftest code is adequate for testing individual instructions, but most interesting passes have logic involving the interaction of multiple instructions, or require a CFG and function to be runnable. In theory we could write selftests by programatically constructing a function and CFG

[PATCH 7/9] combine.c selftests

2016-09-08 Thread David Malcolm
gcc/ChangeLog: * combine.c: Include selftest.h and selftest-rtl.h. (try_combine): Add assertion on this_basic_block. (class selftest::combine_test): New subclass of selftest::tl_dump_test. (selftest::combine_test::combine_test): New ctor.

[PATCH 9/9] cse.c selftests

2016-09-08 Thread David Malcolm
This patch uses rtl_dump_test to start building out a test suite for cse. I attempted to create a reproducer for PR 71779; however I'm not yet able to replicate the bogus cse reported there via the test case. gcc/ChangeLog: * cse.c: Include selftest.h and selftest-rtl.h.

[PATCH 4/9] Expose forcibly_ggc_collect and run it after all selftests

2016-09-08 Thread David Malcolm
Force a GC at the end of the selftests, to shake out GC-related issues. For example, if any GC-managed items have buggy (or missing) finalizers, this last collection will ensure that things that were failed to be finalized can be detected by valgrind. gcc/ChangeLog: * ggc-tests.c

Re: RFA: Small PATCH to add pow2p_hwi to hwint.h

2016-09-08 Thread Jason Merrill
On Thu, Sep 8, 2016 at 11:55 AM, Joseph Myers wrote: > On Thu, 8 Sep 2016, Jason Merrill wrote: > >> Various places in GCC use negate, bit-and and compare to test whether >> an integer is a power of 2, but I think it would be clearer for this >> test to be wrapped in a

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

2016-09-08 Thread Joseph Myers
On Thu, 8 Sep 2016, Martin Sebor wrote: > diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in > index da133a4..4607495 100644 > --- a/gcc/doc/tm.texi.in > +++ b/gcc/doc/tm.texi.in > @@ -4081,6 +4081,13 @@ In either case, it remains possible to select > code-generation for the alternate >

[PATCH] PR fortran/77507

2016-09-08 Thread Steve Kargl
The attached patch fixes issues with using keywords with the IEEE_VALUE and C_ASSOCIATED intrinsic routines. Regression tested on x86_64-*-freebsd. OK to commit? 2016-09-08 Steven G. Kargl PR fortran/77507 * intrinsic.c (add_functions): Use correct

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

2016-09-08 Thread Martin Sebor
On 09/08/2016 01:45 PM, David Malcolm wrote: On Thu, 2016-09-08 at 13:03 -0600, Martin Sebor wrote: Attached is another update to the patch to address the last round of comments and suggestions, most notably to: * implement the checking of the implementation limit of 4,095 on the

[Committed] PR fortran/69514

2016-09-08 Thread Steve Kargl
I've committed the attached patch to trunk after completing regression testing on x86_64-*-freebsd. 2016-09-08 Steven G. Kargl PR fortran/69514 * array.c (gfc_match_array_constructor): If type-spec is present, walk the array constructor performing

[PATCH 6/9] df selftests

2016-09-08 Thread David Malcolm
gcc/ChangeLog: * df-core.c: Include selftest.h and selftest-rtl.h. (selftest::dataflow_test::dataflow_test): New ctor. (selftest::dataflow_test::~dataflow_test): New dtor. (selftest::test_df_single_set): New function. (selftest::df_core_c_tests): New

[PATCH 5/9] Introduce class function_reader

2016-09-08 Thread David Malcolm
This patch generalizes the RTL-reading capabilities so that they can be run on the host as well as the build machine. The available rtx in rtl.def changes dramatically between these two configurations, so a fair amount of #ifdef GENERATOR_FILE is required to express this. This patch introduces a

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

2016-09-08 Thread Jeff Law
On 08/24/2016 05:14 PM, Manuel López-Ibáñez wrote: I agree. The challenge is that not all the bits this depends on (the g_string_concat_db and parse_in globals defined in the front end) are available in the middle end. I've been talking to David Malcolm about how best to factor things out of

[PATCH] ada/77535: GNAT.Perfect_Hash_Generators for non-1-based strings

2016-09-08 Thread Florian Weimer
This patch fixes GNAT.Perfect_Hash_Generators for strings which are not 1-based. It does this by introducing its own storage type which fixes the first index as 1. This is also a minor optimization because it avoids the need to store the index. Okay for trunk? Should I try to construct a new

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

2016-09-08 Thread David Malcolm
On Thu, 2016-09-08 at 13:03 -0600, Martin Sebor wrote: > Attached is another update to the patch to address the last round > of comments and suggestions, most notably to: > > * implement the checking of the implementation limit of 4,095 on > the output of a single directive to allow for

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

2016-09-08 Thread Jeff Law
On 08/24/2016 10:40 AM, Martin Sebor wrote: On 08/23/2016 05:00 PM, Joseph Myers wrote: Some observations: * Does -fprintf-return-value allow for the possibility of snprintf failing because of a memory allocation failure and so returning -1 when GCC computed bounds on what it could return if

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

2016-09-08 Thread Martin Sebor
On 09/08/2016 01:21 PM, Jeff Law wrote: On 08/24/2016 10:40 AM, Martin Sebor wrote: On 08/23/2016 05:00 PM, Joseph Myers wrote: Some observations: * Does -fprintf-return-value allow for the possibility of snprintf failing because of a memory allocation failure and so returning -1 when GCC

Re: [PATCH, PING] DWARF: process all TYPE_DECL nodes when iterating on scopes

2016-09-08 Thread Pierre-Marie de Rodat
On 09/07/2016 11:30 AM, Richard Biener wrote: Ok, had time to look at this issue again. I see the patch works like dwarf2out works currently with respect to DIE creation order and re-location. Thank you very much for helping me with this again! So yes, that was the intent of the patch.

Re: [PATCH] [PR libcpp/71681] Fix handling header.gcc in subdirectories

2016-09-08 Thread Andris Pavenis
On 09/08/2016 12:09 PM, Thomas Schwinge wrote: Hi! A few review comments: On Wed, 7 Sep 2016 20:19:20 +0300, Andris Pavenis wrote: This patch fixes handling header.gcc in subdirectories when command line option -remap has been used. (I have not yet reviewed the logic

[PATCH] avoid non-printable characters in diagnostics (c/77620, c/77521)

2016-09-08 Thread Martin Sebor
While working on the -Wformat-length pass I noticed that in some diagnostics that make use of the %qc and %qs directives GCC prints non-printable characters raw. For example, it might print a newline, corrupting the diagnostic stream (bug 77521). Some other diagnostics that try to avoid this