Re: C++ PATCH to enhance -Wreturn-local-addr (c++/86982)

2018-09-05 Thread Jason Merrill
OK. On Wed, Sep 5, 2018 at 8:13 PM, Marek Polacek wrote: > On Wed, Sep 05, 2018 at 08:01:53PM -0400, Marek Polacek wrote: >> Jonathan suggested to handle std::move and std::forward specially for the > > And for the record I meant "suggested handling"!

Re: [PATCH] C++: special-case single non-viable candidate (more PR c++/85110)

2018-09-05 Thread Jason Merrill
On Wed, Sep 5, 2018 at 11:08 AM, David Malcolm wrote: > On Thu, 2018-08-30 at 18:18 -0400, Jason Merrill wrote: >> On Thu, Aug 23, 2018 at 2:08 PM, David Malcolm >> wrote: >> > This is a followup to: >> > >> > "[PATCH] C++: underline param in print_conversion_rejection (more >> > PR

Re: C++ PATCH to enhance -Wreturn-local-addr (c++/86982)

2018-09-05 Thread Marek Polacek
On Wed, Sep 05, 2018 at 08:01:53PM -0400, Marek Polacek wrote: > Jonathan suggested to handle std::move and std::forward specially for the And for the record I meant "suggested handling"!

C++ PATCH to enhance -Wreturn-local-addr (c++/86982)

2018-09-05 Thread Marek Polacek
Jonathan suggested to handle std::move and std::forward specially for the purpose of -Wreturn-local-addr, because it's a fairly common mistake to return a local var by reference. Now that we have is_std_move_p it's fairly trivial to extend the warning. Bootstrapped/regtested on x86_64-linux, ok

Committed: fix target/86779, speculative error for cris-*

2018-09-05 Thread Hans-Peter Nilsson
Nothing ever speculated here, move along... Regtested for cris-elf, observing the maintenance-provoking test-cases now passing. PR target/86779 * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine to speculation_safe_value_not_needed. Index:

Re: [patch,nvptx] Basic -misa support for nvptx

2018-09-05 Thread Cesar Philippidis
On 09/05/2018 07:30 AM, Tom de Vries wrote: > On 09/05/2018 12:19 AM, Cesar Philippidis wrote: >> On 09/02/2018 07:57 AM, Cesar Philippidis wrote: >>> On 09/01/2018 12:04 PM, Tom de Vries wrote: On 08/31/2018 04:14 PM, Cesar Philippidis wrote: >>> > Is this patch OK for trunk? >

Re: [PATCH,FORTRAN 09/29] Use stringpool for modules

2018-09-05 Thread Bernhard Reutner-Fischer
On 5 September 2018 20:44:05 CEST, Janne Blomqvist wrote: >On Wed, Sep 5, 2018 at 6:00 PM Bernhard Reutner-Fischer < >rep.dot@gmail.com> wrote: > >> diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c >> index 38827ed4637..6596bd87c09 100644 >> --- a/gcc/fortran/match.c >> +++

Re: C++ PATCH/RFC for c++/87109, wrong overload with ref-qualifiers

2018-09-05 Thread Jason Merrill
OK, thanks. On Wed, Sep 5, 2018 at 4:09 PM, Marek Polacek wrote: > On Tue, Sep 04, 2018 at 05:29:00PM -0400, Jason Merrill wrote: >> On Tue, Sep 4, 2018 at 3:02 PM, Marek Polacek wrote: >> > On Thu, Aug 30, 2018 at 09:22:26AM -0400, Jason Merrill wrote: >> >> On Wed, Aug 29, 2018 at 8:03 PM,

[PATCH] S/390: Prohibit SYMBOL_REF in UNSPECV_CAS

2018-09-05 Thread Ilya Leoshkevich
Inhibit constant propagation inlining SYMBOL_REF loads into UNSPECV_CAS. Even though reload can later undo it, the resulting code will be less efficient. gcc/ChangeLog: 2018-09-05 Ilya Leoshkevich PR target/80080 * config/s390/predicates.md: Add nonsym_memory_operand.

Re: C++ PATCH/RFC for c++/87109, wrong overload with ref-qualifiers

2018-09-05 Thread Marek Polacek
On Tue, Sep 04, 2018 at 05:29:00PM -0400, Jason Merrill wrote: > On Tue, Sep 4, 2018 at 3:02 PM, Marek Polacek wrote: > > On Thu, Aug 30, 2018 at 09:22:26AM -0400, Jason Merrill wrote: > >> On Wed, Aug 29, 2018 at 8:03 PM, Marek Polacek wrote: > >> > I've now gotten to the point where I question

[OpenACC] Enable firstprivate OpenACC reductions

2018-09-05 Thread Cesar Philippidis
This patch teaches the gimplifier how to pass certain OpenACC reduction variables as firstprivate, and not with an implicit copy directive. This is matches the default behavior for the implicit data mappings of scalar variables inside OpenACC parallel regions. It should be noted that the

[patch][OpenACC] Add target hook TARGET_GOACC_ADJUST_PARALLELISM

2018-09-05 Thread Cesar Philippidis
At present, GCC fixes the vector length on all targets. However, that is an artificial restriction. This patch introduces a new TARGET_GOACC_ADJUST_PARALLELISM hook that enables the runtime to correct the default number of acc workers and vectors. Extra care need to be done to ensure that large

[openacc] Teach gfortran to lower OpenACC routine dims

2018-09-05 Thread Cesar Philippidis
At present, gfortran does not encode the gang, worker or vector parallelism clauses when it creates acc routines dim attribute for subroutines and functions. While support for acc routine is lacking in other areas in gfortran (including modules), this patch is important because it encodes the

[PATCH] PR86957

2018-09-05 Thread Indu Bhagat
Patch for PR 86957 " gcc should warn about missing profiles for a compilation unit or a new function with -fprofile-use". https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86957 The patch adds -Wmissing-profile warning flag to alert user about cases when there is no profile data for a compilation

Re: [PATCH,FORTRAN 00/29] Move towards stringpool, part 1

2018-09-05 Thread Janne Blomqvist
On Wed, Sep 5, 2018 at 5:58 PM Bernhard Reutner-Fischer < rep.dot@gmail.com> wrote: > Hi, > > The fortran frontend still uses stack-based handling of (symbol) names > with fixed-sized buffers. Furthermore these buffers often are too small > when dealing with F2003 identifiers which can be up

Re: [PATCH,FORTRAN 09/29] Use stringpool for modules

2018-09-05 Thread Janne Blomqvist
On Wed, Sep 5, 2018 at 6:00 PM Bernhard Reutner-Fischer < rep.dot@gmail.com> wrote: > diff --git a/gcc/fortran/match.c b/gcc/fortran/match.c > index 38827ed4637..6596bd87c09 100644 > --- a/gcc/fortran/match.c > +++ b/gcc/fortran/match.c > @@ -1274,15 +1274,22 @@ not_yes: > case

Re: [PATCHv2] Handle overlength string literals in the fortan FE

2018-09-05 Thread Janne Blomqvist
On Tue, Sep 4, 2018 at 10:05 AM Bernd Edlinger wrote: > On 03/09/2018, 21:25 Janne Blomqvist wrote: > > On Fri, Aug 24, 2018 at 11:06 PM Bernd Edlinger < > bernd.edlin...@hotmail.de> > > wrote: > > > >> Hi! > >> > >> > >> This is an alternative approach to handle overlength strings in the > >>

Re: [PATCH 19/25] GCN libgfortran.

2018-09-05 Thread Janne Blomqvist
Please send fortran patches to the fortran list as well! On Wed, Sep 5, 2018 at 7:56 PM Toon Moene wrote: > > > > Forwarded Message > Subject: [PATCH 19/25] GCN libgfortran. > Date: Wed, 5 Sep 2018 12:51:20 +0100 > From: a...@codesourcery.com > To: gcc-patches@gcc.gnu.org > >

Re: [PATCH 18/25] Fix interleaving of Fortran stop messages

2018-09-05 Thread Janne Blomqvist
On Wed, Sep 5, 2018 at 7:57 PM Toon Moene wrote: > > > > Forwarded Message > Subject: [PATCH 18/25] Fix interleaving of Fortran stop messages > Date: Wed, 5 Sep 2018 12:51:19 +0100 > From: a...@codesourcery.com > To: gcc-patches@gcc.gnu.org > > > Fortran STOP and ERROR STOP use

[PATCH, i386]: Rewrite float_truncate patterns

2018-09-05 Thread Uros Bizjak
Hello! IRA is able to generate temporary output memory location by itself, so there is no need to manually provide one in the pattern. Based on this functionality, attached patch rewrites float_truncate patterns in a much simpler and elegant way. It also introduces "enabled" attribute that

Re: [PATCH 17/25] Fix Fortran STOP.

2018-09-05 Thread Janne Blomqvist
Same, please send fortran patches to the fortran list as well! On Wed, Sep 5, 2018 at 7:55 PM Toon Moene wrote: > > > > Forwarded Message > Subject: [PATCH 17/25] Fix Fortran STOP. > Date: Wed, 5 Sep 2018 12:51:18 +0100 > From: a...@codesourcery.com > To:

Re: [PATCH 08/25] Fix co-array allocation

2018-09-05 Thread Janne Blomqvist
Please send fortran patches to the fortran list as well! On Wed, Sep 5, 2018 at 7:54 PM Toon Moene wrote: > > > > Forwarded Message > Subject: [PATCH 08/25] Fix co-array allocation > Date: Wed, 5 Sep 2018 12:49:40 +0100 > From: a...@codesourcery.com > To:

Re: VRP: abstract out wide int CONVERT_EXPR_P code

2018-09-05 Thread Aldy Hernandez
On 09/05/2018 10:57 AM, Michael Matz wrote: Hi, On Wed, 5 Sep 2018, Aldy Hernandez wrote: No apologies needed. I welcome all masochists to join me in my personal hell :). ;-) How can this test and following code catch all problematic cases? Assume a range of [253..257], truncating to

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Denis Khalikov
Richard, thanks for the answer, got it. On 09/05/2018 07:51 PM, Richard Earnshaw (lists) wrote: On 05/09/18 17:43, Denis Khalikov wrote: Thanks for the answers. I understood that, this hack makes more mess in codegen for arm, but can you please clarify what did you mean by Only a single

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Richard Earnshaw (lists)
On 05/09/18 17:43, Denis Khalikov wrote: > Thanks for the answers. > > I understood that, this hack makes more mess in codegen for arm, > but can you please clarify what did you mean by > >>Only a single register can be used >> as the frame chain. > > As far as I understood, GCC for arm with

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Denis Khalikov
Thanks for the answers. I understood that, this hack makes more mess in codegen for arm, but can you please clarify what did you mean by >Only a single register can be used > as the frame chain. As far as I understood, GCC for arm with THUMB2 mode uses r7 register as frame pointer register by

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Wilco Dijkstra
Hi Denis, >> Adding support for a frame chain would require an ABI change. It > would have to > > work across GCC, LLVM, Arm, Thumb-1 and Thumb-2 - not a trivial amount of > > effort. > Clang already works that way. No, that's incorrect like Richard pointed out. Only a single register can be

Re: [PATCH] PR52665 do not let .ident confuse assembler scan tests

2018-09-05 Thread Bernhard Reutner-Fischer
On Tue, 21 Jun 2016 at 00:19, Jeff Law wrote: > > On 06/18/2016 01:31 PM, Bernhard Reutner-Fischer wrote: > > A branch with a name matching scan-assembler pattern triggers > > inappropriate FAIL. > > > > E.g. branch fixups-testsuite and > > - gcc.target/i386/pr65871-?.c (scan-assembler-not

[PATCH] libsupc++/cxxabi.h (__cxa_demangle): Clarify doxygen comment.

2018-09-05 Thread Jonathan Wakely
Document that the parameter can be null. Committed to trunk. commit a7fcd4545416835228f1c0efc8c8b2f21d85262d Author: Jonathan Wakely Date: Wed Sep 5 16:17:07 2018 +0100 * libsupc++/cxxabi.h (__cxa_demangle): Clarify doxygen comment. diff --git a/libstdc++-v3/libsupc++/cxxabi.h

[PATCH,FORTRAN 16/29] Do pointer comparison in iso_c_binding_module

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-23 Bernhard Reutner-Fischer * module.c (import_iso_c_binding_module): Use pointer comparison instead instead of strcmp. --- gcc/fortran/module.c | 25 ++--- 1 file changed, 10 insertions(+),

[PATCH,FORTRAN 15/29] Use stringpool for iso_c_binding module names

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-20 Bernhard Reutner-Fischer * gfortran.h (struct CInteropKind_t): Make name a pointer. * misc.c (get_c_kind): Use pointer comparison on name to determine index. * symbol.c

[PATCH,FORTRAN 17/29] Use stringpool for iso_fortran_env

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-23 Bernhard Reutner-Fischer * module.c (use_iso_fortran_env_module): Use stringpool and use pointer comparison instead of strcmp. --- gcc/fortran/module.c | 16 1 file changed, 8 insertions(+), 8

[PATCH,FORTRAN 20/29] Use stringpool in class et al

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-24 Bernhard Reutner-Fischer * class.c (finalizer_insert_packed_call): Use stringpool. (generate_finalization_wrapper): Likewise. (gfc_find_derived_vtab): Likewise. (find_intrinsic_vtab): Likewise.

[PATCH,FORTRAN 18/29] Use stringpool for charkind

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-24 Bernhard Reutner-Fischer * primary.c (match_charkind_name): Return stringpool node. (match_string_constant): Use stringpool node for name. --- gcc/fortran/primary.c | 21 - 1 file changed,

[PATCH,FORTRAN 19/29] Use stringpool and unified uppercase handling for types

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Use the existing helper function to create type names. The helper function uses the stringpool already. gcc/fortran/ChangeLog: 2017-11-24 Bernhard Reutner-Fischer * decl.c (build_sym): Use stringpool node instead of stack variables.

[PATCH,FORTRAN 28/29] Free type-bound procedure structs

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer compiling gfortran.dg/typebound_proc_31.f90 leaked the type-bound structs: 56 bytes in 1 blocks are definitely lost. at 0x4C2CC05: calloc (vg_replace_malloc.c:711) by 0x151EA90: xcalloc (xmalloc.c:162) by 0x8E3E4F: gfc_get_typebound_proc(gfc_typebound_proc*)

[PATCH,FORTRAN 12/29] Use stringpool for remaining names

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer This replaces the remaining occurrences of names and name manipulation to go through the stringpool. Required to make TYPE (IS) handling work later on. gcc/fortran/ChangeLog: 2017-11-14 Bernhard Reutner-Fischer * class.c (gfc_build_class_symbol): Use

[PATCH,FORTRAN 27/29] Use stringpool for OMP clause reduction code

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-12-12 Bernhard Reutner-Fischer * trans-openmp.c (gfc_trans_omp_array_reduction_or_udr): Use stringpool for clause reduction code. --- gcc/fortran/trans-openmp.c | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH,FORTRAN 25/29] Use stringpool on loading module symbols

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-29 Bernhard Reutner-Fischer * module.c (load_needed): Use stringpool when generating symbols and module names. --- gcc/fortran/module.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-)

[PATCH,FORTRAN 29/29] PR87103: Remove max symbol length check from gfc_new_symbol

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gfc_match_name does check for too long names already. Since gfc_new_symbol is also called for symbols with internal names containing compiler-generated prefixes, these internal names can easily exceed the max_identifier_length mandated by the standard.

[PATCH,FORTRAN 22/29] Use stringpool in class and procedure-pointer result

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-26 Bernhard Reutner-Fischer * class.c (finalize_component): Use stringpool. (finalization_scalarizer): Likewise. * frontend-passes.c (create_var): Likewise. (get_len_trim_call): Likewise. *

[PATCH,FORTRAN 23/29] Use stringpool for module binding_label

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-28 Bernhard Reutner-Fischer * module.c (struct pointer_info): Change binding_label to const pointer. (free_pi_tree): Do not free binding_label. (load_commons): Use stringpool for binding_label.

[PATCH,FORTRAN 11/29] Do pointer comparison instead of strcmp

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer This gets rid of some of the str[n]*cmp in favour of (faster) pointer equality checks. gcc/fortran/ChangeLog: 2017-11-02 Bernhard Reutner-Fischer * check.c (gfc_check_move_alloc): Use pointer comparison instead of strcmp. * class.c

[PATCH,FORTRAN 24/29] Use stringpool for intrinsic functions

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-29 Bernhard Reutner-Fischer * iresolve.c (gfc_resolve_ctime_sub): Use stringpool for intrinsic subroutine name. (gfc_resolve_fdate_sub): Likewise. (gfc_resolve_gerror): Likewise.

[PATCH,FORTRAN 10/29] Do not copy name for check_function_name

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Copying the sym->name ruins pointer equality checks and first and foremost is not needed nowadays. gcc/fortran/ChangeLog: 2018-09-02 Bernhard Reutner-Fischer * decl.c (gfc_match_volatile, gfc_match_asynchronous): Do not copy sym->name. ---

[PATCH,FORTRAN 05/29] Use stringpool for gfc_match("%n")

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Add matched names into the stringpool. gcc/fortran/ChangeLog: 2017-10-26 Bernhard Reutner-Fischer * match.c (gfc_match): Use pointer to pointer when matching a name via "%n" format. Adjust all callers. (gfc_match_label,

[PATCH,FORTRAN 26/29] Use stringpool for mangled common names

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-29 Bernhard Reutner-Fischer * match.c (gfc_get_common): Use stringpool for mangled name. --- gcc/fortran/match.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/match.c

[PATCH,FORTRAN 14/29] Fix write_omp_udr for user-operator REDUCTIONs

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Due to a typo a user operator used in a reduction was not found in the symtree so would have been written multiple times (in theory). E.g. user operator ".add." was looked up as ".ad" instead of "add". For gcc-8 branch and earlier one would - memcpy

[PATCH,FORTRAN 21/29] Use stringpool for module tbp

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Switch type bound procedures to use the stringpool. gcc/fortran/ChangeLog: 2017-11-24 Bernhard Reutner-Fischer * decl.c (gfc_match_decl_type_spec): Use stringpool. * module.c (mio_expr): Likewise. (mio_typebound_proc): Likewise.

[PATCH,FORTRAN 03/29] Use stringpool for gfc_get_name

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Occurrences of name2 in this patch will be fixed later in this series. gcc/fortran/ChangeLog: 2017-10-23 Bernhard Reutner-Fischer * match.h (gfc_match_name): Pass argument by reference. Adjust all callers. (match_common_name):

[PATCH,FORTRAN 13/29] Use stringpool for intrinsics and common

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-11-15 Bernhard Reutner-Fischer * gfortran.h (struct gfc_common_head, struct gfc_intrinsic_arg): Make name a pointer. * intrinsic.c (add_sym): Use stringpool for name. * match.c (gfc_get_common):

[PATCH,FORTRAN 09/29] Use stringpool for modules

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer gcc/fortran/ChangeLog: 2017-10-29 Bernhard Reutner-Fischer * gfortran.h (struct gfc_use_rename): Use pointers for local_name and use_name. * match.c (gfc_match): Set name to NULL on failed match. * module.c (gfc_match_use): Use

[PATCH,FORTRAN 04/29] Use stringpool for gfc_match_generic_spec

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Ideally we would populate mstrings structs with strings obtained through the stringpool. Doing so by means of minit wouldn't work out too well though, see comment in gfortran.h. We could replace the initialized strings in gfc_init_1 but that's for a later patch.

[PATCH,FORTRAN 06/29] Use stringpool for association_list

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer 2017-10-26 Bernhard Reutner-Fischer * gfortran.h (struct gfc_association_list): Change name to pointer. * match.c (gfc_match_associate): Adjust. --- gcc/fortran/gfortran.h | 2 +- gcc/fortran/match.c| 6 ++ 2 files changed, 3

[PATCH,FORTRAN 07/29] Use stringpool for some gfc_code2string return values

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Use a stringpool-node for those gfc_code2string values that are used as names. gcc/fortran/ChangeLog: 2017-10-26 Bernhard Reutner-Fischer * interface.c (gfc_match_generic_spec, gfc_check_dtio_interfaces, gfc_find_typebound_dtio_proc,

[PATCH,FORTRAN 08/29] Add uop/name helpers

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Introduce a helper to construct a user operator from a name and the reverse operation, i.e. a helper to construct a name from a user operator. gcc/fortran/ChangeLog: 2017-10-29 Bernhard Reutner-Fischer * gfortran.h (gfc_get_uop_from_name):

[PATCH,FORTRAN 02/29] Use stringpool for gfc_match_defined_op_name()

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer The openmp part will be cleaned up later in this series. gcc/fortran/ChangeLog: 2017-10-22 Bernhard Reutner-Fischer * match.h (gfc_match_defined_op_name): Adjust prototype and add a parameter USER_OPERATOR. * matchexp.c

[PATCH,FORTRAN 00/29] Move towards stringpool, part 1

2018-09-05 Thread Bernhard Reutner-Fischer
Hi, The fortran frontend still uses stack-based handling of (symbol) names with fixed-sized buffers. Furthermore these buffers often are too small when dealing with F2003 identifiers which can be up to, including 63 bytes long. Other frontends use the stringpool since many years. This janitorial

[PATCH,FORTRAN 01/29] gdbinit: break on gfc_internal_error

2018-09-05 Thread Bernhard Reutner-Fischer
From: Bernhard Reutner-Fischer Aids debugging the fortran FE. gcc/ChangeLog: 2017-11-12 Bernhard Reutner-Fischer * gdbinit.in: Break on gfc_internal_error. --- gcc/gdbinit.in | 1 + 1 file changed, 1 insertion(+) diff --git a/gcc/gdbinit.in b/gcc/gdbinit.in index

Re: VRP: abstract out wide int CONVERT_EXPR_P code

2018-09-05 Thread Michael Matz
Hi, On Wed, 5 Sep 2018, Aldy Hernandez wrote: > No apologies needed. I welcome all masochists to join me in my personal hell > :). ;-) > > How can this test and following code catch all problematic cases? Assume > > a range of [253..257], truncating to 8 bits unsigned. The size of the > >

Re: [PATCH] PR libstdc++/87228 Use heap for large buffers instead of alloca

2018-09-05 Thread Jonathan Wakely
On 05/09/18 15:32 +0100, Jonathan Wakely wrote: Using a huge width in a formatted output operation results in stack overflow due to no restriction on the size passed to alloca. This patch causes the formatting functions to use the heap instead of the stack when a large buffer is needed.

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-09-05 Thread Joseph Myers
On Wed, 5 Sep 2018, Andrew Stubbs wrote: > I suppose someone might choose to compile things on an alternative system for > running on a compatible system, in which case we'd want to simply skip this > binary. > > How does one normally do this? I'd expect a configure test plus makefile

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-09-05 Thread Andrew Stubbs
On 05/09/18 15:22, Joseph Myers wrote: +gcn-run$(exeext): gcn-run.o + +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ $< -ldl I'd expect this to fail on non-Unix configurations that don't have -ldl, and thus to need appropriate conditionals / configure tests to avoid that build failure.

[PATCH] PR libstdc++/87228 Use heap for large buffers instead of alloca

2018-09-05 Thread Jonathan Wakely
Using a huge width in a formatted output operation results in stack overflow due to no restriction on the size passed to alloca. This patch causes the formatting functions to use the heap instead of the stack when a large buffer is needed. PR libstdc++/87228 *

Re: [patch,nvptx] Basic -misa support for nvptx

2018-09-05 Thread Tom de Vries
On 09/05/2018 12:19 AM, Cesar Philippidis wrote: > On 09/02/2018 07:57 AM, Cesar Philippidis wrote: >> On 09/01/2018 12:04 PM, Tom de Vries wrote: >>> On 08/31/2018 04:14 PM, Cesar Philippidis wrote: >> Is this patch OK for trunk? >>> >>> Well, how did you test this ( >>>

Re: [patch, fortan] PR87103 - [OOP] ICE in gfc_new_symbol() due to overlong symbol name

2018-09-05 Thread Andrew Benson
On Wednesday, September 5, 2018 12:35:04 PM PDT Bernhard Reutner-Fischer wrote: > On Wed, 5 Sep 2018 at 03:30, Jerry DeLisle wrote: > > On 09/04/2018 10:43 AM, Bernhard Reutner-Fischer wrote: > > > On Tue, 4 Sep 2018 at 18:43, Andrew Benson wrote: > > >> As suggested by Janus, PR87103 is

Re: [PATCH 21/25] GCN Back-end (part 2/2).

2018-09-05 Thread Joseph Myers
On Wed, 5 Sep 2018, Andrew Stubbs wrote: > + warning_at (decl ? DECL_SOURCE_LOCATION (decl) : UNKNOWN_LOCATION, > + OPT_Wopenacc_dims, > + (dims[GOMP_DIM_VECTOR] > +? "using vector_length (64), ignoring %d" > +:

[PATCH] C++: special-case single non-viable candidate (more PR c++/85110)

2018-09-05 Thread David Malcolm
On Thu, 2018-08-30 at 18:18 -0400, Jason Merrill wrote: > On Thu, Aug 23, 2018 at 2:08 PM, David Malcolm > wrote: > > This is a followup to: > > > > "[PATCH] C++: underline param in print_conversion_rejection (more > > PR c++/85110)" > >

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Richard Earnshaw (lists)
On 05/09/18 14:55, Denis Khalikov wrote: > Hi Wilco, > thanks for the answer. > >> Adding support for a frame chain would require an ABI change. It would > have to >> work across GCC, LLVM, Arm, Thumb-1 and Thumb-2 - not a trivial amount of >> effort. > > Clang already works that way. > Please

Re: VRP: abstract out wide int CONVERT_EXPR_P code

2018-09-05 Thread Aldy Hernandez
On 09/05/2018 08:58 AM, Michael Matz wrote: Hi, On Tue, 4 Sep 2018, Aldy Hernandez wrote: to make the result ~[0, 5], is it? At least the original code dropped that to VARYING. For the same reason truncating [3, 765] from short to unsigned char isn't [3, 253]. But maybe I'm missing

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Denis Khalikov
Hi Wilco, thanks for the answer. > Adding support for a frame chain would require an ABI change. It would have to > work across GCC, LLVM, Arm, Thumb-1 and Thumb-2 - not a trivial amount of > effort. Clang already works that way. Please look at this commit:

Re: [PATCH] Improve x % c1 == c2 expansion (PR middle-end/82853)

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 03:14:40PM +0200, Jakub Jelinek wrote: > It isn't really a GIMPLE transform, just needs to provide the callers > with a tree. Specifically, if it passes several initial checks, it > expands the X expression unconditionally and then just uses the result of > that. What I

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Denis Khalikov
Hi Wilco, thanks for the answer. > Adding support for a frame chain would require an ABI change. It would have to > work across GCC, LLVM, Arm, Thumb-1 and Thumb-2 - not a trivial amount of > effort. Clang already works that way. Please look at this commit:

Re: [PATCH 05/25] Add sorry_at diagnostic function.

2018-09-05 Thread David Malcolm
On Wed, 2018-09-05 at 09:39 -0400, David Malcolm wrote: > On Wed, 2018-09-05 at 12:49 +0100, a...@codesourcery.com wrote: > > The plain "sorry" diagnostic only gives the "current" location, > > which > > is > > typically the last line of the function or translation unit by time > > we get to > >

Re: [PATCH 05/25] Add sorry_at diagnostic function.

2018-09-05 Thread David Malcolm
On Wed, 2018-09-05 at 12:49 +0100, a...@codesourcery.com wrote: > The plain "sorry" diagnostic only gives the "current" location, which > is > typically the last line of the function or translation unit by time > we get to > the back end. > > GCN uses "sorry" to report unsupported language

[PATCH][OBVIOUS] Close file on return from verify-intermediate

2018-09-05 Thread Joey Ye
regression will disappear completely one month after this patch committed to trunk. Tested with make check with no new regressions. OK to trunk? testsuite/ChangeLog: 2018-09-05  Joey Ye      * lib/gcov.exp (verify-intermediate): Add missing close. gcov-20180905.patch Description: gcov

Re: [PATCH] Improve x % c1 == c2 expansion (PR middle-end/82853)

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 02:42:36PM +0200, Richard Biener wrote: > IIRC you said we're already doing x % power-of-two == 0 optimized but the > new > code isn't in that place? For unsigned %, there is no need for anything special, we just expand that as x % (power-of-two - 1) == 0, as any other %

Re: VRP: abstract out wide int CONVERT_EXPR_P code

2018-09-05 Thread Michael Matz
Hi, On Tue, 4 Sep 2018, Aldy Hernandez wrote: > > to make the result ~[0, 5], is it? At least the original code dropped > > that to VARYING. For the same reason truncating [3, 765] from > > short to unsigned char isn't [3, 253]. But maybe I'm missing something. Sorry for chiming in, but this

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread Richard Biener
On Wed, Sep 5, 2018 at 2:40 PM Andrew Stubbs wrote: > > On 05/09/18 13:05, Richard Biener wrote: > > On Wed, Sep 5, 2018 at 1:51 PM wrote: > >> > >> > >> GCN uses V64BImode to represent vector masks in the middle-end, and DImode > >> bit-masks to represent them in the back-end. These must be

Re: [PATCH] Improve x % c1 == c2 expansion (PR middle-end/82853)

2018-09-05 Thread Richard Biener
On Tue, 4 Sep 2018, Jakub Jelinek wrote: > Hi! > > Improve expansion of x % c1 == c2 and x % c1 != c2 checks. > > As mentioned in Hacker's Delight book, section 10-{16,17}, we can improve > generated code for modulo by constant, if we only use the result to equality > compare against some other

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread Andrew Stubbs
On 05/09/18 13:05, Richard Biener wrote: On Wed, Sep 5, 2018 at 1:51 PM wrote: GCN uses V64BImode to represent vector masks in the middle-end, and DImode bit-masks to represent them in the back-end. These must be converted at expand time and the most convenient way is to simply use a

Re: [PATCH 20/25] GCN libgcc.

2018-09-05 Thread Joseph Myers
On Wed, 5 Sep 2018, a...@codesourcery.com wrote: > diff --git a/libgcc/config/gcn/crt0.c b/libgcc/config/gcn/crt0.c > new file mode 100644 > index 000..f4f367b > --- /dev/null > +++ b/libgcc/config/gcn/crt0.c > @@ -0,0 +1,23 @@ > +/* Copyright (C) 2017 Free Software Foundation, Inc.

Re: [PATCH 04/25] SPECIAL_REGNO_P

2018-09-05 Thread Joseph Myers
On Wed, 5 Sep 2018, a...@codesourcery.com wrote: > This patch creates a new macro SPECIAL_REGNO_P which disables regrename. In > other words, the register is fixed once allocated. Creating new target macros is generally suspect - the presumption is that target hooks should be used instead,

Re: [PATCH] Frame pointer for arm with THUMB2 mode

2018-09-05 Thread Wilco Dijkstra
Hi Denis, > We are working on applying Address/LeakSanitizer for the full Tizen OS > distribution. It's about ~1000 packages, ASan/LSan runtime is installed > to ld.so.preload. As we know ASan/LSan has interceptors for > allocators/deallocators such as (malloc/realloc/calloc/free) and so on. >

Re: [PATCH v2] combine: perform jump threading at the end

2018-09-05 Thread Richard Biener
On Wed, Sep 5, 2018 at 2:01 PM Ilya Leoshkevich wrote: > > gcc/ChangeLog: > > 2018-09-05 Ilya Leoshkevich > > PR target/80080 > * combine.c (rest_of_handle_combine): Perform jump threading. > > gcc/testsuite/ChangeLog: > > 2018-09-05 Ilya Leoshkevich > > PR

Re: [ARM/FDPIC v2 04/21] [ARM] FDPIC: Add support for FDPIC for arm architecture

2018-09-05 Thread Christophe Lyon
On Tue, 4 Sep 2018 at 17:29, Richard Earnshaw (lists) wrote: > > On 29/08/18 11:46, Kyrill Tkachov wrote: > > Hi Christophe, > > > > On 13/07/18 17:10, christophe.l...@st.com wrote: > >> From: Christophe Lyon > >> > >> The FDPIC register is hard-coded to r9, as defined in the ABI. > >> > >> We

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread Richard Biener
On Wed, Sep 5, 2018 at 1:51 PM wrote: > > > GCN uses V64BImode to represent vector masks in the middle-end, and DImode > bit-masks to represent them in the back-end. These must be converted at > expand > time and the most convenient way is to simply use a SUBREG. x86 with AVX512 uses SImode in

[PATCH v2] combine: perform jump threading at the end

2018-09-05 Thread Ilya Leoshkevich
gcc/ChangeLog: 2018-09-05 Ilya Leoshkevich PR target/80080 * combine.c (rest_of_handle_combine): Perform jump threading. gcc/testsuite/ChangeLog: 2018-09-05 Ilya Leoshkevich PR target/80080 * gcc.target/s390/pr80080-4.c: New test. --- gcc/combine.c

Re: [PATCH 10/25] Convert BImode vectors.

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 12:50:25PM +0100, a...@codesourcery.com wrote: > 2018-09-05 Andrew Stubbs > > gcc/ > * simplify-rtx.c (convert_packed_vector): New function. > (simplify_immed_subreg): Recognised Boolean vectors and call > convert_packed_vector. > --- > +

Re: [PATCH 01/25] Handle vectors that don't fit in an integer.

2018-09-05 Thread Jakub Jelinek
On Wed, Sep 05, 2018 at 12:48:49PM +0100, a...@codesourcery.com wrote: > +++ b/gcc/combine.c > @@ -8621,7 +8621,13 @@ gen_lowpart_or_truncate (machine_mode mode, rtx x) > { >/* Bit-cast X into an integer mode. */ >if (!SCALAR_INT_MODE_P (GET_MODE (x))) > - x = gen_lowpart

[PATCH 24/25] Ignore LLVM's blank lines.

2018-09-05 Thread ams
The GCN toolchain must use the LLVM assembler and linker because there's no binutils port. The LLVM tools do not have the same diagnostic style as binutils, so the "blank line(s) in output" tests are inappropriate (and very noisy). The LLVM tools also have different command line options, so

[PATCH 25/25] Port testsuite to GCN

2018-09-05 Thread ams
This collection of miscellaneous patches configures the testsuite to run on AMD GCN in a standalone (i.e. not offloading) configuration. It assumes you have your Dejagnu set up to run binaries via the gcn-run tool. 2018-09-05 Andrew Stubbs Kwok Cheung Yeung Julian

[PATCH 23/25] Testsuite: GCN is always PIE.

2018-09-05 Thread ams
The GCN/HSA loader ignores the load address and uses a random location, so we build all GCN binaries as PIE, by default. This patch makes the necessary testsuite adjustments to make this work correctly. 2018-09-05 Andrew Stubbs gcc/testsuite/ * gcc.dg/graphite/scop-19.c:

[PATCH 22/25] Add dg-require-effective-target exceptions

2018-09-05 Thread ams
There are a number of tests that fail because they assume that exceptions are available, but GCN does not support them, yet. This patch adds "dg-require-effective-target exceptions" in all the affected tests. There's probably an automatic way to test for exceptions, but the current

[PATCH 18/25] Fix interleaving of Fortran stop messages

2018-09-05 Thread ams
Fortran STOP and ERROR STOP use a different function to print the "STOP" string and the message string. On GCN this results in out-of-order output, such as "ERROR STOP ". This patch fixes the problem by making estr_write use the proper Fortran write, not C printf, so both parts are now output

[PATCH 20/25] GCN libgcc.

2018-09-05 Thread ams
This patch contains the GCN port of libgcc. I've broken it out just to keep both parts more manageable. We have the usual stuff, plus a "gomp_print" implementation intended to provide a means to output text to console without using the full printf. Originally this was because we did not have a

[PATCH 19/25] GCN libgfortran.

2018-09-05 Thread ams
This patch contains the GCN port of libgfortran. We use the minimal configuration created for NVPTX. That's all that's required, besides the target-independent bug fixes posted already. 2018-09-05 Andrew Stubbs Kwok Cheung Yeung Julian Brown Tom de

[PATCH 17/25] Fix Fortran STOP.

2018-09-05 Thread ams
The minimal libgfortran setup was created for NVPTX, but will also be used by AMD GCN. This patch simply removes an assumption that NVPTX is the only user. Specifically, NVPTX exit is broken, but AMD GCN exit works just fine. 2018-09-05 Andrew Stubbs libgfortran/ *

[PATCH 15/25] Don't double-count early-clobber matches.

2018-09-05 Thread ams
Given a pattern with a number of operands: (match_operand 0 "" "=") (match_operand 1 "" " v0") (match_operand 2 "" " v0") (match_operand 3 "" " v0") GCC will currently increment "reject" once, for operand 0, and then decrement it once for each of the other operands, ending with reject == -2 and

[PATCH 14/25] Disable inefficient vectorization of elementwise loads/stores.

2018-09-05 Thread ams
If the autovectorizer tries to load a GCN 64-lane vector elementwise then it blows away the register file and produces horrible code. This patch simply disallows elementwise loads for such large vectors. Is there a better way to disable this in the middle-end? 2018-09-05 Julian Brown

  1   2   >