Re: [PATCH] Fix test-suite fallout of default -Wreturn-type.

2017-11-19 Thread Thomas Schwinge
Hi! On Wed, 18 Oct 2017 14:48:13 +0200, Martin Liška wrote: > This is second patch that addresses test-suite fallout. All these tests fail > because -Wreturn-type is > now on by default. > > Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. ... but

Fix PR82849 (ICE in modulo scheduling)

2017-11-19 Thread Jan Hubicka
Hi, my understanding of the code is that trip_count is trying to estimate number of iterations when counts are available and disable modulo scheduler for loops with too few iterations. We now have get_estimated_loop_iterations_int and get_max_loop_iterations_int which keeps information detected

Re: Hurd port for gcc-7 go PATCH 1-3(15)

2017-11-19 Thread Samuel Thibault
Hello, Svante Signell, on lun. 06 nov. 2017 16:36:39 +0100, wrote: > Another issue is that /proc/self/exe has to return an absolute path for the > built program go-7 to execute properly. This is solved by a pending patch for > glibc in Debian and will be available in the next upload of

Re: [PATCH][RFC] Instrument function exit with __builtin_unreachable in C++.

2017-11-19 Thread Thomas Schwinge
Hi! After r254437 "Instrument function exit with __builtin_unreachable in C++" (assuming that I bisected that correctly), I'm seeing a number of C++ "ifunc" test cases regress from PASS to UNSUPPORTED. This is because of: ifunc_available29518.c: In function 'void (* g())()':

Re: [PATCH] detect nonstring arguments to string functions (PR 82945)

2017-11-19 Thread Martin Sebor
On 11/16/2017 05:15 PM, Jeff Law wrote: On 11/13/2017 06:21 PM, Martin Sebor wrote: Attached is an improved version that rather than hardcoding the built-in functions to check uses the constness of each built-in's char* argument as a trigger to do the checking. This avoids the problem of the

Re: [PATCH] detect nonstring arguments to string functions (PR 82945)

2017-11-19 Thread Martin Sebor
On 11/16/2017 05:15 PM, Jeff Law wrote: On 11/13/2017 06:21 PM, Martin Sebor wrote: Attached is an improved version that rather than hardcoding the built-in functions to check uses the constness of each built-in's char* argument as a trigger to do the checking. This avoids the problem of the

Re: [GCC][PATCH][AArch64] Add negative tests for dotprod and set minimum version to v8.2 in the target bit.

2017-11-19 Thread Tamar Christina
The 11/17/2017 22:06, James Greenhalgh wrote: > On Tue, Nov 14, 2017 at 03:54:56PM +, Tamar Christina wrote: > > Hi All, > > > > Dot Product is intended to only be available for Armv8.2-a and newer. > > While this restriction is reflected in the intrinsics, the patterns > > themselves were

Re: [RFC][PATCH. CSE. rs6000] Update CSE to handle involutory operations

2017-11-19 Thread Jeff Law
On 11/18/2017 10:47 AM, Peter Bergner wrote: > On 11/18/17 12:16 AM, Jeff Law wrote: >> You might wander a bit and see if/how cse handles other similar >> circumstances. For example (not (not (x)) (neg (neg x)) and (bswap >> (bswap (x)) > > I actually tried examples like that to see what CSE

Re: [PATCH] detect nonstring arguments to string functions (PR 82945)

2017-11-19 Thread Jeff Law
On 11/19/2017 10:06 AM, Martin Sebor wrote: >>> +/* If EXPR refers to a character array or pointer declared attribute >>> +   nonstring return a decl for that array or pointer and set *REF to >>> +   the referenced enclosing object or pointer.  Otherwise returns >>> +   null.  */ >> Generally

[patch, libgfortran] Bug 78549 - [7/8 Regression] Very slow formatted internal file output

2017-11-19 Thread Jerry DeLisle
Hi all, After the usual considerable digging around I determined that for the test case doing 100 writes to a string that we were allocating 100 newunit numbers and the associated unit structures on the unit treap. Consequently, at the end of the program, when all left open units are

Fix pasto in to_sreal_scale

2017-11-19 Thread Jan Hubicka
Hi, this patch fixes ICE with -fno-guess-branch-probability. Bootstrapped/regtested x86_64-linux, comitted. Honza PR ipa/83001 * profile-count.c (profile_count::to_sreal_scale): Fix return value for uninitialied counts. Index: profile-count.c

Avoid ICE in PR82713

2017-11-19 Thread Jan Hubicka
Hi, this patch implements Richi's suggestion to not ICE when vectorization costmodel is asked for cost of vector load/store that is not of vector type. Bootstrapped/regtsted x86_64-linux, comitted. PR target/82713 * i386.c (ix86_builtin_vectorization_cost): Be ready for insane

Make asm statement to cost at least 1 insn

2017-11-19 Thread Jan Hubicka
Hi, this patch avoids degeneration of inliner for function containing empty volatile asm statement. Bootstrapped/regtested x86_64-linux, comitted. PR ipa/60243 * tree-inline.c (estimate_num_insns): Set to 1 at least. Index: ../../gcc/tree-inline.c

Fix PR81360

2017-11-19 Thread Jan Hubicka
Hi, this testcase triggers ICE because we try to inline into -O0 function. Fixed thus. Bootstrapped/regtested x86_64-linux, comitted. Honza * gcc.c-torture/compile/pr81360.c: New testcase. * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized Index:

[committed][PATCH] Fix bogus propagation in DOM

2017-11-19 Thread Jeff Law
On my local branch gcc.dg/torture/pr56349.c fails by sending GCC into an infinite loop trying to simplify a self-referring statement. ie something like x_1 = x_1 + 10; That, of course, shouldn't be happening in SSA form. After some digging I've found the culprit. Let's say we've got a PHI.

Re: VRP: x+1 and -x cannot be INT_MIN

2017-11-19 Thread Jeff Law
On 11/19/2017 03:41 AM, Marc Glisse wrote: > On Mon, 13 Nov 2017, Richard Biener wrote: > >> On Sat, Nov 11, 2017 at 11:03 PM, Marc Glisse >> wrote: >>> Hello, >>> >>> with undefined overflow, just because we know nothing about one of the >>> arguments of an addition

Re: [PATCH] Use bswap framework in store-merging (PR tree-optimization/78821)

2017-11-19 Thread Jakub Jelinek
On Fri, Nov 17, 2017 at 09:45:35AM +, Thomas Preudhomme wrote: > > Bootstrapped/regtested on {x86_64,i686,powerpc64le,powerpc64}-linux, ok for > > trunk? > > > > The cases this patch can handle are less common than rhs_code INTEGER_CST > > (stores of constants to adjacent memory) or MEM_REF

Re: [PATCH] detect nonstring arguments to string functions (PR 82945)

2017-11-19 Thread Martin Sebor
I have seen it in the early IL but this late I couldn't come up with a test case where such a loop would be necessary. The COMPONENT_REF always refers to the member array. If you can show me an example to test with I'll add the handling if possible. There are cases where it isn't, such as in

Re: [PATCH] detect nonstring arguments to string functions (PR 82945)

2017-11-19 Thread Martin Sebor
On 11/17/2017 12:47 AM, Jakub Jelinek wrote: On Thu, Nov 16, 2017 at 05:15:20PM -0700, Jeff Law wrote: + tree_code code = gimple_assign_rhs_code (def); + if (code == ADDR_EXPR + || code == COMPONENT_REF + || code == VAR_DECL) +

[Ada] Fix PR ada/83016

2017-11-19 Thread Eric Botcazou
This gets rid of the warning about the unrecognized option -nostdinc++ passed to gnat1 during the build of the gnattools. Tested on x86_64-suse-linux, applied on the mainline. 2017-11-20 Eric Botcazou PR ada/83016 * gnatlink.adb (Process_Args): Accept

Re: [Patch, fortran] PR78990 [5/6/7 Regression] ICE when assigning polymorphic array function result

2017-11-19 Thread Paul Richard Thomas
Dear Dominique, Committed to trunk as revision 254936. Thanks for picking up the problem and for redoing the testing. Regards Paul

[patch, fortran] Implement maxloc and minloc for character

2017-11-19 Thread Thomas Koenig
Hello world, the attached patch implements maxloc and minloc, a missing feature / bug (now that we are shooting for f2003 compliance). I decided to do everything on the library side, since I am more familiar with that territory. I also suspect that any performance gain from inlining will be less

Re: [PATCH] handle non-constant offsets in -Wstringop-overflow (PR 77608)

2017-11-19 Thread Jeff Law
On 11/18/2017 09:47 AM, Martin Sebor wrote: > On 11/18/2017 12:53 AM, Jeff Law wrote: >> On 11/17/2017 12:36 PM, Martin Sebor wrote: >>> The attached patch enhances -Wstringop-overflow to detect more >>> instances of buffer overflow at compile time by handling non- >>> constant offsets into the

Re: PING Fwd: [patch] implement generic debug() for vectors and hash sets

2017-11-19 Thread Jeff Law
On 10/23/2017 03:44 AM, Aldy Hernandez wrote: > > > >  Forwarded Message  > Subject: [patch] implement generic debug() for vectors and hash sets > Date: Mon, 16 Oct 2017 09:52:51 -0400 > From: Aldy Hernandez  > To: gcc-patches  > > We 

Re: [PING][PATCH][compare-elim] Fix PR rtl-optimization/82597

2017-11-19 Thread Jeff Law
On 10/25/2017 11:54 PM, Michael Collison wrote: > Ping. Original patch posted here: > > https://gcc.gnu.org/ml/gcc-patches/2017-10/msg01317.html Is this still needed or was it addressed by the patch Jakub checked in here: 2017-11-01 Jakub Jelinek PR

Re: [PATCH, alpha] Move linux-specific specfile definitions to linux.h

2017-11-19 Thread Jeff Law
On 10/24/2017 07:26 PM, co...@sdf.org wrote: > On Fri, Oct 13, 2017 at 11:13:52AM -0600, Jeff Law wrote: >> So we can't depend on patches that OpenBSD applies. What's important is >> what is in the official GCC sources. >> >> I'd like to see some discussion about what these macros should look

[visium, committed] Remove semicolon after ASM_OUTPUT_CASE_END

2017-11-19 Thread Tom de Vries
Hi, this patch removes a semicolon after ASM_OUTPUT_CASE_END. This allows the macro to be used in if-then-elses without curly braces. Build visium-unknown-elf. Committed as obvious. Thanks, - Tom [visium] Remove semicolon after ASM_OUTPUT_CASE_END 2017-11-14 Tom de Vries

Re: Increase precision of static profiles

2017-11-19 Thread Tom de Vries
On 11/17/2017 08:53 PM, Jan Hubicka wrote: Hi, this patch makes static profile to be in range 0...2^30 rather than 0...1. This is safe now as profile-counts are taking care of possible overflow when the profile ends up cummulating too high after inlining. MThere are two testcases that needs

[arc] Remove semicolon after do while (0) in FUNCTION_PROFILER

2017-11-19 Thread Tom de Vries
Hi, this patch removes a semicolon after "do while (0)" in FUNCTION_PROFILER. This allows the macro to be used in if-then-elses without curly braces. Build arc-unkown-elf as far as that goes atm (fails somewhere in libgcc). Committed as trivial. Thanks, - Tom [arc] Remove semicolon after

Re: [Patch, fortran] PR78990 [5/6/7 Regression] ICE when assigning polymorphic array function result

2017-11-19 Thread Dominique d'Humières
Looks good to me (as in "pass all my tests"). Thanks, Dominique > Le 18 nov. 2017 à 14:02, Paul Richard Thomas > a écrit : > > Dear Dominique, > > Please find attached a revised patch that I believe fixes the problem > that you found. The changes are the

[mcore, committed] Remove semicolon after do {} while (0) in MCORE_EXPORT_NAME

2017-11-19 Thread Tom de Vries
Hi, this patch removes a semicolon after "do {} while (0)" in MCORE_EXPORT_NAME. This allows the macro to be used in if-then-elses without curly braces. Did mcore-unknown-elf build. Committed as obvious. Thanks, - Tom [mcore] Remove semicolon after do {} while (0) in MCORE_EXPORT_NAME

[phoenix, committed] Remove semicolon after do {} while (0) in TARGET_OS_CPP_BUILTINS

2017-11-19 Thread Tom de Vries
Hi, this patch removes a semicolon after "do {} while (0)" in TARGET_OS_CPP_BUILTINS. This allows the macro to be used in if-then-elses without curly braces. Build arm-unknown-phoenix. Committed as obvious. Thanks, - Tom [phoenix] Remove semicolon after do {} while (0) in

[libgcc, alpha, vms] Remove semicolon after do {} while (0) in UPDATE_FS_FOR_CFA_GR

2017-11-19 Thread Tom de Vries
Hi, this patch removes a semicolon after "do {} while (0)" in UPDATE_FS_FOR_CFA_GR. This allows the macro to be used in if-then-elses without curly braces. I don't manage to build alpha-dec-vms far enough to trigger this patch. Can somebody with a proper setup build and test this patch, or

Re: [PR c++/82836] Fixe testcase

2017-11-19 Thread Rainer Orth
Hi Nathan, > The 82836 testcase fell out of creduce. In c++17 mode it fails horribly > with missing return errors. > > Applying this fix, so it's valid in c++17. It still ICEs (in both 14 and > 17 modes) with the 82836 fix removed. unfortunately, the testcase has several more problems: * It

Re: VRP: x+1 and -x cannot be INT_MIN

2017-11-19 Thread Marc Glisse
On Mon, 13 Nov 2017, Richard Biener wrote: On Sat, Nov 11, 2017 at 11:03 PM, Marc Glisse wrote: Hello, with undefined overflow, just because we know nothing about one of the arguments of an addition doesn't mean we can't say something about the result. We could

[ft32, spu, committed] Remove semicolon after do {} while (0) in REGISTER_TARGET_PRAGMAS

2017-11-19 Thread Tom de Vries
Hi, this patch removes a semicolon after "do {} while (0)" in REGISTER_TARGET_PRAGMAS. This allows the macro to be used in if-then-elses without curly braces. Build for spu-unknown-elf. Committed as obvious. Thanks, - Tom [ft32, spu] Remove semicolon after do {} while (0) in

Re: [vms, committed] Add missing vmsdbgout_early_finish

2017-11-19 Thread Richard Biener
On November 19, 2017 1:09:48 AM GMT+01:00, Tom de Vries wrote: >Hi, > >atm, any build for vms os will fail early in libgcc. > >dwarf2_debug_hooks.early_finish needs to be called before >dwarf2_debug_hooks.finish. > >However, while vmsdbgout_finish calls

Re: [patches] Re: [PATCH] RISC-V: Implement __umulsidi3, umul_ppmm and __muluw3

2017-11-19 Thread Jakub Jelinek
On Sun, Nov 19, 2017 at 08:53:00PM -0800, Jim Wilson wrote: > > 2017-11-24 Kito Cheng > > > > * longlong.h [__riscv] (__umulsidi3): Define. > > [__riscv] (umul_ppmm) Likewise. > > [__riscv] (__muluw3) Likewise. BTW, two colons missing after )

Re: [PATCH] make canonicalize_condition keep its promise

2017-11-19 Thread Jeff Law
On 11/15/2017 08:40 AM, Aaron Sawdey wrote: > So, the story of this very small patch starts with me adding patterns > for ppc instructions bdz[tf] and bdnz[tf] such as this: > > [(set (pc) > (if_then_else > (and >(ne (match_operand:P 1 "register_operand" "c,*b,*b,*b")

Re: [RFTesting] New POINTER_DIFF_EXPR

2017-11-19 Thread Marc Glisse
Hello, new version, regtested on powerpc64le-unknown-linux-gnu. The front-end parts are up for review. 2017-10-28 Marc Glisse gcc/c/ * c-fold.c (c_fully_fold_internal): Handle POINTER_DIFF_EXPR. * c-typeck.c (pointer_diff): Use POINTER_DIFF_EXPR.

Re: [PATCH] Factor out division by squares and remove division around comparisons (2/2)

2017-11-19 Thread Jeff Law
On 09/06/2017 03:55 AM, Jackson Woodruff wrote: > Hi all, > > A minor improvement came to mind while updating other parts of this patch. > > I've updated a testcase to make it more clear and a condition now uses a > call to is_division_by rather than manually checking those conditions. > >

Re: [patches] Re: [PATCH] RISC-V: Implement __umulsidi3, umul_ppmm and __muluw3

2017-11-19 Thread Jim Wilson
On Sun, Nov 19, 2017 at 7:34 PM, Kito Cheng wrote: > > I prefer write more comment in the code instead of ChangeLog, I add > more comment in __muluw3. > btw, long times ago, Vladimir was told me[1] it should contain what is > done but not why it is done? Yes, the ChangeLog

Re: [PING][PATCH][compare-elim] Fix PR rtl-optimization/82597

2017-11-19 Thread Michael Collison
Hi Jeff, No longer needed. Jakub's patch does the job. Michael Collison > On Nov 19, 2017, at 3:50 PM, Jeff Law wrote: > >> On 10/25/2017 11:54 PM, Michael Collison wrote: >> Ping. Original patch posted here: >> >> https://gcc.gnu.org/ml/gcc-patches/2017-10/msg01317.html >

Re: std::advance istreambuf_iterator overload

2017-11-19 Thread François Dumont
Here is the latest version I plan to commit after validation. I'd like to keep the change to the money_get/get/[char/wchar_t]/9.cc tests. At the moment those tests passes only because there is no operation on the is iterator (like a check for eof). If we add any, internal _M_buf will be

[C++ PATCH] Fix constexpr VEC_COND_EXPR handling (PR c++/82781)

2017-11-19 Thread Jakub Jelinek
Hi! VEC_COND_EXPR is handled in constexpr code like COND_EXPR, but that is wrong. VEC_COND_EXPR is more like an arbitrary arithmetics ternary operation, we need to compute all 3 arguments and based on the elements of the first argument pick up elements of 2nd and 3rd arguments. The COND_EXPR

Re: Fix PR81360

2017-11-19 Thread Jakub Jelinek
On Sun, Nov 19, 2017 at 09:06:19PM +0100, Jan Hubicka wrote: > Hi, > this testcase triggers ICE because we try to inline into -O0 function. > Fixed thus. > > Bootstrapped/regtested x86_64-linux, comitted. > > Honza > > * gcc.c-torture/compile/pr81360.c: New testcase. > *

Patch ping

2017-11-19 Thread Jakub Jelinek
Hi! I'd like to ping the following patches: http://gcc.gnu.org/ml/gcc-patches/2017-10/msg01895.html PR debug/82718 Fix DWARF5 .debug_loclist handling with hot/cold partitioning http://gcc.gnu.org/ml/gcc-patches/2017-11/msg00851.html C++2A P0428R2 - familiar template syntax for generic

Re: Add support for adjusting the number of units in a mode

2017-11-19 Thread Jeff Law
On 11/09/2017 04:08 AM, Richard Sandiford wrote: > Jeff Law writes: >> On 10/25/2017 09:57 AM, Richard Sandiford wrote: >>> We already allow the target to change the size and alignment of a mode. >>> This patch does the same thing for the number of units, which is needed >>> to

Re: Use extract_bit_field_as_subreg for vectors

2017-11-19 Thread Jeff Law
On 11/03/2017 10:37 AM, Richard Sandiford wrote: > extract_bit_field_1 tries to use vec_extract to extract part of a > vector. However, if that pattern isn't defined or if the operands > aren't suitable, another good approach is to try a direct subreg > reference. This is particularly useful for

Re: [patch] Do not report non-executed blocks in Ada coverage

2017-11-19 Thread Jeff Law
On 11/03/2017 05:51 AM, Eric Botcazou wrote: > Hi, > > as explained in > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg00105.html > we don't (necessarily) want to report non-executed blocks in Ada. > > The couple of attached patches prevent this from happening by detecting > whether we are

Re: [PATCH] handle non-constant offsets in -Wstringop-overflow (PR 77608)

2017-11-19 Thread Martin Sebor
On 11/18/2017 12:53 AM, Jeff Law wrote: On 11/17/2017 12:36 PM, Martin Sebor wrote: The attached patch enhances -Wstringop-overflow to detect more instances of buffer overflow at compile time by handling non- constant offsets into the destination object that are known to be in some range. The

Re: Allow the number of iterations to be smaller than VF

2017-11-19 Thread Jeff Law
On 11/17/2017 08:11 AM, Richard Sandiford wrote: > Fully-masked loops can be profitable even if the iteration > count is smaller than the vectorisation factor. In this case > we're effectively doing a complete unroll followed by SLP. > > The documentation for min-vect-loop-bound says that the >

Re: [patches] Re: [PATCH] RISC-V: Implement __umulsidi3, umul_ppmm and __muluw3

2017-11-19 Thread Kito Cheng
>> 2017-11-17 Kito Cheng >> >> * longlong.h [__riscv] (__umulsidi3): Define. >> [__riscv] (umul_ppmm) Likewise. >> [__riscv] (__muluw3) Likewise. > > > Apparently the point of this is that by defining __mulsi3/__muldi3 as an > extended asm, we

Re: [3/4] load/store_lanes testsuite markup

2017-11-19 Thread Jeff Law
On 11/08/2017 08:14 AM, Richard Sandiford wrote: > Supporting load/store lanes for variable-length vectors means that > we use them instead of SLP (for which we can't yet handle external > and constant definitions -- fixed by a later patch). Previously > we'd fail to use load/store lanes too and

Re: Add optabs for common types of permutation

2017-11-19 Thread Jeff Law
On 11/09/2017 06:24 AM, Richard Sandiford wrote: > ...so that we can use them for variable-length vectors. For now > constant-length vectors continue to use VEC_PERM_EXPR and the > vec_perm_const optab even for cases that the new optabs could > handle. > > The vector optabs are inconsistent

Re: [PATCH] Fix bug in simplify_ternary_operation

2017-11-19 Thread Jeff Law
Sorry, it's taken so long to get back to this patch... On 09/01/2017 02:51 AM, Tom de Vries wrote: > On 08/31/2017 11:44 PM, Jeff Law wrote: >> On 08/28/2017 12:26 PM, Tom de Vries wrote: >>> Hi, >>> >>> I think I found a bug in r17465: >>> ...     * cse.c (simplify_ternary_operation):