Re: [PATCH v3][PR lto/79061] Fix LTO plus ASAN fails with "AddressSanitizer: initialization-order-fiasco".

2017-01-31 Thread Richard Biener
On Mon, Jan 30, 2017 at 4:26 PM, Jakub Jelinek wrote: > On Mon, Jan 30, 2017 at 04:14:40PM +0100, Richard Biener wrote: >> > as was figured out in PR, using DECL_NAME (TRANSLATION_UNIT_DECL) does not >> > always give us a correct module name in LTO mode because e.g. DECL_CONTEXT >> > of >> > some

Re: [PR tree-optimization/71691] Fix unswitching in presence of maybe-undef SSA_NAMEs (take 2)

2017-01-31 Thread Richard Biener
On Mon, Jan 30, 2017 at 6:19 PM, Aldy Hernandez wrote: > On 01/30/2017 10:03 AM, Richard Biener wrote: >> >> On Fri, Jan 27, 2017 at 12:20 PM, Aldy Hernandez wrote: >>> >>> On 01/26/2017 07:29 AM, Richard Biener wrote: On Thu, Jan 26, 2017 at 1:04 PM, Aldy Hernandez wrote: >>

Re: [PATCH] Fix ICEs with power8 fixuns_truncdi2 patterns (PR target/79197)

2017-01-31 Thread Jakub Jelinek
On Mon, Jan 30, 2017 at 06:43:09PM -0600, Segher Boessenkool wrote: > Hi Jakub, Mike, > > On Mon, Jan 30, 2017 at 10:27:15PM +0100, Jakub Jelinek wrote: > > Accoring to make mddump generated tmp-mddump.md, on powerpc the only pattern > > with unsigned_fix:DI where the inner operand is SF or DFmode

[PATCH] Call symbol_summary<>::release instead of ~symbol_summary (PR, ipa/79285).

2017-01-31 Thread Martin Liška
Hello. Calling twice ~symbol_summary (once from ipa_free_all_node_params, second time from ggc free page) causes double calling ~hash_map, which triggers the valgrind issue. Proper fix is to call ::release from ipa_free_all_node_params. Patch can bootstrap on ppc64le-redhat-linux and survives r

Re: [PATCH v3][PR lto/79061] Fix LTO plus ASAN fails with "AddressSanitizer: initialization-order-fiasco".

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 08:59:27AM +0100, Richard Biener wrote: > > The problem is that at least right now the handling of the init-order is > > done in 2 separate places. > > The C++ FE emits the special libasan calls with the name of the TU at the > > beginning and end of the static initializatio

Re: [patch] Fix PR middle-end/78468

2017-01-31 Thread Eric Botcazou
[Dave replied privately that PA-RISC is OK too]. > I'd say let's not have a middle ground - this stuff is sufficiently > brain-twisting that I'd rather go back to a known working state. If > there was an error in the previous patch, let's roll it back until we > fully understand the situation. Se

[PATCH] Fix PR79278, amend ADJUST_FIELD_ALIGN interface

2017-01-31 Thread Richard Biener
This amends ADJUST_FIELD_ALIGN to always get the type of the field as argument but make the field itself optional. All actual target macro implementations only look at the type of the field but FRV (which seems to misuse ADJUST_FIELD_ALIGN to do bitfield layout rather than using one of the three

Re: Patch to fix PR79131

2017-01-31 Thread Kyrill Tkachov
Hi Christophe, On 30/01/17 20:59, Christophe Lyon wrote: Hi Vladimir, On 26 January 2017 at 18:09, Vladimir Makarov wrote: The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131 The patch also adapts IP IRA in LRA because without it GCC IP RA tests become broken (it wa

[Committed] S/390: Rename __S390_ARCH_LEVEL__ to __ARCH__.

2017-01-31 Thread Andreas Krebbel
We have recently added the predefined macro __S390_ARCH_LEVEL__ to expand to a numerical value representing the architecture document level currently in use. However, the IBM XL compiler already has a macro named __ARCH__ for that purpose. So we change our macro to that in order to improve portab

Re: [PATCH] Call symbol_summary<>::release instead of ~symbol_summary (PR, ipa/79285).

2017-01-31 Thread Richard Biener
On Tue, Jan 31, 2017 at 9:34 AM, Martin Liška wrote: > Hello. > > Calling twice ~symbol_summary (once from ipa_free_all_node_params, second > time from ggc free page) causes > double calling ~hash_map, which triggers the valgrind issue. Proper fix is to > call ::release from > ipa_free_all_node_

Re: Patch to fix PR79131

2017-01-31 Thread Christophe Lyon
On 31 January 2017 at 10:05, Kyrill Tkachov wrote: > Hi Christophe, > > On 30/01/17 20:59, Christophe Lyon wrote: >> >> Hi Vladimir, >> >> On 26 January 2017 at 18:09, Vladimir Makarov wrote: >>> >>> The following patch fixes >>> >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79131 >>> >>> The

Re: [wwwdocs] changes.html - document new warning options

2017-01-31 Thread Aldy Hernandez
On 01/24/2017 03:07 PM, Martin Sebor wrote: Hi Martin. Thank you for taking care of this. +The -Walloca-larger-than=size option detects + calls to the alloca function whose argument may exceed + the specified size. + -Walloca-larger-than is not included in either +

Re: [PATCH], PR target/78597, Fix PowerPC fp-int-convert-{float128-ieee,float64x}

2017-01-31 Thread Segher Boessenkool
On Mon, Jan 30, 2017 at 08:21:00PM -0500, Michael Meissner wrote: > This patch fixes PR target/78597 on PowerPC. The basic problem is conversion > between unsigned int and _Float128 fails for 0x8000. Both power{7,8} > using > simulated IEEE 128-bit floating point and power9 using hardware IE

[PATCH] Fix FAIL: gfortran.dg/graphite/pr68279.f90 -O (internal compiler error) (PR77318)

2017-01-31 Thread Richard Biener
The following patch fixes the graphite ICE in the fortran testsuite. After digging and reverse engineering I concluded that the loop passed to scalar_evolution_in_region via add_condition_to_pbb and create_pw_aff_from_tree is bogus and instead the loop of the condition stmt should be used to not g

Re: [wwwdocs] Document in changes.html -fcode-hoisting, -fipa-bit-cp, -fipa-vrp, -fsplit-loops, GCJ removal, x86 ISA additions, -fshrink-wrap-separate etc.

2017-01-31 Thread Martin Jambor
Hi, On Sun, Jan 29, 2017 at 07:55:18PM +0100, Jakub Jelinek wrote: > On Sun, Jan 29, 2017 at 06:08:32PM +0530, Prathamesh Kulkarni wrote: > > > + A new interprocedural bitwise constant propagation optimization > > > + has been added, which propagates knowledge about which bits of > > > variable

RE: [PATCH] MIPS: Fix mode mismatch error between Loongson builtin arguments and insn operands.

2017-01-31 Thread Matthew Fortune
Toma Tabacu writes: > The builtins for the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw > Loongson instructions have the third argument's type set to UQI while > its corresponding insn operand is in SImode. > > This results in the following error when matching insn operands: > > ../gcc/gcc/i

Re: Patch ping Re: [PATCH] -fsanitize=address,undefined support on s390x

2017-01-31 Thread Andreas Krebbel
On 01/30/2017 10:31 PM, Jakub Jelinek wrote: > Hi! > > On Mon, Jan 23, 2017 at 09:36:29PM +0100, Jakub Jelinek wrote: >> So, I've bootstrapped/regtested s390x-linux (64-bit only, don't have 32-bit >> userland around anymore to test 31-bit) with the attached patch (and on top >> of the PR79168 patc

Re: Patch ping Re: [PATCH] -fsanitize=address,undefined support on s390x

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 01:15:20PM +0100, Andreas Krebbel wrote: > >> 2017-01-23 Jakub Jelinek > >> > >> gcc/ > >>* config/s390/s390.c (s390_asan_shadow_offset): New function. > >>(TARGET_ASAN_SHADOW_OFFSET): Redefine. > >> libsanitizer/ > >>* configure.tgt: Enable asan and ubsan on

Re: [PATCH, wwwdocs, committed] Update gcc-7/changes.html for LRA

2017-01-31 Thread Segher Boessenkool
On Sat, Jan 28, 2017 at 10:51:34PM +0100, Gerald Pfeifer wrote: > On Mon, 19 Sep 2016, Segher Boessenkool wrote: > > Index: htdocs/gcc-7/changes.html > > === > > + GCC now uses LRA by default for new targets. > > > + The PowerPC por

Re: [PATCH][PR target/79170] fix memcmp builtin expansion sequence for rs6000 target.

2017-01-31 Thread Christophe Lyon
Hi, On 30 January 2017 at 17:00, Peter Bergner wrote: > On 1/27/17 5:43 PM, Segher Boessenkool wrote: >> >> On Fri, Jan 27, 2017 at 12:11:05PM -0600, Aaron Sawdey wrote: >>> >>> +addi 9,4,7 >>> +lwbrx 10,0,9 >>> +addi 9,5,7 >>> +lwbrx 9,0,9 >> >> >>

Re: [PATCH][PR target/79170] fix memcmp builtin expansion sequence for rs6000 target.

2017-01-31 Thread Segher Boessenkool
On Tue, Jan 31, 2017 at 01:42:31PM +0100, Christophe Lyon wrote: > The updated test does not link when using newlib, missing random(). > > The small attached patch fixes this by calling rand() instead. > Tested on arm-none-eabi, aarch64-elf. > > OK? > > Christophe Okay, thanks! Segher > 201

Re: [C++ PATCH] pr 67273 & 79253 lambdas, warnings & ICEs

2017-01-31 Thread Nathan Sidwell
On 01/30/2017 03:48 PM, Jason Merrill wrote: Why can't it figure that out for itself? We should be able to tell whether its containing function is currently open. It doesn't have sufficient information (but that may not matter, see below). template void Foo (T lam) { lam (1u); // #1 } te

[PATCH] Fix PR71824

2017-01-31 Thread Richard Biener
The following fixes an ICE that happens because instantiate_scev doesn't really work as expected for SESE regions (a FIXME comment hints at this already). So instead of asserting all goes well just bail out (add_loop_constraints seems to add constraints not required for correctness?). Bootstrap

Re: [PATCH] Fix ICEs with power8 fixuns_truncdi2 patterns (PR target/79197)

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 09:11:11AM +0100, Jakub Jelinek wrote: > But I don't see an iterator that would handle SFmode in vsx.md, only > VSX_B is only > (define_mode_iterator VSX_B [DF V4SF V2DF]) > and even most of the iterators the vsx.md insn uses don't handle SFmode. > So, shall the condition ac

Re: libgomp: Provide prototypes for functions implemented by libgomp plugins

2017-01-31 Thread Thomas Schwinge
Hi! On Fri, 27 Jan 2017 10:28:42 +0100, Jakub Jelinek wrote: > On Fri, Jan 27, 2017 at 10:19:18AM +0100, Thomas Schwinge wrote: > > During development, I had been changing the libgomp plugin API, which > > should have caused build failures in unmodified plugins -- but it didn't. > > Here is patch

Re: [PATCH] Fix PR71824

2017-01-31 Thread Sebastian Pop
Resend as plain text to please gcc-patches@ On Tue, Jan 31, 2017 at 8:39 AM, Sebastian Pop wrote: > > > On Tue, Jan 31, 2017 at 7:49 AM, Richard Biener wrote: >> >> >> The following fixes an ICE that happens because instantiate_scev >> doesn't really work as expected for SESE regions (a FIXME co

Re: [C++ PATCH] pr 67273 & 79253 lambdas, warnings & ICEs

2017-01-31 Thread Jason Merrill
On Tue, Jan 31, 2017 at 8:31 AM, Nathan Sidwell wrote: > On 01/30/2017 03:48 PM, Jason Merrill wrote: >> Why can't it figure that out for itself? We should be able to tell >> whether its containing function is currently open. > > It doesn't have sufficient information (but that may not matter, se

Re: [PATCH] Fix PR71824

2017-01-31 Thread Richard Biener
On Tue, 31 Jan 2017, Sebastian Pop wrote: > Resend as plain text to please gcc-patches@ > > On Tue, Jan 31, 2017 at 8:39 AM, Sebastian Pop wrote: > > > > > > On Tue, Jan 31, 2017 at 7:49 AM, Richard Biener wrote: > >> > >> > >> The following fixes an ICE that happens because instantiate_scev >

Re: [PATCH] Fix PR71824

2017-01-31 Thread Richard Biener
On Tue, 31 Jan 2017, Sebastian Pop wrote: > On Tue, Jan 31, 2017 at 7:49 AM, Richard Biener wrote: > > > > > The following fixes an ICE that happens because instantiate_scev > > doesn't really work as expected for SESE regions (a FIXME comment > > hints at this already). So instead of asserting

Re: [PATCH] Fix PR71824

2017-01-31 Thread Richard Biener
On Tue, 31 Jan 2017, Richard Biener wrote: > On Tue, 31 Jan 2017, Sebastian Pop wrote: > > > Resend as plain text to please gcc-patches@ > > > > On Tue, Jan 31, 2017 at 8:39 AM, Sebastian Pop wrote: > > > > > > > > > On Tue, Jan 31, 2017 at 7:49 AM, Richard Biener wrote: > > >> > > >> > > >> T

Re: [PATCH] Fix PR71824

2017-01-31 Thread Sebastian Pop
On Tue, Jan 31, 2017 at 9:06 AM, Richard Biener wrote: > On Tue, 31 Jan 2017, Sebastian Pop wrote: > >> On Tue, Jan 31, 2017 at 7:49 AM, Richard Biener wrote: >> >> > >> > The following fixes an ICE that happens because instantiate_scev >> > doesn't really work as expected for SESE regions (a FIX

[C++ PATCH] PR c++/79264 another lambda capture

2017-01-31 Thread Nathan Sidwell
PR 79264 is an ICE with concepts and lambdas, but underneath is another case of failing to notice this capture. My fix for 61636 had ignored the 'g ()' case of calling a template member fn. This patch adds the smarts for that, and also an assert in finish_member_declaration that we're insert

Re: [PATCH] Fix PR71824

2017-01-31 Thread Sebastian Pop
On Tue, Jan 31, 2017 at 9:11 AM, Richard Biener wrote: > On Tue, 31 Jan 2017, Richard Biener wrote: > >> On Tue, 31 Jan 2017, Sebastian Pop wrote: >> >> > Resend as plain text to please gcc-patches@ >> > >> > On Tue, Jan 31, 2017 at 8:39 AM, Sebastian Pop wrote: >> > > >> > > >> > > On Tue, Jan 3

Re: [wwwdocs] changes.html - document new warning options

2017-01-31 Thread Martin Sebor
On 01/31/2017 03:50 AM, Aldy Hernandez wrote: On 01/24/2017 03:07 PM, Martin Sebor wrote: Hi Martin. Thank you for taking care of this. +The -Walloca-larger-than=size option detects +calls to the alloca function whose argument may exceed +the specified size. +-Walloca-larger-t

Re: [wwwdocs] Document in changes.html -fcode-hoisting, -fipa-bit-cp, -fipa-vrp, -fsplit-loops, GCJ removal, x86 ISA additions, -fshrink-wrap-separate etc.

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 12:15:36PM +0100, Martin Jambor wrote: > > I've committed it as is, feel free to propose changes. But before that, we > > should figure out what to do with -fipa-cp-alignment. Should it have > > Ignore flag and > > Does nothing. Preserved for backward compatibility. > > de

Re: [PATCH] Fix PGO bootstrap on x390x (PR bootstrap/78985).

2017-01-31 Thread Jeff Law
On 01/30/2017 04:27 AM, Martin Liška wrote: Hi. Following patch simply fixes issues reported by -Wmaybe-unitialized. That enables PGO bootstrap on a s390x machine. Ready to be installed? Martin 0001-Fix-PGO-bootstrap-on-x390x-PR-bootstrap-78985.patch From 3f3c3fe790ebffd038a033b6946de663e2

Re: [PATCH] Fix PGO bootstrap on x390x (PR bootstrap/78985).

2017-01-31 Thread Jeff Law
On 01/30/2017 06:32 AM, Martin Liška wrote: On 01/30/2017 12:27 PM, Martin Liška wrote: Hi. Following patch simply fixes issues reported by -Wmaybe-unitialized. That enables PGO bootstrap on a s390x machine. Ready to be installed? Martin There's second version that adds one more hunk for s3

[C++ patch] instantiate_decl cleanup

2017-01-31 Thread Nathan Sidwell
I've committed this patch, which is the tidying up I've done for the 67273 and 79253 patch on its way. instantiate_decl's cleanup is a little untidy because of some 'goto out' statements, that jump into the middle of the cleanup. 1) finally make defer_ok a bool 2) sort the state restoration t

Re: [wwwdocs] Document in changes.html -fcode-hoisting, -fipa-bit-cp, -fipa-vrp, -fsplit-loops, GCJ removal, x86 ISA additions, -fshrink-wrap-separate etc.

2017-01-31 Thread Martin Jambor
On Tue, Jan 31, 2017 at 05:31:41PM +0100, Jakub Jelinek wrote: > On Tue, Jan 31, 2017 at 12:15:36PM +0100, Martin Jambor wrote: > > > I've committed it as is, feel free to propose changes. But before that, > > > we > > > should figure out what to do with -fipa-cp-alignment. Should it have > > >

Re: [wwwdocs] changes.html - document new warning options

2017-01-31 Thread Aldy Hernandez
On 01/31/2017 10:57 AM, Martin Sebor wrote: On 01/31/2017 03:50 AM, Aldy Hernandez wrote: On 01/24/2017 03:07 PM, Martin Sebor wrote: Hi Martin. Thank you for taking care of this. +The -Walloca-larger-than=size option detects +calls to the alloca function whose argument may exceed +

Re: [PATCH 1/6] RISC-V Port: gcc/config/riscv/riscv.c

2017-01-31 Thread Richard Henderson
On 01/30/2017 04:53 PM, Andrew Waterman wrote: > The ISA spec references an out-of-date calling convention, and will be > removed in the next revision to orthogonalize the ABI from the ISA. > We are in the process of drafting a RISC-V ELF psABI spec, which the > GCC port targets. > https://github.c

Re: [C++ PATCH] pr 67273 & 79253 lambdas, warnings & ICEs

2017-01-31 Thread Nathan Sidwell
On 01/31/2017 10:04 AM, Jason Merrill wrote: Agreed. As I was suggesting in response to one of Adam's patches, I think we need to defer creating the closure until f is instantiated; at that point we can resolve all names from f and so we should be able to always push to top when instantiating t

[PATCH] Fix -masm=intel output for AVX512{F,VL} gathers (PR target/79299)

2017-01-31 Thread Jakub Jelinek
Hi! As mentioned in the PR and shown by the testcases, many of the AVX512{F,VL} gathers fail to assemble with binutils. Unlike AVX2 gathers, gas for some strange reason requires the memory operand to be {Q,XMM,YMM,ZMM}WORD depending on the sizes of all the memory locations together (and when not

[PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)

2017-01-31 Thread Jakub Jelinek
Hi! useless_type_conversion_p says that precision 1 unsigned BOOLEAN_TYPE conversion to/from precision 1 unsigned integral type is useless, but apparently the vectorizer heavily relies on the BOOLEAN_TYPE vs. unsigned integral:1 distinction (uses VECTOR_BOOLEAN_TYPE_P types only for real BOOLEAN_T

[C++ PATCH] Fix diagnostic printing of COMPONENT_REF with ARROW_EXPR first operand (PR c++/79304)

2017-01-31 Thread Jakub Jelinek
Hi! For dependent expression followed by -> and identifier or ~ identifier, the parser creates COMPONENT_REF with ARROW_EXPR as its first argument. When printing that, we actually print expr->.identifier , which is not what the user typed. The following patch omits the undesirable dot in that cas

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-31 Thread Richard Henderson
On 01/30/2017 05:10 PM, Andrew Waterman wrote: >>> +(define_expand "clear_cache" >>> + [(match_operand 0 "pmode_register_operand") >>> + (match_operand 1 "pmode_register_operand")] >>> + "" >>> + " >>> +{ >>> + emit_insn (gen_fence_i ()); >>> + DONE; >>> +}") >> >> >> Do you need a FENCE bef

[PATCH] PR fortran/79305 -- Fix spelling in #if defined() condition

2017-01-31 Thread Steve Kargl
I would like to apply the following patch to trunk. It technically isn't a regression or documentation fix. Is this ok with the release managers? 2017-01-31 Steven G. Kargl PR fortran/79305 * libgfortran/c99_protos.h: Spell HAVE_EXPL correctly. * libgfortran/intrinsic

Re: [PATCH] PR fortran/79305 -- Fix spelling in #if defined() condition

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 10:35:14AM -0800, Steve Kargl wrote: > I would like to apply the following patch to trunk. It technically > isn't a regression or documentation fix. Is this ok with the release > managers? Ok. > > 2017-01-31 Steven G. Kargl > > PR fortran/79305 > * libgfo

Re: [PATCH] PR fortran/79305 -- Fix spelling in #if defined() condition

2017-01-31 Thread Steve Kargl
On Tue, Jan 31, 2017 at 07:41:27PM +0100, Jakub Jelinek wrote: > On Tue, Jan 31, 2017 at 10:35:14AM -0800, Steve Kargl wrote: > > I would like to apply the following patch to trunk. It technically > > isn't a regression or documentation fix. Is this ok with the release > > managers? > > Ok. > >

Re: [wwwdocs] changes.html - document new warning options

2017-01-31 Thread Martin Sebor
On 01/31/2017 10:30 AM, Aldy Hernandez wrote: On 01/31/2017 10:57 AM, Martin Sebor wrote: On 01/31/2017 03:50 AM, Aldy Hernandez wrote: On 01/24/2017 03:07 PM, Martin Sebor wrote: Hi Martin. Thank you for taking care of this. +The -Walloca-larger-than=size option detects +calls to t

Re: [PATCH] Fix -masm=intel output for AVX512{F,VL} gathers (PR target/79299)

2017-01-31 Thread Rainer Orth
Hi Jakub, > --- gcc/testsuite/gcc.target/i386/avx512vl-pr79299-1.c.jj 2017-01-31 > 13:15:20.919592886 +0100 > +++ gcc/testsuite/gcc.target/i386/avx512vl-pr79299-1.c2017-01-31 > 14:33:38.425028304 +0100 > @@ -0,0 +1,91 @@ > +/* PR target/79299 */ > +/* { dg-do assemble { target avx512

[PATCH] Fix ICE with spelling hints within explicit namespace aliases (PR c++/79298)

2017-01-31 Thread David Malcolm
PR c++/79298 reports a segfault when handling a qualified name lookup error, where consider_binding_level dereferences a NULL cp_binding_level *. The root cause is that suggest_alternative_in_explicit_scope assumes that NAMESPACE_LEVEL (scope) is non-NULL, but this can be NULL for namespace aliase

[C++ PATCH] fix c++79290 bogus error with -Wall

2017-01-31 Thread Nathan Sidwell
This patch fixes 79290, a bogus error caused by -Wall trying to figure out if a component ref expr results a thing that can never be null. unfortunately, it was looking at a PMF record access, and even though that;s a RECORD_TYPE, it's not CLASSTYPE because the relevant flag is clear. Fixed b

Re: [PATCH v2] aarch64: Add split-stack initial support

2017-01-31 Thread Adhemerval Zanella
On 25/01/2017 10:10, Jiong Wang wrote: > On 24/01/17 18:05, Adhemerval Zanella wrote: >> >> On 03/01/2017 13:13, Wilco Dijkstra wrote: >> >>> + /* If function uses stacked arguments save the old stack value so >>> morestack >>> + can return it. */ >>> + reg11 = gen_rtx_REG (Pmode, R11_REG

[committed] Prevent ICEs due to bogus substring locations (PR preprocessor/79210)

2017-01-31 Thread David Malcolm
PR preprocessor/79210 identifies a ICE due to a failing assertion within get_substring_ranges_for_loc when re-lexing strings, due to the wrong location being used for a string token. The root cause of the bogus string location is due to (A) a bogus location being generated when pasting together tw

Re: [committed] move constant to the right of relational operators (Re: [PATCH 4/5] distinguish likely and unlikely results (PR 78703))

2017-01-31 Thread Bernhard Reutner-Fischer
On 31 January 2017 00:19:46 CET, Martin Sebor wrote: >> So I see the introduction of many >> >> if (const OP object) expressions >> >> Can you please fix those as an independent patch after #4 and #5 are >> installed on the trunk? Consider that patch pre-approved, but please >> post it here for t

Re: [PATCH 2/6] RISC-V Port: gcc

2017-01-31 Thread Andrew Waterman
On Tue, Jan 31, 2017 at 10:32 AM, Richard Henderson wrote: > On 01/30/2017 05:10 PM, Andrew Waterman wrote: +(define_expand "clear_cache" + [(match_operand 0 "pmode_register_operand") + (match_operand 1 "pmode_register_operand")] + "" + " +{ + emit_insn (ge

Re: [patch 79279] combine/simplify_set issue

2017-01-31 Thread Segher Boessenkool
Hello, On Mon, Jan 30, 2017 at 10:43:23AM +0100, Aurelien Buhrig wrote: > This patch fixes a combiner bug in simplify_set which calls > CANNOT_CHANGE_MODE_CLASS with wrong mode params. > It occurs when trying to simplify paradoxical subregs of hw regs (whose > natural mode is lower than a word). >

Re: [C++ PATCH] Fix diagnostic printing of COMPONENT_REF with ARROW_EXPR first operand (PR c++/79304)

2017-01-31 Thread Jason Merrill
OK. On Tue, Jan 31, 2017 at 1:29 PM, Jakub Jelinek wrote: > Hi! > > For dependent expression followed by -> and identifier or ~ identifier, > the parser creates COMPONENT_REF with ARROW_EXPR as its first argument. > When printing that, we actually print expr->.identifier , which is not > what the

Re: [wwwdocs] changes.html - document new warning options

2017-01-31 Thread Gerald Pfeifer
Wow, that's quite a patch. And quite some contributions behind that! :-) Let me offer some comments, and then I suggest you commit what you have (taking these comments into account), and we can still improve things then if there is further feedback. Index: gcc-7/changes.html

Re: [PATCH] Fix ICE with spelling hints within explicit namespace aliases (PR c++/79298)

2017-01-31 Thread Jason Merrill
OK. On Tue, Jan 31, 2017 at 3:10 PM, David Malcolm wrote: > PR c++/79298 reports a segfault when handling a qualified name lookup error, > where consider_binding_level dereferences a NULL cp_binding_level *. > > The root cause is that suggest_alternative_in_explicit_scope assumes that > NAMESPACE

Re: [PATCH] Fix -masm=intel output for AVX512{F,VL} gathers (PR target/79299)

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 08:07:05PM +0100, Rainer Orth wrote: > Hi Jakub, > > > --- gcc/testsuite/gcc.target/i386/avx512vl-pr79299-1.c.jj 2017-01-31 > > 13:15:20.919592886 +0100 > > +++ gcc/testsuite/gcc.target/i386/avx512vl-pr79299-1.c 2017-01-31 > > 14:33:38.425028304 +0100 > > @@ -0,0 +

[PATCH] Fix gcc-5-branch build with libc++

2017-01-31 Thread Dimitry Andric
As discussed with the FreeBSD gcc ports maintainer, building the gcc-5-branch with libc++ requires standard C++ headers to be included *before* gcc/system.h, otherwise the redefinition of abort() to fancy_abort() will cause trouble. In trunk r235362, most gcc C++ sources were updated to define INC

Re: [PATCH 1/6] RISC-V Port: gcc/config/riscv/riscv.c

2017-01-31 Thread Andrew Waterman
On Tue, Jan 31, 2017 at 10:01 AM, Richard Henderson wrote: > On 01/30/2017 04:53 PM, Andrew Waterman wrote: >> The ISA spec references an out-of-date calling convention, and will be >> removed in the next revision to orthogonalize the ABI from the ISA. >> We are in the process of drafting a RISC-V

Re: [PATCH] relax -Wformat-overflow for precision ranges (PR 79275)

2017-01-31 Thread Jeff Law
On 01/30/2017 02:28 PM, Martin Sebor wrote: Bug 79275 - -Wformat-overflow false positive exceeding INT_MAX in glibc sysdeps/posix/tempname.c points out a false positive found during a Glibc build and caused by the checker using the upper bound of a range of precisions in string directives with st

Re: [PATCH/VECT/AARCH64] Improve cost model for ThunderX2 CN99xx

2017-01-31 Thread Andrew Pinski
On Sat, Jan 28, 2017 at 12:34 PM, Andrew Pinski wrote: > Hi, > On some (most) AARCH64 cores, it is not always profitable to > vectorize some integer loops. This patch does two things (I can split > it into different patches if needed). > 1) It splits the aarch64 back-end's vector cost model's v

Re: [PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)

2017-01-31 Thread Jeff Law
On 01/31/2017 11:26 AM, Jakub Jelinek wrote: Hi! useless_type_conversion_p says that precision 1 unsigned BOOLEAN_TYPE conversion to/from precision 1 unsigned integral type is useless, but apparently the vectorizer heavily relies on the BOOLEAN_TYPE vs. unsigned integral:1 distinction (uses VECT

Re: [PATCH] relax -Wformat-overflow for precision ranges (PR 79275)

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 03:33:04PM -0700, Jeff Law wrote: > My general inclination is to ask this to wait for gcc-8 as it is not a > regression, but instead a false positive in a new warning. Well, as the warning is enabled by -Wall, the false positives in it are regressions (while false negatives

Re: [PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 03:41:27PM -0700, Jeff Law wrote: > > useless_type_conversion_p says that precision 1 unsigned BOOLEAN_TYPE > > conversion to/from precision 1 unsigned integral type is useless, > > but apparently the vectorizer heavily relies on the BOOLEAN_TYPE vs. > > unsigned integral:1

Re: [PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)

2017-01-31 Thread Jeff Law
On 01/31/2017 03:46 PM, Jakub Jelinek wrote: On Tue, Jan 31, 2017 at 03:41:27PM -0700, Jeff Law wrote: useless_type_conversion_p says that precision 1 unsigned BOOLEAN_TYPE conversion to/from precision 1 unsigned integral type is useless, but apparently the vectorizer heavily relies on the BOOLE

Re: [PATCH] relax -Wformat-overflow for precision ranges (PR 79275)

2017-01-31 Thread Jeff Law
On 01/31/2017 03:42 PM, Jakub Jelinek wrote: On Tue, Jan 31, 2017 at 03:33:04PM -0700, Jeff Law wrote: My general inclination is to ask this to wait for gcc-8 as it is not a regression, but instead a false positive in a new warning. Well, as the warning is enabled by -Wall, the false positives

Re: [PATCH] relax -Wformat-overflow for precision ranges (PR 79275)

2017-01-31 Thread Joseph Myers
On Tue, 31 Jan 2017, Jeff Law wrote: > My general inclination is to ask this to wait for gcc-8 as it is not a > regression, but instead a false positive in a new warning. I'd hope it would be possible for current releases of GCC and glibc to build with each other. As this seems to be a case whe

Re: [PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)

2017-01-31 Thread Jakub Jelinek
On Tue, Jan 31, 2017 at 03:52:10PM -0700, Jeff Law wrote: > Which makes your patch safe -- but introduces a non-obvious dependency > between useless_type_conversion_p and your definition of > INTEGRAL_BOOLEAN_TYPE and how it's used in the vectorizer. The predicate is simply true for all BOOLEAN_TY

Re: [PATCH] Fix PR79278, amend ADJUST_FIELD_ALIGN interface

2017-01-31 Thread Jeff Law
On 01/31/2017 02:01 AM, Richard Biener wrote: This amends ADJUST_FIELD_ALIGN to always get the type of the field as argument but make the field itself optional. All actual target macro implementations only look at the type of the field but FRV (which seems to misuse ADJUST_FIELD_ALIGN to do bit

Re: [PATCH] Fix bool vs. unsigned:1 vectorization (PR tree-optimization/79284)

2017-01-31 Thread Jeff Law
On 01/31/2017 04:22 PM, Jakub Jelinek wrote: On Tue, Jan 31, 2017 at 03:52:10PM -0700, Jeff Law wrote: Which makes your patch safe -- but introduces a non-obvious dependency between useless_type_conversion_p and your definition of INTEGRAL_BOOLEAN_TYPE and how it's used in the vectorizer. The

GCC patch committed: fix unwind info for 32-bit x86 split stack

2017-01-31 Thread Ian Lance Taylor
With a new libgo patch (waiting to be committed until we are out of stage 4) I noticed that the runtime/pprof tests were failing about 2% of the time on 32-bit x86. The problem turned out to be testing profiling with a very call-heavy benchmark. The 32-bit x86 split stack sequence pushes two numb

Re: [wwwdocs] changes.html - document new warning options

2017-01-31 Thread Martin Sebor
On 01/31/2017 02:16 PM, Gerald Pfeifer wrote: Wow, that's quite a patch. And quite some contributions behind that! :-) Let me offer some comments, and then I suggest you commit what you have (taking these comments into account), and we can still improve things then if there is further feedback.

Re: [committed] move constant to the right of relational operators (Re: [PATCH 4/5] distinguish likely and unlikely results (PR 78703))

2017-01-31 Thread Martin Sebor
On 01/31/2017 01:49 PM, Bernhard Reutner-Fischer wrote: On 31 January 2017 00:19:46 CET, Martin Sebor wrote: So I see the introduction of many if (const OP object) expressions Can you please fix those as an independent patch after #4 and #5 are installed on the trunk? Consider that patch pre

Re: [PATCH] Fix gcc-5-branch build with libc++

2017-01-31 Thread David Edelsohn
> As discussed with the FreeBSD gcc ports maintainer, building the > gcc-5-branch with libc++ requires standard C++ headers to be included > *before* gcc/system.h, otherwise the redefinition of abort() to > fancy_abort() will cause trouble. > > In trunk r235362, most gcc C++ sources were updated to

Re: [PATCH] Actually fix libhsail-rt build on x86_64/i?86 32-bit (take 2)

2017-01-31 Thread Pekka Jääskeläinen
Hi Jakub, Thanks for the fix. I've tested this patch with the HSA PRM suite and no bri{ck,g}ing, so please go ahead and commit. BR, Pekka On Mon, Jan 30, 2017 at 10:17 PM, Jakub Jelinek wrote: > On Mon, Jan 30, 2017 at 08:53:18PM +0100, Bernhard Reutner-Fischer wrote: >> As this will likely b

Re: [PATCH] Fix gcc-5-branch build with libc++

2017-01-31 Thread Dimitry Andric
On 01 Feb 2017, at 01:23, David Edelsohn wrote: ... >> In trunk r235362, most gcc C++ sources were updated to define >> INCLUDE_xxx macros before including gcc/system.h, which fixes the >> incompatibility with libc++. However, this revision is most likely too >> disruptive to backport to the gcc-