Re: C++ PATCH for c++/91844 - Implement CWG 2352, Similar types and reference binding.

2019-09-23 Thread Jason Merrill
On 9/22/19 3:23 PM, Marek Polacek wrote: + /* Informally, two types are similar if, ignoring top-level cv-qualification: + * they are the same type; or + * they are both pointers, and the pointed-to types are similar; or + * they are both pointers to member of the same class, and

[PR 91831] Copy PARM_DECLs of artificial thunks

2019-09-23 Thread Martin Jambor
Hi, I am quite surprised I did not catch this before but the new ipa-param-manipulation does not copy PARM_DECLs when creating artificial thinks (I think it originally did but then I somehow removed during one cleanups). Fixed below by adding the capability at the natural place. It is triggered

[PATCH] PR libstdc++/91788 improve codegen for std::variant::index()

2019-09-23 Thread Jonathan Wakely
If __index_type is a smaller type than size_t, then the result of size_t(__index_type(-1)) is not equal to size_t(-1), but to an incorrect value such as size_t(255) or size_t(65535). The old implementation of variant::index() uses (size_t(__index_type(_M_index + 1)) - 1) which is always correct,

[PATCH][arm] Add missing Makefile dependency on arm_acle_builtins.def

2019-09-23 Thread Kyrill Tkachov
Hi all, arm-builtins.o is missing a Makefile dependency on arm_acle_builtins.def which can cause inconsistent rebuilds when adding builtins in there. This patch adds the right Makefile-foo to fix that. Tested on arm-none-eabi. Committing to trunk. Thanks, Kyrill 2019-09-23  Kyrylo Tkachov 

[PATCH RS6000], add xxswapd support

2019-09-23 Thread Carl Love
GCC maintainers: The following patch adds define_insn support for xxswapd mnemonic.  The xxswapd mnemonic is the more prefered name for the xxpermdi mnemonic.  The following patch replaces the define_insn xxpermdi with define_insn xxswapd. The patch has been tested on:  

[PR 91832] Do not ICE on negative offsets in ipa-sra

2019-09-23 Thread Martin Jambor
Hi, IPA-SRA asserts that an offset obtained from get_ref_base_and_extent is non-negative (after it verifies it is based on a parameter). That assumption is invalid as the testcase shows. One could probably also write a testcase with defined behavior, but unless I see a reasonable one where the

Re: [C++ Patch] Use cp_expr_loc_or_input_loc in a few places in pt.c

2019-09-23 Thread Jason Merrill
On 9/23/19 7:08 AM, Paolo Carlini wrote: Hi, simply a few new uses, in the places where we are dealing with expressions: we are able to do the right thing in a pretty large number of additional cases - the below could even include more testcases, most however are rather tangled (eg, we

Re: C++ PATCH for c++/91844 - Implement CWG 2352, Similar types and reference binding.

2019-09-23 Thread Marek Polacek
On Mon, Sep 23, 2019 at 10:17:00AM -0400, Jason Merrill wrote: > On 9/22/19 3:23 PM, Marek Polacek wrote: > > + /* Informally, two types are similar if, ignoring top-level > > cv-qualification: > > + * they are the same type; or > > + * they are both pointers, and the pointed-to types

Re: [patch, libgfortran] Bug 91593 - Implicit enum conversions in libgfortran/io/transfer.c

2019-09-23 Thread Bernhard Reutner-Fischer
On 22 September 2019 22:51:46 CEST, Jerry DeLisle wrote: >Hi all, > >The attached patch eliminates several warnings by adjusting which >enumerator is >used in the subject offending code. I fixed this by adding an >enumerator at the >end of the file_mode definition. This then triggered a

[testsuite] Skip gcc.dg/ucnid-5-utf8.c unless ucn is supported

2019-09-23 Thread Rainer Orth
The new gcc.dg/ucnid-5-utf8.c test FAILs on Solaris with the native assembler: +FAIL: gcc.dg/ucnid-5-utf8.c (test for excess errors) +UNRESOLVED: gcc.dg/ucnid-5-utf8.c compilation failed to produce executable Excess errors: /usr/ccs/bin/as: "/var/tmp//cc8LEnCb.s", line 22: error: invalid

Re: [patch, testsuite, arm] Fix ICE in gcc.dg/gimplefe-28.c

2019-09-23 Thread Kyrill Tkachov
On 9/23/19 4:11 AM, Sandra Loosemore wrote: On 9/20/19 2:18 AM, Kyrill Tkachov wrote: Yeah, an add_options_for_arm_vfp is what we ideally need here. How about this version of the patch?  The two test cases I also tweaked to use it are the only ones that use the corresponding arm_vfp_ok

Re: [Ada] Fix 32/64bit mistake on SYSTEM_INFO component in s-win32

2019-09-23 Thread Rainer Orth
Hi Arnaud, >> I'd keep the target list alphabetical. Can do so when the Solaris patch >> goes in. >> >> Here's what I've successfully tested last night on both >> i386-pc-solaris2.11 and sparc-sun-solaris2.11, shamelessly stolen from >> the Linux counterparts. If it is acceptable, I'd add

Re: [rs6000] Fix non-canonical CONST_INTs in altivec_copysign_v4sf3 (PR91823)

2019-09-23 Thread Segher Boessenkool
On Mon, Sep 23, 2019 at 10:51:30AM +0100, Richard Sandiford wrote: > The pattern was generating zero-extended rather than sign-extended > CONST_INTs. > > Tested by Bill Seurer (thanks!). OK to install? Sure! One nit: > gcc/ > PR target/91823 > * config/rs6000/altivec.md

[Ada] Process argument of pragma Compile_Time_{Error|Warning} in gigi

2019-09-23 Thread Eric Botcazou
As demonstrated by the testcase, gigi needs to process the (first) argument of pragma Compile_Time_{Error|Warning} to catch the case of a type otherwise not referenced in the main unit. Tested on x86_64-suse-linux, applied on the mainline. 2019-09-23 Eric Botcazou *

Re: [patch, libgfortran] Bug 91593 - Implicit enum conversions in libgfortran/io/transfer.c

2019-09-23 Thread Tobias Burnus
Hi Jerry, On 9/22/19 10:51 PM, Jerry DeLisle wrote: The attached patch eliminates several warnings by adjusting which enumerator is used in the subject offending code. I fixed this by adding an enumerator at the end of the file_mode definition.  This then triggered a warning in several other

[AArch64] Fix cost of (plus ... (const_int -C))

2019-09-23 Thread Richard Sandiford
The PLUS handling in aarch64_rtx_costs only checked for nonnegative constants, meaning that simple immediate subtractions like: (set (reg R1) (plus (reg R2) (const_int -8))) had a cost of two instructions. Tested on aarch64-linux-gnu (with and without SVE). OK to install? Richard

[Ada] Fix size increase for packed record with aliased component

2019-09-23 Thread Eric Botcazou
This fixes a fallout of the reordering of components in record types that was enabled some time ago: the size of a packed record with an aliased component may be larger than the size that would have been given by a textual layout of the record type. Tested on x86_64-suse-linux, applied on the

Re: [Patch 0/X] [WIP][RFC][libsanitizer] Introduce HWASAN to GCC

2019-09-23 Thread Martin Liška
Hi. As mentioned in the next email thread, there are main objectives that will help me to make a proper patch review: 1) Make first libsanitizer merge from trunk, it will remove the need of the backports that you made. Plus I will be able to apply the patchset on the current master. 2) I

[rs6000] Fix non-canonical CONST_INTs in altivec_copysign_v4sf3 (PR91823)

2019-09-23 Thread Richard Sandiford
The pattern was generating zero-extended rather than sign-extended CONST_INTs. Tested by Bill Seurer (thanks!). OK to install? Richard 2019-09-23 Richard Sandiford gcc/ PR target/91823 * config/rs6000/altivec.md (altivec_copysign_v4sf3): Generate canonical

Re: [PATCH] xtensa: fix PR target/90922

2019-09-23 Thread Max Filippov
On Tue, Jun 18, 2019 at 3:23 PM Max Filippov wrote: > > On Tue, Jun 18, 2019 at 3:09 PM augustine.sterl...@gmail.com > wrote: > > > > On Tue, Jun 18, 2019 at 2:27 PM Max Filippov wrote: > > > > > > Stack pointer adjustment code in prologue missed a case of no > > > callee-saved registers and a

Re: Question on direction of GCC support for HWASAN.

2019-09-23 Thread Martin Liška
On 9/20/19 7:11 PM, Matthew Malcomson wrote: > Hello, Hi. Next time, please send the email to the HWASAN email thread. > > I'm nearing the point where I think the hardware-asan patch series could > go in and would appreciate some feedback on what features need to be > implemented before it

[Ada] Disable selected optimizations done in gigi at -Og

2019-09-23 Thread Eric Botcazou
This disables 3 optimizations done in gigi when the -Og switch is passed: the rotation of loops, the NRV optimization (Named Return Value) and the inlining of local finalizers. Tested on x86_64-suse-linux, applied on the mainline. 2019-09-23 Eric Botcazou * gcc-interface/trans.c

Re: [PATCH, AArch64] PR target/91833

2019-09-23 Thread Kyrill Tkachov
On 9/21/19 7:11 AM, Richard Henderson wrote: Tested on aarch64-linux (glibc) and aarch64-elf (installed newlib). The existing configure claims to be generated by 2.69, but there are changes wrt the autoconf distributed with Ubuntu 18. Nothing that seems untoward though. The aarch64 parts

[committed][AArch64] Fix memmodel index in aarch64_store_exclusive_pair

2019-09-23 Thread Richard Sandiford
Found via an rtl checking failure. Tested on aarch64-linux-gnu and applied as obvious (r276052). Richard 2019-09-23 Richard Sandiford gcc/ * config/aarch64/atomics.md (aarch64_store_exclusive_pair): Fix memmodel index. Index: gcc/config/aarch64/atomics.md

Use underscore in IPA-SRA LTO section name (PR ipa/91835)

2019-09-23 Thread Rainer Orth
The recent IPA-SRA patch completely broke LTO on Solaris/x86 with the native assembler: FAIL: gcc.c-torture/compile/2105-1.c -O2 -flto -flto-partition=none (test for excess errors) Excess errors: Assembler: 2105-1.c "/var/tmp//ccaW7VHa.s", line 35 : Syntax error Near

[C++ Patch] Use cp_expr_loc_or_input_loc in a few places in pt.c

2019-09-23 Thread Paolo Carlini
Hi, simply a few new uses, in the places where we are dealing with expressions: we are able to do the right thing in a pretty large number of additional cases - the below could even include more testcases, most however are rather tangled (eg, we finally get the locations completely right

Re: C++ PATCH for c++/91844 - Implement CWG 2352, Similar types and reference binding.

2019-09-23 Thread Jason Merrill
On 9/23/19 12:06 PM, Marek Polacek wrote: On Mon, Sep 23, 2019 at 10:17:00AM -0400, Jason Merrill wrote: On 9/22/19 3:23 PM, Marek Polacek wrote: + /* Informally, two types are similar if, ignoring top-level cv-qualification: + * they are the same type; or + * they are both pointers,

Re: [PATCH] PR libstdc++/91788 improve codegen for std::variant::index()

2019-09-23 Thread Marc Glisse
On Mon, 23 Sep 2019, Jonathan Wakely wrote: If __index_type is a smaller type than size_t, then the result of size_t(__index_type(-1)) is not equal to size_t(-1), but to an incorrect value such as size_t(255) or size_t(65535). The old implementation of variant::index() uses

Re: [PATCH RS6000], add xxswapd support

2019-09-23 Thread Segher Boessenkool
Hi Carl, On Mon, Sep 23, 2019 at 08:07:32AM -0700, Carl Love wrote: > * config/rs6000/vsx.md (xxswapd_v4si, xxswapd_v8hi, xxswapd_v16qi): > New define_insn. > (vsx_xxpermdi4_le_, vsx_xxpermdi8_le_V8HI, > vsx_xxpermdi16_le_V16QI): Removed define_insn. If you use "" in a

[PATCH] Remove unused #include "vec.h" from hash-table.h

2019-09-23 Thread Christian Biesinger via gcc-patches
From: Christian Biesinger Removes an unused include as a cleanup. Requires updating lots of files who previously relied on this transitive include. I have only been able to test this on x86_64 because I failed at building a cross compiler. gcc/ChangeLog: 2019-09-23 Christian Biesinger

[C++ PATCH] PR c++/91809 - bit-field and ellipsis.

2019-09-23 Thread Jason Merrill
decay_conversion converts a bit-field access to its declared type, which isn't what we want here; it even has a comment that the caller is expected to have already used default_conversion to perform integral promotion. This function handles arithmetic promotion differently, but we still don't

Re: [PATCH] V4, patch #1: Rework prefixed/pc-relative lookup

2019-09-23 Thread Michael Meissner
On Fri, Sep 20, 2019 at 08:29:04PM -0500, Segher Boessenkool wrote: > Hi Mike, > > On Wed, Sep 18, 2019 at 07:49:18PM -0400, Michael Meissner wrote: > > This patch reworks the prefixed and pc-relative memory matching functions. > > This mostly looks fine, thanks! A few smaller things: > > > >

Re: [PATCH] Remove unused #include "vec.h" from hash-table.h

2019-09-23 Thread Jason Merrill
On Mon, Sep 23, 2019 at 3:52 PM Christian Biesinger via gcc-patches wrote: > > From: Christian Biesinger > > Removes an unused include as a cleanup. Requires updating > lots of files who previously relied on this transitive include. > > I have only been able to test this on x86_64 because I

Re: [PING^2][PATCH 0/3] GNAT test suite fixes for build sysroot

2019-09-23 Thread Maciej W. Rozycki
On Mon, 16 Sep 2019, Arnaud Charlet wrote: > > > In the course of setting up GCC regression testing for the RISC-V target > > > I have discovered that the GNAT test suite does not correctly respond to > > > the test environment settings passed from the test harness in my setup > > > and > > >

Re: [PATCH] fold more string comparison with known result (PR 90879)

2019-09-23 Thread Martin Sebor
On 9/3/19 2:00 PM, Jeff Law wrote: On 8/28/19 3:12 PM, Martin Sebor wrote: On 8/22/19 3:31 PM, Jeff Law wrote: On 8/20/19 8:10 PM, Martin Sebor wrote: Jeff, Please let me know if you agree/disagree and what I need to do to advance this work:   

Re: [PATCH] Remove unused #include "vec.h" from hash-table.h

2019-09-23 Thread Bernhard Reutner-Fischer
On Mon, 23 Sep 2019 14:52:19 -0500 "Christian Biesinger via gcc-patches" wrote: > From: Christian Biesinger > > Removes an unused include as a cleanup. Requires updating > lots of files who previously relied on this transitive include. Note that we have a tool to help prune unused includes,

[PATCH] V4.1, patch #1: Rework prefixed/pc-relative lookup (revised)

2019-09-23 Thread Michael Meissner
This patch replaces patch #1. It tries to address most/all of the review comments. This patch bootstraps fine, and there are no regressions. When I applied this patch, the revised patch #2 that will be posted next and the other patches, it builds Spec 2017 with -mcpu=future. The other patches

Re: [patch, libgfortran] Bug 91593 - Implicit enum conversions in libgfortran/io/transfer.c

2019-09-23 Thread Jerry DeLisle
On 9/23/19 8:52 AM, Bernhard Reutner-Fischer wrote: On 22 September 2019 22:51:46 CEST, Jerry DeLisle wrote: Hi all, The attached patch eliminates several warnings by adjusting which enumerator is used in the subject offending code. I fixed this by adding an enumerator at the end of the

[PATCH] driver: Also prune joined switches with negation

2019-09-23 Thread Matt Turner
When -march=native is passed to host_detect_local_cpu to the backend, it overrides all command lines after it. That means $ gcc -march=native -march=armv8-a is treated as $ gcc -march=armv8-a -march=native Prune joined switches with Negative and RejectNegative to allow -march=armv8-a to

C++ PATCH for c++/91868 - improve -Wshadow location.

2019-09-23 Thread Marek Polacek
We can improve various -Wshadow warnings by using DECL_SOURCE_LOCATION rather than whatever is in input_location. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2019-09-23 Marek Polacek PR c++/91868 - improve -Wshadow location. * name-lookup.c (check_local_shadow): Use

C++ PATCH for c++/91845 - ICE with invalid pointer-to-member.

2019-09-23 Thread Marek Polacek
build_m_component_ref checks if either datum/component it got are erroneous but they can be turned into the error_mark_node by mark_use as in this case: datum is "a" before the call to mark_lvalue_use, but that emits an error and returns the error_mark_node, which then crashes. We can just move

[Ada] Fix run-time segfault with private access-to-subprogram type

2019-09-23 Thread Eric Botcazou
This fixes a segfault at run time in a very peculiar case where an access-to- subprogram type is declared as private and used to pass the address of a local subprogram and dereference it using different views of the type. Tested on x86_64-suse-linux, applied on all active branches. 2019-09-23

Update riscv64 baseline symbols

2019-09-23 Thread Andreas Schwab
Tested on riscv64-suse-linux and installed as obvious. * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update. diff --git a/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt b/libstdc++-v3/config/abi/post/riscv64-linux-gnu/baseline_symbols.txt index

Re: [PATCH] Reduction of conditional operations for vectorization

2019-09-23 Thread Richard Biener
On Fri, Sep 20, 2019 at 3:53 PM Yuliang Wang wrote: > > Hi Richard, > > Thanks for your comments and tips. fold_binary_op_with_conditional_arg > performs the reverse transformation to this patch in certain situations: > > /* Transform `a + (b ? x : y)' into `b ? (a + x) : (a + y)'. Yes, this is

Re: [PATCH, AArch64] Fix PR target/91834

2019-09-23 Thread Kyrill Tkachov
On 9/21/19 7:11 AM, Richard Henderson wrote: As diagnosed in the PR.     * config/aarch64/lse.S (LDNM): Ensure STXR output does not     overlap the inputs. Looks good to me. Perhaps even obvious. Thanks, Kyrill ---  libgcc/config/aarch64/lse.S | 4 ++--  1 file changed, 2

Re: [PATCH, Fortran] Character type names in errors and warnings - new version for review

2019-09-23 Thread Janne Blomqvist
On Thu, Sep 19, 2019 at 3:59 PM Mark Eggleston wrote: > > Original thread: https://gcc.gnu.org/ml/fortran/2019-09/msg00024.html > > The original patch introduced a new field in gfc_typespec called length > to be used only for character literals. At the time I felt that this was > a bit of kludge.