Re: [PATCH] analyzer: fix ICE on pointer arithmetic with incomplete types [PR 93774]

2020-02-17 Thread Thomas König
Hi David in principle, any valid test case (especially for an ICE) should count as obvious and simple, so no approval should be needed. Having said that, I think I would prefer a copy of the original test case rather than an include statement. Although we usually do not change or remove test

[PATCH] ipa: Various diagnostic fixes [PR93797]

2020-02-17 Thread Jakub Jelinek
Hi! As the patch shows, various messages didn't match the field names they are talking about. Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2020-02-18 Jakub Jelinek PR ipa/93797 * cgraph.c (verify_speculative_call): Use speculative_id

[committed] Typo fixes - functoin -> function [PR93796]

2020-02-17 Thread Jakub Jelinek
Hi! Bootstrapped/regtested on x86_64-linux and i686-linux, committed to trunk as obvious. 2020-02-18 Jakub Jelinek PR driver/93796 * params.opt (-param=ipa-max-switch-predicate-bounds=): Fix help typo, functoin -> function. * tree.c (free_lang_data_in_decl):

Re: [PATCH 3/3] libstdc++: Implement C++20 range adaptors

2020-02-17 Thread Stephan Bergmann
On 18/02/2020 02:20, Patrick Palka wrote: On Mon, 17 Feb 2020, Stephan Bergmann wrote: On 04/02/2020 03:07, Patrick Palka wrote: This patch implements [range.adaptors]. It also includes the changes from P3280 and P3278 and P3323, without which many standard examples won't work. I see that

[PATCH] Add c++2a binary_semaphore

2020-02-17 Thread Thomas Rodgers
This patch adds the c++2a semaphore header and binary_semaphore type. The implementation is not complete, this patch is just to solicit initial feedback. * include/std/semaphore: New file. * include/std/version (__cpp_lib_semaphore): Add feature test macro. *

[PATCH] RISC-V: Using fmv.x.w/fmv.w.x rather than fmv.x.s/fmv.s.x

2020-02-17 Thread Kito Cheng
- fmv.x.s/fmv.s.x renamed to fmv.x.w/fmv.w.x in the latest RISC-V ISA manual. - Tested rv32gc/rv64gc on bare-metal with qemu. ChangeLog gcc/ Kito Cheng * config/riscv/riscv.c (riscv_output_move) Using fmv.x.w/fmv.w.x rather than fmv.x.s/fmv.s.x. ---

Re: [PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-17 Thread Li Jia He
Hi, On 2020/2/17 4:30 PM, Richard Biener wrote: On Mon, 17 Feb 2020, Jakub Jelinek wrote: On Mon, Feb 17, 2020 at 09:01:13AM +0100, Richard Biener wrote: On Mon, 17 Feb 2020, Li Jia He wrote: This patch wants to fix PR66552 on gimple and optimizes (x shift (n mod C)) to (x shift (n bit_and

[PATCH] analyzer: fix ICE on failed casts [PR 93777]

2020-02-17 Thread David Malcolm
PR analyzer/93777 reports ICEs in Fortran and C++ cases involving a cast of a NULL pointer to a REFERENCE_TYPE. In both cases the call to build_cast fails and returns a NULL type, but region_model::maybe_cast_1 asserts that a non-NULL type was returned. This patch fixes the ICEs by converting

[committed] diagnostics: don't generate URLs that won't be used

2020-02-17 Thread David Malcolm
The two places in diagnostics.c where URLs are printed both do non-trivial work to generate the URL strings (including malloc/free), so don't do this work if URL-printing is disabled. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to master as

[PATCH] analyzer: fix ICE on COMPONENT_REF of ARRAY_TYPE [PR 93778]

2020-02-17 Thread David Malcolm
PR analyzer/93778 reports an ICE with -fanalyzer on a gfortran test case at this gimple stmt: _gfortran_st_set_nml_var (_parm.0, , &"ro%xi%jq"[1]{lb: 1 sz: 1}, 4, 0, D.3913); where ro.xi.jq is a COMPONENT_REF, but ro.xi is of type "struct bl[3]". The analyzer's handling of COMPONENT_REF

[PATCH] analyzer: fix ICE on pointer arithmetic with incomplete types [PR 93774]

2020-02-17 Thread David Malcolm
PR analyzer/93774 reports an ICE in gfortran with -fanalyzer within region_model::convert_byte_offset_to_array_index on a pointer of incomplete type ("character(kind=1)[0:][1:0] * restrict"). This patch bulletproofs the routine against incomplete types, fixing the ICE. Successfully bootstrapped

[PATCH] analyzer: add test coverage for gfortran ICE fix [PR 93779]

2020-02-17 Thread David Malcolm
PR analyzer/93779 reports an ICE in gfortran with -fanalyzer that was fixed for GCC 10 by a workaround in f76a88ebf089871dcce215aa0cb1956ccc060895; the tree code in question is a FUNCTION_DECL. Given that I want to rework the above patch at some point, it seems prudent to add test coverage to

[committed] analyzer: fix ICE on function pointer casts [PR 93775]

2020-02-17 Thread David Malcolm
PR analyzer/93775 reports an ICE in cgraph_node::get when -fanalyzer is used on code that calls a function pointer that was generated via a cast from a non-function. This patch fixes it by bulletproofing region_model::get_fndecl_for_call for the case where the code_region's

Re: [PATCH 3/3] libstdc++: Implement C++20 range adaptors

2020-02-17 Thread Patrick Palka
Hi Stephan, On Mon, 17 Feb 2020, Stephan Bergmann wrote: > On 04/02/2020 03:07, Patrick Palka wrote: > > This patch implements [range.adaptors]. It also includes the changes from > > P3280 > > and P3278 and P3323, without which many standard examples won't work. > > I see that with this >

[PATCH] c++: use "C++20" in std header hints

2020-02-17 Thread David Malcolm
On Sat, 2020-02-15 at 22:21 +0100, Jason Merrill wrote: > It's probably past time for this, but definitely now that we're done > with > the final committee meeting of C++20. This patch only adds the > option and > adjusts the testsuite to recognize it; more extensive changes can > wait for > the

[PATCH] i18n: Fix translation of --help [PR93759]

2020-02-17 Thread Jakub Jelinek
Hi! The first two hunks make sure we actually translate what has been marked for translation, i.e. the cl_options[...].help strings, rather than those strings ammended in various ways, like: _("%s Same as %s."), help, ... or "%s %s", help, _(use_diagnosed_msg) The exgettext changes attempt to

[PATCH] tree-ssa: Fix ICE in build_vector_type [PR93780]

2020-02-17 Thread Jakub Jelinek
Hi! The following testcase ICEs, because execute_update_addresses_taken attempts to create a VECTOR_TYPE with non-power of 2 number of elts. Fixed by guarding it with the corresponding predicate. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2020-02-17 Jakub Jelinek

[PATCH] reject invalid flexarrays even in anonymous structs (PR 93753)

2020-02-17 Thread Martin Sebor
The improved checking of flexible array members committed in r231665 (and later) deliberately excluded anonymous structs and unions (unnamed members of types with no tags) to allow a harmless extension that was accepted by G++ prior to the change. However, being overly broad, the exemption

Re: [PATCH] libgfortran: Fix and simplify IO locking [PR92836]

2020-02-17 Thread Thomas Koenig
Hi Janne, Simplify IO locking in libgfortran. The new IO implementation avoids accessing units without locks, as seen in PR 92836. It also avoids lock inversion (except for a corner case wrt namelist query when reading from stdin and outputting to stdout), making it easier to verify

Re: [9/10 Regression, PATCH] fortran: ICE in gfc_validate_kind(): Got bad kind [PR93580]

2020-02-17 Thread Thomas Koenig
Hi Mark, OK for master and gcc 9 branch? Looks good. Thanks! Regards Thomas

Re: [8/9/10 Regression, patch][PR93714] ICE in gfc_check_same_strlen, at fortran/check.c:1253

2020-02-17 Thread Thomas Koenig
Hi Mark, OK to commit? Yes, OK. Thanks a lot for the patch! Regards Thomas

Re: [PATCH 3/3] libstdc++: Implement C++20 range adaptors

2020-02-17 Thread Stephan Bergmann
On 04/02/2020 03:07, Patrick Palka wrote: This patch implements [range.adaptors]. It also includes the changes from P3280 and P3278 and P3323, without which many standard examples won't work. I see that with this

Re: [Regression, patch][Fortran] ICE: Invalid expression in gfc_element_size PR93601

2020-02-17 Thread Thomas Koenig
Hi Mark and Steve, OK to commit? Yes. Again, thanks a lot! Regards Thomas

Re: [Regression, patch][Fortran] ICE in gfc_typenode_for_spec PR93603

2020-02-17 Thread Thomas Koenig
Hi Mark and Steve, OK to commit? OK (bordering on obvious). Thanks to both of you! Regards Thomas

[patch, libfortran] Fix race condition in asynchronous I/O

2020-02-17 Thread Thomas Koenig
Hello world, as you can see from the PR, async_io_4.f90 exhibited a race condition every few thousands to tens of thousands of cases. This was difficult to track down, and took some thinking, discussion with Nicolas and enabling of the debugging feature of the async I/O, which finally produced

[PATCH 1/2] libstdc++: P1243R4 Rangify new algorithms

2020-02-17 Thread Patrick Palka
This adds rangified overloads for for_each_n, sample and clamp as per P1243R4. libstdc++-v3/ChangeLog: P1243R4 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn, for_each_n, __sample_fn, sample, __clamp_fn, clamp): New. *

[PATCH 2/2] libstdc++: P2106R0 Alternative wording for GB315 and GB316

2020-02-17 Thread Patrick Palka
libstdc++-v3/ChangeLog: P2106R0 * include/bits/ranges_algo.h (in_fun_result): New. (for_each_result, for_each_n_result): Change into an alias of in_fun_result. (in_in_result): New. (mismatch_result): Change into an alias of in_in_result.

Re: [committed] libstdc++: P1964R2 Wording for boolean-testable

2020-02-17 Thread Tim Song
On Mon, Feb 17, 2020 at 12:34 PM Jonathan Wakely wrote: > This removes the complicated std::boolean concept, as agreed in Prague. > > * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn) > (__adjacent_find_fn): Cast result of predicate to bool. Um, why? These look fine

Re: Update gcc.target/powerpc/pr92132-fp test for power7 and older

2020-02-17 Thread will schmidt
On Thu, 2020-02-13 at 17:23 -0600, Segher Boessenkool wrote: > On Thu, Feb 13, 2020 at 04:41:09PM -0600, will schmidt wrote: > > Attempting to clean up some more testcase failures. > > This test in particular exercises the -ftree-vectorize > > option, and by inspection I see this fails out with

[COMMITTED][AArch64] Fix PR93565 testcase for ILP32.

2020-02-17 Thread Wilco Dijkstra
Fix PR93565 testcase for ILP32. Committed as obvious. testsuite/ * gcc.target/aarch64/pr93565.c: Fix test for ilp32. -- diff --git a/gcc/testsuite/gcc.target/aarch64/pr93565.c b/gcc/testsuite/gcc.target/aarch64/pr93565.c index 7200f80..fb64f5c 100644 ---

[committed] libstdc++: P1970R2 Consistency for size() functions: Add ranges::ssize

2020-02-17 Thread Jonathan Wakely
This defines ranges::ssize as approved in Prague. It's unclear what is supposed to happen for types for which range_difference_t is not a valid type. I've assumed they are not meant to be usable with ranges::ssize, despite being usable with ranges::size. * include/bits/range_access.h

[committed] libstdc++: P1964R2 Wording for boolean-testable

2020-02-17 Thread Jonathan Wakely
This removes the complicated std::boolean concept, as agreed in Prague. * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn) (__adjacent_find_fn): Cast result of predicate to bool. * include/std/concepts (__boolean): Remove.

[GCC][PATCH][AArch64] Add bfloat16 vldn/vstn intrinsics

2020-02-17 Thread Mihail Ionescu
Hi, This patch adds the load/store bfloat16 intrinsics to the AArch64 back-end. ACLE documents are at https://developer.arm.com/docs/101028/latest ISA documents are at https://developer.arm.com/docs/ddi0596/latest Regression tested on aarch64-none-linux-gnu. Is it ok for trunk? gcc/ChangeLog:

[GCC][PATCH][AArch64] Add bfloat16 vdup and vreinterpret ACLE intrinsics

2020-02-17 Thread Mihail Ionescu
Hi, This patch adds support for the bf16 duplicate and reinterpret intrinsics. ACLE documents are at https://developer.arm.com/docs/101028/latest ISA documents are at https://developer.arm.com/docs/ddi0596/latest Regression tested on aarch64-none-linux-gnu. Is it ok for trunk? gcc/ChangeLog:

Re: [PATCH] aarch64: Allow -mcpu=generic -march=armv8.5-a

2020-02-17 Thread Andrew Pinski
On Mon, Feb 17, 2020 at 7:56 AM Richard Earnshaw (lists) wrote: > > On 17/02/2020 15:42, Richard Sandiford wrote: > > "Richard Earnshaw (lists)" writes: > >> On 14/02/2020 10:41, Andrew Pinski wrote: > >>> On Fri, Feb 14, 2020 at 2:12 AM Richard Earnshaw (lists) > >>> wrote: > > On

Re: [PATCH] avoid user-constructible types in reshape_init_array (PR 90938)

2020-02-17 Thread Jason Merrill
On 2/14/20 9:06 PM, Martin Sebor wrote: On 2/13/20 3:59 PM, Jason Merrill wrote: On 2/12/20 9:21 PM, Martin Sebor wrote: On 2/11/20 5:28 PM, Jason Merrill wrote: On 2/11/20 9:00 PM, Martin Sebor wrote: r270155, committed in GCC 9, introduced a transformation that strips redundant trailing

Re: [PATCH v2 0/4] Fix library testsuite compilation for build sysroot

2020-02-17 Thread Maciej W. Rozycki
On Sat, 15 Feb 2020, Maciej W. Rozycki wrote: > > > Thank you, Mike, for your input. That is what v1 did, but it seems to > > > clash with some people's expectations, as discussed here: > > > > > > > > > > I didn't see any clash with

Re: [committed] libstdc++: Add lightweight replacement for std::numeric_limits (PR 92546)

2020-02-17 Thread Jonathan Wakely
On 17/02/20 17:26 +0100, Daniel Krügler wrote: Am Mo., 17. Feb. 2020 um 16:33 Uhr schrieb Jonathan Wakely : Many uses of std::numeric_limits in C++17 and C++20 features only really need the min(), max() and digits constants for integral types. By adding __detail::__int_limits we can avoid

[committed] libstdc++ P1956R1 On the names of low-level bit manipulation functions

2020-02-17 Thread Jonathan Wakely
Implement this change for C++20 that was just approved in Prague. P1956R1 On the names of low-level bit manipulation functions * include/bits/hashtable_policy.h: Update comment. * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename. (ispow2, ceil2,

Re: [committed] libstdc++: Add lightweight replacement for std::numeric_limits (PR 92546)

2020-02-17 Thread Daniel Krügler
Am Mo., 17. Feb. 2020 um 16:33 Uhr schrieb Jonathan Wakely : > > Many uses of std::numeric_limits in C++17 and C++20 features only really > need the min(), max() and digits constants for integral types. By adding > __detail::__int_limits we can avoid including the whole header. numeric_limits

[committed] libstdc++: Add comment to explaining C++14 status

2020-02-17 Thread Jonathan Wakely
This header is intentionally valid in C++14 mode, because no conforming C++14 program will try to include and so it's OK to add new (non-reserved in C++14) names to namespace std. However, other headers must not include transitively prior to C++17, so that we don't add those non-reserved names

Re: [PATCH] aarch64: Allow -mcpu=generic -march=armv8.5-a

2020-02-17 Thread Richard Earnshaw (lists)
On 17/02/2020 15:42, Richard Sandiford wrote: "Richard Earnshaw (lists)" writes: On 14/02/2020 10:41, Andrew Pinski wrote: On Fri, Feb 14, 2020 at 2:12 AM Richard Earnshaw (lists) wrote: On 14/02/2020 03:18, apin...@marvell.com wrote: From: Andrew Pinski Right if someone supplies a

[committed] libstdc++: Reduce header dependencies for C++20 (PR 92546)

2020-02-17 Thread Jonathan Wakely
Another patch to reduce the size of preprocessed code in C++20, this time reducing . Tested powerpc64le-linux, committed to master. commit 9cd4eeefcc641dd70d026e08e9d218101b826c52 Author: Jonathan Wakely Date: Mon Feb 17 15:25:33 2020 + libstdc++: Reduce header dependencies for

Re: [PATCH] aarch64: Allow -mcpu=generic -march=armv8.5-a

2020-02-17 Thread Richard Sandiford
"Richard Earnshaw (lists)" writes: > On 14/02/2020 10:41, Andrew Pinski wrote: >> On Fri, Feb 14, 2020 at 2:12 AM Richard Earnshaw (lists) >> wrote: >>> >>> On 14/02/2020 03:18, apin...@marvell.com wrote: From: Andrew Pinski Right if someone supplies a -mcpu= option and then

[committed] libstdc++: Add lightweight replacement for std::numeric_limits (PR 92546)

2020-02-17 Thread Jonathan Wakely
Many uses of std::numeric_limits in C++17 and C++20 features only really need the min(), max() and digits constants for integral types. By adding __detail::__int_limits we can avoid including the whole header. The header isn't especially large, but avoiding it still gives small savings in

[PATCH] Compare more sensitive FIX_TRUNC_EXPR in IPA ICF.

2020-02-17 Thread Martin Liška
Hi. The patch is extension of 446096148ca9775cb56f9ee924fa283babcd0b76 commit where we need to handle FIX_TRUNC_EXPR in compare_gimple_assign. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: 2020-02-17 Martin Liska

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Martin Liška
On 2/17/20 3:48 PM, Jakub Jelinek wrote: On Mon, Feb 17, 2020 at 03:44:53PM +0100, Martin Liška wrote: + error ("MALLOC attribute set on a void function"); Why the capitals? Either malloc or % IMSHO. Sure, I'll fix it. What is special about void functions, missing lhs? That can be

Re: One more patch for PR91333

2020-02-17 Thread Maxim Kuvyrkov
Hi Vladimir, This patch increases code size at -Os on arm-linux-gnueabihf by 1% (with no code-size reductions) on several SPEC CPU2006 benchmarks: 400.perlbench,perlbench_base.default ,580842,583842 429.mcf,mcf_base.default ,7867,7955

Re: [PATCH v2][ARM][GCC][3/x]: MVE ACLE intrinsics framework patch.

2020-02-17 Thread Kyrill Tkachov
On 2/14/20 4:34 PM, Srinath Parvathaneni wrote: Hello Kyrill, In this patch (v2) all the review comments mentioned in previous patch (v1) are addressed. (v1) https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01401.html # Hello, This patch is part of MVE ACLE intrinsics

Re: [PATCH v2][ARM][GCC][2/x]: MVE ACLE intrinsics framework patch.

2020-02-17 Thread Kyrill Tkachov
Hi Srinath, On 2/14/20 4:34 PM, Srinath Parvathaneni wrote: Hello Kyrill, In this patch (v2) all the review comments mentioned in previous patch (v1) are addressed. (v1) https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01395.html # Hello, This patch is part of MVE ACLE

Re: [PATCH v2][ARM][GCC][1/x]: MVE ACLE intrinsics framework patch.

2020-02-17 Thread Kyrill Tkachov
Hi Srinath, On 2/14/20 4:26 PM, Srinath Parvathaneni wrote: Hi Kyrill, > This patch series depends on upstream patches "Armv8.1-M Mainline Security Extension" [4], > "CLI and multilib support for Armv8.1-M Mainline MVE extensions" [5] and "support for Armv8.1-M > Mainline scalar shifts"

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Jakub Jelinek
On Mon, Feb 17, 2020 at 03:44:53PM +0100, Martin Liška wrote: > + error ("MALLOC attribute set on a void function"); Why the capitals? Either malloc or % IMSHO. What is special about void functions, missing lhs? That can be missing for other functions (where you just don't use the return

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Martin Jambor
Hi, On Mon, Feb 17 2020, Richard Biener wrote: > On Mon, Feb 17, 2020 at 1:16 PM Martin Liška wrote: >> >> Hello. >> >> As mentioned in the PR, we end up with a void function >> call that has set MALLOC attribute. That causes problems in RTL >> expansion. >> >> I believe a proper fix is to drop

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Martin Liška
Sorry, I attached wrong patch. Martin >From c215a4d5d5d5aa72729c16408805eb9ddf5f0d38 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 17 Feb 2020 12:33:28 +0100 Subject: [PATCH] Drop MALLOC attribute for void functions. gcc/ChangeLog: 2020-02-17 Martin Liska PR ipa/93583 *

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Martin Liška
On 2/17/20 3:25 PM, Richard Biener wrote: On Mon, Feb 17, 2020 at 1:16 PM Martin Liška wrote: Hello. As mentioned in the PR, we end up with a void function call that has set MALLOC attribute. That causes problems in RTL expansion. I believe a proper fix is to drop the attribute when a

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Richard Biener
On Mon, Feb 17, 2020 at 1:16 PM Martin Liška wrote: > > Hello. > > As mentioned in the PR, we end up with a void function > call that has set MALLOC attribute. That causes problems in RTL > expansion. > > I believe a proper fix is to drop the attribute when a callgraph > clone with void type is

Re: [PR47785] COLLECT_AS_OPTIONS

2020-02-17 Thread Richard Biener
On Mon, Feb 17, 2020 at 10:28 AM Prathamesh Kulkarni wrote: > > On Thu, 6 Feb 2020 at 20:03, Prathamesh Kulkarni > wrote: > > > > On Thu, 6 Feb 2020 at 18:42, Richard Biener > > wrote: > > > > > > On Thu, Feb 6, 2020 at 1:48 PM Prathamesh Kulkarni > > > wrote: > > > > > > > > On Tue, 4 Feb

[Regression, patch][Fortran] ICE: Invalid expression in gfc_element_size PR93601

2020-02-17 Thread Mark Eggleston
Please find attached a fix for PR93601. gcc/fortran/ChangeLogs     Steven G. Kargl      PR fortran/93601     * match.c (gfc_match_assignment) : Reject assignment if     the lhs stype is BT_CLASS and the rhs type is BT_BOZ. gcc/testsuite/ChangeLogs     Mark Eggleston      PR fortran/93601  

[committed] libstdc++: Make "implicit expression variants" more explicit (P2102R0)

2020-02-17 Thread Jonathan Wakely
* include/bits/iterator_concepts.h (indirectly_copyable_storable): Add const-qualified expression variations. * include/std/concepts (copyable): Likewise. Tested powerpc64le-linux, committed to master. commit d6dfa3dafc0a69a84002f1c0be17a70b0996cc72 Author: Jonathan Wakely

[committed] libstdc++: Fix regression in libstdc++-prettyprinters/cxx20.cc

2020-02-17 Thread Jonathan Wakely
* python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update value for partial_ordering::unordered. Tested powerpc64le-linux, committed to master. commit 4540ef781bcefffe779a8b31950ea737733f06a4 Author: Jonathan Wakely Date: Mon Feb 17 13:20:57 2020 +

[committed] libstdc++: Implement "Safe Integral Comparisons" (P0586R2)

2020-02-17 Thread Jonathan Wakely
* include/std/type_traits (__is_standard_integer): New helper trait. * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater) (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20. * include/std/version

[Regression, patch][Fortran] ICE in gfc_typenode_for_spec PR93603

2020-02-17 Thread Mark Eggleston
Please find attached fix for PR fortran/93603. gcc/fortran/ChangeLog     Steven G. Kargl      PR fortran/93603     * match.c (gfc_match_associate) : If target expression     has the type BT_BOZ output an error and goto     assocListError. gcc/testsuite/ChangeLog     Mark Eggleston      PR

[PATCH] tree-optimization/93586 - bogus path-based disambiguation

2020-02-17 Thread Richard Biener
This fixes bogus path-based disambiguation of mismatched array shape accesses. Bootstrap & regtest running on x86_64-unknown-linux-gnu. Honza, is this the correct place to detect this or were we not supposed to arrive there? Thanks, Richard. 2020-02-17 Richard Biener PR

Re: [PATCH] c++: Fix poor diagnostic for array initializer [PR93710]

2020-02-17 Thread Christophe Lyon
On Wed, 12 Feb 2020 at 21:06, Marek Polacek wrote: > > A small improvement for an error in build_user_type_conversion_1: > instead of > > array-init1.C:11:1: error: conversion from ‘long int’ to ‘A’ is ambiguous >11 | }; > | ^ > > we will print > > array-init1.C:8:3: error: conversion

Re: [PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Martin Jambor
Hi, On Mon, Feb 17 2020, Martin Liška wrote: > Hello. > > As mentioned in the PR, we end up with a void function > call that has set MALLOC attribute. That causes problems in RTL > expansion. > > I believe a proper fix is to drop the attribute when a callgraph > clone with void type is created. >

[PATCH][OBVIOUS] Fix grammar in error message.

2020-02-17 Thread Martin Liška
Hi. One obvious fix suggested by Andrew P. Martin gcc/ChangeLog: 2020-02-17 Martin Liska PR ipa/93760 * ipa-devirt.c (odr_types_equivalent_p): Fix grammar. gcc/testsuite/ChangeLog: 2020-02-17 Martin Liska PR ipa/93760 * g++.dg/lto/odr-8_1.C: Fix

[PATCH][OBVIOUS] Fix double quoting.

2020-02-17 Thread Martin Liška
Hi. The fix is about removal of redundant quotes. Thanks, Martin gcc/ChangeLog: 2020-02-17 Martin Liska PR translation/93755 * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix double quotes. --- gcc/config/rs6000/rs6000.c | 2 +- 1 file changed, 1

[PATCH][OBVIOUS] Fix a typo.

2020-02-17 Thread Martin Liška
Hi. One obvious typo fix. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Thanks, Martin gcc/ChangeLog: 2020-02-17 Martin Liska PR other/93756 * config/rx/elf.opt: Fix typo. libphobos/ChangeLog: 2020-02-17 Martin Liska PR other/93756

[PATCH] Drop MALLOC attribute for void functions.

2020-02-17 Thread Martin Liška
Hello. As mentioned in the PR, we end up with a void function call that has set MALLOC attribute. That causes problems in RTL expansion. I believe a proper fix is to drop the attribute when a callgraph clone with void type is created. I would like to see Martin's comment about the hunk in

Re: [PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-17 Thread Jiufu Guo
Li Jia He writes: > Hi, > @@ -546,6 +546,12 @@ DEFINE_INT_AND_FLOAT_ROUND_FN (RINT) > (simplify >(mod (mod@2 @0 @1) @1) >@2) > + /* Optimize (x shift (n mod C)) to (x shift (n bit_and (C - 1))) when C is a > +constant and power of two. */ > + (for shift (lshift rshift) > +

[Regression, patch][Fortran] ICE in gfc_conv_constant_to_tree PR93604

2020-02-17 Thread Mark Eggleston
Please find attached patch for PR93604. gcc/fortran/ChangeLog     Steven G. Kargl      PR fortran/93604     * decl.c (gfc_match_data) : Check whether the data expression     is a derived type and is a constructor. If a BOZ constant     is encountered in the constructor output an error and

Re: [PATCH] issues with configure --enable-checking option

2020-02-17 Thread Roman Zhuykov
Ping.  Proposed patch is docs-only (install.texi), and IMHO it's better to push it into 8.4 and 9.3. 11.02.2020 17:46, Roman Zhuykov wrote: > 07.02.2020 20:20, Richard Sandiford writes: >> Roman Zhuykov writes: >>> Hi! >>> I've investigated a bit, because some of the following confused me while

Re: [PATCH 2/4] Use const for some function arguments.

2020-02-17 Thread Richard Biener
On Mon, Feb 17, 2020 at 11:05 AM Martin Liška wrote: > > On 2/7/20 6:21 PM, Segher Boessenkool wrote: > > On Tue, Feb 04, 2020 at 02:55:14PM +0100, Martin Liska wrote: > >> > >> gcc/ChangeLog: > >> > >> 2020-02-04 Martin Liska > >> > >> PR c/92472. > > > > That trailing dot should not be

Re: [PATCH 2/4] Use const for some function arguments.

2020-02-17 Thread Martin Liška
On 2/7/20 6:21 PM, Segher Boessenkool wrote: On Tue, Feb 04, 2020 at 02:55:14PM +0100, Martin Liska wrote: gcc/ChangeLog: 2020-02-04 Martin Liska PR c/92472. That trailing dot should not be there (in some other patches as well). Sure. I'll fix it. @Richi: May I install the

Re: gcov: reduce code quality loss by reproducible topn merging [PR92924]

2020-02-17 Thread Martin Liška
On 2/13/20 2:35 PM, Jan Hubicka wrote: Otherwise the patch is OK and thanks for working on this! Honza Hello. There's updated version of the patch that comes with the new option name. If there's no comment I'm going to install it tomorrow. Patch can bootstrap on x86_64-linux-gnu and

Re: [PR47785] COLLECT_AS_OPTIONS

2020-02-17 Thread Prathamesh Kulkarni
On Thu, 6 Feb 2020 at 20:03, Prathamesh Kulkarni wrote: > > On Thu, 6 Feb 2020 at 18:42, Richard Biener > wrote: > > > > On Thu, Feb 6, 2020 at 1:48 PM Prathamesh Kulkarni > > wrote: > > > > > > On Tue, 4 Feb 2020 at 19:44, Richard Biener > > > wrote: > > > > > > > > On Mon, Feb 3, 2020 at

RE: [PATCH] Fix bug in recursiveness check for function to be cloned (ipa/pr93707)

2020-02-17 Thread Tamar Christina
Hi Feng, Thanks! The patch seems to work. Hopefully it gets reviewed soon so we can fix the two benchmarks  Thanks, Tamar > -Original Message- > From: Feng Xue OS > Sent: Thursday, February 13, 2020 05:40 > To: Tamar Christina ; Martin Jambor > ; Jan Hubicka ; gcc- >

Re: [PATCH] c/86134 avoid errors for unrecognized -Wno- options

2020-02-17 Thread Richard Biener
On Fri, 14 Feb 2020, Joseph Myers wrote: > On Fri, 14 Feb 2020, Richard Biener wrote: > > > diff --git a/gcc/opts-global.c b/gcc/opts-global.c > > index d5e308bf800..52ea083a6d5 100644 > > --- a/gcc/opts-global.c > > +++ b/gcc/opts-global.c > > @@ -139,8 +139,10 @@ print_ignored_options (void) >

Re: [PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-17 Thread Richard Biener
On Mon, 17 Feb 2020, Jakub Jelinek wrote: > On Mon, Feb 17, 2020 at 09:01:13AM +0100, Richard Biener wrote: > > On Mon, 17 Feb 2020, Li Jia He wrote: > > > This patch wants to fix PR66552 on gimple and optimizes (x shift (n mod > > > C)) > > > to (x shift (n bit_and (C - 1))) when C is a

Re: [PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-17 Thread Jakub Jelinek
On Mon, Feb 17, 2020 at 09:01:13AM +0100, Richard Biener wrote: > On Mon, 17 Feb 2020, Li Jia He wrote: > > This patch wants to fix PR66552 on gimple and optimizes (x shift (n mod C)) > > to (x shift (n bit_and (C - 1))) when C is a constant and power of two as > > discussed in PR66552. > > > >

Re: [PATCH] Fix PR66552, Missed optimization when shift amount is result of signed modulus

2020-02-17 Thread Richard Biener
On Mon, 17 Feb 2020, Li Jia He wrote: > Hi, > > This patch wants to fix PR66552 on gimple and optimizes (x shift (n mod C)) > to (x shift (n bit_and (C - 1))) when C is a constant and power of two as > discussed in PR66552. > > The regression testing for the patch was done on GCC mainline on >