[PATCH] Fix regex_replace

2018-01-12 Thread Tim Shen via gcc-patches
This fixes PR 83601. Tested on x86_64-linux-gnu. -- Regards, Tim Shen commit 01a85ea3ae77acc7ad03430a6982db1b2b8c8bc3 Author: Tim Shen Date: Fri Jan 12 22:22:45 2018 -0800 PR libstdc++/83601 * include/bits/regex.tcc (regex_replace): Fix escaping

Re: [PATCH v4] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-12 Thread Boris Kolpackov
Joseph Myers writes: > Contrary to a previous review, you should *not* be removing RejectNegative > from -fdebug-prefix-map=, and should be including it on both the new > options. [...] > > The patch is OK with that fixed. Thanks for finding the time to review this

RE: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Kumar, Venkataramanan
Hi All, > -Original Message- > From: H.J. Lu [mailto:hjl.to...@gmail.com] > Sent: Saturday, January 13, 2018 1:11 AM > To: Kumar, Venkataramanan > Cc: Nagarajan, Muthu kumar raj ; > GCC Patches ;

Re: [PATCH] PR libstdc++/80276 fix pretty printers for array smart pointers

2018-01-12 Thread Jonathan Wakely
On 13/01/18 00:29 +, Jonathan Wakely wrote: Secondly, std::experimental::optional no longer omits the fundamentals_v1 inline namespace ... but then it didn't work properly anyway because it displayed as "std::experimental::optional<\1>". So arguably it's better to have no type printer than

Re: [PATCH] PR libstdc++/80276 fix pretty printers for array smart pointers

2018-01-12 Thread Jonathan Wakely
On 09/01/18 21:51 +, Jonathan Wakely wrote: This fixes unique_ptr so it doesn't print as unique_ptr, and fixes a problem in the type-printers that can result in a gdb.error exception (see https://sourceware.org/PR22686). PR libstdc++/80276 *

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 06:08:55PM +0100, Jakub Jelinek wrote: > It is true that in my log file I don't have any cases where in C > it was first TREE_CONSTANT and turned into is_gimple_constant, but that > doesn't mean it isn't possible. > > Looking at a random testcase, it is > #0

Re: [RFC][PATCH] PR preprocessor/83173: Additional check before decrementing highest_location

2018-01-12 Thread David Malcolm
On Fri, 2017-12-01 at 17:57 -0500, Mike Gulick wrote: > I've come up with some patches that fix PR preprocessor/83173, which > I reported > a couple of weeks ago. > > The first patch is a test case. The second and third patches are two > versions > of the fix. The first version is simpler, but

Re: [PATCH PR82096] Fix ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi

2018-01-12 Thread Jeff Law
On 01/12/2018 01:45 AM, Christophe Lyon wrote: > Hi, > > On 11 January 2018 at 11:58, Sudakshina Das wrote: >> Hi Jeff >> >> >> On 10/01/18 21:08, Jeff Law wrote: >>> >>> On 01/10/2018 09:25 AM, Sudakshina Das wrote: Hi Jeff On 10/01/18 10:44, Sudakshina Das

Re: [PATCH] RTEMS: Add GCC Runtime Library Exception

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Jeff Law wrote: > > What is the status of this PR > > > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61152 > > > > now? Can it be closed with a notice that this must be decided file by file? > Seems reasonable with a note that it needs to be decided file by file. And the

Re: Use poly_int tree accessors

2018-01-12 Thread Jeff Law
On 01/12/2018 06:31 AM, Richard Sandiford wrote: > Richard Sandiford writes: >> Jeff Law writes: >>> On 01/09/2018 11:39 AM, Richard Sandiford wrote: This patch generalises various places that used hwi tree accessors so that they can

Re: [PATCH] RTEMS: Add GCC Runtime Library Exception

2018-01-12 Thread Jeff Law
On 12/21/2017 11:59 PM, Sebastian Huber wrote: > On 21/12/17 05:58, Jeff Law wrote: >> On 08/22/2017 11:15 PM, Sebastian Huber wrote: >>> Hello Jeff, >>> >>> On 03/08/17 07:11, Sebastian Huber wrote: On 02/08/17 21:30, Jeff Law wrote: > On 07/24/2017 12:03 AM, Sebastian Huber wrote:

Re: [PATCH][Middle-end][version 2]2nd patch of PR78809 and PR83026

2018-01-12 Thread Jeff Law
On 12/21/2017 02:25 PM, Qing Zhao wrote: > Hi, > > I updated my patch based on all your comments. > > the major changes are the following: > > 1. replace the candidate calls with __builtin_str(n)cmp_eq instead of > __builtin_memcmp_eq; > in builtins.c, when expanding the

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-12 Thread Bill Schmidt
Hi Richard and Jeff, Sorry I missed this earlier today, it somehow ended up in my spam folder... > On Jan 12, 2018, at 10:08 AM, Richard Earnshaw (lists) > wrote: > > On 10/01/18 23:26, Jeff Law wrote: >> On 01/08/2018 09:01 AM, Bill Schmidt wrote: >>> On Jan 8,

[PATCH, rs6000] Add -msafe-indirect-jumps option and implement safe bctrl

2018-01-12 Thread Bill Schmidt
Hi, This patch adds a new option for the compiler to produce only "safe" indirect jumps, in the sense that these jumps are deliberately mispredicted to inhibit speculative execution. For now, this option is undocumented; this may change at some future date. It is intended eventually for the

Re: [PATCH] Introduce -fwrapp and make -fno-strict-overflow imply it (PR middle-end/82694)

2018-01-12 Thread Marc Glisse
On Fri, 12 Jan 2018, Jakub Jelinek wrote: Apparently Linux kernel contains various UB code that has been worked around through -fno-strict-overflow in 7.x and before, but when POINTER_TYPE_OVERFLOW_UNDEFINED has been removed it now fails to boot. The following patch follows the comments in the

[PATCH] C++: Fix ICE in warn_for_memset within templates (PR c++/83814)

2018-01-12 Thread David Malcolm
PR c++/83814 reports an ICE introduced by the location wrapper patch (r256448), affecting certain memset calls within templates. The issue occurs when fold_for_warn is called on the arguments to the memset before they've been type-checked, leading to e.g. this assertion failing within

Re: [PATCH] fold strlen of constant aggregates (PR 83693)

2018-01-12 Thread Martin Sebor
Ping in advance of stage 3 closing: https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00680.html (As the majority of the strlen issues I raised recently, this one also came out of my testing of the -Wrray-bounds and -Wrestrict warnings newly enhanced in GCC 8.) On 01/09/2018 02:41 PM, Martin

[PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-01-12 Thread Martin Sebor
A failure in a test for the recently enhanced -Warray-bounds warning exposed an unnecessarily broad restriction in the strlen pass that prevents it from tracking the length of a member string of locally defined and initialized struct: void f (void) { struct { char s[8]; int i } a = {

Re: [PATCH] Fix altivec-cell-2.C test regression (PR c++/83778)

2018-01-12 Thread Segher Boessenkool
On Fri, Jan 12, 2018 at 09:23:49PM +0100, Jakub Jelinek wrote: > After the addition of location wrappers the > targetm.resolve_overloaded_builtin target hook is called with parameters > that may have those location wrappers in it. Seems generic code has been > changed to fold_for_warn fold it

Re: [committed] Fix float128-hw7.c testcase

2018-01-12 Thread Segher Boessenkool
On Fri, Jan 12, 2018 at 09:20:50PM +0100, Jakub Jelinek wrote: > On Fri, Dec 29, 2017 at 12:35:03AM -0500, Michael Meissner wrote: > > +/* { dg-final { scan-assembler-times {\mxsabsqp\M} 1 } } */ > > +/* { dg-final { scan-assembler-not {\mxsnabsqp\M} 1 } } */ > > +/* { dg-final {

[PATCH, rs6000] Support for gimple folding of mergeh, mergel intrinsics

2018-01-12 Thread Will Schmidt
Hi, Add support for gimple folding of the mergeh, mergel intrinsics. Since the merge low and merge high variants are almost identical, a new helper function has been added so that code can be shared. This also adds define_insn for xxmrghw, xxmrglw instructions, allowing us to generate xxmrglw

Re: [PATCH, rs6000] Generate lvx and stvx without swaps for aligned vector loads and stores

2018-01-12 Thread Segher Boessenkool
On Fri, Jan 12, 2018 at 01:55:26PM -0600, Kelvin Nilsen wrote: > On Power 7 and Power 8 little endian, the code generator has been > emitting two instructions for each vector load and each vector store. > One instruction does a swapping load or store, and the second > instruction does an

[PATCH 2/2] Fix unstable sort

2018-01-12 Thread lists
From: Cory Fields 2018-01-12 Cory Fields * tree-ira.c (allocno_hard_regs_compare): stabilize sort --- gcc/ChangeLog | 3 +++ gcc/ira-color.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 1/2] Fix unstable sort

2018-01-12 Thread lists
From: Cory Fields 2018-01-12 Cory Fields * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): stabilize sort --- gcc/ChangeLog | 3 +++ gcc/tree-ssa-loop-im.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-)

[PATCH 0/2] Fix unstable sorts affecting codegen

2018-01-12 Thread lists
From: Cory Fields Related to PR82407. These two unstable sorts caused bootstrap comparison failures when crossing from glibc to musl. I'm not 100% sure about the correctness of the fixes, but I can verify that when applied, bootstrap is successful. Cory Fields (2): Fix

Re: [PING 5] Ability to remap file names in __FILE__, etc (PR other/70268)

2018-01-12 Thread Joseph Myers
On Tue, 9 Jan 2018, Boris Kolpackov wrote: > Hi, > > Looks like this is the last chance for this patch to make GCC 8 > so I would like to ping it one last time: > > https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01451.html Contrary to a previous review, you should *not* be removing

[PATCH] Introduce -fwrapp and make -fno-strict-overflow imply it (PR middle-end/82694)

2018-01-12 Thread Jakub Jelinek
Hi! Apparently Linux kernel contains various UB code that has been worked around through -fno-strict-overflow in 7.x and before, but when POINTER_TYPE_OVERFLOW_UNDEFINED has been removed it now fails to boot. The following patch follows the comments in the PR, essentially reverts Bin's removal

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Janne Blomqvist wrote: > (I don't know why HOST_WIDE_INT_PRINT_DEC doesn't work with the > diagnostics machinery on darwin, but IMHO at this point it's too late HOST_WIDE_INT_PRINT_DEC is a host-specific printf format; for example, it might use %I64d on Windows host or %lld

[PATCH] Fix altivec-cell-2.C test regression (PR c++/83778)

2018-01-12 Thread Jakub Jelinek
Hi! After the addition of location wrappers the targetm.resolve_overloaded_builtin target hook is called with parameters that may have those location wrappers in it. Seems generic code has been changed to fold_for_warn fold it away when looking for something that should be e.g. INTEGER_CST.

[committed] Fix float128-hw7.c testcase

2018-01-12 Thread Jakub Jelinek
On Fri, Dec 29, 2017 at 12:35:03AM -0500, Michael Meissner wrote: > * gcc.target/powerpc/float128-hw7.c: Likewise. > --- gcc/testsuite/gcc.target/powerpc/float128-hw7.c (nonexistent) > +++ gcc/testsuite/gcc.target/powerpc/float128-hw7.c (working copy) > @@ -0,0 +1,27 @@ > +/* { dg-do

Re: [PATCH, rs6000] pr58684, pr83759 Disable test cases that fail on powerpc64.

2018-01-12 Thread Bill Seurer
On 01/12/2018 11:23 AM, Segher Boessenkool wrote: On Thu, Jan 11, 2018 at 01:36:53PM -0600, Bill Seurer wrote: [PATCH, rs6000] pr58684, pr83759 Disable test cases that fail on powerpc64. This patch disables a few test cases on powerpc64 that fail after r256380 due to a longstanding issue with

Re: Patch ping (Re: [PATCH] Small regrename improvement)

2018-01-12 Thread Eric Botcazou
> > Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? > > > > 2018-01-04 Jakub Jelinek > > > > * regrename.c (regrename_do_replace): If replacing the same > > reg multiple times, try to reuse last created gen_raw_REG. > > I'd like to ping this

Re: [PATCH] PR 78534, 83704 Large character lengths

2018-01-12 Thread Janne Blomqvist
On Wed, Jan 10, 2018 at 3:35 PM, Dominique d'Humières wrote: > Hi Janne, > > With this patch, bootstrap fails with > > ../../work/gcc/fortran/array.c: In function 'bool > gfc_resolve_character_array_constructor(gfc_expr*)': > ../../work/gcc/fortran/array.c:2062:36:

[PATCH, rs6000] Generate lvx and stvx without swaps for aligned vector loads and stores

2018-01-12 Thread Kelvin Nilsen
On Power 7 and Power 8 little endian, the code generator has been emitting two instructions for each vector load and each vector store. One instruction does a swapping load or store, and the second instruction does an in-register swap. This patch replaces the two-instruction sequences with a

Re: [PATCH] rs6000: Remove -mstring

2018-01-12 Thread David Edelsohn
On Fri, Jan 12, 2018 at 11:22 AM, Segher Boessenkool wrote: > -mstring is only enabled by default on 601, and with -Os on some > configurations. It is almost always slower (than not using it) and > does not very often lead to smaller code. > > This patch disables it.

Re: [C++ Patch] PR 78344 ("ICE on invalid c++ code (tree check: expected tree_list, have error_mark in cp_check_const_attributes, at cp/decl2.c:1347")

2018-01-12 Thread Paolo Carlini
Hi, On 12/01/2018 19:13, Jason Merrill wrote: Hmm, I think dropping the attributes is reasonable for grokdeclarator to do as error-recovery, similarly to how it discards an ill-formed exception-specification. But let's assert seen_error() in that case. Agreed. The below passes testing.

Re: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread H.J. Lu
On Fri, Jan 12, 2018 at 10:27 AM, Kumar, Venkataramanan wrote: > Hi HJ, > >> -Original Message- >> From: Kumar, Venkataramanan >> Sent: Friday, January 12, 2018 8:39 PM >> To: 'H.J. Lu' ; 'Martin Jambor' >> Cc:

C++ PATCH for c++/83186, ICE with static_cast and list-init

2018-01-12 Thread Jason Merrill
If we're going to try to do normal semantic checking of static_cast in a template, we need to use build_non_dependent_expr like we do for function calls. Tested x86_64-pc-linux-gnu, applying to trunk. commit 4d7e6ada4e9f1c83d59b0e83d7e554ddae5cb3a8 Author: Jason Merrill Date:

[PR c++/83160] local ref to capture

2018-01-12 Thread Nathan Sidwell
Jason, this fixes 83160, where we complain about not having an lvalue in things like: void foo () { const int a = 0; [] () { const int = a; // here }; } The problem is that we in convert_like_real we have ref_bind->identity conversions, and the identity conversion calls

RE: [PATCH] RL78 UNUSED note setting bug fix in rl78_note_reg_set

2018-01-12 Thread Sebastian Perta
Hi DJ, >>Do you have checkin privs yet? I have filled out the form. "Thanks for your request. It must be approved by the person you named as approver ... >> This is ok aside from.. Sorry about this. I will keep this in mind in future. I corrected the patch with your second suggestion. Best

[PATCH] [MSP430] PR79242: Implement Complex Partial Integers

2018-01-12 Thread Jozef Lawrynowicz
Complex Partial Integers are unimplemented, resulting in an ICE when attempting to use them. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79242 This results in GCC7/8 for msp430-elf failing to build. typedef _Complex __int20 C; C foo (C x, C y) { return x + y; } (Thanks Jakub -

[C++ PATCH] some reformatting

2018-01-12 Thread Nathan Sidwell
In working on pr83160 I came across some code to cleanup 1) name mark_rvalue_use's final parm to remind us what it is 2) fix poor line breaking in convert_like_real 3) move mark_lvalue_use{,_nonread) close to their friend mark_rvalue_use applying to trunk. nathan -- Nathan Sidwell 2018-01-12

Re: [PATCH][ARM] Fix test fail with conflicting -mfloat-abi

2018-01-12 Thread Christophe Lyon
Le 12 janv. 2018 15:26, "Sudakshina Das" a écrit : Hi This patch fixes my earlier test case that fails for arm-none-eabi with explicit user option for -mfloat-abi which conflict with the test case options. I have added a guard to skip the test on those cases. @Christophe:

RE: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Kumar, Venkataramanan
Hi HJ, > -Original Message- > From: Kumar, Venkataramanan > Sent: Friday, January 12, 2018 8:39 PM > To: 'H.J. Lu' ; 'Martin Jambor' > Cc: Nagarajan, Muthu kumar raj ; > 'GCC Patches' ; 'Jeff

Patch ping (Re: [PATCH] Small regrename improvement)

2018-01-12 Thread Jakub Jelinek
On Thu, Jan 04, 2018 at 10:31:16PM +0100, Jakub Jelinek wrote: > While debugging PR target/83554, I first thought the bug is that > regrename creates a new raw REG each time and when the insn uses > match_dup that it would be a problem. > > While that is not the case, for match_dup we actually

Re: [C++ Patch] PR 78344 ("ICE on invalid c++ code (tree check: expected tree_list, have error_mark in cp_check_const_attributes, at cp/decl2.c:1347")

2018-01-12 Thread Jason Merrill
On Thu, Jan 11, 2018 at 5:11 PM, Paolo Carlini wrote: > On 11/01/2018 21:33, Jason Merrill wrote: >> On 01/10/2018 06:50 PM, Paolo Carlini wrote: >>> >>> thus the below is a rather "dull" solution at the level of >>> cplus_decl_attributes itself:

Re: [PATCH] RL78 UNUSED note setting bug fix in rl78_note_reg_set

2018-01-12 Thread DJ Delorie
"Sebastian Perta" writes: > Please let me know if this is OK. Thank you! Do you have checkin privs yet? This is ok aside from.. > + /* 'dead' keeps track of the QImode registers if r is of different size > + we need to check the other subparts as well */

Re: [PATCH 4/4] x86: Add 'V' register operand modifier

2018-01-12 Thread H.J. Lu
On Fri, Jan 12, 2018 at 10:00 AM, Jan Hubicka wrote: >> Add 'V', a special modifier which prints the name of the full integer >> register without '%'. For >> >> extern void (*func_p) (void); >> >> void >> foo (void) >> { >> asm ("call __x86_indirect_thunk_%V0" : : "a"

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

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Wilco Dijkstra wrote: > I've updated the patch to exclude pre-C99 C/C++/ObjC: Another question to consider: what about configurations (mostly soft-float) where floating-point exceptions are not supported? (glibc wrongly defines math_errhandling to include MATH_ERREXCEPT

[PATCH] RL78 UNUSED note setting bug fix in rl78_note_reg_set

2018-01-12 Thread Sebastian Perta
Hello, The below patch fixes 31 regression failures (28 for C and 3 for C++, see below) plus the problem discovered here https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00688.html by DJ. Tested with the following command: make -k check-gcc RUNTESTFLAGS=--target_board=rl78-sim List of previous

Re: [PATCH 4/4] x86: Add 'V' register operand modifier

2018-01-12 Thread Jan Hubicka
> Add 'V', a special modifier which prints the name of the full integer > register without '%'. For > > extern void (*func_p) (void); > > void > foo (void) > { > asm ("call __x86_indirect_thunk_%V0" : : "a" (func_p)); > } > > it generates: > > foo: > movqfunc_p(%rip), %rax >

Re: [PATCH 1/5] x86: Add -mindirect-branch=

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 10:57:08AM -0700, Jeff Law wrote: > On 01/11/2018 04:07 PM, Jakub Jelinek wrote: > > On Thu, Jan 11, 2018 at 03:46:51PM -0700, Jeff Law wrote: > >> Note I'm expecting Uros to chime in. So please do not consider this > >> ack'd until you hear from Uros. > >> > >> At a high

Re: [PATCH 3/4] x86: Add -mindirect-branch-register

2018-01-12 Thread Jan Hubicka
> Add -mindirect-branch-register to force indirect branch via register. > This is implemented by disabling patterns of indirect branch via memory, > similar to TARGET_X32. > > -mindirect-branch= and -mfunction-return= tests are updated with > -mno-indirect-branch-register to avoid false test

Re: [PATCH, r3], Add optional IEEE/IBM long double multilib support

2018-01-12 Thread Segher Boessenkool
Hi! On Fri, Jan 12, 2018 at 01:46:27AM -0500, Michael Meissner wrote: > This is my current multilib version support for migrating PowerPC servers from > using IBM extended double as the long double type to IEEE 128-bit floating > point. > > I have built both little endian and big endian PowerPC

Re: [PATCH 1/5] x86: Add -mindirect-branch=

2018-01-12 Thread Jeff Law
On 01/11/2018 04:07 PM, Jakub Jelinek wrote: > On Thu, Jan 11, 2018 at 03:46:51PM -0700, Jeff Law wrote: >> Note I'm expecting Uros to chime in. So please do not consider this >> ack'd until you hear from Uros. >> >> At a high level is there really that much value in having thunks in the >>

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Torvald Riegel wrote: > Another option might be to require a minimum glibc version on Linux, and > build libstdc++ for that. That would yield a minimum kernel version as > well, and we may can make use of other things in return such as syscall > wrappers. A minimum glibc

Re: PR81703 and Martin's fix for PR83501

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 10:38:39AM -0700, Jeff Law wrote: > >>> Thanks for pointing it out.  I see it there as well with > >>> Prathamesh's test case, though not with the test case in > >>> bug 83543.  It is the same root cause in both.  I agree > >>> that enhancing the strlen pass to handle this

Re: [PATCH 2/4] x86: Add -mfunction-return=

2018-01-12 Thread Jan Hubicka
> Add -mfunction-return= option to convert function return to call and > return thunks. The default is 'keep', which keeps function return > unmodified. 'thunk' converts function return to call and return thunk. > 'thunk-inline' converts function return to inlined call and return thunk. >

Re: [PATCH, r3], Add optional IEEE/IBM long double multilib support

2018-01-12 Thread Segher Boessenkool
On Fri, Jan 12, 2018 at 07:23:37AM -0500, Michael Meissner wrote: > Of course it would be helpful, if I included the patch: Yup :-) > 2018-01-12 Michael Meissner > > * config.gcc (powerpc*-linux*-*): Add support for 64-bit little > endian Linux

Re: [PATCH 1/4] x86: Add -mindirect-branch=

2018-01-12 Thread Jan Hubicka
> gcc/ > > * config/i386/i386-opts.h (indirect_branch): New. > * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise. > * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone > with local indirect jump when converting indirect call and jump. >

Re: Link with correct values-*.o files on Solaris (PR target/40411)

2018-01-12 Thread Joseph Myers
On Fri, 12 Jan 2018, Rainer Orth wrote: > At the same time, I had a new look at when values-Xc.o is used by the > Studio compilers. It selects strict ISO C mode in a couple of cases, > and the latest Studio 12.6 cc, which is about to do away with the > previous -Xc option which enabled that mode

[committed, PR83737] Set use_gcc_stdint=wrap for nvptx

2018-01-12 Thread Tom de Vries
Hi, atm, for nvptx we have the following failure: ... FAIL: gcc.dg/stdint-width-1.c (test for excess errors) ... In more detail: ... gcc/testsuite/gcc.dg/stdint-width-1.c:20:4: error: #error "missing INT8_WIDTH" ... The test fails because newlib's stdint.h lacks TS 18661-1 support. The test

Re: PR81703 and Martin's fix for PR83501

2018-01-12 Thread Jeff Law
On 01/12/2018 09:23 AM, Martin Sebor wrote: > On 01/11/2018 11:44 PM, Prathamesh Kulkarni wrote: >> On 12 January 2018 at 06:15, Martin Sebor wrote: >>> On 01/11/2018 02:48 PM, Rainer Orth wrote: Hi Martin, >> I am not sure why constant string is not emitted

[PATCH v2] Fix failure building LLVM with location wrapper nodes (PR c++/83799)

2018-01-12 Thread David Malcolm
On Fri, 2018-01-12 at 09:07 +0100, Markus Trippelsdorf wrote: > On 2018.01.11 at 18:21 -0500, David Malcolm wrote: > > diff --git a/gcc/testsuite/g++.dg/wrappers/pr83799.C > > b/gcc/testsuite/g++.dg/wrappers/pr83799.C > > new file mode 100644 > > index 000..f93c0ae > > --- /dev/null > > +++

Re: [PATCH] Add PowerPC configuration option --with-long-double-format={ibm,ieee}

2018-01-12 Thread Segher Boessenkool
On Thu, Jan 11, 2018 at 05:35:59PM -0500, Michael Meissner wrote: > On Wed, Jan 10, 2018 at 11:48:30PM +, Joseph Myers wrote: > > On Wed, 10 Jan 2018, Michael Meissner wrote: > > > > > This patch is next in my series of patches to enable us to configure the > > > long > > > double type on

Re: [PATCH, rs6000] pr58684, pr83759 Disable test cases that fail on powerpc64.

2018-01-12 Thread Segher Boessenkool
On Thu, Jan 11, 2018 at 01:36:53PM -0600, Bill Seurer wrote: > [PATCH, rs6000] pr58684, pr83759 Disable test cases that fail on powerpc64. > > This patch disables a few test cases on powerpc64 that fail after r256380 > due to a longstanding issue with floating-point compares. > > See

Re: [PATCH], Set PowerPC .gnu_attribute for long double use if no call

2018-01-12 Thread Segher Boessenkool
On Thu, Jan 11, 2018 at 01:11:05PM -0500, Michael Meissner wrote: > In working on the transition of PowerPC long double from using the IBM > extended > double format to IEEE 128-bit floating point, I noticed that the long double > .gnu_attribute (#4) was not set if the compiler can handle long

patch to fix PR80481

2018-01-12 Thread Vladimir Makarov
  The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80481    During forming an allocation thread in a multi-region function a conflict allocno was added to the thread and that resulted in generation of additional moves.  The patch prevents inclusion of conflict allocnos

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 05:45:15PM +0100, Richard Biener wrote: > >In a few C testcases the cases with TREE_CONSTANT before gimplify_expr > >are > >stuff like: > >extern void dynreplace_trampoline(void); > >extern void dynreplace_trampoline_endlabel(void); > >int dynreplace_add_trampoline(void) >

Re: [PATCH] i386: Align stack frame if argument is passed on stack

2018-01-12 Thread Uros Bizjak
On Thu, Jan 11, 2018 at 10:17 PM, H.J. Lu wrote: > On Thu, Jan 11, 2018 at 11:07 AM, Uros Bizjak wrote: >> On Wed, Jan 10, 2018 at 9:40 PM, H.J. Lu wrote: >>> When a function call is removed, it may become a leaf function. But if

[PATCH, alpha]: Work around PR83628, performance regression when accessing arrays on alpha

2018-01-12 Thread Uros Bizjak
Hello! It turns out that without ashlsi3 named pattern combine pass won't simplify subregs in: (set (reg:SI 74) (plus:SI (subreg:SI (ashift:DI (reg:DI 17 $17 [ b ]) (const_int 2 [0x2])) 0) (reg:SI 16 $16 [ a ]))) Attached patch adds relevant insn-and-split patterns

Re: [PATCH] Workaround for a GDB bug for -flto -freorder-blocks-and-partition -g (PR debug/81155)

2018-01-12 Thread Richard Biener
On January 12, 2018 4:52:27 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >The LTO debug changes create a DW_TAG_subprogram in main in one spot >and >a small DW_TAG_subprogram that has DW_AT_abstract_origin to that + >DW_AT_ranges when doing hot/cold partitioning. Unfortunately,

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Richard Biener
On January 12, 2018 4:47:41 PM GMT+01:00, Jakub Jelinek wrote: >On Fri, Jan 12, 2018 at 10:25:30AM +0100, Richard Biener wrote: >> On Fri, 12 Jan 2018, Jakub Jelinek wrote: >> >> > On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote: >> > > Or another workaround

Re: Add support for masked load/store_lanes

2018-01-12 Thread Richard Sandiford
Sorry, just realised this wasn't ACKed Jeff Law writes: > On 11/17/2017 02:36 AM, Richard Sandiford wrote: >> Richard Sandiford writes: >>> This patch adds support for vectorising groups of IFN_MASK_LOADs >>> and IFN_MASK_STOREs using conditional

Re: PR81703 and Martin's fix for PR83501

2018-01-12 Thread Martin Sebor
On 01/11/2018 11:44 PM, Prathamesh Kulkarni wrote: On 12 January 2018 at 06:15, Martin Sebor wrote: On 01/11/2018 02:48 PM, Rainer Orth wrote: Hi Martin, I am not sure why constant string is not emitted for arm-linux-gnueabihf ? As far as this issue is concerned, should I

[PATCH] rs6000: Remove -mstring

2018-01-12 Thread Segher Boessenkool
-mstring is only enabled by default on 601, and with -Os on some configurations. It is almost always slower (than not using it) and does not very often lead to smaller code. This patch disables it. If a user uses -mstring he gets a warning (but not with -mno-string). I left the target

[PATCH] x86: Disallow -mindirect-branch=/-mfunction-return= with -mshstk

2018-01-12 Thread H.J. Lu
On Thu, Jan 11, 2018 at 3:00 PM, H.J. Lu wrote: > On Thu, Jan 11, 2018 at 2:46 PM, Jeff Law wrote: >> Do you want to mention that CET and retpolines are inherently > > I will document it. > >> incompatible? Should an attempt to use them together generate a

Re: [PATCH 1/3] [builtins] Generic support for __builtin_load_no_speculate()

2018-01-12 Thread Richard Earnshaw (lists)
On 10/01/18 23:26, Jeff Law wrote: > On 01/08/2018 09:01 AM, Bill Schmidt wrote: >> On Jan 8, 2018, at 8:06 AM, Richard Earnshaw (lists) >> wrote: >>> >>> On 08/01/18 02:20, Bill Schmidt wrote: Hi Richard, Unfortunately, I don't see any way that this will

[C PATCH] Outside of initializers partially restore c_fully_fold 7.x behavior (PR c/83801)

2018-01-12 Thread Jakub Jelinek
Hi! In 7.x and earlier, decl_constant_value_for_optimization punted if the initializer has ARRAY_TYPE or BLKmode type, and the following patch shows that is reasonable thing to do, otherwise we might grab very large initializers out of constant variable initializers and if e.g. ARRAY_REF on it

Re: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Jeff Law
On 01/12/2018 07:05 AM, H.J. Lu wrote: > On Fri, Jan 12, 2018 at 4:38 AM, Martin Jambor wrote: >> Hi, >> >> On Thu, Jan 11 2018, Jeff Law wrote: >>> On 01/07/2018 03:59 PM, H.J. Lu wrote: Add -mindirect-branch-loop= option to control loop filler in call and return

Re: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Jeff Law
On 01/12/2018 08:09 AM, Kumar, Venkataramanan wrote: > Hi all, > >> -Original Message- >> From: Kumar, Venkataramanan >> Sent: Friday, January 12, 2018 8:16 PM >> To: 'H.J. Lu' ; Martin Jambor >> Cc: Nagarajan, Muthu kumar raj

[PATCH] Workaround for a GDB bug for -flto -freorder-blocks-and-partition -g (PR debug/81155)

2018-01-12 Thread Jakub Jelinek
Hi! The LTO debug changes create a DW_TAG_subprogram in main in one spot and a small DW_TAG_subprogram that has DW_AT_abstract_origin to that + DW_AT_ranges when doing hot/cold partitioning. Unfortunately, it seems GDB in that case doesn't read the DIE in the initial debug info read, as

Re: [PATCH] Fix up handling of not really variable VLAs (PR libgomp/83590)

2018-01-12 Thread Jakub Jelinek
On Fri, Jan 12, 2018 at 10:25:30AM +0100, Richard Biener wrote: > On Fri, 12 Jan 2018, Jakub Jelinek wrote: > > > On Fri, Jan 12, 2018 at 09:16:35AM +0100, Richard Biener wrote: > > > Or another workaround would be to make sure non-constant sizepos > > > stay non-constant by doing sth like the

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

2018-01-12 Thread Wilco Dijkstra
Joseph Myers wrote:   > No existing glibc version defines math_errhandling based on > __NO_MATH_ERRNO__.  I'd expect such a change to come with a glibc patch, > and indeed a GCC execution test of the value of math_errhandling to make > sure the compiler's behavior isn't contradicting what's

Re: [3/4] [AArch64] SVE tests

2018-01-12 Thread Richard Sandiford
James Greenhalgh writes: > On Sat, Jan 06, 2018 at 07:13:22PM +, Richard Sandiford wrote: >> James Greenhalgh writes: >> > On Fri, Nov 03, 2017 at 05:50:54PM +, Richard Sandiford wrote: >> >> This patch adds gcc.target/aarch64 tests for

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-12 Thread H.J. Lu
On Fri, Jan 12, 2018 at 6:50 AM, Jan Hubicka wrote: >> On Fri, Jan 12, 2018 at 12:01 AM, Uros Bizjak wrote: >> > On Thu, Jan 11, 2018 at 2:28 PM, H.J. Lu wrote: >> > >> >> Hi Uros, >> >> >> >> Can you take a look at my x86 backend changes

RE: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Kumar, Venkataramanan
Hi all, > -Original Message- > From: Kumar, Venkataramanan > Sent: Friday, January 12, 2018 8:16 PM > To: 'H.J. Lu' ; Martin Jambor > Cc: Nagarajan, Muthu kumar raj ; > GCC Patches ; Jeff Law

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-12 Thread Jan Hubicka
> On Fri, Jan 12, 2018 at 12:01 AM, Uros Bizjak wrote: > > On Thu, Jan 11, 2018 at 2:28 PM, H.J. Lu wrote: > > > >> Hi Uros, > >> > >> Can you take a look at my x86 backend changes so that they are ready > >> to check in once we have consensus. > > > >

Re: [PATCH 2/5] libstdc++ futex: Use FUTEX_CLOCK_REALTIME for wait

2018-01-12 Thread Jonathan Wakely
On 12/01/18 14:18 +0100, Torvald Riegel wrote: On Tue, 2018-01-09 at 17:54 +, Mike Crowe wrote: On Tuesday 09 January 2018 at 13:50:54 +, Jonathan Wakely wrote: > On 07/01/18 20:55 +, Mike Crowe wrote: > > The futex system call supports waiting for an absolute time if > >

RE: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread Kumar, Venkataramanan
Hi all, > -Original Message- > From: H.J. Lu [mailto:hjl.to...@gmail.com] > Sent: Friday, January 12, 2018 7:36 PM > To: Martin Jambor > Cc: Nagarajan, Muthu kumar raj ; > Kumar, Venkataramanan ; GCC >

[PATCH][ARM] Fix test fail with conflicting -mfloat-abi

2018-01-12 Thread Sudakshina Das
Hi This patch fixes my earlier test case that fails for arm-none-eabi with explicit user option for -mfloat-abi which conflict with the test case options. I have added a guard to skip the test on those cases. @Christophe: Sorry about this. I think this should fix the test case. Can you please

Re: Handle polynomial DR_INIT

2018-01-12 Thread Richard Biener
On Fri, Jan 12, 2018 at 2:47 PM, Richard Sandiford wrote: > The idea with the main 107-patch poly_int series (latterly 109-patch) > was to change the mode sizes and vector element counts to poly_int and > then propagate those changes as far as they needed to go to

Re: [PATCH 2/5] x86: Add -mindirect-branch-loop=

2018-01-12 Thread H.J. Lu
On Fri, Jan 12, 2018 at 4:38 AM, Martin Jambor wrote: > Hi, > > On Thu, Jan 11 2018, Jeff Law wrote: >> On 01/07/2018 03:59 PM, H.J. Lu wrote: >>> Add -mindirect-branch-loop= option to control loop filler in call and >>> return thunks generated by -mindirect-branch=. 'lfence'

Re: Handle poly_int vector sizes in get_vec_alignment_for_array_type

2018-01-12 Thread Richard Biener
On Fri, Jan 12, 2018 at 2:34 PM, Richard Sandiford wrote: > get_vectype_for_scalar_type returns a variable-length vector type > for SVE, whereas get_vec_alignment_for_array_type assumed it would > always be an INTEGER_CST. > > This is needed to build

Re: Allow variable-sized temporary variables in gimplify.c

2018-01-12 Thread Richard Biener
On Fri, Jan 12, 2018 at 2:33 PM, Richard Sandiford wrote: > This is needed to build libgfortran for SVE. The OpenMP code needs > to create temporary vector variables, and the variables will therefore > be variable-sized for SVE. Earlier patches made such variables

Handle polynomial DR_INIT

2018-01-12 Thread Richard Sandiford
The idea with the main 107-patch poly_int series (latterly 109-patch) was to change the mode sizes and vector element counts to poly_int and then propagate those changes as far as they needed to go to fix build failures from incompatible types. This means that DR_INIT is now constructed as a

Re: [testsuite, i386] Guard against incomplete AVX512F support in Solaris as

2018-01-12 Thread Uros Bizjak
On Fri, Jan 12, 2018 at 1:58 PM, Rainer Orth wrote: > Recent versions of the Solaris/x86 assembler do support AVX512F, but > there are a couple of bugs: it chokes on > > vaddsd {rn-sae}, %xmm2, %xmm0, %xmm0 > vaddsd {rn-sae}, %xmm0, %xmm1,

Handle poly_int vector sizes in get_vec_alignment_for_array_type

2018-01-12 Thread Richard Sandiford
get_vectype_for_scalar_type returns a variable-length vector type for SVE, whereas get_vec_alignment_for_array_type assumed it would always be an INTEGER_CST. This is needed to build libstdc++-v3/src/closures.cc for SVE (and probably many other places besides -- this was just the first hit).

Allow variable-sized temporary variables in gimplify.c

2018-01-12 Thread Richard Sandiford
This is needed to build libgfortran for SVE. The OpenMP code needs to create temporary vector variables, and the variables will therefore be variable-sized for SVE. Earlier patches made such variables work. Tested on aarch64-linux-gnu, x86_64-linux-gnu and powerpc64le-linux-gnu. Also tested by

Re: Use poly_int tree accessors

2018-01-12 Thread Richard Sandiford
Richard Sandiford writes: > Jeff Law writes: >> On 01/09/2018 11:39 AM, Richard Sandiford wrote: >>> This patch generalises various places that used hwi tree accessors >>> so that they can handle poly_ints instead. Earlier patches did >>> this

  1   2   >