[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 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 (name,

[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 b/gcc/fortran/ma

[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. --- gcc

[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, gfc_match_iterat

[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. (gfc_resolv

[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 (fin

[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 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 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. gcc/fortran/

[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(-) dif

[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 a/gcc

[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 p

[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. (gf

[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, 1

[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 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 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 (generate_isocbinding_symb

[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(+), 15

[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

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 "test")

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 u

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 d

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 THU

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 regi

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 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: gcc-patches@gcc.gnu.or

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: gcc-patches@gcc.gnu.or

[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 handles

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

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: [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 > >> Fo

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: [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 t

[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 un

[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 paral

[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 vec

[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 gimplifier

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

[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 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, Mar

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 >> +++ b/gcc/fortra

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? > >

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: gcc/config/cris

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 f

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"!

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 c++/85110)"

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,nvptx] Basic -misa support for nvptx

2018-09-05 Thread Tom de Vries
On 09/06/2018 12:24 AM, Cesar Philippidis wrote: > I'll commit the attached patch shortly. x86_64 with nvptx offloading > regression testing didn't yield any new failures, nor did the standalone > nvptx testing. I'll follow up with an SImode patch later. I'm sorry, I guess I was not clear enough h

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

2018-09-05 Thread Tom de Vries
On 09/06/2018 12:24 AM, Cesar Philippidis wrote: > This is ok (with, as I mentioned above, the SI part split off into a > separate patch), on the condition that you test libgomp with > -foffload=-misa=sm_35. >>> Adding -foffload=misa=sm_35 didn't work because the host gcc doesn't >>> s

<    1   2