Re: [PATCH] prevent -Wno-system-headers from suppressing -Wstringop-overflow (PR 79214)

2017-05-09 Thread Rainer Orth
Andreas Schwab writes: > I see these regressions on ia64: > > FAIL: c-c++-common/Wsizeof-pointer-memaccess2.c -std=gnu++11 (test for > excess errors) > Excess errors: > /usr/local/gcc/gcc-20170508/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:11:53: > warning: 'void* __builtin_memcpy(vo

Re: Bump version namespace and remove _Rb_tree useless template parameter

2017-05-09 Thread François Dumont
On 05/05/2017 15:08, Jonathan Wakely wrote: On 04/05/17 22:16 +0200, François Dumont wrote: Hi Here is the patch to remove the useless _Is_pod_comparator _Rb_tree_impl template parameter. As this is an ABI breaking change it is limited to the versioned namespace mode and the patch also bum

avoid remove&reinsert of call when splitting block for inlining

2017-05-09 Thread Alexandre Oliva
We used to split the inlined-into block at (= after) the call, and then remove the call from the first block to insert it in the second. The removal may cause unnecessary and unrecoverable resetting of debug insns: we do not generate debug temps for calls. Avoid the remove-and-reinsert dance by s

Trivial iter_swap cleanup

2017-05-09 Thread François Dumont
Hi A trivial code simplification in a pre-C++11 piece of code. Ok to commit ? François diff --git a/libstdc++-v3/include/bits/stl_algobase.h b/libstdc++-v3/include/bits/stl_algobase.h index d15be63..a33dde2 100644 --- a/libstdc++-v3/include/bits/stl_algobase.h +++ b/libstdc++-v3/includ

C++ PATCHes for c++/66297 and 70979, literal type issues

2017-05-09 Thread Jason Merrill
66297: C++14 removed the requirement that a constexpr member function must be a member of a literal class. 70979: We were failing to treat a C++14 lambda as non-literal; they are only literal with the constexpr lambda addition in C++17. Tested x86_64-pc-linux-gnu, applying to trunk. commit 187ea3

C++ PATCH for testsuite failures with -std=c++17

2017-05-09 Thread Jason Merrill
For C++17 aggregate bases, we have started adding base fields for empty bases. The code for calculating whether a class is standard layout needs to ignore these. The C++17 mode diagnostic for direct-enum-init1.C was incorrect. Tested x86_64-pc-linux-gnu, applying to trunk. commit 9a612cc30d4b3ef

Re: [PATCH] prevent -Wno-system-headers from suppressing -Wstringop-overflow (PR 79214)

2017-05-09 Thread Martin Sebor
On 05/09/2017 02:01 PM, Rainer Orth wrote: Andreas Schwab writes: I see these regressions on ia64: FAIL: c-c++-common/Wsizeof-pointer-memaccess2.c -std=gnu++11 (test for excess errors) Excess errors: /usr/local/gcc/gcc-20170508/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c:11:53: wa

[Patch, fortran] PR80442 Handle DATA statement with iteration var in array slice

2017-05-09 Thread Nicolas Koenig
Hello everyone, since everybody seems to be submitting patches the last few days, I thought I might as well :) Attached is a patch that makes the compiler capable of dealing with implied do variables in array slices in data statements. The copying of the expressions is necessary since gfc_sim

[PATCH 01/13] improve safety of freeing bitmaps

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders There's two groups of changes here, first taking a sbitmap &, so that we can assign null to the pointer after freeing the sbitmap to prevent use after free through that pointer. Second we define overloads of sbitmap_free and bitmap_free taking auto_sbitmap and auto_bitmap r

[PATCH 02/13] improve bitmap / sbitmap compatability of bitmap_set_bit

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders This make the sbitmap version return true if the bit was previously unset to make it similar to the bitmap version. gcc/ChangeLog: 2017-05-09 Trevor Saunders * sbitmap.h (bitmap_set_bit): Return bool similar to bitmap version of this function. --- gcc/sbitmap.

[PATCH 00/13] misc data structure stuff

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders Hi, this is sort of a grab bag, but mostly improving bitmaps and auto_vec, and then using them in more places. Individually patches commit messages should explain in more detail where needed. patches individually bootstrapped and regtested on x86_64-linux-gnu, ok? Thank

[PATCH 03/13] store the bitmap_head within the auto_bitmap

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders This gets rid of one allocation per bitmap. Often the bitmap_head is now on the stack, when it isn't its part of some other struct on the heap instead of being refered to by that struct. On 64 bit platforms this will increase the size of such structs by 24 bytes, but its a

[PATCH 05/13] allow constructing a auto_vec with a preallocation, and a possibly larger actual allocation size

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders This allows us to set the capacity of the vector when we construct it, and still use a stack buffer when the size is small enough. gcc/ChangeLog: 2017-05-09 Trevor Saunders * genrecog.c (int_set::int_set): Explicitly construct our auto_vec base class. *

[PATCH 06/13] replace some manual stacks with auto_vec

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * cfganal.c (mark_dfs_back_edges): Replace manual stack with auto_vec. (post_order_compute): Likewise. (inverted_post_order_compute): Likewise. (pre_and_rev_post_order_compute_fn): Likewis

[PATCH 04/13] allow auto_bitmap to use other bitmap obstacks

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-07 Trevor Saunders * bitmap.h (class auto_bitmap): New constructor taking bitmap_obstack * argument. --- gcc/bitmap.h | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/bitmap.h b/gcc/bitmap.h index 49aec001cb0..2ddeee6bc10 100644 --

[PATCH 08/13] move several bitmaps from gc memory to the default obstack and use auto_bitmap

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders These places where probably trying to use the default bitmap obstack, but passing 0 to bitmap_initialize actually uses gc allocation. In any case they are all cleaned up before going out of scope so using auto_bitmap should be fine. gcc/ChangeLog: 2017-05-09 Trevor Saund

[PATCH 10/13] make a member an auto_sbitmap

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a auto_sbitmap. --- gcc/tree-ssa-dse.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c i

[PATCH 11/13] make more vars auto_sbitmaps

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * ddg.c (find_nodes_on_paths): Use auto_sbitmap. (longest_simple_path): Likewise. * shrink-wrap.c (spread_components): Likewise. (disqualify_problematic_components): Likewise. (emit_common

[PATCH 07/13] use auto_bitmap more

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap lifetime. (migrate_btr_def): Likewise. * cfgloop.c (get_loop_body_in_bfs_order): Likewise. * df-core.c (loop_post_order_com

[PATCH 12/13] make depth_first_search_ds a class

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * cfganal.c (connect_infinite_loops_to_exit): Adjust. (depth_first_search::depth_first_search): Change structure init function to this constructor. (depth_first_search::add_bb): Rename function to this me

[PATCH 09/13] use auto_bitmap more with alternate obstacks

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * df-core.c (df_set_blocks): Start using auto_bitmap. (df_compact_blocks): Likewise. * df-problems.c (df_rd_confluence_n): Likewise. * df-scan.c (df_insn_rescan_all): Likewise. (df_process

[PATCH 13/13] make inverted_post_order_compute() operate on a vec

2017-05-09 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-05-09 Trevor Saunders * cfganal.c (inverted_post_order_compute): Change argument type to vec *. * cfganal.h (inverted_post_order_compute): Adjust prototype. * df-core.c (rest_of_handle_df_initialize): Adjust. (

Re: [PATCH v2,rs6000] Add built-in function support for compare bytes instruction

2017-05-09 Thread Segher Boessenkool
Hi Kelvin, On Mon, May 08, 2017 at 11:04:59AM -0600, Kelvin Nilsen wrote: > + /* If any supplied arguments are wider than 32 bits, resolve to > + 64-bit variant of built-in function. */ > + if ((arg1_mode == TImode) || (arg1_mode == DImode) || > + (arg2_mode == TImode) || (ar

Use "oacc kernels parallelized" attribute for parallelized OpenACC kernels (was: Use "oacc kernels" attribute for OpenACC kernels)

2017-05-09 Thread Thomas Schwinge
Hi! On Mon, 08 May 2017 21:29:28 +0200, I wrote: > On Thu, 4 Aug 2016 16:07:00 +0200, I wrote: > > Ping. > > > > On Wed, 27 Jul 2016 12:06:59 +0200, I wrote: > > > On Mon, 25 Jan 2016 16:09:14 +0100, Jakub Jelinek > > > wrote: > > > > On Mon, Jan 25, 2016 at 10:06:50AM -0500, Nathan Sidwell wro

Re: [Patch, Fortran, OOP] PR 79311: ICE in generate_finalization_wrapper, at fortran/class.c:1992

2017-05-09 Thread Janus Weil
2017-05-09 18:18 GMT+02:00 Jerry DeLisle : > On 05/08/2017 02:16 PM, Janus Weil wrote: >> Hi all, >> >> the attached patch fixes an ICE-on-valid problem with finalization by >> making sure that the finalization procedures are properly resolved. >> >> In the test case, the finalizer of the component

Re: [PATCH, rs6000] Add x86 instrinsic headers to GCC PPC64LE taget

2017-05-09 Thread Segher Boessenkool
On Tue, May 09, 2017 at 02:33:00PM -0500, Steven Munroe wrote: > On Tue, 2017-05-09 at 12:23 -0500, Segher Boessenkool wrote: > > On Mon, May 08, 2017 at 09:49:57AM -0500, Steven Munroe wrote: > > > Thus I would like to restrict this support to PowerPC > > > targets that support VMX/VSX and PowerIS

Re: [PATCH 1/2] C++ template type diff printing

2017-05-09 Thread Manuel López-Ibáñez
On 08/05/17 17:51, David Malcolm wrote: So I think it can work if we add a "needs quoting" flag to the postprocessing phase, if we need to handle the case where %H and %I ever appear without 'q' (and have the delayed handling stash that flag, and do the quoting there). I'll look at implementing

Re: [1/2] PR 78736: New warning -Wenum-conversion

2017-05-09 Thread Pedro Alves
On 05/09/2017 07:04 PM, Martin Sebor wrote: >>> > > -Wassign-enum is a Clang warning too, it just isn't included in > either -Wall or -Wextra. It warns when a constant is assigned > to a variable of an enumerated type and is not representable in > it. I enhanced it for GCC to also warn when the

Re: Record equivalences for spill registers

2017-05-09 Thread Jim Wilson
On Sun, May 7, 2017 at 11:47 PM, Andrew Pinski wrote: > On Sun, May 7, 2017 at 11:37 PM, Richard Sandiford > wrote: >> Really sorry for the breakage. I'd forgotten that this depended on: >> >> https://gcc.gnu.org/ml/gcc-patches/2017-03/msg01550.html Thanks, this does fix my build failures. A

OpenACC C front end maintenance: c_parser_oacc_single_int_clause (was: [OpenACC] num_gangs, num_workers and vector_length in c++)

2017-05-09 Thread Thomas Schwinge
Hi! On Wed, 4 Nov 2015 14:10:29 -0800, Cesar Philippidis wrote: > > [...] > > Thanks. I've applied this patch to trunk. > gcc/cp/ > * (cp_parser_oacc_single_int_clause): New function. > (cp_parser_oacc_clause_vector_length): Delete. > (cp_parser_omp_clause_num_gangs): D

Fwd: [patch, fortran] PR 80687, 80696

2017-05-09 Thread Thomas Koenig
... forgot to copy in gcc-patches here... Weitergeleitete Nachricht Betreff: [patch, fortran] PR 80687, 80696 Datum: Tue, 9 May 2017 23:14:30 +0200 Von: Thomas Koenig An: fort...@gcc.gnu.org Hello world, it appears that using VLAs also caused the strange errors reported in

Re: [PATCH, rs6000] Fix vec_xl and vec_xst intrinsics for P8

2017-05-09 Thread Segher Boessenkool
On Tue, May 09, 2017 at 01:44:35PM -0500, Bill Schmidt wrote: > I forgot to ask -- this fix is needed for GCC 6 and 7 as well. Is this ok > for backport > after the usual burn-in? Sure! Segher

Re: [PATCH, GCC/LTO, ping3] Fix PR69866: LTO with def for weak alias in regular object file

2017-05-09 Thread Jan Hubicka
> Ping? Sorry for late reply > >Hi, > > > >This patch fixes an assert failure when linking one LTOed object file > >having a weak alias with a regular object file containing a strong > >definition for that same symbol. The patch is twofold: > > > >+ do not add an alias to a partition if it is exter

[PATCH] RISC-V: Add Sign/Zero extend patterns for PIC loads

2017-05-09 Thread Palmer Dabbelt
Loads on RISC-V are sign-extending by default, but we weren't telling GCC this in our PIC load patterns. This corrects the problem, and adds a zero-extending pattern as well. gcc/ChangeLog 2017-05-09 Palmer Dabbelt * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define. * config/ri

Move myself to Write After Approval section

2017-05-09 Thread Kaz Kojima
Hi all, I am stepping down as the SH backend maintainer for personal reasons. I might still send tiny SH patches and sh-linux testresults if the HDD of my SH machine can be recovered. I've moved myself to write after approval section. I didn't think that I could be involved with such huge and hi

[PATCH 0/3] v3 of C++ template type diffing

2017-05-09 Thread David Malcolm
On Tue, 2017-05-09 at 10:52 -0400, Nathan Sidwell wrote: > On 05/09/2017 10:07 AM, David Malcolm wrote: > > > > +static const char * > > +type_to_string_with_compare (tree type, tree peer, bool verbose, > > +bool show_color) > > +{ > > > + for (int idx = 0; idx < len_max

[PATCH 3/3] (v3) Use %qH and %qI throughout C++ frontend

2017-05-09 Thread David Malcolm
(unchanged in v3) Changed in v2: use %qH and %qI rather than %H and %I. This is the second half of the kit, which uses %qH and %qI throughout the C++ frontend whenever describing type mismatches between a pair of %qT. gcc/cp/ChangeLog: * call.c (print_conversion_rejection): Replace pairs

[PATCH 1/3] (v3) Non-C++ parts of template type diff printing

2017-05-09 Thread David Malcolm
This patch is broken out from the C++ patch, for ease of review. I believe I can self-approve this one, assuming the other patches in the kit are OK. The patch: - adds the bool and const char ** params to the pp_format_decoder callback - adds the format_postprocessor class - adds the "type-diff"

[PATCH 2/3] (v3) C++ template type diff printing

2017-05-09 Thread David Malcolm
Changes in v3: - Merge bodies of type_to_string_with_compare and print_template_tree_comparison into a new function, print_template_differences. Use simpler comma-insertion criterion. - Cleanup assertions in cxx_format_postprocessor::handle. Would it make sense to rename "m_type_a"/"m_type_b" to

Re: [RFC]: Fix Ada boostrap failure on S/390 with -mzarch

2017-05-09 Thread H.J. Lu
On Tue, Apr 4, 2017 at 4:46 AM, Andreas Krebbel wrote: > On 04/03/2017 06:18 PM, Eric Botcazou wrote: >>> On S/390 UNITS_PER_WORD is: >>> 8 with -m64 >>> 4 with -m31 >>> 8 with -m31 -mzarch >>> >>> This has been chosen to support use of 64 bit registers also in 32 bit >>> code. Code compiled with

[PATCH, v4] Fix PR51513, switch statement with default case containing __builtin_unreachable leads to wild branch

2017-05-09 Thread Peter Bergner
Here is the updated patch to use gimple_seq_unreachable_p() which scans the sequence backwards so it bails out earlier in the common case (ie, no call to __builtin_unreachable). As discussed in the previous thread, we remove case statement labels from the jump table that lead to unreachable blocks

Re: [PATCH 02/13] improve bitmap / sbitmap compatability of bitmap_set_bit

2017-05-09 Thread Richard Sandiford
tbsaunde+...@tbsaunde.org writes: > From: Trevor Saunders > > This make the sbitmap version return true if the bit was previously > unset to make it similar to the bitmap version. > > gcc/ChangeLog: > > 2017-05-09 Trevor Saunders > > * sbitmap.h (bitmap_set_bit): Return bool similar to bi

Re: [PATCH 05/13] allow constructing a auto_vec with a preallocation, and a possibly larger actual allocation size

2017-05-09 Thread Richard Sandiford
tbsaunde+...@tbsaunde.org writes: > From: Trevor Saunders > > This allows us to set the capacity of the vector when we construct it, > and still use a stack buffer when the size is small enough. > > gcc/ChangeLog: > > 2017-05-09 Trevor Saunders > > * genrecog.c (int_set::int_set): Explici

Re: [c++ PATCH] PR c++/80682

2017-05-09 Thread Ville Voutilainen
On 9 May 2017 at 17:14, Nathan Sidwell wrote: > On 05/09/2017 08:06 AM, Ville Voutilainen wrote: >> >> Tested on Linux-x64, not tested with the full suite yet. >> >> 2017-05-09 Ville Voutilainen >> >> gcc/ >> >> PR c++/80682 >> * cp/method.c (is_trivially_xible): Reject void type

<    1   2