Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.

2019-08-12 Thread Richard Biener
On Mon, Aug 12, 2019 at 12:49 PM Richard Biener wrote: > > On Mon, Aug 12, 2019 at 12:43 PM Martin Liška wrote: > > > > On 8/12/19 12:39 PM, Richard Biener wrote: > > > which is the "other" body for 'open' but it shouldn't really be output > > > to the symbol table. Still we want to emit its

Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-08-12 Thread Richard Biener
On Fri, 9 Aug 2019, Uros Bizjak wrote: > On Fri, Aug 9, 2019 at 3:00 PM Richard Biener wrote: > > > > > > > > > > > > (define_mode_iterator MAXMIN_IMODE [SI "TARGET_SSE4_1"] > > > > > > > > > > > [DI "TARGET_AVX512F"]) > > > > > > > > > > > > > > > > > > > > > > and then we need to split

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-12 Thread Martin Liška
On 8/12/19 2:43 PM, Richard Biener wrote: > On Mon, Aug 12, 2019 at 1:49 PM Martin Liška wrote: >> >> On 8/12/19 1:40 PM, Richard Biener wrote: >>> On Mon, Aug 12, 2019 at 1:19 PM Martin Liška wrote: On 8/8/19 5:55 PM, Michael Matz wrote: > Hi, > > On Mon, 10 Jun 2019,

[PATCH] Add missing _mm{256,512}_zext* intrinsics (PRs target/83250, target/91340)

2019-08-12 Thread Jakub Jelinek
Hi! The following patch adds 9 missing intrinsics, which are like _mm*_cast*, but don't leave the upper bits undefined - set them to zero instead. The implementation uses code that combine manages to optimize well, the only problem is that as the 512-bit intrinsics are supposed to be avx512f and

Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.

2019-08-12 Thread Richard Biener
On Mon, Aug 12, 2019 at 12:43 PM Martin Liška wrote: > > On 8/12/19 12:39 PM, Richard Biener wrote: > > which is the "other" body for 'open' but it shouldn't really be output > > to the symbol table. Still we want to emit its body for the purpose > > of inlining. So IMHO the fix is not to do

[PATCH] Add noexcept-specifier to std::apply and std::make_from_tuple

2019-08-12 Thread Jonathan Wakely
When unpacking a std::tuple we know that the std::get calls are noexcept, so only the invocation (for std::apply) and construction (for std::make_from_tuple) can throw. We also know the std::get calls won't throw for a std::array, but this patch doesn't specialize the variable template for

Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.

2019-08-12 Thread Richard Biener
On Mon, Aug 12, 2019 at 12:39 PM Richard Biener wrote: > > On Mon, Aug 12, 2019 at 11:57 AM Martin Liška wrote: > > > > On 8/12/19 11:45 AM, Richard Biener wrote: > > > On Fri, Aug 9, 2019 at 3:57 PM Martin Liška wrote: > > >> > > >> Hi. > > >> > > >> The patch is about prevention of LTO

Re: [Patch, ira] Invalid assert in reload1.c::finish_spills?

2019-08-12 Thread Vladimir Makarov
On 2019-08-09 5:23 p.m., Jeff Law wrote: I've committed it after letting it bootstrap/regression test on ppc64le, aarch64 and others. It also didn't regress on any of the *-elf targets I'm testing which are far more likely to exercise this code. Thank you, Jeff.

Re: [PATCH] Teach mklog to reference PRs.

2019-08-12 Thread Martin Liška
On 8/2/19 8:04 AM, Martin Liška wrote: > On 8/2/19 7:45 AM, Martin Liška wrote: >> I agree with that approach. > > I'm sending an example how it would look like for something > bigger: > > $ git diff > e8a3be407068bfb9c82f0f6656b30d26cc2f484a~15..e8a3be407068bfb9c82f0f6656b30d26cc2f484a > >

[PATCH] Fix PR91375

2019-08-12 Thread Richard Biener
Bootstrapped & tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2019-08-12 Richard Biener PR lto/91375 * tree.c (free_lang_data_in_type): Do not free TYPE_BINFO dependent on flag_devirtualize. Index: gcc/tree.c

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-12 Thread Michael Matz
Hi, On Fri, 9 Aug 2019, Martin Sebor wrote: > The solution introduced in C99 is a flexible array. C++ > compilers usually support it as well. Those that don't are > likely to support the zero-length array (even Visual C++ does). > If there's a chance that some don't support either do you

Re: [PATCH][RFC][x86] Fix PR91154, add SImode smax, allow SImode add in SSE regs

2019-08-12 Thread Uros Bizjak
On Mon, Aug 12, 2019 at 2:27 PM Richard Biener wrote: > > On Fri, 9 Aug 2019, Uros Bizjak wrote: > > > On Fri, Aug 9, 2019 at 3:00 PM Richard Biener wrote: > > > > > > > > > > > > > > (define_mode_iterator MAXMIN_IMODE [SI "TARGET_SSE4_1"] > > > > > > > > > > > > [DI "TARGET_AVX512F"]) > > > >

Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.

2019-08-12 Thread Richard Biener
On Mon, Aug 12, 2019 at 11:57 AM Martin Liška wrote: > > On 8/12/19 11:45 AM, Richard Biener wrote: > > On Fri, Aug 9, 2019 at 3:57 PM Martin Liška wrote: > >> > >> Hi. > >> > >> The patch is about prevention of LTO section name clashing. > >> Now we have a situation where body of 2 functions is

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-12 Thread Richard Biener
On Mon, Aug 12, 2019 at 1:19 PM Martin Liška wrote: > > On 8/8/19 5:55 PM, Michael Matz wrote: > > Hi, > > > > On Mon, 10 Jun 2019, Martin Liska wrote: > > > >> 2019-07-24 Martin Liska > >> > >> * fold-const.c (operand_equal_p): Rename to ... > >> (operand_compare::operand_equal_p):

Re: [patch] handle casesi dispatch insns in create_trace_edges

2019-08-12 Thread Jeff Law
On 8/12/19 2:54 AM, Olivier Hainque wrote: > Hi Jeff, > > Thanks for your prompt feedback :-) > >>>* rtl.h (tablejump_casesi_pattern): New helper, casesi >>>recognition logic originating from code in cfgrtl.c. >>>* cfgrtl.c (patch_jump_insn): Use it. >>>*

[C++ PATCH] Adjust -Wsequence-point for C++17 changes (PR c++/91415)

2019-08-12 Thread Jakub Jelinek
Hi! The following patch adds some tweaks for -Wsequence-point warning for C++17 and later. In particular, stop warning about no sequence point in between <<, >>, ., -> and [] expressions, where E1 is in C++17 sequenced before E2. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for

Re: PR driver/91130 Use CL_DRIVER when handling of COLLECT_GCC_OPTIONS in lto-wrapper.c

2019-08-12 Thread Richard Biener
On Wed, 7 Aug 2019, Richard Earnshaw (lists) wrote: > On 07/08/2019 17:15, Jakub Jelinek wrote: > > On Wed, Aug 07, 2019 at 05:08:28PM +0100, Richard Earnshaw (lists) wrote: > > > > Though, I'm fine if you commit your patch now as a fix and Richi's patch > > > > with the above incremental change

Re: PR driver/91130 Use CL_DRIVER when handling of COLLECT_GCC_OPTIONS in lto-wrapper.c

2019-08-12 Thread Richard Biener
On Mon, 12 Aug 2019, Richard Biener wrote: > On Wed, 7 Aug 2019, Richard Earnshaw (lists) wrote: > > > On 07/08/2019 17:15, Jakub Jelinek wrote: > > > On Wed, Aug 07, 2019 at 05:08:28PM +0100, Richard Earnshaw (lists) wrote: > > > > > Though, I'm fine if you commit your patch now as a fix and

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-12 Thread Michael Matz
Hi, On Mon, 12 Aug 2019, Martin Liška wrote: > > You seem to need it only to have the possibility of virtual functions, > > i.e. fancy callbacks. AFAICS you only have one derived class, i.e. a > > simple distinction of two cases. What do you think about encoding the > > additional new (ICF)

Re: [PATCH] Port value profiling to -fopt-info infrastructure.

2019-08-12 Thread Jeff Law
On 8/9/19 7:13 AM, Martin Liška wrote: > On 8/9/19 10:13 AM, Richard Biener wrote: >> On Thu, Aug 8, 2019 at 4:17 PM Jeff Law wrote: >>> On 8/8/19 7:04 AM, Martin Liška wrote: Hi. As requested by Richi, I'm suggesting to use new dump_printf optimization info infrastructure.

Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.

2019-08-12 Thread Martin Liška
On 8/12/19 12:39 PM, Richard Biener wrote: > which is the "other" body for 'open' but it shouldn't really be output > to the symbol table. Still we want to emit its body for the purpose > of inlining. So IMHO the fix is not to do magic '0' appending for > the user-asm-name case but instead

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-12 Thread Martin Liška
On 8/8/19 5:55 PM, Michael Matz wrote: > Hi, > > On Mon, 10 Jun 2019, Martin Liska wrote: > >> 2019-07-24 Martin Liska >> >> * fold-const.c (operand_equal_p): Rename to ... >> (operand_compare::operand_equal_p): ... this. >> (add_expr): Rename to ... >>

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-12 Thread Martin Liška
On 8/12/19 1:40 PM, Richard Biener wrote: > On Mon, Aug 12, 2019 at 1:19 PM Martin Liška wrote: >> >> On 8/8/19 5:55 PM, Michael Matz wrote: >>> Hi, >>> >>> On Mon, 10 Jun 2019, Martin Liska wrote: >>> 2019-07-24 Martin Liska * fold-const.c (operand_equal_p): Rename to ...

Re: [PATCH] Properly detect working jobserver in gcc driver.

2019-08-12 Thread Jeff Law
On 8/9/19 7:05 AM, Martin Liška wrote: > On 8/9/19 2:38 PM, Martin Liška wrote: >> On 8/9/19 10:19 AM, Richard Biener wrote: >>> OK with that. I still think that making -flto use a jobserver if detected >>> (but _not_ use the number of CPU cores by default) makes >>> sense as an independent

Re: [PATCH 5/9] Come up with an abstraction.

2019-08-12 Thread Richard Biener
On Mon, Aug 12, 2019 at 1:49 PM Martin Liška wrote: > > On 8/12/19 1:40 PM, Richard Biener wrote: > > On Mon, Aug 12, 2019 at 1:19 PM Martin Liška wrote: > >> > >> On 8/8/19 5:55 PM, Michael Matz wrote: > >>> Hi, > >>> > >>> On Mon, 10 Jun 2019, Martin Liska wrote: > >>> > 2019-07-24

Re: [patch] handle casesi dispatch insns in create_trace_edges

2019-08-12 Thread Olivier Hainque
> On 12 Aug 2019, at 16:48, Jeff Law wrote: >> >> Searching for tablejump related prototypes in rtl.h led to >> declarations for functions in rtlanal.c. Wouldn't that be a >> better place than rtl.c for the new function ? > I think part of the reason I settled on rtl.c was because we're not

Re: [PATCH] Teach mklog to reference PRs.

2019-08-12 Thread Marek Polacek
On Mon, Aug 12, 2019 at 10:27:46AM -0600, Martin Sebor wrote: > FWIW, another feature I find useful that mklog doesn't seem to have > is one that strips the context details from testsuite ChangeLogs. > Hardly anyone bothers to mention the functions, macros, types, or > variables they changed in

Re: [PATCH] Add generic support for "noinit" attribute

2019-08-12 Thread Jozef Lawrynowicz
Hi, On Tue, 30 Jul 2019 15:35:23 +0200 Christophe Lyon wrote: > Hi, > > Thanks for the useful feedback. > > > On Tue, 16 Jul 2019 at 11:54, Richard Sandiford > wrote: > > > > Thanks for doing this in a generic way. > > > > Christophe Lyon writes: > > > @@ -2224,6 +2234,50 @@

types for VR_VARYING

2019-08-12 Thread Aldy Hernandez
This is a fresh re-post of: https://gcc.gnu.org/ml/gcc-patches/2019-07/msg6.html Andrew gave me some feedback a week ago, and I obviously don't remember what it was because I was about to leave on PTO. However, I do remember I addressed his concerns before getting drunk on rum in

[PATCH] PR other/91396 Fix static link error with -fvtable-verify

2019-08-12 Thread Caroline Tice via gcc-patches
Hi, This patch is to fix a bug where linking with -fvtable-verify and -static causes the linker to complain about multiple definitions of things in the vtv_end*.o files (once from the .o file and once from libvtv.a). (See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91396). The fix is for the

Re: [AArch64] Add a "y" constraint for V0-V7

2019-08-12 Thread James Greenhalgh
On Wed, Aug 07, 2019 at 07:19:12PM +0100, Richard Sandiford wrote: > Some indexed SVE FCMLA operations have a 3-bit register field that > requires one of Z0-Z7. This patch adds a public "y" constraint for that. > > The patch also documents "x", which is again intended to be a public >

Re: [EXTERNAL]Re: [PATCH 1/2][MIPS] Emit .note.GNU-stack for soft-float linux targets.

2019-08-12 Thread Dragan Mladjenovic
On 09.08.2019. 23:31, Jeff Law wrote: > On 8/5/19 4:47 AM, Dragan Mladjenovic wrote: >> From: "Dragan Mladjenovic" >> >> gcc/ChangeLog: >> >> 2019-08-05 Dragan Mladjenovic >> >> * config/mips/linux.h (NEED_INDICATE_EXEC_STACK): Define to >> TARGET_SOFT_FLOAT. >> *

[PATCH] PR libstdc++/90361 add missing macro definition

2019-08-12 Thread Jonathan Wakely
The src/c++17/string-inst.cc file needs to override the default string ABI so that it still contains the expected symbols even when the library is configured with --with-default-libstdcxx-abi=gcc4-compatible. PR libstdc++/90361 * src/c++17/string-inst.cc: Use

Re: [AArch64] Make aarch64_classify_vector_mode use a switch statement

2019-08-12 Thread James Greenhalgh
On Wed, Aug 07, 2019 at 07:24:18PM +0100, Richard Sandiford wrote: > aarch64_classify_vector_mode used properties of a mode to test whether > the mode was a single Advanced SIMD vector, a single SVE vector, or a > tuple of SVE vectors. That works well for current trunk and is simpler > than

[patch, fortran] Some corrections for DO loop index warnings

2019-08-12 Thread Thomas Koenig
Hello world, the attached patch fixes three problems with DO loop index warnings: - DO loops in contained procedures were not checked - Zero-trip loops gave a false positive - DO loops in blocks gave the same warning twice plus it fixes the resulting fallout from the test suite.

enforce canonicalization of value_range's

2019-08-12 Thread Aldy Hernandez
This is a ping of: https://gcc.gnu.org/ml/gcc-patches/2019-07/msg8.html I have addressed the comments Jeff mentioned there. This patch goes before the VR_VARYING + types patch, but I can adapt either one to come first.  I can even munge them together into one patch, if it helps review.

Re: [PATCH] Add missing _mm{256,512}_zext* intrinsics (PRs target/83250, target/91340)

2019-08-12 Thread Uros Bizjak
On Mon, Aug 12, 2019 at 4:57 PM Jakub Jelinek wrote: > > Hi! > > The following patch adds 9 missing intrinsics, which are like _mm*_cast*, > but don't leave the upper bits undefined - set them to zero instead. > The implementation uses code that combine manages to optimize well, > the only

Re: [PATCH] Teach mklog to reference PRs.

2019-08-12 Thread Martin Sebor
On 8/2/19 12:04 AM, Martin Liška wrote: On 8/2/19 7:45 AM, Martin Liška wrote: I agree with that approach. I'm sending an example how it would look like for something bigger: $ git diff e8a3be407068bfb9c82f0f6656b30d26cc2f484a~15..e8a3be407068bfb9c82f0f6656b30d26cc2f484a > patch &&

Re: [AArch64] Make the complete mnemonic

2019-08-12 Thread James Greenhalgh
On Wed, Aug 07, 2019 at 08:23:48PM +0100, Richard Sandiford wrote: > The Advanced SIMD and SVE permute patterns both split the permute > operation into a base name and a hilo suffix. That works well, but it > means that for "@" patterns, we need to pass the permute code twice, > once for the base

Re: [PATCH][aarch64] Use neoversen1 tuning struct for -mcpu=cortex-a76

2019-08-12 Thread James Greenhalgh
On Tue, Jul 30, 2019 at 05:59:15PM +0100, Kyrill Tkachov wrote: > Hi all, > > The neoversen1 tuning struct gives better performance on the Cortex-A76, > so use that. > The only difference from the current tuning is the function and label > alignment settings. > > This gives about 1.3%

Re: [PATCH][AArch64] Increase default function alignment

2019-08-12 Thread James Greenhalgh
On Fri, May 31, 2019 at 12:52:32PM +0100, Wilco Dijkstra wrote: > With -mcpu=generic the function alignment is currently 8, however almost all > supported cores prefer 16 or higher, so increase the default to 16:12. > This gives ~0.2% performance increase on SPECINT2017, while codesize is 0.12% >

Re: [PATCH][AArch64] Fix PR81800

2019-08-12 Thread James Greenhalgh
On Tue, May 28, 2019 at 06:11:29PM +0100, Wilco Dijkstra wrote: > PR81800 is about the lrint inline giving spurious FE_INEXACT exceptions. > The previous change for PR81800 didn't fix this: when lrint is disabled > in the backend, the midend will simply use llrint. This actually makes > things

[wwwdocs] Add missing C++20 feature

2019-08-12 Thread Marek Polacek
I missed this one. As a sign of repentance, I'll aim to address it this week. Applying to CVS. Index: cxx-status.html === RCS file: /cvs/gcc/wwwdocs/htdocs/projects/cxx-status.html,v retrieving revision 1.96 diff -u -r1.96

Re: [patch] handle casesi dispatch insns in create_trace_edges

2019-08-12 Thread Olivier Hainque
Hi Jeff, Thanks for your prompt feedback :-) >>* rtl.h (tablejump_casesi_pattern): New helper, casesi >>recognition logic originating from code in cfgrtl.c. >>* cfgrtl.c (patch_jump_insn): Use it. >>* dwarf2cfi.c (create_trace_edges): Handle casesi patterns. > Is

[Patch v2] Enable math functions linking with static library for LTO

2019-08-12 Thread luoxhu
Hi Richard, Thanks for your comments, updated the v2 patch as below: 1. Define and use builtin_with_linkage_p. 2. Add comments. 3. Add a testcase. In LTO mode, if static library and dynamic library contains same function and both libraries are passed as arguments, linker will link the function in

Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.

2019-08-12 Thread Richard Biener
On Fri, Aug 9, 2019 at 3:57 PM Martin Liška wrote: > > Hi. > > The patch is about prevention of LTO section name clashing. > Now we have a situation where body of 2 functions is streamed > into the same ELF section. Then we'll end up with smashed data. > > Patch can bootstrap on x86_64-linux-gnu

Re: [PATCH] Prevent LTO section collision for a symbol name starting with '*'.

2019-08-12 Thread Martin Liška
On 8/12/19 11:45 AM, Richard Biener wrote: > On Fri, Aug 9, 2019 at 3:57 PM Martin Liška wrote: >> >> Hi. >> >> The patch is about prevention of LTO section name clashing. >> Now we have a situation where body of 2 functions is streamed >> into the same ELF section. Then we'll end up with smashed

Re: [PATCH] Properly register dead cgraph_nodes in passes.c.

2019-08-12 Thread Martin Liška
On 8/9/19 4:39 PM, Martin Sebor wrote: > On 8/9/19 6:41 AM, Martin Liška wrote: >> Hi. >> >> The patch prevents crashes caused by fact that do_per_function_toporder >> uses get_uid () to register all dead cgraph_nodes. That does not work >> now as cgraph_nodes are directly released via ggc_free

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-12 Thread Richard Biener
On Mon, Aug 12, 2019 at 8:50 AM luoxhu wrote: > > Hi Richard, > Thanks for your comments, updated the v2 patch as below: > 1. Define and use builtin_with_linkage_p. > 2. Add comments. > 3. Add a testcase. > > In LTO mode, if static library and dynamic library contains same > function and both

[Ada] More precise handling of Size/Object_Size in GNATprove

2019-08-12 Thread Pierre-Marie de Rodat
GNATprove does a partial expansion which did not allow getting the most precise value for attributes Size/Object_Size. Now fixed. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-12 Yannick Moy gcc/ada/ * exp_attr.adb, exp_attr.ads

[Ada] Missing check on outbound parameter of a non-null access type

2019-08-12 Thread Pierre-Marie de Rodat
This patch adds code to generate proper post-call checks when an actual for an in-out or out parameter has a non-null access type. No constraints are applied to an inbound access parameter, but on exit a not-null check must be performed if the type of the actual requires it. Tested on

[Ada] Fix IPv6 numeric address detection

2019-08-12 Thread Pierre-Marie de Rodat
IPv6 numeric address can't have less than 2 colons. It fixes the error when Get_Host_By_Name called with hostname composed by only hexadecimal symbols. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-12 Dmitriy Anisimkov gcc/ada/ * libgnat/g-socket.adb (Is_IPv6_Address):

[Ada] New parameter Quiet for procedure GNAT.Command_Line.Getopt

2019-08-12 Thread Pierre-Marie de Rodat
Getopt procedure is parsing the command line or set of strings. If the command line contains unknown switch than the Getopt prints error message to the console and raises the exception Invalid_Switch. The printing can be inappropriate in some cases. The new parameter Quiet allows avoiding console

[Ada] New aspect/pragma No_Caching for analysis of volatile data

2019-08-12 Thread Pierre-Marie de Rodat
A new aspect/pragma can be attached to volatile variables to indicate that such a variable is not used for interactions with the external world, but only that accesses to that variable should not be optimized by the compiler. This is in particular useful for guarding against fault injection. SPARK

[Ada] Crash on illegal left-hand side in assignment of renamed variable

2019-08-12 Thread Pierre-Marie de Rodat
This patch fixes a crash on an assignment where the left-hand side is a renaming of a function call that does not involve ceiling priorities. This avoids a compiler crash in some cases, and prevents a useless retrieval and compilation of run-time packages. Tested on x86_64-pc-linux-gnu, committed

[Ada] Extended traversal subprograms for GNATprove

2019-08-12 Thread Pierre-Marie de Rodat
GNATprove needs traversal subprograms that do not simply traverse syntactic nodes like Atree.Traverse_Func and Atree.Traverse_Proc, but also traverse semantic nodes which are logically children of the nodes. Now available through Sem_Util.Traverse_More_Func and Sem_Util.Traverse_More_Proc. There

[Ada] Adapt new extended traversal of AST to have optional part

2019-08-12 Thread Pierre-Marie de Rodat
The new extended traversal of the AST for GNATprove use now optionally traverses the ranges under Itypes, based on a formal parameter. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-12 Yannick Moy gcc/ada/ * sem_util.adb, sem_util.ads

[Ada] Fix missing range check for In/Out parameter with -gnatVa

2019-08-12 Thread Pierre-Marie de Rodat
This plugs another small loophole in the front-end which fails to generate a range check for a scalar In/Out parameter when -gnatVa is specified. This also fixes a few more leaks of the Do_Range_Check flag on actual parameters, both in regular and -gnatVa modes, as well as a leak specific to

[Ada] Eliminate redundant range checks on conversions

2019-08-12 Thread Pierre-Marie de Rodat
This gets rid of redundant range checks generated in 5 out of the 9 cases of scalar conversions, i.e. (integer, fixed-point, floating-point) converted to (integer, fixed-point, floating-point). The problem is that the Real_Range_Check routine rewrites the conversion node into a conversion to the

[Ada] Implement Ada.Directories.Hierarchical_File_Names

2019-08-12 Thread Pierre-Marie de Rodat
This patch corrects certain behaviors within Ada.Directories to better conform to conformance tests and implements the package Ada.Directories.Hierarchical_File_Names outlined in AI05-0049-1. Only partial test sources are included. -- Source -- -- main.ads with

[Ada] Prevent crash in Put_Scaled

2019-08-12 Thread Pierre-Marie de Rodat
This patch fixes a bug in Put_Scaled, which causes a crash when checks are on. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-12 Bob Duff gcc/ada/ * libgnat/a-tifiio.adb (Put_Scaled): Prevent AA from being negative, since Field is range 0 .. something.---

[Ada] Inconsistent compile time Constraint_Error warning

2019-08-12 Thread Pierre-Marie de Rodat
This patch corrects several bugs within the compiler which led to inconsistent handling of compile time Constraint_Errors. Notibly, subtype out of range checks which are only out of range of the subtype must be warnings while out of range checks where the value is out of range of the base type

[Ada] Improve error message for Object_Size clause on dynamic array

2019-08-12 Thread Pierre-Marie de Rodat
This makes the compiler issue the same error: size clause not allowed for variable length type for an Object_Size clause on a variable-sized type as for a Size clause, for example on the following procedure: procedure P (X, Y : Integer) is subtype Sub is String (X .. Y) with Object_Size

[Ada] Do not suppress checks in instances of internal generics

2019-08-12 Thread Pierre-Marie de Rodat
This patch removes suppression of checks in nested instances of internal packages. No test. This was inconsistent: only for packages, not for subprograms. Only for nested instantiations, not library level ones. Not for GNAT units. Furthermore, the user should have control via pragma Suppress or

Re: C++ PATCH for c++/91416 - GC during late parsing collects live data

2019-08-12 Thread Richard Biener
On Sun, Aug 11, 2019 at 7:12 PM Marek Polacek wrote: > > This is a crash that points to a GC problem. Consider this test: > > __attribute__ ((unused)) struct S { > S() { } > } s; > > We're parsing a simple-declaration. While parsing the decl specs, we parse > the > attribute, which

[Ada] Prevent crash in Is_Reachable

2019-08-12 Thread Pierre-Marie de Rodat
This patch fixes a bug in Is_Reachable, which causes a crash when checks are on. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-12 Bob Duff gcc/ada/ * libgnat/a-cbmutr.adb (Is_Reachable): Declare Idx to be of the base subtype. Clearly it makes no sense to loop

[Ada] Fix leak of Do_Range_Check flag in -gnatVa mode

2019-08-12 Thread Pierre-Marie de Rodat
This fixes a small glitch in Insert_Valid_Check, which needs to propagate the Do_Range_Check flag onto the rewritten expression, but uses its Original_Node as the source of the copy. Now Original_Node does not necessarily point to the node that was just rewritten, but to the ultimately original

[Ada] Hang on loop in generic with subtype indication specifying a range

2019-08-12 Thread Pierre-Marie de Rodat
The compiler may hang when a for loop expanded in a generic instantiation has a range specified by a subtype indication with an explicit range that has a bound that is an attribute applied to a discriminant-dependent array component. The Parent field of the bound may not be set, which can lead to

[Ada] Suppress_Initialization not respected for private subtypes

2019-08-12 Thread Pierre-Marie de Rodat
The compiler fails to suppress initialization on a variable of a subtype of a private type (such as System.Address) even though the subtype has aspect Suppress_Initialization. This can lead to errors on object declarations specified with Thread_Local_Storage when Initialize_Scalars is applied (as

[Ada] Remove doc for language version switches

2019-08-12 Thread Pierre-Marie de Rodat
Remove documentation for Ada language version switches, and note that they are no longer needed. These tools now silently ignore such switches, and process the file correctly no matter what version of Ada is used. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-12 Bob Duff

[Ada] Fix internal error on comparison of unaligned slices

2019-08-12 Thread Pierre-Marie de Rodat
This fixes an internal error in the code generator when it is trying to take the address of a slice which does not start on a byte boundary, in order to generate a comparison between slices with a dynamic length. This case is not supported by the code generator and comes from an explicit

[Ada] Add special bypass for obsolete code pattern

2019-08-12 Thread Pierre-Marie de Rodat
This change prevents the analysis phase of the front-end from setting the Do_Range_Check flag in the very peculiar case of the source of a conversion whose result is passed by reference to a "valued procedure", because the expansion phase would not be able to generate the check. This pattern

[Ada] Fix incorrect Do_Range_Check on type conversion

2019-08-12 Thread Pierre-Marie de Rodat
This gets rid of another leak of the Do_Range_Check flag to the back-end which is specific to expression functions. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-08-12 Eric Botcazou gcc/ada/ * checks.adb (Activate_Range_Check): Remove redundant

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-12 Thread luoxhu
On 2019/8/13 10:22, luoxhu wrote: diff --git a/gcc/testsuite/gcc.dg/pr91287.c b/gcc/testsuite/gcc.dg/pr91287.c new file mode 100644 index 000..c816e0537aa --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr91287.c @@ -0,0 +1,40 @@ +/* { dg-do assemble } */ +/* { dg-options "-O2" } */ You

[PATCH] PR fortran/87993 -- An array can have a kind type inquiry suffix

2019-08-12 Thread Steve Kargl
The attached patch ahs been regression tested on x86_64-*-freebsd. It probably borders on obvious, but I'll ask away. OK to commit? 2019-08-12 Steven G. Kargl PR fortran/87993 * expr.c (gfc_simplify_expr): Simplifcation of an array with a kind type inquiry suffix

Re: [Patch v2] Enable math functions linking with static library for LTO

2019-08-12 Thread luoxhu
Hi Richard, On 2019/8/12 16:51, Richard Biener wrote: On Mon, Aug 12, 2019 at 8:50 AM luoxhu wrote: Hi Richard, Thanks for your comments, updated the v2 patch as below: 1. Define and use builtin_with_linkage_p. 2. Add comments. 3. Add a testcase. In LTO mode, if static library and dynamic

[PATCH, i386]: Add missing *mmx_pinsr{q,d} patterns

2019-08-12 Thread Uros Bizjak
We can implement these for TARGET_MMX_WITH_SSE and TARGET_SSE4_1. 2019-08-13 Uroš Bizjak * config/i386/i386.md (ix86_expand_vector_set) : Use vec_merge path for TARGET_MMX_WITH_SSE && TARGET_SSE4_1. : Ditto. * config/i386/mmx.md (*mmx_pinsrd): New insn pattern.

Re: [PATCH] Improve DSE to handle redundant zero initializations.

2019-08-12 Thread Marek Polacek
I have no comments on the patch itself, but... On Mon, Aug 12, 2019 at 04:14:40PM -0400, Matthew Beliveau wrote: > 2019-08-12 Matthew Beliveau > > PR c++/DSE.patch Please drop this. > * tree-ssa-dse.c (dse_optimize_redundant_stores): Improved check to > catch more

Re: [PATCH] PR other/91396 Fix static link error with -fvtable-verify

2019-08-12 Thread Caroline Tice via gcc-patches
The bootstrap succeeded. On Mon, Aug 12, 2019 at 11:51 AM Caroline Tice wrote: > > Hi, > > This patch is to fix a bug where linking with -fvtable-verify and > -static causes the linker to complain about multiple definitions of > things in the vtv_end*.o files (once from the .o file and once

[PATCH] PR fortran/89647 -- Allow host associated procedure to be a binding target

2019-08-12 Thread Steve Kargl
The attached patch fixes PR fortran/89647, and has been regression tested on x86_64-*-freebsd. If a procedure is made accessible by host association, the that procedure can be used as binding target. During the resolution of a type bound procedure, gfortran needs to check the parent namespace

Re: [PATCH] Improve DSE to handle redundant zero initializations.

2019-08-12 Thread Jeff Law
On 8/12/19 2:14 PM, Matthew Beliveau wrote: > This patch improves DSE to handle missing optimizations for zero > initializations. > > Thank you, > Matthew Beliveau > > > DSE.patch > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2019-08-12 Matthew Beliveau > > PR

Re: enforce canonicalization of value_range's

2019-08-12 Thread Jeff Law
On 8/12/19 12:48 PM, Aldy Hernandez wrote: > This is a ping of: > > https://gcc.gnu.org/ml/gcc-patches/2019-07/msg8.html > > I have addressed the comments Jeff mentioned there. > > This patch goes before the VR_VARYING + types patch, but I can adapt > either one to come first.  I can even

Re: [PATCH] fix and improve strlen conditional handling of merged stores (PR 91183, 91294, 91315)

2019-08-12 Thread Jeff Law
On 8/9/19 5:42 PM, Martin Sebor wrote: >>> @@ -3408,7 +3457,13 @@ static bool >>>   } >>>       gimple *stmt = SSA_NAME_DEF_STMT (exp); >>> -  if (gimple_code (stmt) != GIMPLE_PHI) >>> +  if (gimple_assign_single_p (stmt)) >>> +    { >>> +  tree rhs = gimple_assign_rhs1 (stmt);

Re: [PATCH] PR fortran/91414: Improved PRNG

2019-08-12 Thread Steve Kargl
On Sun, Aug 11, 2019 at 12:37:49PM +0300, Janne Blomqvist wrote: > Update the PRNG from xorshift1024* to xoshiro256** by the same > author. For details see > > http://prng.di.unimi.it/ > > and the paper at > > https://arxiv.org/abs/1805.01407 > > Also the seeding is slightly improved, by

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-12 Thread Martin Sebor
On 8/12/19 2:04 PM, Jeff Law wrote: On 8/9/19 4:14 PM, Martin Sebor wrote: On 8/9/19 10:58 AM, Jakub Jelinek wrote: On Fri, Aug 09, 2019 at 10:51:09AM -0600, Martin Sebor wrote: That said, we should change this code one way or the other. There is even less of a guarantee that other compilers

Re: [PATCH] Teach mklog to reference PRs.

2019-08-12 Thread Pedro Alves
On 8/12/19 8:34 PM, Pedro Alves wrote: > Let me share my 2c -- the format GDB uses doesn't affect most GCC forks I meant most GCC folks. Thanks, Pedro Alves

Re: [C++ PATCH] Adjust -Wsequence-point for C++17 changes (PR c++/91415)

2019-08-12 Thread Jeff Law
On 8/12/19 8:48 AM, Jakub Jelinek wrote: > Hi! > > The following patch adds some tweaks for -Wsequence-point warning for C++17 > and later. In particular, stop warning about no sequence point in between > <<, >>, ., -> and [] expressions, where E1 is in C++17 sequenced before E2. > >

Re: [MSP430][PATCH 1/2] Consolidate handling of hard-coded MCU data

2019-08-12 Thread Jeff Law
On 8/8/19 6:14 AM, Jozef Lawrynowicz wrote: > This patch improves the handling of MCU data by consolidating multiple > copies of hard-coded MCU data into a single location, and adds a new function > to be used as a single entry point for the extraction of MCU data for the > selected MCU. > > This

Re: [PATCH] fixincludes breaks mingw64 build

2019-08-12 Thread Gerald Pfeifer
On Tue, 11 Jun 2019, Bruce Korb wrote: > I should probably update the e-address as well. Yes, I still receive > gnu.org email, but not daily. As infrequent as monthly. Can I do > something to auto-forward it to an e-address I process daily? You can log in to fencepost.gnu.org and edit

Re: [PATCH] Teach mklog to reference PRs.

2019-08-12 Thread Pedro Alves
On 8/1/19 4:01 PM, Jakub Jelinek wrote: > You can easily tweak the script to handle the other way too. > Looking around, different people have different style, some people don't > post the date/name/email lines at all, others do, some people post them > multiple times, once for each ChangeLog,

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-12 Thread Jeff Law
On 8/9/19 4:14 PM, Martin Sebor wrote: > On 8/9/19 10:58 AM, Jakub Jelinek wrote: >> On Fri, Aug 09, 2019 at 10:51:09AM -0600, Martin Sebor wrote: >>> That said, we should change this code one way or the other. >>> There is even less of a guarantee that other compilers support >>> writing past the

[PATCH] Improve DSE to handle redundant zero initializations.

2019-08-12 Thread Matthew Beliveau
This patch improves DSE to handle missing optimizations for zero initializations. Thank you, Matthew Beliveau Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-08-12 Matthew Beliveau PR c++/DSE.patch * tree-ssa-dse.c (dse_optimize_redundant_stores): Improved check to catch more

Re: [MSP430][PATCH 2/2] Read MCU data from external file

2019-08-12 Thread Jeff Law
On 8/8/19 6:17 AM, Jozef Lawrynowicz wrote: > This patch extends the MCU data handling so that MCU data can be provided > in an external file (devices.csv). This means the compiler doesn't have to be > updated and rebuilt to support new devices when they are released. > > TI distribute

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-12 Thread Jeff Law
On 8/12/19 4:17 PM, Martin Sebor wrote: > On 8/12/19 2:04 PM, Jeff Law wrote: >> On 8/9/19 4:14 PM, Martin Sebor wrote: >>> On 8/9/19 10:58 AM, Jakub Jelinek wrote: On Fri, Aug 09, 2019 at 10:51:09AM -0600, Martin Sebor wrote: > That said, we should change this code one way or the other.

Re: [patch, fortran] Some corrections for DO loop index warnings

2019-08-12 Thread Steve Kargl
On Mon, Aug 12, 2019 at 05:18:18PM +0200, Thomas Koenig wrote: > Hello world, > > the attached patch fixes three problems with DO loop index warnings: > > - DO loops in contained procedures were not checked > > - Zero-trip loops gave a false positive > > - DO loops in blocks gave the same

Re: [Patch, DWARF] Ignore address spaces for get_nearest_type_subqualifiers

2019-08-12 Thread Jeff Law
On 8/6/19 1:58 AM, senthilkumar.selva...@microchip.com wrote: > Hi, > > r254484 explicitly added previously ignored address space > qualifiers, when > emitting DWARF dies for types. > > Adding address spaces to cv_qual_mask, however, breaks > nearest_type_subqualifier, which uses the

Patch to support extended characters in C/C++ identifiers

2019-08-12 Thread Lewis Hyatt
Hello- The attached patch for libcpp adds support for extended characters (e.g. UTF-8) in identifiers. A preliminary version of the patch was posted on PR c/67224 as Comment 26 (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67224#c26) and discussed with Joseph Myers. Here is an updated patch

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-08-12 Thread Jeff Law
On 8/9/19 10:17 AM, Martin Sebor wrote: > GCC 9 optimizes a subset of expression of the form > (0 == strcmp(a, b)) based on the length and/or size of > the arguments but it doesn't take advantage of all > the opportunities there.  For example in the following, > although it folds the first test to 

Re: types for VR_VARYING

2019-08-12 Thread Jeff Law
On 8/12/19 12:43 PM, Aldy Hernandez wrote: > This is a fresh re-post of: > > https://gcc.gnu.org/ml/gcc-patches/2019-07/msg6.html > > Andrew gave me some feedback a week ago, and I obviously don't remember > what it was because I was about to leave on PTO.  However, I do remember > I