[PATCH] Fix PR86179, stale STMT_VINFO_RELATED_STMT

2018-06-18 Thread Richard Biener
Pattern recognition can leave stale STMT_VINFO_RELATED_STMT entries around which confuses the correctness asserting I put into get_{earlier,later}_stmt. The following makes sure to clear those again. To make things more complicated pattern recognition sometimes scans forward ... which runs into

PING 4 [PATCH] allow more strncat calls with -Wstringop-truncation (PR 85700)

2018-06-18 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01189.html On 06/11/2018 11:34 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01189.html On 06/04/2018 05:45 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01189.html On 05/29/2018 10

Re: RFA: Restore ability to build zlib in a srcdir == builddir

2018-06-18 Thread Jason Merrill
OK. On Mon, Jun 18, 2018 at 5:35 AM, Nick Clifton wrote: > Hi Guys, > > The patch below allows the zlib library to be built when the build > directory is the same as the source directory. This patch has been in > the binutils/gdb sources for a while now, but unfortunately was never > cop

Re: [PATCH], Backport IEEE 128-bit changes to GCC 8.x, preliminary, Patch #3

2018-06-18 Thread Michael Meissner
As we have discussed on the patch submission, I'm going to be back porting the IEEE 128-bit changes that we've made recently in the trunk to the GCC 8.x branch. The motivation is to allow distributions to switch to IEEE 128-bit long double without having to wait for the GCC 9.1 compiler. I'm send

Re: [PATCH] Use __builtin_memmove for trivially copy assignable types

2018-06-18 Thread Glen Fernandes
On Mon, Jun 18, 2018 at 6:12 PM Ville Voutilainen wrote: > On 16 June 2018 at 18:05, Marc Glisse wrote: > > On Sat, 16 Jun 2018, Glen Fernandes wrote: > > > >> Use __builtin_memmove for trivially copy assignable types > >> > >> 2018-06-14 Glen Joseph Fernandes > >> > >>* include/bits/stl

C++ PATCHes for c++/86200, ICE with unexpanded pack in lambda parameter

2018-06-18 Thread Jason Merrill
Now that we allow unexpanded packs in a lambda, since they can be part of the pattern of a pack expansion, we need to look at the argument types when we scan the full-expression later. But fixing this added an unexpected error to the test for 81060, where we weren't properly diagnosing the unexpan

Re: [PATCH] avoid ICE when pretty-printing a VLA with an error bound (PR 85956)

2018-06-18 Thread Martin Sebor
On 05/31/2018 11:43 AM, Jakub Jelinek wrote: On Thu, May 31, 2018 at 01:34:19PM -0400, Jason Merrill wrote: Where is the error_mark_node coming from in the first place? remap_type invoked during omp-low.c (scan_omp). omp_copy_decl returns error_mark_node for decls that tree-inline.c wants to r

PING [PATCH] update Zero-length array documentation

2018-06-18 Thread Martin Sebor
Attached is an updated patch with the additional text as discussed below. Martin On 06/11/2018 03:05 PM, Martin Sebor wrote: On 06/11/2018 02:03 PM, Richard Sandiford wrote: Martin Sebor writes: On 06/11/2018 12:08 PM, Richard Sandiford wrote: Martin Sebor writes: @@ -1553,12 +1553,28 @@

Re: [PATCH], Backport IEEE 128-bit changes to GCC 8.x, Patch #2

2018-06-18 Thread Michael Meissner
As we have discussed on the patch submission, I'm going to be back porting the IEEE 128-bit changes that we've made recently in the trunk to the GCC 8.x branch. The motivation is to allow distributions to switch to IEEE 128-bit long double without having to wait for the GCC 9.1 compiler. I'm send

backporting fix for pr85602 to 8 branch

2018-06-18 Thread Martin Sebor
Richard & Jakub, I would like to backport the fix for pr85602 to gcc-8-branch. Can you please review the original patch below and let me know if you have any concerns with the backport? https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00869.html Thanks Martin

Re: [PATCH], Backport IEEE 128-bit changes to GCC 8.x, Patch #1

2018-06-18 Thread Michael Meissner
As we have discussed on the patch submission, I'm going to be back porting the IEEE 128-bit changes that we've made recently in the trunk to the GCC 8.x branch. The motivation is to allow distributions to switch to IEEE 128-bit long double without having to wait for the GCC 9.1 compiler. I'm send

[PATCH], Backport IEEE 128-bit changes to GCC 8.x, preliminary

2018-06-18 Thread Michael Meissner
As we have discussed on the patch submission, I'm going to be back porting the IEEE 128-bit changes that we've made recently in the trunk to the GCC 8.x branch. The motivation is to allow distributions to switch to IEEE 128-bit long double without having to wait for the GCC 9.1 compiler. I'm send

Re: [PATCH] gracefully deal with invalid strlen declarations (PR 86114)

2018-06-18 Thread Martin Sebor
On 06/12/2018 03:37 PM, Jeff Law wrote: On 06/12/2018 03:29 PM, Martin Sebor wrote: Declaring strlen() to return a pointer instead of size_t and then calling the function can result in an ICE due to both gimple-fold and tree-ssa-strlen assuming the function necessarily returns an integer. As lu

Re: [PATCH] Use __builtin_memmove for trivially copy assignable types

2018-06-18 Thread Ville Voutilainen
On 16 June 2018 at 18:05, Marc Glisse wrote: > On Sat, 16 Jun 2018, Glen Fernandes wrote: > >> Use __builtin_memmove for trivially copy assignable types >> >> 2018-06-14 Glen Joseph Fernandes >> >>* include/bits/stl_algobase.h >>(__is_simple_copy_move): Defined helper. >>

[PATCH] xtensa: fix PR target/65416

2018-06-18 Thread Max Filippov
The issue is caused by reordering of stack pointer update after stack space allocation with instructions that write to the allocated stack space. In windowed ABI register spill area for the previous call frame is located just below the stack pointer and may be reloaded back into the register file o

Rope iterator patch reminder

2018-06-18 Thread Jeremy Sawicki
Last month I sent a patch for a bug in the rope template.  I want to make sure it is not forgotten: https://gcc.gnu.org/ml/libstdc++/2018-05/msg00115.html https://gcc.gnu.org/ml/gcc-patches/2018-05/msg01006.html When an iterator is copied or assigned, the copy can retain pointers to an interna

Limit Debug mode impact: overload __niter_base

2018-06-18 Thread François Dumont
Hi     I abandon the idea of providing Debug algos, it would be too much code to add and maintain. However I haven't quit on reducing Debug mode performance impact.     So this patch make use of the existing std::__niter_base to get rid of the debug layer around __gnu_debug::vector<>::iterat

Re: [PATCH, rs6000] Fix AIX expected builtin instruction counts

2018-06-18 Thread Carl Love
Segher: Per our discussions, the previous patch had issues with the target !powerpc*-*-aix* not working correctly and thus the instruction count test was not being done. I have addressed those issues and verified by inspecting the gcc/testsuite/gcc/gcc.log file to make sure the test was actually

PATCH to fix ICE with -Wint-conversion (PR middle-end/86202)

2018-06-18 Thread Marek Polacek
This patch improves the checks in size_must_be_zero_p so that we don't call get_range_info with SIZE of a pointer type. Bootstrapped/regtested on x86_64-linux, ok for trunk and 8? 2018-06-18 Marek Polacek PR middle-end/86202 * gimple-fold.c (size_must_be_zero_p): Check the typ

Re: [PATCH] PR libstdc++/78870 support std::filesystem on Windows

2018-06-18 Thread Christophe Lyon
On Mon, 18 Jun 2018 at 18:01, Jonathan Wakely wrote: > > On 16/06/18 20:56 -0600, Sandra Loosemore wrote: > >On 06/16/2018 05:05 PM, Jonathan Wakely wrote: > >>Oops, that message got bounced from the lists and was the wrong > >>version of the patch anyway - this is the one I meant to attach. > >>

[PATCH] LWG 2975 ensure construct(pair*, ...) used to construct pairs

2018-06-18 Thread Jonathan Wakely
* include/std/scoped_allocator (__not_pair): Define SFINAE helper. (construct(_Tp*, _Args&&...)): Remove from overload set when _Tp is a specialization of std::pair. * testsuite/20_util/scoped_allocator/construct_pair.cc: Ensure pair elements are constructed

Re: [PATCH applied], 3 PowerPC long double patches applied

2018-06-18 Thread Joseph Myers
On Mon, 18 Jun 2018, Michael Meissner wrote: > In terms of the tests, the following tests fail if you switch the default long > double format. Also, having done a test build: various *tf* and *tc* libgcc functions end up getting built incorrectly (to use IEEE long double when the ABIs for those

Re: [PATCH applied], 3 PowerPC long double patches applied

2018-06-18 Thread Michael Meissner
On Mon, Jun 18, 2018 at 07:40:46PM +, Joseph Myers wrote: > On Mon, 18 Jun 2018, Michael Meissner wrote: > > > gcc.target/powerpc/pr70117.c(bug in isnormal on > > IEEE 128) > > Doesn't look like a bug in isnormal to me. That test is explicitly using > an IBM long do

Re: [PATCH applied], 3 PowerPC long double patches applied

2018-06-18 Thread Joseph Myers
On Mon, 18 Jun 2018, Michael Meissner wrote: > gcc.target/powerpc/pr70117.c (bug in isnormal on IEEE 128) Doesn't look like a bug in isnormal to me. That test is explicitly using an IBM long double representation and can't possibly be expected to work with IEEE long double - e

[PATCH applied], 3 PowerPC long double patches applied

2018-06-18 Thread Michael Meissner
This is just the combined patch of the last three patches that have been approved for trunk. I expanded the description in rs6000-modes.def of what the 3 128-bit floating point types are and why IFmode needs to be ordered above KFmode and TFmode. These patches were individually proposed in: https

Re: [PATCH v2] C/C++: Add -Waddress-of-packed-member

2018-06-18 Thread Joseph Myers
On Mon, 18 Jun 2018, Jason Merrill wrote: > On Mon, Jun 18, 2018 at 11:59 AM, Joseph Myers > wrote: > > On Mon, 18 Jun 2018, Jason Merrill wrote: > > > >> > + if (TREE_CODE (rhs) == COND_EXPR) > >> > +{ > >> > + /* Check the THEN path first. */ > >> > + tree op1 = TREE_OPERAND (r

[PATCH] avoid using strnlen result for late calls to strlen (PR 82604)

2018-06-18 Thread Martin Sebor
While looking into opportunities to detect strnlen/strlen coding mistakes (pr86199) I noticed a bug in the strnlen implementation I committed earlier today that lets a strnlen() result be saved and used in subsequent calls to strlen() with the same argument. The attached patch changes the handle_b

Re: [PATCH 2/8] Introduce VECT_SCOPE macro

2018-06-18 Thread David Malcolm
On Fri, 2018-06-15 at 14:11 -0600, Jeff Law wrote: > On 06/14/2018 02:32 PM, David Malcolm wrote: > > The vectorizer code has numerous instances of: > > > > if (dump_enabled_p ()) > > dump_printf_loc (MSG_NOTE, vect_location, > > "=== some message ===\n"); > > > > In ea

Re: [PATCH], PowerPC long double transistion, patch #2

2018-06-18 Thread Michael Meissner
On Fri, Jun 15, 2018 at 04:00:42PM -0500, Segher Boessenkool wrote: > On Thu, Jun 14, 2018 at 08:15:51PM -0400, Michael Meissner wrote: > > On Thu, Jun 14, 2018 at 07:00:52PM -0500, Segher Boessenkool wrote: > > > Hi Mike, > > > > > > On Wed, Jun 13, 2018 at 05:16:37PM -0400, Michael Meissner wrot

[PATCH] LWG 2989 hide path iostream operators from normal lookup

2018-06-18 Thread Jonathan Wakely
By only defining these operators as friends (with no namespace-scope declaration) they can only be found by ADL and do not participate in overload resolution for arguments of types other than path. LWG 2989 hide path iostream operators from normal lookup * include/bits/fs_path.h (

Re: [PATCH 01/11] Initial TI PRU GCC port

2018-06-18 Thread Dimitar Dimitrov
On сряда, 13 юни 2018 г. 19:44:16 EEST Joseph Myers wrote: > On Wed, 13 Jun 2018, Dimitar Dimitrov wrote: > > + error ("__delay_cycles() only takes constant arguments"); > > As in documentation, diagnostics should not use () to indicate that a name > refers to a function (as opposed to referr

[PATCH][PR other/86198] Libacktrace and ".note.gnu.build-id" section.

2018-06-18 Thread Denis Khalikov
Hello, this is a patch for PR other/86198 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86198 Thanks. From: Denis Khalikov Date: Mon, 18 Jun 2018 20:46:39 +0300 Subject: [PATCH] PR other/86198 * elf.c (elf_add): Increase ".note.gnu.build-id" section size checking up to 36 bytes. --- libbacktrace/

C++ PATCH for c++/86171, ICE with recursive alias instantiation

2018-06-18 Thread Jason Merrill
Here, instantiating B requires instantiating A, which requires instantiating B. Previously, that resulted in creating two separate TYPE_DECLS for B and trying to combine them in register_specialization. Better, I think, to check for this situation sooner. Tested x86_64-pc-linux-gnu, applying to

Re: [PATCH v2] C/C++: Add -Waddress-of-packed-member

2018-06-18 Thread Jason Merrill
On Mon, Jun 18, 2018 at 11:59 AM, Joseph Myers wrote: > On Mon, 18 Jun 2018, Jason Merrill wrote: > >> > + if (TREE_CODE (rhs) == COND_EXPR) >> > +{ >> > + /* Check the THEN path first. */ >> > + tree op1 = TREE_OPERAND (rhs, 1); >> > + context = check_address_of_packed_member

[PATCH] LWG 3050 Fix cv-qualification of convertibility constraints

2018-06-18 Thread Jonathan Wakely
This issue hasn't been voted into the working draft yet, but it's been approved by LWG and is obviously correct. * include/std/chrono (duration, operator*, operator/, operator%): Use const-qualified type as source type in is_convertible constraints. * testsuite/20_util/dur

Re: [tree.c] Replace cast to (char *) by const_cast

2018-06-18 Thread Jason Merrill
On Mon, Jun 18, 2018 at 1:51 PM, Jakub Jelinek wrote: > On Mon, Jun 18, 2018 at 01:48:05PM -0400, Jason Merrill wrote: >> On Mon, Jun 18, 2018 at 12:41 PM, Jakub Jelinek wrote: >> > On Mon, Jun 18, 2018 at 08:34:28AM -0600, Jeff Law wrote: >> >> On 06/18/2018 08:08 AM, Prathamesh Kulkarni wrote:

Re: Incremental LTO linking part 2: lto-plugin support

2018-06-18 Thread Sandra Loosemore
On 06/18/2018 11:37 AM, Jan Hubicka wrote: It is exactly the warning newly added by this patch. /scratch/sandra/arm-eabi-upstream/install/lib/gcc/arm-none-eabi/9.0.0/../../../../arm-none-eabi/bin/ld: warning: incremental linking of LTO and non-LTO objects; using -flinker-output=nolto-rel which

Re: RFA: Sanitize deprecation messages (PR 84195)

2018-06-18 Thread Jason Merrill
On Fri, Feb 16, 2018 at 11:19 AM, Martin Sebor wrote: > On 02/16/2018 05:43 AM, Nick Clifton wrote: >> >> Hi David, >> >> Attached is a revised version of the patch which I hope addresses all >> of your (very helpful) comments on the v3 patch. >> >> OK to apply once the sources are back on s

Re: [tree.c] Replace cast to (char *) by const_cast

2018-06-18 Thread Jakub Jelinek
On Mon, Jun 18, 2018 at 01:48:05PM -0400, Jason Merrill wrote: > On Mon, Jun 18, 2018 at 12:41 PM, Jakub Jelinek wrote: > > On Mon, Jun 18, 2018 at 08:34:28AM -0600, Jeff Law wrote: > >> On 06/18/2018 08:08 AM, Prathamesh Kulkarni wrote: > >> > On 18 June 2018 at 19:28, Nick Clifton wrote: > >> >

Re: [tree.c] Replace cast to (char *) by const_cast

2018-06-18 Thread Jason Merrill
On Mon, Jun 18, 2018 at 12:41 PM, Jakub Jelinek wrote: > On Mon, Jun 18, 2018 at 08:34:28AM -0600, Jeff Law wrote: >> On 06/18/2018 08:08 AM, Prathamesh Kulkarni wrote: >> > On 18 June 2018 at 19:28, Nick Clifton wrote: >> >> Hi Prathamesh, >> >> >> >>> I am getting the following build error with

Re: Incremental LTO linking part 2: lto-plugin support

2018-06-18 Thread Jan Hubicka
> > It is exactly the warning newly added by this patch. > > /scratch/sandra/arm-eabi-upstream/install/lib/gcc/arm-none-eabi/9.0.0/../../../../arm-none-eabi/bin/ld: > warning: incremental linking of LTO and non-LTO objects; using > -flinker-output=nolto-rel which will bypass whole program optimiz

Re: [PATCH, alpha] PR target/85095

2018-06-18 Thread Jeff Law
On 05/24/2018 04:34 PM, co...@sdf.org wrote: > On Thu, May 24, 2018 at 01:32:17PM -0600, Jeff Law wrote: >> On 05/24/2018 01:17 PM, co...@sdf.org wrote: >>> On Thu, May 24, 2018 at 12:48:22PM -0600, Jeff Law wrote: On 05/24/2018 07:54 AM, Maya Rashish wrote: > Move linux-specific specfile

Re: [PATCH v3] Change default to -fno-math-errno

2018-06-18 Thread Joseph Myers
On Mon, 18 Jun 2018, Jeff Law wrote: > So do we need to set or check math_errhandling & MATH_ERRNO at all? Or That's a matter for libc (glibc currently sets it based on __FAST_MATH__ / __NO_MATH_ERRNO__, but fails to avoid including MATH_ERREXCEPT in the definition for configurations not suppo

Re: RFC: What should go in our header?

2018-06-18 Thread Jonathan Wakely
On 18/06/18 15:12 +0300, Ville Voutilainen wrote: On 17 June 2018 at 19:49, Ed Smith-Rowland <3dw...@verizon.net> wrote: On 06/15/2018 11:52 AM, Jonathan Wakely wrote: C++20 adds a header, which should define all the library feature test macros, as well as implementation-specific macros like

Re: [tree.c] Replace cast to (char *) by const_cast

2018-06-18 Thread Jakub Jelinek
On Mon, Jun 18, 2018 at 08:34:28AM -0600, Jeff Law wrote: > On 06/18/2018 08:08 AM, Prathamesh Kulkarni wrote: > > On 18 June 2018 at 19:28, Nick Clifton wrote: > >> Hi Prathamesh, > >> > >>> I am getting the following build error with trunk: > >>> ../../gcc/gcc/tree.c: In member function ‘void >

Re: [PATCH] add support for strnlen (PR 81384)

2018-06-18 Thread Martin Sebor
On 06/12/2018 03:11 PM, Jeff Law wrote: On 06/05/2018 03:43 PM, Martin Sebor wrote: The attached patch adds basic support for handling strnlen as a built-in function. It touches the strlen pass where it folds constant results of the function, and builtins.c to add simple support for expanding s

[PATCH, rs6000] Fix implementation of vec_packsu (vector unsigned long long, vector unsigned long long) built-in function

2018-06-18 Thread Kelvin Nilsen
This patch fixes an error in the code generation for vec_packsu (vector unsigned long long, vector unsigned long long). As previously implemented, this built-in function translates to the vpksdus instruction. This patch causes vec_packsu (vector unsigned long long, vector unsigned long long)

Re: RFA: Sanitize deprecation messages (PR 84195)

2018-06-18 Thread Nick Clifton
Hi Martin, > I'm getting a bootstrap failure: *sigh* yes - my bad. Fortunately a patch has already been posted: https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01039.html And I think that it has now been approved. Cheers Nick

Re: [PATCH v3] Change default to -fno-math-errno

2018-06-18 Thread Jeff Law
On 06/18/2018 08:01 AM, Wilco Dijkstra wrote: > GCC currently defaults to -fmath-errno. This generates code assuming math > functions set errno and the application checks errno. Few applications > test errno and various systems and math libraries no longer set errno since it > is optional. GCC g

Re: [patch] Remove redundant intrinsics

2018-06-18 Thread Jeff Law
On 06/14/2018 05:44 AM, Koval, Julia wrote: > Hi, > > This patch should fix the issue. Ok for trunk? > > gcc/testsuite/ > * gcc.target/i386/avx512vl-vpclmulqdq-2.c: Remove 128bit version. OK. jeff

Re: [PATCH] PR libstdc++/78870 support std::filesystem on Windows

2018-06-18 Thread Jonathan Wakely
On 16/06/18 20:56 -0600, Sandra Loosemore wrote: On 06/16/2018 05:05 PM, Jonathan Wakely wrote: Oops, that message got bounced from the lists and was the wrong version of the patch anyway - this is the one I meant to attach. On Sun, 17 Jun 2018 at 00:00, Jonathan Wakely wrote: Here's what I

Re: [PATCH v2] C/C++: Add -Waddress-of-packed-member

2018-06-18 Thread Joseph Myers
On Mon, 18 Jun 2018, Jason Merrill wrote: > > + if (TREE_CODE (rhs) == COND_EXPR) > > +{ > > + /* Check the THEN path first. */ > > + tree op1 = TREE_OPERAND (rhs, 1); > > + context = check_address_of_packed_member (type, op1); > > This should handle the GNU extension of re-u

Re: [patch] Test Fortran part of libgomp with check-fortran

2018-06-18 Thread Jeff Law
On 06/18/2018 02:00 AM, Eric Botcazou wrote: > Hi, > > that's already done for C++ so it seems consistent to do it for Fortran too. > > Tested on x86-64/Linux, OK for the mainline? > > > 2018-06-18 Eric Botcazou > > * Makefile.def (fortran): Add check-target-libgomp-fortran. > *

Re: [PATCH] Add initial version of rtl.vim syntax file.

2018-06-18 Thread Jeff Law
On 06/15/2018 08:28 AM, Martin Liška wrote: > On 06/15/2018 07:08 AM, Alexander Monakov wrote: >> On Tue, 12 Jun 2018, Martin Liška wrote: >> >>> This is equivalent of gimple.vim file. I'm aware of not full coverage of RTL >>> instructions, but hope it's a good start point. >> >> I think this is ni

Re: [PATCH] More rtx to rtx_insn * cleanups

2018-06-18 Thread Jeff Law
On 06/14/2018 02:10 PM, David Malcolm wrote: > These are mostly pre-approved, but there are some slightly non-trivial > cases in frv.c and mips.c. They looked pretty trivial to me :-) > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. > > Successfully built "cc1" binaries on all

[PATCH] LWG 3035. std::allocator's constructors should be constexpr

2018-06-18 Thread Jonathan Wakely
* include/bits/allocator.h (allocator): Add constexpr to constructors for C++2a. Replace dynamic exception specifications with NOTHROW macro. (allocator, operator==, operator!=): Replace USE_NOEXCEPT macro with NOTHROW. * include/bits/c++config (_GLI

[PATCH][Middle-end]3rd patch of PR78809

2018-06-18 Thread Qing Zhao
Hi, this is the 3rd (and the last) patch for PR78809: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78809 Inline strcmp with small constant strings The design doc for PR78809 is at: https://www.mail-archive.com/gcc@gcc.gnu.org/msg83822.html this patch is for the third part of change of PR78809.

Re: Incremental LTO linking part 2: lto-plugin support

2018-06-18 Thread Sandra Loosemore
On 06/18/2018 02:45 AM, Jan Hubicka wrote: On 05/08/2018 09:14 AM, Jan Hubicka wrote: Hi, with lto, incremental linking can be meaninfuly done in three ways: 1) read LTO file and produce non-LTO .o file this is current behaviour of gcc -r or ld -r with plugin 2) read LTO files and merge

[10/n] PR85694: Split out check for vectorizable associative reductions

2018-06-18 Thread Richard Sandiford
This patch adds an overload of vect_reassociating_reduction_p that checks for a vectorizable associative reduction, since the check was duplicated in three functions. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard 2018-06-18 Richard Sandiford gcc/ * tree-v

[9/n] PR85694: Add a vect_look_through_pattern helper

2018-06-18 Thread Richard Sandiford
When following the definitions of SSA names, some recognisers already cope with statements that have been replaced by patterns. This patch makes that happen automatically for users of type_conversion_p and vect_get_internal_def. It also adds a vect_look_through_pattern helper that can be used dire

[8/n] PR85694: Make patterns check for target support

2018-06-18 Thread Richard Sandiford
This patch makes pattern recognisers do their own checking for vector types and target support. Previously some recognisers did this themselves and some left it to vect_pattern_recog_1. Doing this means we can get rid of the type_in argument, which was ignored if the recogniser did its own checki

[7/n] PR85694: Add a vect_pattern_detected helper

2018-06-18 Thread Richard Sandiford
This message is a long write-up for a patch that simply adds a common routine for printing the "vector_foo_pattern: detected:" messages. The reason for doing this is that some routines check for target support themselves and some leave it to vect_pattern_recog_1. Those that leave it to vect_patte

[6/n] PR85694: Add a vect_get_internal_def helper

2018-06-18 Thread Richard Sandiford
This patch adds a helper for pattern code that wants to find an internal (vectorisable) definition of an SSA name. A later patch will make more use of this, and alter the definition. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard 2018-06-18 Richard Sandiford gcc/

[5/n] PR85694: Remove dead WIDEN_SUM handling

2018-06-18 Thread Richard Sandiford
vect_recog_dot_prod_pattern and vect_recog_sad_pattern both checked whether the statement passed in had already been recognised as a WIDEN_SUM_EXPR pattern. That isn't possible (any more?), since the first recognised pattern wins, and since vect_recog_widen_sum_pattern never matches a later statem

[4/n] PR85694:Remove redundant calls to types_compatible_p

2018-06-18 Thread Richard Sandiford
tree-vect-patterns.c checked that operands to primitive arithmetic ops are compatible with each other and with the result. The checks date back years and have long been redundant with verify_gimple_stmt. Tested on aarch64-linux-gnu and x86_64-linux-gnu. OK to install? Richard 2018-06-18 Rich

[3/n] PR85694: Fix dummy assignment handling in vectorizable_call

2018-06-18 Thread Richard Sandiford
vectorizable_call stubs out the original scalar statement with a dummy assignment to the same lhs, so that we don't leave any bogus scalar calls around. If the call is actually a pattern statement, the code rightly took the lhs of the original bb statement: if (is_pattern_stmt_p (stmt_info))

[2/n] PR85694: Attach a DEF_SEQ only to the original statement

2018-06-18 Thread Richard Sandiford
A pattern's PATTERN_DEF_SEQ was attached to both the original statement and the main pattern statement, which made it harder to update later. This patch attaches it to just the original statement. In practice, anything that cared had ready access to both. Tested on aarch64-linux-gnu and x86_64-li

[1/n] PR85694: Allow pattern definition statements to be reused

2018-06-18 Thread Richard Sandiford
This patch is the first part of a series to fix to PR85694. Later patches can make the pattern for a statement S2 reuse the results of a PATTERN_DEF_SEQ statement attached to an earlier statement S1. Although vect_mark_stmts_to_be_vectorized handled this fine, vect_analyze_stmt and vect_transform_

Re: [tree.c] Replace cast to (char *) by const_cast

2018-06-18 Thread Jeff Law
On 06/18/2018 08:08 AM, Prathamesh Kulkarni wrote: > On 18 June 2018 at 19:28, Nick Clifton wrote: >> Hi Prathamesh, >> >>> I am getting the following build error with trunk: >>> ../../gcc/gcc/tree.c: In member function ‘void >>> escaped_string::escape(const char*)’: >>> ../../gcc/gcc/tree.c:12457

Re: [PATCH v2] C/C++: Add -Waddress-of-packed-member

2018-06-18 Thread Jason Merrill
On Fri, May 18, 2018 at 7:36 AM, H.J. Lu wrote: > On Thu, May 17, 2018 at 10:32:56AM -0700, H.J. Lu wrote: >> On Mon, May 14, 2018 at 8:00 PM, Martin Sebor wrote: >> > On 05/14/2018 01:10 PM, H.J. Lu wrote: >> >> >> >> On Mon, May 14, 2018 at 10:40 AM, H.J. Lu wrote: >> >> >> >> $ cat c.i >>

Re: [tree.c] Replace cast to (char *) by const_cast

2018-06-18 Thread Prathamesh Kulkarni
On 18 June 2018 at 19:28, Nick Clifton wrote: > Hi Prathamesh, > >> I am getting the following build error with trunk: >> ../../gcc/gcc/tree.c: In member function ‘void >> escaped_string::escape(const char*)’: >> ../../gcc/gcc/tree.c:12457:20: error: cast from type ‘const char*’ to >> type ‘char*’

Re: RFA: Sanitize deprecation messages (PR 84195)

2018-06-18 Thread Martin Jambor
Hi Nick, On Fri, Feb 16 2018, Nick Clifton wrote: > Hi David, > > Attached is a revised version of the patch which I hope addresses all > of your (very helpful) comments on the v3 patch. > > OK to apply once the sources are back on stage 1 ? > > Cheers > Nick > > gcc/ChangeLog > 2018-02-0

[PATCH v3] Change default to -fno-math-errno

2018-06-18 Thread Wilco Dijkstra
GCC currently defaults to -fmath-errno. This generates code assuming math functions set errno and the application checks errno. Few applications test errno and various systems and math libraries no longer set errno since it is optional. GCC generates much faster code for simple math functions wi

Re: [tree.c] Replace cast to (char *) by const_cast

2018-06-18 Thread Nick Clifton
Hi Prathamesh, > I am getting the following build error with trunk: > ../../gcc/gcc/tree.c: In member function ‘void > escaped_string::escape(const char*)’: > ../../gcc/gcc/tree.c:12457:20: error: cast from type ‘const char*’ to > type ‘char*’ casts away qualifiers [-Werror=cast-qual] >m_str =

[tree.c] Replace cast to (char *) by const_cast

2018-06-18 Thread Prathamesh Kulkarni
Hi, I am getting the following build error with trunk: ../../gcc/gcc/tree.c: In member function ‘void escaped_string::escape(const char*)’: ../../gcc/gcc/tree.c:12457:20: error: cast from type ‘const char*’ to type ‘char*’ casts away qualifiers [-Werror=cast-qual] m_str = (char *) unescaped;

[PATCH] [aarch64] Remove obsolete comment about X30

2018-06-18 Thread Siddhesh Poyarekar
r217431 changed X30 as caller-saved in CALL_USE_REGISTERS because of which this comment about X30 not being marked as call-clobbered is no longer accurate. Siddhesh * config/aarch64/aarch64.h: Remove obsolete comment. --- gcc/config/aarch64/aarch64.h | 9 - 1 file changed, 9 dele

Re: [C++ Patch] Tidy duplicate_decls locations

2018-06-18 Thread Jason Merrill
OK. On Fri, Jun 15, 2018 at 10:16 AM, Paolo Carlini wrote: > Hi, > > these bits started when I realized that in the error messages about > redefined default arguments we were using DECL_SOURCE_LOCATION for the > olddecl and just input_location for newdecl: in the future we'll able to > point at t

Re: [patch, fortran] PR25829 Asynchronous I/O (patch version 2.0)

2018-06-18 Thread Rainer Orth
Hi Nicolas, > Here is the next version of the async I/O patch. It adds the documentation, > renames the testcases, uses "gthr.h", follows the style guidelines and has > been regression tested cleanly. > > As for adding additional flags, I think it would be better to follow ifort > to minimize comp

[COMMITTED][testsuite] Add target pthread to pr86076.c

2018-06-18 Thread Wilco Dijkstra
Add missing target pthread to ensure test doesn't fail on bare-metal targets. Committed as obvious. ChangeLog: 2018-06-18 Wilco Dijkstra PR tree-optimization/86076 * gcc.dg/pr86076.c: Add target pthread for bare-metal targets. -- diff --git a/gcc/testsuite/gcc.dg/pr86076.c b/g

Re: RFC: What should go in our header?

2018-06-18 Thread Ville Voutilainen
On 17 June 2018 at 19:49, Ed Smith-Rowland <3dw...@verizon.net> wrote: > On 06/15/2018 11:52 AM, Jonathan Wakely wrote: >> >> C++20 adds a header, which should define all the library >> feature test macros, as well as implementation-specific macros like >> _GLIBCXX_RELEASE and __GLIBCXX__. >> >> W

Re: RFC: What should go in our header?

2018-06-18 Thread Jonathan Wakely
On Sun, 17 Jun 2018 at 17:49, Ed Smith-Rowland wrote: > > On 06/15/2018 11:52 AM, Jonathan Wakely wrote: > > My preference is implemented by the attached patch. > > > This is pretty much what I was looking at doing. I say go! Thanks for the feedback, I'll add later today. > > While on the subje

[COMMITTED][testsuite] Remove xfail from vect-abs-compile.c

2018-06-18 Thread Wilco Dijkstra
Since PR64946 has been fixed, we can remove the xfail from this test. Committed as obvious. ChangeLog: 2018-06-18 Wilco Dijkstra PR tree-optimization/64946 * gcc.target/aarch64/vect-abs-compile.c: Remove xfail. -- diff --git a/gcc/testsuite/gcc.target/aarch64/vect-abs-compile.

[AArch64][PATCH 2/2] Combine AES instructions with xor and zero operands

2018-06-18 Thread Andre Simoes Dias Vieira
Hi, This patch teaches the AArch64 backend that AES instructions with a XOR and zero operands can be simplified by replacing the operands of the AES with XOR's thus eliminating the XOR. This is OK because the AES instruction XORs the input operands. This will improve code-generation when deali

[AArch64][PATCH 1/2] Make AES unspecs commutative

2018-06-18 Thread Andre Simoes Dias Vieira
Hi, This patch teaches the AArch64 backend that the AESE and AESD unspecs are commutative (which correspond to the vaeseq_u8 and vaesdq_u8 intrinsics). This improves register allocation around their corresponding instructions avoiding unnecessary moves. For instance, with the old patterns code

[AArch64][PATCH 0/2] Improve codegen for AES instructions

2018-06-18 Thread Andre Simoes Dias Vieira
Hi, This patch series aims to improve codegen for the AArch64 AES instructions by doing two things. The first is to make the AES unspecs commutative and by consequence make the corresponding intrinsics commutative, since the instructions themselves are commutative in the input. This will impro

RFA: Restore ability to build zlib in a srcdir == builddir

2018-06-18 Thread Nick Clifton
Hi Guys, The patch below allows the zlib library to be built when the build directory is the same as the source directory. This patch has been in the binutils/gdb sources for a while now, but unfortunately was never copied to gcc. So I am trying to right that mistake now. OK to apply

Re: [PATCH 2/8] Introduce VECT_SCOPE macro

2018-06-18 Thread Richard Biener
On Fri, Jun 15, 2018 at 10:11 PM Jeff Law wrote: > > On 06/14/2018 02:32 PM, David Malcolm wrote: > > The vectorizer code has numerous instances of: > > > > if (dump_enabled_p ()) > > dump_printf_loc (MSG_NOTE, vect_location, > > "=== some message ===\n"); > > > > In eac

Re: [PATCH] i386; Add -mmanual-endbr and cf_check function attribute

2018-06-18 Thread Richard Biener
On Fri, Jun 15, 2018 at 2:59 PM H.J. Lu wrote: > > Currently GCC inserts ENDBR instruction at entries of all non-static > functions, unless LTO compilation is used. Marking all functions, > which are not called indirectly with nocf_check attribute, is not > ideal since 99% of functions in a progr

Re: Incremental LTO linking part 2: lto-plugin support

2018-06-18 Thread Jan Hubicka
> On 05/08/2018 09:14 AM, Jan Hubicka wrote: > >Hi, > >with lto, incremental linking can be meaninfuly done in three ways: > > 1) read LTO file and produce non-LTO .o file > > this is current behaviour of gcc -r or ld -r with plugin > > 2) read LTO files and merge section for later LTO > >

Re: [AArch64][PATCH 1/2] Fix addressing printing of LDP/STP

2018-06-18 Thread Andre Simoes Dias Vieira
Hi Richard, Sorry for the delay I have been on holidays. I had a look and I think you are right. With these changes Umq and Uml seem to have the same functionality though, so I would suggest using only one. Maybe use a different name for both, removing both Umq and Uml in favour of Umn, wher

[patch] Test Fortran part of libgomp with check-fortran

2018-06-18 Thread Eric Botcazou
Hi, that's already done for C++ so it seems consistent to do it for Fortran too. Tested on x86-64/Linux, OK for the mainline? 2018-06-18 Eric Botcazou * Makefile.def (fortran): Add check-target-libgomp-fortran. * Makefile.tpl (check-target-libgomp-fortran): New phony target.

Re: [patch] Streamline debug info for up-level references

2018-06-18 Thread Eric Botcazou
> Looks good to me. Rather than removing dwarf2/pr37726.c can you try > turning that into a guality test that verifies the debug experience is the > same (or better) than before? I realize guality stuff is fragile but you > can restrict it to -O0 if you like (not sure if dg-skip-if supports that)