[PATCH, AArch64 10/11] aarch64: Implement TImode compare-and-swap

2018-09-25 Thread rth7680
From: Richard Henderson This pattern will only be used with the __sync functions, because we do not yet have a bare TImode atomic load. * config/aarch64/aarch64.c (aarch64_gen_compare_reg): Add support for NE comparison of TImode values. (aarch64_print_operand):

[PATCH, AArch64 09/11] aarch64: Implement -matomic-ool

2018-09-25 Thread rth7680
From: Richard Henderson * config/aarch64/aarch64.opt (-matomic-ool): New. * config/aarch64/aarch64.c (aarch64_atomic_ool_func): New. (aarch64_ool_cas_names, aarch64_ool_swp_names): New. (aarch64_ool_ldadd_names, aarch64_ool_ldset_names): New.

[PATCH, AArch64 11/11] Enable -matomic-ool by default

2018-09-25 Thread rth7680
From: Richard Henderson Do Not Merge Upstream. This is for agraf and his testing within SLES. --- gcc/common/config/aarch64/aarch64-common.c | 6 -- gcc/config/aarch64/aarch64.c | 6 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git

[PATCH, AArch64 04/11] aarch64: Improve atomic-op lse generation

2018-09-25 Thread rth7680
From: Richard Henderson Fix constraints; avoid unnecessary split. Drop the use of the atomic_op iterator in favor of the ATOMIC_LDOP iterator; this is simplier and more logical for ldclr aka bic. * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.

[PATCH, AArch64 08/11] aarch64: Add out-of-line functions for LSE atomics

2018-09-25 Thread rth7680
From: Richard Henderson This is the libgcc part of the interface -- providing the functions. Rationale is provided at the top of libgcc/config/aarch64/lse.c. * config/aarch64/lse.c: New file. * config/aarch64/t-lse: New file. * config.host: Add t-lse to all aarch64

[PATCH, AArch64 07/11] Link static libgcc after shared libgcc for -shared-libgcc

2018-09-25 Thread rth7680
From: Richard Henderson We are about to introduce symbols to libgcc.a that will not be present in libgcc_s.so. Most symbols will be resolved from the shared library first, and only the new symbols will be pulled from the static library. * gcc.c (init_gcc_specs): Include static_name

[PATCH, AArch64 06/11] Add visibility to libfunc constructors

2018-09-25 Thread rth7680
From: Richard Henderson * optabs-libfuncs.c (build_libfunc_function_visibility): New, split out from... (build_libfunc_function): ... here. (init_one_libfunc_visibility): New, split out from ... (init_one_libfunc): ... here. --- gcc/optabs-libfuncs.h | 2

[PATCH, AArch64 01/11] aarch64: Simplify LSE cas generation

2018-09-25 Thread rth7680
From: Richard Henderson The cas insn is a single insn, and if expanded properly need not be split after reload. Use the proper inputs for the insn. * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap): Force value into a register for TARGET_LSE; avoid register

[PATCH, AArch64 00/11] LSE atomics out-of-line

2018-09-25 Thread rth7680
From: Richard Henderson ARMv8.1 adds an (mandatory) Atomics extension, also known as the Large System Extension. Deploying this extension at the OS level has proved challenging. The following is the result of a conversation between myself, Alex Graf of SuSE, and Ramana Radhakrishnan of ARM, at

[PATCH, AArch64 03/11] aarch64: Improve swp generation

2018-09-25 Thread rth7680
From: Richard Henderson Allow zero as an input; fix constraints; avoid unnecessary split. * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove. (aarch64_gen_atomic_ldop): Don't call it. * config/aarch64/atomics.md (atomic_exchange): Use

[PATCH, AArch64 02/11] aarch64: Improve cas generation

2018-09-25 Thread rth7680
From: Richard Henderson Do not zero-extend the input to the cas for subword operations; instead, use the appropriate zero-extending compare insns. Correct the predicates and constraints for immediate expected operand. * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.

[PATCH, AArch64 05/11] aarch64: Emit LSE st instructions

2018-09-25 Thread rth7680
From: Richard Henderson When the result of an operation is not used, we can ignore the result by storing to XZR. For two of the memory models, using XZR with LD has a preferred assembler alias, ST. * config/aarch64/atomics.md (aarch64_atomic__lse): Use ST for relaxed and

Re: libgo patch committed: Update to 1.11 release

2018-09-25 Thread Ian Lance Taylor
On Tue, Sep 25, 2018 at 6:26 AM, Rainer Orth wrote: > >> /vol/gcc/src/hg/trunk/local/libgo/go/runtime/traceback_gccgo.go:151:14: >> error: reference to undefined name 'nanotime' >> 151 | waitfor = (nanotime() - gp.waitsince) / 60e9 >> | ^ >> >> and many many more instances.

Re: [PATCH][OpenACC] Update deviceptr handling during gimplification

2018-09-25 Thread Julian Brown
On Tue, 7 Aug 2018 15:09:38 -0700 Cesar Philippidis wrote: > I had previously posted this patch as part of a monster deviceptr > patch here > . This > patch breaks out the generic gimplifier changes. Essentially, with > this patch, the

PING: [PATCH][Middle-end][Version 4]Add a new option to control inlining only on static functions

2018-09-25 Thread Qing Zhao
Hi, I’d like to ping the following patch. https://gcc.gnu.org/ml/gcc-patches/2018-09/msg01238.html Thanks. Qing

[PATCH] rs6000: Use set_attr_alternative in some places

2018-09-25 Thread Segher Boessenkool
Some code is much neater if it uses set_attr_alternative than if it does everything by hand. Change some patterns to use this shorthand. 2018-09-25 Segher Boessenkool * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative. (*call_indirect_nonlocal_sysv):

[PATCH] rs6000: Simplify "switch (which_alternative)" patterns

2018-09-25 Thread Segher Boessenkool
A few of the rs6000 patterns use C code as output control string, where that code is just a "switch (which_alternative)" with all alternatives returning a constant string or just the result of a function call as template. Write such cases as just a list of templates, with the few pieces that are C

Re: [PR 87347] Prevent segfaults if TYPE_ARG_TYPES is NULL

2018-09-25 Thread Joseph Myers
On Tue, 25 Sep 2018, Jakub Jelinek wrote: > On Tue, Sep 25, 2018 at 05:47:49PM +0200, Martin Jambor wrote: > > > Isn't that bail out too early? > > > I mean most of the warnings that are emitted by the function don't really > > > need TYPE_ARG_TYPES, only the last one does, so can't you just bail

[PATCH] RISC-V: Fix weak symbols with medany and explicit relocs.

2018-09-25 Thread Jim Wilson
When using -mcmodel=medany -mexplicit-relocs, weak symbol references aren't handled correctly. The conditional test gets optimized away by the compiler. The problem is with the RTL generated for the instruction pair for a symbol reference, where the lo part insn only has a label pointing at the

Re: [RFC PATCH, i386]: Rewrite nearbyint expanders

2018-09-25 Thread Joseph Myers
On Mon, 24 Sep 2018, Uros Bizjak wrote: > There is no issue with traps with SSE 4.1 round instruction. This > instruction can suppress generation of precision interrupt by setting > ROUND_NO_EXC bit in its immediate operand. If you're supporting inlining nearbyint / nearbyintf for SSE 4.1, note

Re: [PATCH] Cleanup strcpy/stpcpy no nul warning code

2018-09-25 Thread Jeff Law
On 9/16/18 1:58 PM, Bernd Edlinger wrote: > Hi, > > this is a cleanup of the recently added strlen/strcpy/stpcpy > no nul warning code. > > Most importantly it moves the SSA_NAME handling from > unterminated_array to string_constant, thereby fixing > another round of xfails in the strlen and

[PATCH] rs6000: Do not allow out of range immediate in vsplt[bhw] (PR86987)

2018-09-25 Thread Segher Boessenkool
The original AltiVec manuals had the immediate lane number in the splat instructions as a 5-bit number, but anything too big has no defined meaning, and gas will choke on it too. This patch disallows it in the instruction patterns as well as in the builtins. This solves PR86987. Tested on

Re: [patch] Extend thunk support and use it in Ada

2018-09-25 Thread Eric Botcazou
> I think you should also handle duplicate_thunk_for_node in > cgraphclones.c. That function clones thunks when the function they > belong to gets cloned. If you think you don't need to handle it for one > reason or another, at the very least put an assert there that > indirect_offset is zero.

[PATCH] dumpfile.c: use prefixes other that 'note: ' for MSG_{OPTIMIZED_LOCATIONS|MISSED_OPTIMIZATION}

2018-09-25 Thread David Malcolm
As noted at Cauldron, dumpfile.c currently emits "note: " for all kinds of dump message, so that (after filtering) there's no distinction between MSG_OPTIMIZED_LOCATIONS vs MSG_NOTE vs MSG_MISSED_OPTIMIZATION in the textual output. This patch changes dumpfile.c so that the "note: " varies to show

[PATCH] Fix build with ISL 0.20

2018-09-25 Thread Alexey Neyman
Hi, A trivial patch that fixes the build against the latest ISL release, 0.20. In that release, and were split in two headers each. The (included from which is included by "graphite.h") now includes and ; and must be included explicitly. These headers ( and ) are present in all

adjust dinst.adb's expectations for location views

2018-09-25 Thread Alexandre Oliva
The testcase failed when the compiler used .loc view syntax, because it expected discriminators at the end of the .loc lines. Tested with both -gas-locview-support and -gno-as-locview-support. I'm checking it in as obvious. for gcc/testsuite/ChangeLog * gnat.dg/dinst.adb: Adjust for

Re: [Patch, fortran] PRs 70752 and 72709 - more deferred character length bugs

2018-09-25 Thread Janne Blomqvist
On Tue, Sep 25, 2018 at 8:06 PM Paul Richard Thomas < paul.richard.tho...@gmail.com> wrote: > This patch is a bit more complicated than some of the previous posts. > However, the ChangeLog explains the story pretty clearly. > > Bootstraps and regtests on FC21/x86_64 - OK for trunk and 8-branch? >

Re: [Patch, fortran] PR70149 - [F08] Character pointer initialization causes ICE

2018-09-25 Thread Janne Blomqvist
On Tue, Sep 25, 2018 at 7:43 PM Paul Richard Thomas < paul.richard.tho...@gmail.com> wrote: > This is yet another deferred length character bug. The fix speaks for > itself. I'll dream up a more suitable name for the testcase before > committing. > > Bootstraps and regtests on FC21/x86_64 - OK

Re: [PATCH] Fix EQ_ATTR_ALT size calculation (PR bootstrap/87417)

2018-09-25 Thread Jeff Law
On 9/24/18 11:15 PM, Richard Sandiford wrote: > Ilya Leoshkevich writes: >> Bootstrap and regtest running on s390x-redhat-linux. >> >> "r264537: Change EQ_ATTR_ALT to support up to 64 alternatives" changed >> the format of EQ_ATTR_ALT from ii to ww. This broke the bootstrap on >> 32-bit systems,

Re: [PR 87339, testsuite] Fix failure of gcc.dg/warn-abs-1.c on some targets

2018-09-25 Thread Jeff Law
On 9/24/18 12:45 PM, Martin Jambor wrote: > Hi, > > the test added to check whether _Float128 types are handled correctly by > the new warning about suspicious calls to abs-like functions fails on > many platforms. The patch below circumvents the problem by running on > i686/x86_64 only. I

C++ PATCH to add test for c++/87425

2018-09-25 Thread Marek Polacek
As a nice side effect, c++/87398 fixed this PR, so let's add the testcase. Tested on x86_64-linux, applying to trunk. 2018-09-25 Marek Polacek PR c++/87425 * g++.dg/cpp2a/constexpr-virtual12.C: New test. diff --git gcc/testsuite/g++.dg/cpp2a/constexpr-virtual12.C

Re: [PATCH, rs6000] Update vec_splat references in testcases for validity. (pass2)

2018-09-25 Thread Segher Boessenkool
Hi Will, On Tue, Sep 25, 2018 at 10:47:25AM -0500, Will Schmidt wrote: > [v2 updates] > Added the -longlong testcase changes. > Add 'lxv' to expected instruction list (for power9 targets). > Update and simplify some commentary sprinkled through the tests. > > OK for trunk? It is still okay

[Patch, fortran] PRs 70752 and 72709 - more deferred character length bugs

2018-09-25 Thread Paul Richard Thomas
This patch is a bit more complicated than some of the previous posts. However, the ChangeLog explains the story pretty clearly. Bootstraps and regtests on FC21/x86_64 - OK for trunk and 8-branch? Again, better names for the testcases will be determined before committing. Paul 2018-09-25 Paul

[C++ Patch] PR 84940 ("[7/8/9 Regression] internal compiler error: in build_value_init_noctor, at cp/init.c:465")

2018-09-25 Thread Paolo Carlini
Hi, in this error-recovery regression we ICE after a sensible diagnostic emitted by cp_build_unary_op, called by finish_unary_op_expr via build_x_unary_op. In principle we could dig deeper, but I don't think it makes sense for finish_unary_op_expr to go on having seen the error_mark_node

[Patch, fortran] PR70149 - [F08] Character pointer initialization causes ICE

2018-09-25 Thread Paul Richard Thomas
This is yet another deferred length character bug. The fix speaks for itself. I'll dream up a more suitable name for the testcase before committing. Bootstraps and regtests on FC21/x86_64 - OK for trunk and 8-branch? Paul 2018-09-25 Paul Thomas PR fortran/70149 * trans-decl.c

Re: [PATCH][GCC][ARM] New helper functions to check atomicity requirements

2018-09-25 Thread Richard Earnshaw (lists)
On 24/09/18 10:22, Matthew Malcomson wrote: > A few places in the arm and aarch64 backends check whether an atomic > operation needs acquire or release semantics. > This is generally done with a check like > > (is_mm_relaxed (model) > || is_mm_consume (model) > || is_mm_release (model)) > >

Re: [PATCH, ARM] PR85434: Prevent spilling of stack protector guard's address on ARM

2018-09-25 Thread Kyrill Tkachov
Hi Thomas, On 29/08/18 10:51, Thomas Preudhomme wrote: Resend hopefully without HTML this time. On Wed, 29 Aug 2018 at 10:49, Thomas Preudhomme wrote: Hi, I've reworked the patch fixing PR85434 (spilling of stack protector guard's address on ARM) to address the testsuite regression on

Re: [PR 87347] Prevent segfaults if TYPE_ARG_TYPES is NULL

2018-09-25 Thread Jakub Jelinek
On Tue, Sep 25, 2018 at 05:47:49PM +0200, Martin Jambor wrote: > > Isn't that bail out too early? > > I mean most of the warnings that are emitted by the function don't really > > need TYPE_ARG_TYPES, only the last one does, so can't you just bail out > > before the last warning? > > my reasoning

Embedded User’s Mailing list

2018-09-25 Thread kathleen . stewart
style="background-image:initial;background-position:initial;background-size:initial;background-repeat:initial;background-origin:initial;background-clip:initial">style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,78,121)">Hi, 

Re: [PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).

2018-09-25 Thread Jakub Jelinek
On Tue, Sep 25, 2018 at 05:26:44PM +0200, Martin Liška wrote: > The only missing piece is how to implement asan_emit_redzone_payload more > smart. > It means doing memory stores with 8,4,2,1 sizes in order to reduce # of insns. > Do we have somewhere a similar code? Yeah, that is a very

Re: [PR 87339, testsuite] Fix failure of gcc.dg/warn-abs-1.c on some targets

2018-09-25 Thread Martin Jambor
Hi, On Mon, Sep 24 2018, Christophe Lyon wrote: > On Mon, 24 Sep 2018 at 20:46, Martin Jambor wrote: >> >> Hi, >> >> the test added to check whether _Float128 types are handled correctly by >> the new warning about suspicious calls to abs-like functions fails on >> many platforms. The patch

Re: [PR 87347] Prevent segfaults if TYPE_ARG_TYPES is NULL

2018-09-25 Thread Martin Jambor
Hi, On Tue, Sep 25 2018, Jakub Jelinek wrote: > On Mon, Sep 24, 2018 at 08:40:13PM +0200, Martin Jambor wrote: >> Hi, >> >> the warning for suspicious calls of abs-like functions segfaults if a >> user declared their own parameter-less-ish variant of abs like in the >> testcase below. Fixed by

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

2018-09-25 Thread H.J. Lu
On Fri, Aug 31, 2018 at 2:04 PM, Jason Merrill wrote: > On 07/23/2018 05:24 PM, H.J. Lu wrote: >> >> On Mon, Jun 18, 2018 at 12:26 PM, Joseph Myers >> wrote: >>> >>> On Mon, 18 Jun 2018, Jason Merrill wrote: >>> On Mon, Jun 18, 2018 at 11:59 AM, Joseph Myers wrote: > > On Mon,

[PATCH, rs6000] Update vec_splat references in testcases for validity. (pass2)

2018-09-25 Thread Will Schmidt
Hi, This is an updated version of the previously posted patch. This updates those powerpc testsuite tests that are using the vec_splat() builtin with an invalid arg1. Per discussions during the review of gimple-folding for vec_splat(), it was clarified that arg1 for a vec_splat() call should

Re: [C++ PATCH] Fix constexpr OBJ_TYPE_REF handling on array elts (PR c++/87398)

2018-09-25 Thread Jason Merrill
Yes, thanks. On Tue, Sep 25, 2018 at 11:14 AM, Jakub Jelinek wrote: > On Tue, Sep 25, 2018 at 11:07:19AM -0400, Jason Merrill wrote: >> > You're right. So like this (only look through COMPONENT_REFs where the >> > FIELD_DECL is DECL_FIELD_IS_BASE)? >> > Only checked >> > make check-c++-all

Re: [PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).

2018-09-25 Thread Martin Liška
On 9/25/18 12:40 PM, Jakub Jelinek wrote: > On Tue, Sep 25, 2018 at 12:10:42PM +0200, Martin Liška wrote: On 9/25/18 >> 11:24 AM, Jakub Jelinek wrote: >>> On Tue, Sep 25, 2018 at 11:05:30AM +0200, Martin Liška wrote: As requested in PR81715, GCC emits bigger middle redzones for small

Re: [C++ PATCH] Fix constexpr OBJ_TYPE_REF handling on array elts (PR c++/87398)

2018-09-25 Thread Jakub Jelinek
On Tue, Sep 25, 2018 at 11:07:19AM -0400, Jason Merrill wrote: > > You're right. So like this (only look through COMPONENT_REFs where the > > FIELD_DECL is DECL_FIELD_IS_BASE)? > > Only checked > > make check-c++-all RUNTESTFLAGS="dg.exp='constexpr-virt* pr87398*'" > > so far, but it also fixes

Re: [C++ PATCH] Fix constexpr OBJ_TYPE_REF handling on array elts (PR c++/87398)

2018-09-25 Thread Jason Merrill
On Tue, Sep 25, 2018 at 10:57 AM, Jakub Jelinek wrote: > On Tue, Sep 25, 2018 at 10:42:08AM -0400, Jason Merrill wrote: >> On Tue, Sep 25, 2018 at 3:17 AM, Jakub Jelinek wrote: >> > ARRAY_REF is a handled component, so when a virtual call is on an array >> > element (or some component thereof),

[PATCH] PR libstdc++/87431 optimise valueless_by_exception()

2018-09-25 Thread Jonathan Wakely
If a std::variant can never get into valueless state then we don't need to do a runtime check for a valid alternative. PR libstdc++/87431 * include/std/variant (_Variant_storage::_M_valid): Avoid runtime test when all alternatives are scalars and so cannot throw

Re: [PATCH] Use steady_clock to implement condition_variable::wait_for with predicate

2018-09-25 Thread Jonathan Wakely
On 12/09/18 15:35 +0100, Mike Crowe wrote: In r263225 (d2e378182a12d68fe5caeffae681252662a2fe7b), I fixed condition_variable::wait_for to use std::chrono::steady_clock for the wait. Unfortunately, I failed to spot that the same fix is required for the wait_for variant that takes a predicate too.

Re: [C++ PATCH] Fix constexpr OBJ_TYPE_REF handling on array elts (PR c++/87398)

2018-09-25 Thread Jakub Jelinek
On Tue, Sep 25, 2018 at 10:42:08AM -0400, Jason Merrill wrote: > On Tue, Sep 25, 2018 at 3:17 AM, Jakub Jelinek wrote: > > ARRAY_REF is a handled component, so when a virtual call is on an array > > element (or some component thereof), the loop to look through handled > > components will look

Re: [C++ PATCH] Fix constexpr OBJ_TYPE_REF handling on array elts (PR c++/87398)

2018-09-25 Thread Jason Merrill
On Tue, Sep 25, 2018 at 3:17 AM, Jakub Jelinek wrote: > ARRAY_REF is a handled component, so when a virtual call is on an array > element (or some component thereof), the loop to look through handled > components will look through the ARRAY_REFs too and then TREE_TYPE (obj) > might be an

Re: [PATCH][RFC] Fix PRs 87362/87428

2018-09-25 Thread Jason Merrill
On Tue, Sep 25, 2018 at 9:55 AM, Richard Biener wrote: > On Tue, 25 Sep 2018, Jason Merrill wrote: > >> On Tue, Sep 25, 2018 at 6:34 AM, Richard Biener wrote: >> > >> > Hi, >> > >> > the following two patches both "fix" the immediate issue of gdb >> > asserting with >> > >> >

Re: libgo patch committed: Update to 1.11 release

2018-09-25 Thread Ian Lance Taylor
On Tue, Sep 25, 2018 at 1:03 AM, Andreas Schwab wrote: > ../../../libgo/go/internal/cpu/cpu.go:21:16: error: reference to undefined > name ‘CacheLineSize’ > 21 | _[CacheLineSize]byte >|^ > ../../../libgo/go/internal/cpu/cpu.go:38:16: error: reference to undefined

Re: [C++ PATCH] Fix constexpr OBJ_TYPE_REF handling on array elts (PR c++/87398)

2018-09-25 Thread Marek Polacek
On Tue, Sep 25, 2018 at 09:17:54AM +0200, Jakub Jelinek wrote: > Hi! > > ARRAY_REF is a handled component, so when a virtual call is on an array > element (or some component thereof), the loop to look through handled > components will look through the ARRAY_REFs too and then TREE_TYPE (obj) >

Re: [ARM] Fix ICE during thunk generation with -mlong-calls

2018-09-25 Thread Richard Earnshaw (lists)
On 24/09/18 10:19, Eric Botcazou wrote: >> Ah! But that still doesn't explain why you want to skip these passes >> when building thunks. > > They simply don't work because there is no CFG for thunks; I can add a blurb > about that. Yes, this needs a comment as it's far from obvious when

[patch] Fix AArch64 ILP ICE

2018-09-25 Thread Andrew Stubbs
On 22/09/18 19:51, Andreas Schwab wrote: That breaks aarch64 ILP32. The problem is that the mode given to expand_expr is just a "hint", apparently, and it's being ignored. I'm testing the attached patch for GCN. It fixes the ICE for AArch64 just fine. OK? Andrew Fix AArch64 ILP32 ICE.

libgo patch committed: Pass down newly built gccgo in TestScript

2018-09-25 Thread Ian Lance Taylor
This patch changes libgo so that the cmd/go TestScript test passes down the newly built gccgo in TestScript. This permits TestScript to work when gccgo is not installed. Previous testing was using a previously installed gccgo, not the newly built one. This revealed that the testing of whether

Re: [PATCH][RFC] Fix PRs 87362/87428

2018-09-25 Thread Richard Biener
On Tue, 25 Sep 2018, Jason Merrill wrote: > On Tue, Sep 25, 2018 at 6:34 AM, Richard Biener wrote: > > > > Hi, > > > > the following two patches both "fix" the immediate issue of gdb > > asserting with > > > > ../../gdb/dwarf2read.c:9730: internal-error: void > > dw2_add_symbol_to_list(symbol*,

[PATCH] i386: Check -mindirect-branch/-mfunction-return with -fcf-protection

2018-09-25 Thread H.J. Lu
Issue an error when -mindirect-branch or -mfunction-return are used with incompatible -fcf-protection. gcc/ PR target/87412 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an error for -mindirect-branch/-mfunction-return with incompatible

Re: [PATCH][RFC] Fix PRs 87362/87428

2018-09-25 Thread Jason Merrill
On Tue, Sep 25, 2018 at 6:34 AM, Richard Biener wrote: > > Hi, > > the following two patches both "fix" the immediate issue of gdb > asserting with > > ../../gdb/dwarf2read.c:9730: internal-error: void > dw2_add_symbol_to_list(symbol*, pending**): Assertion `(*listhead) == NULL > ||

Re: [PATCH v4] [aarch64] Add HiSilicon tsv110 CPU support

2018-09-25 Thread Zhangshaokun
Hi ARM maintainers, Any plan to support CTR_EL0.DIC and CTR_EL0.IDC in GCC? I saw it has been supported in linux mainline(on Mar 7), Patch link: http://lists.infradead.org/pipermail/linux-arm-kernel/2018-March/565090.html Kernel link:

Re: [PATCH 2/4] Remove unused functions and fields.

2018-09-25 Thread Jeff Law
On 9/25/18 6:19 AM, Richard Biener wrote: > On Tue, Sep 25, 2018 at 9:09 AM Martin Liška wrote: >> >> On 9/24/18 4:42 PM, Jeff Law wrote: >>> On 9/22/18 1:08 PM, marxin wrote: gcc/ChangeLog: 2018-09-24 Martin Liska * alias.c (set_dest_equal_p): Remove unused

Re: libgo patch committed: Update to 1.11 release

2018-09-25 Thread Rainer Orth
Hi Ian, > /vol/gcc/src/hg/trunk/local/libgo/go/runtime/traceback_gccgo.go:151:14: > error: reference to undefined name 'nanotime' > 151 | waitfor = (nanotime() - gp.waitsince) / 60e9 > | ^ > > and many many more instances. Again, I found an implementation in > upstream

Re: [PATCH] Do array index calculations in gfc_array_index_type

2018-09-25 Thread Janne Blomqvist
On Tue, Sep 25, 2018 at 10:57 AM Jakub Jelinek wrote: > For -m64, the last lock/unlock are: > _gfortran_caf_lock (four.token, (unsigned long) (1 - > four.dim[0].lbound), (integer(kind=4)) (7 - four.dim[1].lbound), > , , 0B, 0); > _gfortran_caf_unlock (four.token, (unsigned long) (2 - >

[PATCH 6/6, OpenACC, libgomp] Async re-work, nvptx changes

2018-09-25 Thread Chung-Lin Tang
Hi Tom, this patch removes large portions of plugin/plugin-nvptx.c, since a lot of it is now in oacc-async.c now. The new code is essentially a NVPTX/CUDA-specific implementation of the new-style goacc_asyncqueues. Also, some needed functions in cuda-lib.def are added. The cuda.h function has

[PATCH 3/6, OpenACC, libgomp] acc_get/set_default_async API, Fortran specific parts

2018-09-25 Thread Chung-Lin Tang
This patch adds the OpenACC 2.5 new APIs of acc_get_default_async/acc_set_default_async, contained are the modifications for Fortran in libgomp/openacc.f90, libgomp/openacc_lib.h, and a small testsuite adjustment. Thanks, Chung-Lin * openacc.f90 (acc_async_default): Declare.

[PATCH 2/6, OpenACC, libgomp] Async re-work, oacc-* parts

2018-09-25 Thread Chung-Lin Tang
Hi Thomas, These are the OpenACC specific changes, mostly the re-implementation of async-related acc_* runtime library API functions to use the new backend plugin interfaces, in a non-target specific way. Thanks, Chung-Lin * oacc-async.c (get_goacc_thread): New function.

[PATCH 1/6, OpenACC, libgomp] Async re-work, interfaces

2018-09-25 Thread Chung-Lin Tang
This patch separates out the header interface changes. GOMP_VERSION has been bumped, and various changes to the plugin interface, and a few libgomp internal functions declared. The libgomp linkmap updated as well. Thanks, Chung-Lin include/ * gomp-constants.h

[PATCH 0/6, OpenACC, libgomp] Async re-work

2018-09-25 Thread Chung-Lin Tang
This patch is a re-organization of OpenACC asynchronous queues. The previous style of implementation was essentially re-defining the entire async API inside the plugin-interface, and relaying all such API calls to the target plugin, which is awkward in design; it requires (each) target plugin

Re: [PATCH] Fix PR83941

2018-09-25 Thread Richard Biener
On Tue, 25 Sep 2018, Richard Biener wrote: > > This gets rid of 99% of the useless late DIE to early DIE forwarders > (those which do not have any attributes besides the > DW_AT_abstract_origin). I've wanted to do this for a long time but > only now was able to verify that creating the

Re: [patch,openacc] Fix PR71959: lto dump of callee counts

2018-09-25 Thread Martin Jambor
Hi, I have noticed a few things... On Thu, Sep 20 2018, Cesar Philippidis wrote: > This is another old gomp4 patch that demotes an ICE in PR71959 to a > linker warning. One problem here is that it is not clear if OpenACC > allows individual member functions in C++ classes to be marked as acc >

[PATCH] Fix PR87402

2018-09-25 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-09-25 Richard Biener PR tree-optimization/87402 * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function. (visit_phi): Re-instantiate handling of supposed to be VARYING but

Re: [PATCH] i386: Compile pr82699-5.c and pr82699-6.c with -fno-pic

2018-09-25 Thread H.J. Lu
On Tue, Sep 25, 2018 at 5:41 AM, H.J. Lu wrote: > Compile pr82699-5.c and pr82699-6.c with -fno-pic to avoid > > FAIL: gcc.target/i386/pr82699-5.c (test for excess errors) > Excess errors: > cc1: sorry, unimplemented: -mfentry isn't supported for 32-bit in combination > with -fpic > FAIL:

Re: [PATCH] Fix a memory leak in vr-values

2018-09-25 Thread Richard Biener
On Tue, Sep 25, 2018 at 9:38 AM Jakub Jelinek wrote: > > Hi! > > I've noticed that in the last few days we leak memory. > The problem is that vr_values ctor allocates 2 vectors, but > ~vr_values doesn't free them, only verifies they aren't empty, they are > released by the

[PATCH] i386: Compile pr82699-5.c and pr82699-6.c with -fno-pic

2018-09-25 Thread H.J. Lu
Compile pr82699-5.c and pr82699-6.c with -fno-pic to avoid FAIL: gcc.target/i386/pr82699-5.c (test for excess errors) Excess errors: cc1: sorry, unimplemented: -mfentry isn't supported for 32-bit in combination with -fpic FAIL: gcc.target/i386/pr82699-6.c (test for excess errors) Excess errors:

Re: [patch] Extend thunk support and use it in Ada

2018-09-25 Thread Martin Jambor
Hi, On Tue, Sep 25 2018, Eric Botcazou wrote: > Hi, > > this extends the support for thunks present in the middle-end to accomodate > the Ada language, which can generate more diverse thunks than C++. The main > couple of enhancements are: > 1. Indirect offsets used to implement thunks for

Re: [PATCH 2/4] Remove unused functions and fields.

2018-09-25 Thread Richard Biener
On Tue, Sep 25, 2018 at 9:09 AM Martin Liška wrote: > > On 9/24/18 4:42 PM, Jeff Law wrote: > > On 9/22/18 1:08 PM, marxin wrote: > >> > >> gcc/ChangeLog: > >> > >> 2018-09-24 Martin Liska > >> > >> * alias.c (set_dest_equal_p): Remove unused function. > >> * config/i386/i386.c

Re: [PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).

2018-09-25 Thread Jakub Jelinek
On Tue, Sep 25, 2018 at 12:10:42PM +0200, Martin Liška wrote: On 9/25/18 > 11:24 AM, Jakub Jelinek wrote: > > On Tue, Sep 25, 2018 at 11:05:30AM +0200, Martin Liška wrote: > >> As requested in PR81715, GCC emits bigger middle redzones for small > >> variables. > >> It's analyzed in following

[PATCH][RFC] Fix PRs 87362/87428

2018-09-25 Thread Richard Biener
Hi, the following two patches both "fix" the immediate issue of gdb asserting with ../../gdb/dwarf2read.c:9730: internal-error: void dw2_add_symbol_to_list(symbol*, pending**): Assertion `(*listhead) == NULL || (SYMBOL_LANGUAGE ((*listhead)->symbol[0]) == SYMBOL_LANGUAGE (symbol))' failed.

[patch] Extend thunk support and use it in Ada

2018-09-25 Thread Eric Botcazou
Hi, this extends the support for thunks present in the middle-end to accomodate the Ada language, which can generate more diverse thunks than C++. The main couple of enhancements are: 1. Indirect offsets used to implement thunks for self-referential types, 2. Local thunks used to implement

Re: [PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).

2018-09-25 Thread Martin Liška
On 9/25/18 12:10 PM, Martin Liška wrote: > On 9/25/18 11:24 AM, Jakub Jelinek wrote: >> On Tue, Sep 25, 2018 at 11:05:30AM +0200, Martin Liška wrote: >>> As requested in PR81715, GCC emits bigger middle redzones for small >>> variables. >>> It's analyzed in following comment: >>>

Re: [PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).

2018-09-25 Thread Martin Liška
On 9/25/18 11:24 AM, Jakub Jelinek wrote: > On Tue, Sep 25, 2018 at 11:05:30AM +0200, Martin Liška wrote: >> As requested in PR81715, GCC emits bigger middle redzones for small >> variables. >> It's analyzed in following comment: >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715#c28 > >

Re: [rs6000] Do not generate sibling call to nested function

2018-09-25 Thread Eric Botcazou
> I'm seeing a testism on the GCC 7 branch due to the noipa attribute in the > testcase. I think it doesn't exist in GCC 7 so we're getting a test for > excess errors FAIL: > > warning: 'noipa' attribute directive ignored [-Wattributes] > > Any chance we can adjust the testcase? Yes, I did it

Re: [PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).

2018-09-25 Thread Jakub Jelinek
On Tue, Sep 25, 2018 at 11:05:30AM +0200, Martin Liška wrote: > As requested in PR81715, GCC emits bigger middle redzones for small variables. > It's analyzed in following comment: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715#c28 First of all, does LLVM make the variable sized red zone

[PATCH] Come up with --param asan-stack-small-redzone (PR sanitizer/81715).

2018-09-25 Thread Martin Liška
Hi. As requested in PR81715, GCC emits bigger middle redzones for small variables. It's analyzed in following comment: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715#c28 For now I'm suggesting to shrink shadow memory for variables <= 16B to 32B (including variable storage). LLVM is more

Re: [PR 87347] Prevent segfaults if TYPE_ARG_TYPES is NULL

2018-09-25 Thread Jakub Jelinek
On Mon, Sep 24, 2018 at 08:40:13PM +0200, Martin Jambor wrote: > Hi, > > the warning for suspicious calls of abs-like functions segfaults if a > user declared their own parameter-less-ish variant of abs like in the > testcase below. Fixed by looking whether there is any TYPE_ARG_TYPES > before

Re: libgo patch committed: Update to 1.11 release

2018-09-25 Thread Andreas Schwab
../../../libgo/go/internal/cpu/cpu.go:21:16: error: reference to undefined name ‘CacheLineSize’ 21 | _[CacheLineSize]byte |^ ../../../libgo/go/internal/cpu/cpu.go:38:16: error: reference to undefined name ‘CacheLineSize’ 38 | _[CacheLineSize]byte |

Re: [PATCH] Do array index calculations in gfc_array_index_type

2018-09-25 Thread Jakub Jelinek
On Mon, Sep 24, 2018 at 10:38:57PM +0300, Janne Blomqvist wrote: > > On 24/09/18 14:54, Andreas Schwab wrote: > > > On Sep 22 2018, Janne Blomqvist wrote: > > > > > > > +! { dg-final { scan-tree-dump-times "_gfortran_caf_lock > > \\(four.token, .*\\(1 - four.dim\\\[0\\\].lbound\\), > >

Re: libgo patch committed: Update to 1.11 release

2018-09-25 Thread Andreas Schwab
It also breaks ia64. ../../../libgo/go/internal/bytealg/indexbyte_native.go:10:1: error: redefinition of 'IndexByte' 10 | func IndexByte(b []byte, c byte) int | ^ ../../../libgo/go/internal/bytealg/indexbyte_generic.go:12:1: note: previous definition of 'IndexByte' was here 12 | func

[PATCH] Fix a memory leak in vr-values

2018-09-25 Thread Jakub Jelinek
Hi! I've noticed that in the last few days we leak memory. The problem is that vr_values ctor allocates 2 vectors, but ~vr_values doesn't free them, only verifies they aren't empty, they are released by the cleanup_edges_and_switches method. Some evrp walker users do call that method, but others

[PATCH] Fix unwind info in -mindirect-branch=thunk thunks (PR target/87414)

2018-09-25 Thread Jakub Jelinek
Hi! The indirect branch thunks we emit look like: __x86_indirect_thunk_rax: .cfi_startproc call.LIND1 .LIND0: pause lfence jmp .LIND0 .LIND1: mov %rax, (%rsp) ret .cfi_endproc The problem is that the CFI is incorrect.

[PATCH] Fix PR83941

2018-09-25 Thread Richard Biener
This gets rid of 99% of the useless late DIE to early DIE forwarders (those which do not have any attributes besides the DW_AT_abstract_origin). I've wanted to do this for a long time but only now was able to verify that creating the concrete instances lazily in lookup_decl_die and friend

[C++ PATCH] Fix constexpr OBJ_TYPE_REF handling on array elts (PR c++/87398)

2018-09-25 Thread Jakub Jelinek
Hi! ARRAY_REF is a handled component, so when a virtual call is on an array element (or some component thereof), the loop to look through handled components will look through the ARRAY_REFs too and then TREE_TYPE (obj) might be an ARRAY_TYPE. The code wants to look at the class type instead

Re: [PATCH 2/4] Remove unused functions and fields.

2018-09-25 Thread Martin Liška
On 9/24/18 4:42 PM, Jeff Law wrote: > On 9/22/18 1:08 PM, marxin wrote: >> >> gcc/ChangeLog: >> >> 2018-09-24 Martin Liska >> >> * alias.c (set_dest_equal_p): Remove unused function. >> * config/i386/i386.c (def_builtin_pure2): Likewise. >> * diagnostic-show-locus.c (class

Re: [PATCH 1/2] Check pie_enabled target in PIC tests

2018-09-25 Thread Richard Sandiford
"H.J. Lu" writes: > We need to check pie_enabled target in PIC tests to support GCC where > PIE is enabled by default when configured with --enable-default-pie. > > PR testsuite/70150 > * gcc.dg/20020312-2.c (dg-additional-options): Set to "-no-pie" > for pie_enabled target. >

Re: [openacc] Teach gfortran to lower OpenACC routine dims

2018-09-25 Thread Bernhard Reutner-Fischer
On 24 September 2018 16:45:38 CEST, Cesar Philippidis wrote: >I updated the patch by incorporating all of those changes. Is it OK for >trunk? LGTM but I cannot approve it. thanks,

Re: libgo patch committed: Update to 1.11 release

2018-09-25 Thread Andreas Schwab
This breaks aarch64/-mabi=ilp32. ../../../../libgo/go/internal/poll/splice_linux.go:165:45: error: reference to undefined identifier 'syscall.SYS_FCNTL' 165 | if _, _, errno := syscall.Syscall(syscall.SYS_FCNTL, uintptr(fds[0]), syscall.F_GETPIPE_SZ, 0); errno != 0 { |

Re: GCC 8 backports

2018-09-25 Thread Martin Liška
Hi. One more tested patch. Martin >From 62538e940432b55cf38e96e1a2cd72ed1f5f569f Mon Sep 17 00:00:00 2001 From: marxin Date: Mon, 24 Sep 2018 11:22:38 + Subject: [PATCH] Backport r264528 gcc/ChangeLog: 2018-09-24 Martin Liska PR sanitizer/85774 * asan.c: Make asan_handled_variables

Re: [patch, fortran, committed] Another fallout from the INTENT(OUT) patch

2018-09-25 Thread Janus Weil
Am Mo., 24. Sep. 2018 um 19:16 Uhr schrieb Thomas Koenig : > > Hello world, > > another obvious and simple one-line fix for fallout from the INTENT(OUT) > clobber patch. Committed as r264539, after regression-testing. > > It seems our testsuite is not testing as many combinations in the >

  1   2   >