[PATCH] Add gcc.dg/stack-check-16.c

2018-01-19 Thread Jakub Jelinek
Hi! This patch adds a new testcases, not exactly sure what is the exact origin and what was the problem. The changes I've done are: 1) macroize, so that the test is just a few lines rather than 160KB, verified -fdump-tree-gimple printf call is identical between this and the original test

Re: [PATCH 4/5] Remove predictors that are unrealiable.

2018-01-19 Thread Martin Liška
On 01/11/2018 11:39 AM, Jan Hubicka wrote: >> These predictors are in my opinion not reliable and thus I decided to remove >> them: >> >> 1) PRED_NEGATIVE_RETURN: probability is ~51% >> 2) PRED_RECURSIVE_CALL: there are 2 dominant edges that influence value to >> 63%; >> w/o these edges it goes

Re: [PATCH] Fix profile_quality sanity check.

2018-01-19 Thread Martin Liška
On 01/18/2018 04:57 PM, Tom de Vries wrote: > On 01/18/2018 03:59 PM, Martin Liška wrote: >> Hi. >> >> Following patch adds a new enum value so that we don't see following warning: >> https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01211.html >> > > Hi, > > with the patch, I still see the same

Re: [PATCH] Fix profile_quality sanity check.

2018-01-19 Thread Tom de Vries
On 01/19/2018 01:11 PM, Martin Liška wrote: On 01/18/2018 04:57 PM, Tom de Vries wrote: On 01/18/2018 03:59 PM, Martin Liška wrote: Hi. Following patch adds a new enum value so that we don't see following warning: https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01211.html Hi, with the

Re: [PATCH] Fix pr83619.C (was Re: Fix ICE with profile info mismatch)

2018-01-19 Thread Jakub Jelinek
On Fri, Jan 19, 2018 at 02:33:09PM +0100, Rainer Orth wrote: > however, the test now FAILs everywhere with > > +FAIL: g++.dg/torture/pr83619.C -O0 (test for excess errors) > +FAIL: g++.dg/torture/pr83619.C -O1 (test for excess errors) > +FAIL: g++.dg/torture/pr83619.C -O2 (test for

Small C++ tweak to fold_simple

2018-01-19 Thread Marek Polacek
fold_simple struck me as odd, certainly the NULL_TREE assignment is unnecessary, so this patch simplifies it a bit. I've been confused about the commentary too, what is the difference between "constant-expressions" and "constexpressions"? We should clarify that. Bootstrapped/regtested on

Re: [PATCH,NVPTX] Fix PR83920

2018-01-19 Thread Tom de Vries
On 01/18/2018 02:27 PM, Tom de Vries wrote: On 01/18/2018 12:40 AM, Cesar Philippidis wrote: In PR83920, I encountered a nvptx bug where live predicate variables were clobbered before their value was broadcasted. Hi, I've managed to reproduce the problem based on the description in the PR.

Re: [PATCH] Fix pr83619.C (was Re: Fix ICE with profile info mismatch)

2018-01-19 Thread Rainer Orth
Hi Jan, >> On Thu, Jan 18, 2018 at 04:59:01PM +0100, Jan Hubicka wrote: >> > this patch ICE where the profile in cgraph mismatch profile in BB. This >> > is becuase >> > of expansion of speculative devirtualization where we get some roundoff >> > issues. >> > >> > Bootstrapped/regtested

Re: [PATCH][arm] XFAIL advsimd-intrinsics/vld1x2.c

2018-01-19 Thread Kyrill Tkachov
Ping. https://gcc.gnu.org/ml/gcc-patches/2018-01/msg00913.html Thanks, Kyrill On 11/01/18 15:33, Kyrill Tkachov wrote: Hi all, This recently added test fails on arm. We haven't implemented these intrinsics for arm (any volunteers?) so for now let's XFAIL these on that target. Also, the

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

2018-01-19 Thread Sebastian Perta
HI DJ, >>Do you have checkin privs yet? >> This is ok aside from.. ... + /* Do not mark the reg unused unless all QImode parts of it are dead. */ Can I checkin this patch? Thank you! Best Regards, Sebastian > -Original Message- > From: Sebastian Perta > Sent: 12 January 2018 18:42 >

Re: Check whether any statements need masking (PR 83922)

2018-01-19 Thread Richard Biener
On Fri, Jan 19, 2018 at 10:55 AM, Richard Sandiford wrote: > This PR is an odd case in which, due to the low optimisation level, > we enter vectorisation with: > > outer1: > x_1 = PHI ; > ... > > inner: > x_2 = 0; > ... > >

Re: Avoid ICE for nested inductions (PR 83914)

2018-01-19 Thread Richard Biener
On Fri, Jan 19, 2018 at 10:45 AM, Richard Sandiford wrote: > This testcase ICEd because we converted the initial value of an > induction to the vector element type even for nested inductions. > This isn't necessary because the initial expression is vectorised >

Re: [PATCH] Fix profile_quality sanity check.

2018-01-19 Thread Tom de Vries
On 01/19/2018 04:08 PM, Martin Liška wrote: On 01/19/2018 02:21 PM, Tom de Vries wrote: How about keeping profile_uninitialized at the zero value location and asserting m_quality != profile_uninitialized ? Thanks, - Tom Yes, that would be possible. Can you please test that the patch does

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

2018-01-19 Thread Martin Sebor
On 01/14/2018 07:29 AM, H.J. Lu wrote: When address of packed member of struct or union is taken, it may result in an unaligned pointer value. This patch adds -Waddress-of-packed-member to warn it: $ cat x.i struct pair_t { char c; int i; } __attribute__ ((packed)); extern struct pair_t

RE:[PATCH,AIX] Optimize parsing of include files.

2018-01-19 Thread REIX, Tony
Thanks David, I've saved you comments in our Wiki so I hope I'll remember and do better next time. Regards, Cordialement, Tony Reix ATOS / Bull SAS ATOS Expert IBM Coop Architect & Technical Leader Office : +33 (0) 4 76 29 72 67 1 rue de Provence - 38432 Échirolles - France www.atos.net

Re: [PATCH] Fix profile_quality sanity check.

2018-01-19 Thread Martin Liška
On 01/19/2018 02:21 PM, Tom de Vries wrote: > How about keeping profile_uninitialized at the zero value location and > asserting m_quality != profile_uninitialized ? > > Thanks, > - Tom Yes, that would be possible. Can you please test that the patch does not generate warnings? I'm running

[PATCH] Fix missing profiles with PGO (PR tree-optimization/83051).

2018-01-19 Thread Martin Liška
Hello. Following ICE can be seen when we have -fprofile-generate or -fprofile-use w/ missing gcda file. I hope the proper fix is to check for reliable profile. Patch can bootstrap on ppc64le-redhat-linux and survives regression tests. Ready to be installed? Martin gcc/ChangeLog: 2018-01-19

Re: New code merge optimization?

2018-01-19 Thread Georg-Johann Lay
On 18.01.2018 16:08, Sebastian Perta wrote: Hello, I am interested in implementing a new pass in gcc to merge identical sequences of code in GCC to be used mainly for RL78. The commercial RL78 compilers have such algorithms implemented and they make quite good use of it. Opportunities arise

Re: [PATCH, rs6000] Add 128-bit support for vec_xl(), vec_xl_be(), vec_xst(), vec_xst_be() builtins.

2018-01-19 Thread Segher Boessenkool
On Thu, Jan 18, 2018 at 04:51:47PM -0600, Segher Boessenkool wrote: > > +(define_insn "vsx_ld_elemrev_v1ti" > > +  [(set (match_operand:V1TI 0 "vsx_register_operand" "=wa") > > +(vec_select:V1TI > > +   (match_operand:V1TI 1 "memory_operand" "Z") > > +   (parallel [(const_int 0)])))] >

Re: [PATCH v3, rs6000] Add -mspeculate-indirect-jumps option and implement non-speculating bctr / bctrl

2018-01-19 Thread Sandra Loosemore
On 01/15/2018 04:09 PM, Bill Schmidt wrote: [gcc] 2018-01-15 Bill Schmidt * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for -mspeculate-indirect-jumps. * config/rs6000/rs6000.md (*call_indirect_elfv2): Disable for

Re: [PATCH,NVPTX] Fix PR83920

2018-01-19 Thread Richard Biener
On January 19, 2018 3:15:45 PM GMT+01:00, Tom de Vries wrote: >On 01/18/2018 02:27 PM, Tom de Vries wrote: >> On 01/18/2018 12:40 AM, Cesar Philippidis wrote: >>> In PR83920, I encountered a nvptx bug where live predicate variables >>> were clobbered before their value

[og7] backport fix for PR83920

2018-01-19 Thread Cesar Philippidis
I've backported the patch Tom committed to trunk to fix PR83920 to openacc-gcc-7-branch in revision d0a1e0fa43ca4004fde33707cb6a93c01cb11507. No changes were required for og7. The original email can be found here . Cesar

Re: [PATCH, fortran] Support Fortran 2018 teams

2018-01-19 Thread Steve Kargl
index 882fe577b76..b4baf5be554 100644 --- a/gcc/fortran/array.c +++ b/gcc/fortran/array.c @@ -158,6 +158,7 @@ gfc_match_array_ref (gfc_array_ref *ar, gfc_array_spec *as, int init, bool matched_bracket = false; gfc_expr *tmp; bool stat_just_seen = false; + bool team_just_seen = false;

Re: [PATCH,AIX] Optimize parsing of include files.

2018-01-19 Thread David Edelsohn
On Thu, Jan 18, 2018 at 9:56 AM, REIX, Tony wrote: > > Description: > * This patch optimizes the time required for parsing the include files. > > Tests: > * AIX: Build: SUCCESS >- build made by means of gmake on AIX. > > ChangeLog: > * xcoff.c: Optimize parsing of

Re: [PATCH,AIX] Optimize parsing of include files.

2018-01-19 Thread Ian Lance Taylor
On Fri, Jan 19, 2018 at 8:36 AM, David Edelsohn wrote: > On Thu, Jan 18, 2018 at 9:56 AM, REIX, Tony wrote: >> >> Description: >> * This patch optimizes the time required for parsing the include files. >> >> Tests: >> * AIX: Build: SUCCESS >>- build

Re: [PATCH, rs6000] Add 128-bit support for vec_xl(), vec_xl_be(), vec_xst(), vec_xst_be() builtins.

2018-01-19 Thread Carl Love
On Fri, 2018-01-19 at 10:13 -0600, Segher Boessenkool wrote: > On Thu, Jan 18, 2018 at 04:51:47PM -0600, Segher Boessenkool wrote: > > > +(define_insn "vsx_ld_elemrev_v1ti" > > > +  [(set (match_operand:V1TI 0 "vsx_register_operand" "=wa") > > > +(vec_select:V1TI > > > +   

[PATCH, rs6000] Testcase fix-ups for gimple-folding intrinsic tests.

2018-01-19 Thread Will Schmidt
Hi, Some testcase fix-ups affecting the gimple-folding tests, including: - Add xxspltib as a valid instruction for vec-abs tests (power9). - Fix up mismatched dg-require and dg-option values for the fold-vec-shift-left-longlong tests (fixes/eliminates a test failure on p6). Sniff tested

Re: FW: [PATCH] rl78 umaxdi3 improvement

2018-01-19 Thread DJ Delorie
"Sebastian Perta" writes: > * config/rl78/rl78.md: New define_expand "umaxdi3". > * config/rl78/rl78.md: New define_expand "smaxdi3". > * config/rl78/rl78.md: New define_expand "smindi3". > * config/rl78/rl78.md: New define_expand "umindi3". >

Re: [PATCH v2, rs6000] Implement 32- and 64-bit BE handling for -mno-speculate-indirect-jumps

2018-01-19 Thread David Edelsohn
This patch is incorrect for AIX. Which also means that the backport to GCC 7 branch is incorrect for AIX and must be corrected before the release. AIX assembler does not accept "." (period) as the current address. "b ." is incorrect. And testing for "b ." is incorrect. I am going to try

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

2018-01-19 Thread DJ Delorie
Sebastian Perta writes: > * config/rl78/rl78.c (rl78_note_reg_set): fixed dead reg check > for non-QImode registers This is OK. Thanks! Note: in the future; ChangeLog entries should be provided separate from the patch; they rarely apply cleanly anyway. > Index:

Re: [PATCH] Add gcc.dg/stack-check-16.c

2018-01-19 Thread Jeff Law
On 01/19/2018 04:22 AM, Jakub Jelinek wrote: > Hi! > > This patch adds a new testcases, not exactly sure what is the exact > origin and what was the problem. The changes I've done are: > 1) macroize, so that the test is just a few lines rather than 160KB, >verified -fdump-tree-gimple printf

Re: [PATCH, rs6000] Add 128-bit support for vec_xl(), vec_xl_be(), vec_xst(), vec_xst_be() builtins.

2018-01-19 Thread Carl Love
On Fri, 2018-01-19 at 10:13 -0600, Segher Boessenkool wrote: > On Thu, Jan 18, 2018 at 04:51:47PM -0600, Segher Boessenkool wrote: > > > +(define_insn "vsx_ld_elemrev_v1ti" > > > +  [(set (match_operand:V1TI 0 "vsx_register_operand" "=wa") > > > +(vec_select:V1TI > > > +   

Re: [PATCH] rl78 anddi3 improvement

2018-01-19 Thread DJ Delorie
Jeff Law writes: > So I think you're ultimately far better off determining why GCC does not > generate efficient code for 64bit logicals on the rl78 target. In thinking about this more, one possible reason is that rl78 has an 8-bit WORD_MODE. Which means DImode operations are

Re: [PATCH, fortran] Support Fortran 2018 teams

2018-01-19 Thread Damian Rouson
Thanks for catching that, Steve, and for responding, Alessandro. Anything else? Damian On January 19, 2018 at 9:17:03 AM, Alessandro Fanfarillo (elfa...@ucar.edu) wrote: Yes, definitively ar->team. On Fri, Jan 19, 2018 at 8:36 AM, Steve Kargl wrote: >

Re: [PATCH, fortran] Support Fortran 2018 teams

2018-01-19 Thread Steve Kargl
On Fri, Jan 19, 2018 at 09:18:14AM -0800, Damian Rouson wrote: > Thanks for catching that, Steve, and for responding, Alessandro. > > Anything else? > I've only just started to look at the patch. Unfortunately, I know zero about teams, so need to read the patch and F2018 standard

[PATCH PR82604]Fix regression in ftree-parallelize-loops

2018-01-19 Thread Bin Cheng
Hi, This patch is supposed to fix regression caused by loop distribution when ftree-parallelize-loops. The reason is distributed memset call can't be understood/analyzed in data reference analysis, as a result, parloop can only parallelize the innermost 2-level loop nest. Before distribution

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

2018-01-19 Thread Kyrill Tkachov
On 16/01/18 10:31, Sudakshina Das wrote: Hi Christophe On 12/01/18 18:32, Christophe Lyon wrote: 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

Re: [PATCH, fortran] Support Fortran 2018 teams

2018-01-19 Thread Alessandro Fanfarillo
Yes, definitively ar->team. On Fri, Jan 19, 2018 at 8:36 AM, Steve Kargl wrote: > index 882fe577b76..b4baf5be554 100644 > --- a/gcc/fortran/array.c > +++ b/gcc/fortran/array.c > @@ -158,6 +158,7 @@ gfc_match_array_ref (gfc_array_ref *ar, gfc_array_spec > *as,

Re: [PATCH, rs6000] Testcase fix-ups for gimple-folding intrinsic tests.

2018-01-19 Thread Segher Boessenkool
Hi! On Fri, Jan 19, 2018 at 01:14:08PM -0600, Will Schmidt wrote: > Some testcase fix-ups affecting the gimple-folding tests, including: > - Add xxspltib as a valid instruction for vec-abs tests (power9). > - Fix up mismatched dg-require and dg-option values for the >

Re: [C++ PATCH] Speed up inplace_merge algorithm & fix inefficient logic(PR c++/83938)

2018-01-19 Thread Jason Merrill
This is a libstdc++ bug and patch, not the C++ front end. So I'm adding the libstdc++ list to CC. On Fri, Jan 19, 2018 at 3:02 AM, chang jc wrote: > Current std::inplace_merge() suffers from performance issue by inefficient > logic under limited memory, > > It leads to

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Bill Schmidt
> On Jan 19, 2018, at 3:09 PM, Jakub Jelinek wrote: > > On Fri, Jan 19, 2018 at 02:58:07PM -0600, Bill Schmidt wrote: >> --- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c (revision >> 256894) >> +++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c (working

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Andreas Schwab
On Jan 19 2018, Bill Schmidt wrote: >> On Jan 19, 2018, at 3:09 PM, Jakub Jelinek wrote: >> >> On Fri, Jan 19, 2018 at 02:58:07PM -0600, Bill Schmidt wrote: >>> --- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c (revision >>> 256894) >>>

[PATCH] Fix UMOD rtx simplification (PR target/83930)

2018-01-19 Thread Jakub Jelinek
Hi! THis bug has been introduced 16.5 years ago. If simplify_binary_operation_1 is called with op1 (MEM) on which avoid_constant_pool_reference returns something simpler, for UMOD simplification we check that trueop1 is CONST_INT and power of 2, but then we use INTVAL of the op1 (MEM). Fixed by

[PATCH] Fix tree-emutls ADDR_EXPR handling (PR middle-end/83945)

2018-01-19 Thread Jakub Jelinek
Hi! Before emutls lowering, expressions like _REF[(whatever)].a for static __thread e is considered gimple invariant (after all, for native TLS we do that too) and gimple invariants are shareable trees. lower_emutls* then has code to update the VAR_DECL in there with an SSA_NAME and if needed,

[og7,nvptx] Backport CUDA 9 support from trunk.

2018-01-19 Thread Cesar Philippidis
I've committed this patch to openacc-gcc-7-branch which backports the recent CUDA 9 changes I applied to trunk here . OG7 already had an earlier version of this patch, but Tom requested some changes which went made their way into trunk.

Re: Small C++ tweak to fold_simple

2018-01-19 Thread Jason Merrill
On Fri, Jan 19, 2018 at 8:28 AM, Marek Polacek wrote: > fold_simple struck me as odd, certainly the NULL_TREE assignment is > unnecessary, so this patch simplifies it a bit. OK. > I've been confused about the commentary too, what is the difference between >

Re: [PATCH v2, rs6000] Implement 32- and 64-bit BE handling for -mno-speculate-indirect-jumps

2018-01-19 Thread Bill Schmidt
On Jan 19, 2018, at 12:32 PM, David Edelsohn wrote: > > This patch is incorrect for AIX. Which also means that the backport > to GCC 7 branch is incorrect for AIX and must be corrected before the > release. > > AIX assembler does not accept "." (period) as the current

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Bill Schmidt
I see that David already proposed this same patch in PR83946. Sorry, I've gotten behind on my email. Two changes I need: The scan-assembly should have \$ rather than $ in it, and I should add PR83946 to the ChangeLog. Sorry for the noise. -- Bill Bill Schmidt, Ph.D. STSM, GCC Architect for

[PATCH] Fix branch probability computation in do_compare_rtx_and_jump (PR tree-optimization/83081)

2018-01-19 Thread Jakub Jelinek
Hi! This PR is about a certain test FAILing on arm, because it scans for "Invalid sum ..." message in the *.ira dump, but recent GCC versions have that message in there; not introduced by IRA though, but all the way from expansion. We are expanding: [local count: 1073741825]: _1 = *x_3(D);

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Segher Boessenkool
On Fri, Jan 19, 2018 at 10:20:23PM +0100, Andreas Schwab wrote: > On Jan 19 2018, Bill Schmidt wrote: > > >> On Jan 19, 2018, at 3:09 PM, Jakub Jelinek wrote: > >> > >> On Fri, Jan 19, 2018 at 02:58:07PM -0600, Bill Schmidt wrote: > >>> ---

Re: [PATCH v3, rs6000] Add -mspeculate-indirect-jumps option and implement non-speculating bctr / bctrl

2018-01-19 Thread Segher Boessenkool
On Fri, Jan 19, 2018 at 10:01:50AM -0700, Sandra Loosemore wrote: > > I see no documentation for the new option here :-( +;; -mno-speculate-indirect-jumps adds deliberate misprediction to indirect +;; branches via the CTR. +mspeculate-indirect-jumps +Target Undocumented

[PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Bill Schmidt
Hi, My recent patches to trunk and gcc-7-branch for avoiding speculation of indirect branches has a flaw, pointed out by David. Usage of "." to represent the program counter is not portable across all POWER assemblers, particularly not being accepted on AIX. "$" is the universally accepted

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Jakub Jelinek
On Fri, Jan 19, 2018 at 02:58:07PM -0600, Bill Schmidt wrote: > --- gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c (revision > 256894) > +++ gcc/testsuite/gcc.target/powerpc/safe-indirect-jump-2.c (working copy) > @@ -30,4 +30,4 @@ int foo (int x) > > /* { dg-final {

[C++] Deprecate old for-scope handling

2018-01-19 Thread Nathan Sidwell
Jason, what do you think about deprecating the ARM-era for-scope handling that allows: void f () { for (int i = 0;;); i = 2; } we noisily accept that in c++98 mode with -fpermissive. It wasn't even well formed then. Implementing this has some unique requirements in the

Re: [C++ PATCH] Fix ICE in joust with -Wconversion (PR c++/81167)

2018-01-19 Thread Jason Merrill
On Thu, Jan 18, 2018 at 6:35 PM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, we ICE on this testcase because > w->fn is a conversion operator, w->convs[0]->type is a reference > to a class type, but because that conversion is ck_ref_bind, > source_type looks through

Re: [C++ PATCH] Avoid spurious -Wignored-qualifiers warning on artificial C++17 P0138R2 cast (PR c++/83919)

2018-01-19 Thread Jason Merrill
OK. On Thu, Jan 18, 2018 at 6:17 PM, Jakub Jelinek wrote: > Hi! > > These casts for P0138R2 isn't something the user typed in their code, > so diagnosing -Wignored-qualifiers on these looks wrong. > -Wuseless-cast has been handled similarly in the past already. > >

Re: [PATCH] Fix unwind info in x86 interrupt functions (PR debug/83728)

2018-01-19 Thread Jason Merrill
On Thu, Jan 18, 2018 at 6:28 PM, Jakub Jelinek wrote: > Last summer i386 INCOMING_FRAME_SP_OFFSET macro has been changed, so that it > is one word for most of the functions (as previously always), but 2 words > for functions with interrupt attribute. > Unfortunately this breaks

Re: [C++ Patch] PR 83921 ("[7/8 Regression] GCC rejects constexpr initialization of empty aggregate")

2018-01-19 Thread Jason Merrill
On Thu, Jan 18, 2018 at 5:53 PM, Paolo Carlini wrote: > Hi, > > I'm finishing testing on x86_64-linux the below - which anyway seems very > unlikely to cause regressions because we aren't really stress testing the > relevant checks in potential_constant_expression_1

[Committed] PR fortran/80768 -- testcase

2018-01-19 Thread Steve Kargl
Jakub fixed a typo in --- r250734 | jakub | 2017-07-31 02:32:02 -0700 (Mon, 31 Jul 2017) | 2 lines * check.c (gfc_check_num_images): Fix a pasto. but he seemed to be unaware of PR fortran/80768. I've converted to code

Re: [PATCH, x86, libgcc] PR target/83917 Correct debug for -mcall-ms2sysv-xlogues stubs

2018-01-19 Thread Jakub Jelinek
On Fri, Jan 19, 2018 at 05:33:10PM -0600, Daniel Santos wrote: > When stepping through tail-call restore stubs the debugger has to assume > that rsp - 8 is the CFA, although it is not. This is because I did not > explicitly add any .cfi directives. This patch adds them to the > tail-call restore

patch to fix PR83147

2018-01-19 Thread Vladimir Makarov
The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83147 The patch was successfully boostrapped and tested on x86_64. There is no test for the patch because a test from the PR does not reproduce the bug anymore. Committed as rev. 256902. Index: ChangeLog

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Bill Schmidt
> On Jan 19, 2018, at 3:58 PM, Segher Boessenkool > wrote: > > On Fri, Jan 19, 2018 at 10:20:23PM +0100, Andreas Schwab wrote: >> On Jan 19 2018, Bill Schmidt wrote: >> On Jan 19, 2018, at 3:09 PM, Jakub Jelinek

Re: [PATCH, fortran] Support Fortran 2018 teams

2018-01-19 Thread Alessandro Fanfarillo
I can confirm that the little change suggested by Steve passes the regtests (on x86_64-pc-linux-gnu) and the regular tests using OpenCoarrays. On Fri, Jan 19, 2018 at 10:33 AM, Steve Kargl wrote: > On Fri, Jan 19, 2018 at 09:18:14AM -0800, Damian Rouson wrote:

Re: [C++ Patch] PR 83921 ("[7/8 Regression] GCC rejects constexpr initialization of empty aggregate")

2018-01-19 Thread Paolo Carlini
Hi, On 19/01/2018 23:28, Jason Merrill wrote: On Thu, Jan 18, 2018 at 5:53 PM, Paolo Carlini wrote: Hi, I'm finishing testing on x86_64-linux the below - which anyway seems very unlikely to cause regressions because we aren't really stress testing the relevant

[PATCH, x86, libgcc] PR target/83917 Correct debug for -mcall-ms2sysv-xlogues stubs

2018-01-19 Thread Daniel Santos
When stepping through tail-call restore stubs the debugger has to assume that rsp - 8 is the CFA, although it is not. This is because I did not explicitly add any .cfi directives. This patch adds them to the tail-call restore stubs, but this is new territory for me, so I would appreciate

Re: [PATCH, i386]: Backport a small retpoline improvement to gcc-7 branch

2018-01-19 Thread Richard Biener
On Thu, 18 Jan 2018, Uros Bizjak wrote: > Hello! > > I'd like to backport a small improvement to retpoline functionality to > gcc-7 branch. > > 2018-01-17 Uros Bizjak > > * config/i386/i386.c (indirect_thunk_name): Declare regno > as unsigned int. Compare regno

[C++ PATCH] Speed up inplace_merge algorithm & fix inefficient logic(PR c++/83938)

2018-01-19 Thread chang jc
Current std::inplace_merge() suffers from performance issue by inefficient logic under limited memory, It leads to performance downgrade. Please help to review it. Index: include/bits/stl_algo.h === --- include/bits/stl_algo.h

[libstdc++][testsuite] Fix dg-options/dg-add-options order

2018-01-19 Thread Christophe Lyon
Hi, While checking dg directives order, I've noticed a few libstdc++ tests where the current order is: // { dg-add-options ieee } // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" } while dg-add-options should be after dg-options. The attached patch fixes that, is that OK for stage4? I've

Re: [PATCH,PTX] Add support for CUDA 9

2018-01-19 Thread Tom de Vries
On 01/19/2018 01:59 AM, Cesar Philippidis wrote: Here's the updated patch with the changes that you requested. There are no new regressions in trunk. I tested it on my desktop running driver 387.34 on a Pascal GPU. Is this OK for trunk? OK with 'PR target/83790' added to the changelog entry.

Re: [PATCH] Fix pr83619.C (was Re: Fix ICE with profile info mismatch)

2018-01-19 Thread Jan Hubicka
> On Thu, Jan 18, 2018 at 04:59:01PM +0100, Jan Hubicka wrote: > > this patch ICE where the profile in cgraph mismatch profile in BB. This is > > becuase > > of expansion of speculative devirtualization where we get some roundoff > > issues. > > > > Bootstrapped/regtested x86_64-linux,

Check whether any statements need masking (PR 83922)

2018-01-19 Thread Richard Sandiford
This PR is an odd case in which, due to the low optimisation level, we enter vectorisation with: outer1: x_1 = PHI ; ... inner: x_2 = 0; ... outer2: x_3 = PHI ; These statements are tentatively treated as a double reduction by

[PATCH][arm] Fix gcc.target/arm/pr79058.c

2018-01-19 Thread Kyrill Tkachov
Hi all, This testcase tests 32-bit ARM state functionality, so add the -marm to make it explicit as well as to avoid Thumb1 hard-float errors for certain toolchain configurations. Committing to trunk. Thanks, Kyrill 2018-01-19 Kyrylo Tkachov *

Avoid ICE for nested inductions (PR 83914)

2018-01-19 Thread Richard Sandiford
This testcase ICEd because we converted the initial value of an induction to the vector element type even for nested inductions. This isn't necessary because the initial expression is vectorised normally, and it meant that init_expr was no longer the original statement operand by the time we

Re: [libstdc++][testsuite] Fix dg-options/dg-add-options order

2018-01-19 Thread Jonathan Wakely
On 19/01/18 09:44 +0100, Christophe Lyon wrote: Hi, While checking dg directives order, I've noticed a few libstdc++ tests where the current order is: // { dg-add-options ieee } // { dg-options "-D__STDCPP_WANT_MATH_SPEC_FUNCS__" } while dg-add-options should be after dg-options. Yes, those

Re: [libstdc++][testsuite] Fix dg-options/dg-add-options order

2018-01-19 Thread Christophe Lyon
On 19 January 2018 at 11:12, Jonathan Wakely wrote: > On 19/01/18 09:44 +0100, Christophe Lyon wrote: >> >> Hi, >> >> While checking dg directives order, I've noticed a few libstdc++ tests >> where the current order is: >> // { dg-add-options ieee } >> // { dg-options

[PATCH][arm] Fix gcc.target/arm/pr40956.c

2018-01-19 Thread Kyrill Tkachov
Hi all, The scan-assembler tests here check for MOVS for Thumb1 and MOV for Thumb2, but in fact there's no reason why we wouldn't generate MOVS for Thumb2 as well, it really depends on a lot of optimisation decisions. The only behaviour we want to test is that we move a 0 constant into a

Re: [PATCH] -Warray-bounds: Fix false positive in some "switch" stmts (PR tree-optimization/83510)

2018-01-19 Thread Richard Biener
On Fri, Jan 19, 2018 at 12:36 AM, David Malcolm wrote: > PR tree-optimization/83510 reports that r255649 (for > PR tree-optimization/83312) introduced a false positive for > -Warray-bounds for array accesses within certain switch statements: > those for which value-ranges

[PATCH][arm] Fix gcc.target/arm/negdi-[12].c

2018-01-19 Thread Kyrill Tkachov
Hi all, These tests are failing for a silly reason. They scan for an occurrence of the NEGS instruction. NEGS (and NEG in general) is a pre-UAL alias of RSB with an immediate of 0 and we only emit it in one pattern: *thumb2_negsi2_short in thumb2.md. In all other instances of negation we emit

Re: [PATCH] Fix UMOD rtx simplification (PR target/83930)

2018-01-19 Thread Richard Biener
On January 19, 2018 10:29:36 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >THis bug has been introduced 16.5 years ago. If >simplify_binary_operation_1 >is called with op1 (MEM) on which avoid_constant_pool_reference returns >something simpler, for UMOD simplification we check

Re: [PATCH] Fix tree-emutls ADDR_EXPR handling (PR middle-end/83945)

2018-01-19 Thread Richard Biener
On January 19, 2018 10:52:08 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >Before emutls lowering, expressions like _REF[(whatever)].a >for static __thread e is considered gimple invariant (after all, for >native TLS we do that too) and gimple invariants are shareable trees.

Re: [PATCH v2, rs6000] Use $ instead of . for PC

2018-01-19 Thread Bill Schmidt
Forgot to mention, these have also been tested successfully as backports in gcc-7-branch. Okay to fix there as well? Thanks, Bill > On Jan 19, 2018, at 9:31 PM, Bill Schmidt wrote: > > Hi, > > Here's the same patch with corrected test cases. This has now passed

[PATCH, rs6000] Requested cleanups for BE handling of -mno-speculate-indirect-jumps

2018-01-19 Thread Bill Schmidt
Hi, Segher had previously requested some cleanups in https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01605.html. Due to time pressures, I delayed those, but they are ready now. Here they are, bootstrapped and tested on powerpc64le-linux-gnu and powerpc64-linux-gnu. Is this okay for trunk? I

[PATCH v3, rs6000] Use $ instead of . for PC, use "crset 2" instead of "crset eq"

2018-01-19 Thread Bill Schmidt
Hi, Here's another version of this patch incorporating the late-breaking news that the AIX assembler doesn't comprehend the "eq" symbol. Same as https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01787.html but adding the change to use "crset 2" instead. This one is still regstrapping on BE/LE,

[PATCH v2, rs6000] Use $ instead of . for PC

2018-01-19 Thread Bill Schmidt
Hi, Here's the same patch with corrected test cases. This has now passed bootstrap and testing on powerpc64-linux-gnu and powerpc64le-linux-gnu with no regressions. Is this okay for trunk? Hopefully tomorrow early I will have a separate patch also changing "setcr eq" to "setcr 2" to

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

2018-01-19 Thread Martin Sebor
On 01/19/2018 10:14 AM, Martin Sebor wrote: On 01/14/2018 07:29 AM, H.J. Lu wrote: When address of packed member of struct or union is taken, it may result in an unaligned pointer value. This patch adds -Waddress-of-packed-member to warn it: $ cat x.i struct pair_t { char c; int i; }

[Committed] PR fortran/83900 -- Remove bogus assert

2018-01-19 Thread Steve Kargl
The patch and testcase are sufficient to describe the problem. 2018-01-19 Steven G. Kargl PR fortran/83900 * simplify.c (gfc_simplify_matmul): Delete bogus assertion. 2018-01-19 Steven G. Kargl PR fortran/83900 *

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread David Edelsohn
On Fri, Jan 19, 2018 at 3:58 PM, Bill Schmidt wrote: > Hi, > > My recent patches to trunk and gcc-7-branch for avoiding speculation of > indirect branches has a flaw, pointed out by David. Usage of "." to > represent the program counter is not portable across all

Re: [C++ Patch] PR 83921 ("[7/8 Regression] GCC rejects constexpr initialization of empty aggregate")

2018-01-19 Thread Paolo Carlini
Hi again, On 19/01/2018 23:55, Paolo Carlini wrote: ...Therefore It seems to me that a way to more cleanly solve the bug would be moving something like || !DECL_NONTRIVIALLY_INITIALIZED_P to the the above check in check_for_uninitialized_const_var, and therefore remove completely the

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Segher Boessenkool
On Fri, Jan 19, 2018 at 08:53:52PM -0500, David Edelsohn wrote: > On Fri, Jan 19, 2018 at 3:58 PM, Bill Schmidt > wrote: > > Hi, > > > > My recent patches to trunk and gcc-7-branch for avoiding speculation of > > indirect branches has a flaw, pointed out by David.

Re: [PATCH, rs6000] Use $ instead of . for PC

2018-01-19 Thread Bill Schmidt
> On Jan 19, 2018, at 7:53 PM, David Edelsohn wrote: > > On Fri, Jan 19, 2018 at 3:58 PM, Bill Schmidt > wrote: >> Hi, >> >> My recent patches to trunk and gcc-7-branch for avoiding speculation of >> indirect branches has a flaw, pointed out by