[pushed] c++: Avoid unnecessary empty class copy [94175].

2020-03-19 Thread Jason Merrill via Gcc-patches
A simple empty class copy is still simple when wrapped in a TARGET_EXPR, so we need to strip that as well. This change also exposed some unnecessary copies in return statements, which when returning by invisible reference led to >>, which gimplify_return_expr didn't like. So we also need to strip

Re: [PATCH PR94026] combine missed opportunity to simplify comparisons with zero

2020-03-19 Thread Segher Boessenkool
On Thu, Mar 19, 2020 at 01:43:40AM +, Yangfei (Felix) wrote: > 2. Given that the patterns for ubfx and ubfiz are already not simple, I am > afraid the pattern we got by combining the three would be much complex. > And even more complex when further merged with insn 14 here in order to > mak

Re: Re: Re: [PATCH, rs6000] Add command line and builtin compatibility

2020-03-19 Thread Segher Boessenkool
Hi Carl, On Wed, Mar 18, 2020 at 04:19:18PM -0700, Carl Love wrote: > > Yes, but only for this fprnd vs. 2.06 (vsx) situation. Like we > > already > > have: > > > > if (TARGET_DIRECT_MOVE && !TARGET_VSX) > > { > > if (rs6000_isa_flags_explicit & OPTION_MASK_DIRECT_MOVE) > > e

Re: [PATCH] avoid -Wredundant-tags on a first declaration in use (PR 93824)

2020-03-19 Thread Martin Sebor via Gcc-patches
On 3/18/20 9:07 PM, Jason Merrill wrote: On 3/12/20 6:38 PM, Martin Sebor wrote: ... After a lot more trial and error I discovered most_specialized_partial_spec in pt.c with whose help I have been able to get templates to work the way I think they should (at least the cases I've tested do). Be

Re: [PATCH 0/6] aarch64: Implement TImode comparisons

2020-03-19 Thread Wilco Dijkstra
Hi Richard, > Any compare can be done in at most 2 instructions: > > void doit(void); > void f(long long a) > { > if (a <= 1) > doit(); > } > > f: > cmp r0, #2 > sbcs    r3, r1, #0 > blt .L4 > Well, this one requires that you be able to add 1 to an in

Re: [PATCH] c++: Reject changing active member of union during initialization [PR94066]

2020-03-19 Thread Jason Merrill via Gcc-patches
On 3/19/20 2:06 PM, Patrick Palka via Gcc-patches wrote: On Thu, 19 Mar 2020, Marek Polacek wrote: On Thu, Mar 19, 2020 at 01:06:35PM -0400, Patrick Palka via Gcc-patches wrote: On Thu, 19 Mar 2020, Patrick Palka wrote: This patch adds a check to detect changing the active union member durin

Re: [PATCH] c-family: Tighten vector handling in type_for_mode [PR94072]

2020-03-19 Thread Joseph Myers
On Thu, 19 Mar 2020, Richard Sandiford wrote: > In this PR we had a 512-bit VECTOR_TYPE whose mode is XImode > (an integer mode used for four 128-bit vectors). When trying > to expand a zero constant for it, we hit code in expand_expr_real_1 > that tries to use the associated integer type instead

Re: [PATCH] c++: Reject changing active member of union during initialization [PR94066]

2020-03-19 Thread Patrick Palka via Gcc-patches
On Thu, 19 Mar 2020, Jason Merrill wrote: > On 3/19/20 12:35 PM, Patrick Palka wrote: > > This patch adds a check to detect changing the active union member during > > initialization of the union. It uses the CONSTRUCTOR_NO_CLEARING flag as a > > proxy for whether the non-empty CONSTRUCTOR of UNI

Re: [PATCH] c++: template keyword in a typename-specifier [PR94057]

2020-03-19 Thread Jason Merrill via Gcc-patches
On 3/19/20 5:28 PM, Marek Polacek wrote: Consider template class A { template class B { void fn(typename A::B); }; }; which is rejected with error: 'typename A::B' names 'template template class A::B', which is not a type whereas clang/icc/msvc accept it. "typename A:

Re: [PATCH] c: Fix up cfun->function_end_locus from the C FE [PR94029]

2020-03-19 Thread Joseph Myers
On Thu, 19 Mar 2020, Jakub Jelinek via Gcc-patches wrote: > The second instead propagates the location_t from the parsing of the > outermost compound statement (the function body) to finish_function. > > Both patches successfully bootstrapped/regtested on x86_64-linux and > i686-linux, ok for tru

Fix cgraph_node::function_symbol availability computation [PR94202]

2020-03-19 Thread Jan Hubicka
Hi, this fixes ICE in inliner cache sanity check which is caused by very old bug in visibility calculation in cgraph_node::function_symbol and cgraph_node::function_or_virtual_thunk_symbol. In the testcase there is indirect call to a thunk. At begining we correctly see that its body as AVAIL_AVAIL

[PATCH] c++: template keyword in a typename-specifier [PR94057]

2020-03-19 Thread Marek Polacek via Gcc-patches
Consider template class A { template class B { void fn(typename A::B); }; }; which is rejected with error: 'typename A::B' names 'template template class A::B', which is not a type whereas clang/icc/msvc accept it. "typename A::B" is a typename-specifier. Sadly, our comment

Re: [stage1][PATCH] Provide hint for misspelled -fdump-foo options.

2020-03-19 Thread David Malcolm via Gcc-patches
On Thu, 2020-03-19 at 14:52 +0100, Martin Liška wrote: > Hi. Hi Martin. > The patch is about basic hint support for -fdump-foo options where > one can newly get something like: > > $ ./xgcc -B. /tmp/foo.c -fdump-ipa-ynline -c > cc1: error: unrecognized command-line option ‘-fdump-ipa-ynline’; d

[PATCH] include/dwarf2.h: Sync with binutils

2020-03-19 Thread H.J. Lu via Gcc-patches
DW_CIE_VERSION is unused by GCC and has been removed from binutils by commit 66f8b2cbbb675ccbcae56e2bdb6dae485878ec00 Author: Andrew Burgess Date: Mon Nov 4 12:27:45 2019 + gas: Add --gdwarf-cie-version command line flag * dwarf2.h (DW_CIE_VERSION): Delete. --- include/dwarf2

Re: [PATCH] c++: Reject changing active member of union during initialization [PR94066]

2020-03-19 Thread Jason Merrill via Gcc-patches
On 3/19/20 12:35 PM, Patrick Palka wrote: This patch adds a check to detect changing the active union member during initialization of the union. It uses the CONSTRUCTOR_NO_CLEARING flag as a proxy for whether the non-empty CONSTRUCTOR of UNION_TYPE we're assigning to in cxx_eval_store_expression

Re: [PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-19 Thread Jason Merrill via Gcc-patches
On 3/19/20 12:50 PM, Patrick Palka wrote: On Thu, 19 Mar 2020, Jason Merrill wrote: On 3/18/20 3:26 PM, Patrick Palka wrote: + if (map) +{ + pp_cxx_whitespace (pp); + pp_cxx_left_bracket (pp); + pp->translate_string ("with"); + pp_cxx_whitespace (pp); + pp_cxx_par

Re: [PATCH][RFC] API extension for binutils (type of symbols).

2020-03-19 Thread H.J. Lu via Gcc-patches
On Thu, Mar 19, 2020 at 12:56 PM Richard Biener wrote: > > On March 19, 2020 5:51:14 PM GMT+01:00, "H.J. Lu" wrote: > >On Thu, Mar 19, 2020 at 9:00 AM Martin Liška wrote: > >> > >> On 3/19/20 4:50 PM, H.J. Lu wrote: > >> > I like it and I will take case of binutils side. > >> > > >> > Thanks. >

Re: [PATCH][RFC] API extension for binutils (type of symbols).

2020-03-19 Thread Richard Biener via Gcc-patches
On March 19, 2020 5:51:14 PM GMT+01:00, "H.J. Lu" wrote: >On Thu, Mar 19, 2020 at 9:00 AM Martin Liška wrote: >> >> On 3/19/20 4:50 PM, H.J. Lu wrote: >> > I like it and I will take case of binutils side. >> > >> > Thanks. >> >> Great. I've just installed the 2 patches to master. >> > >Here is th

[PATCH d] Committed merge upstream dmd d1a606599

2020-03-19 Thread Iain Buclaw via Gcc-patches
Fixes long standing regression in the D front-end implemention, adds a new field to allow retrieving a list of all content imports from the code generator, and fixes a recently introduced test to use old-style syntax for contracts. Bootstrapped and tested on x86_64-linux-gnu, and committed to trun

Re: [PATCH, d] Committed merge with upstream dmd e9420cfbf

2020-03-19 Thread Iain Buclaw via Gcc-patches
On 15/03/2020 14:32, Rainer Orth wrote: > Hi Ian, > >> This patch merges the D front-end implementation with dmd upstream e9420cfbf. > [...] >> Bootstrapped and tested on x86_64-linux-gnu, and committed to trunk. > > this merge introduced a regression on Solaris (SPARC and x86): > > +UNRESOLVED:

[PATCH v2][ARM][GCC][7x]: MVE vreinterpretq and vuninitializedq intrinsics.

2020-03-19 Thread Srinath Parvathaneni
Hello Kyrill, This patch addresses all the comments in patch version v2. (version v2) https://gcc.gnu.org/pipermail/gcc-patches/2019-November/534351.html Hello, This patch supports following MVE ACLE intrinsics. vreinterpretq_s16_s32, vreinterpretq_s16_s64, vreinterpretq_s16_s8, vreinter

[PATCH v2][ARM][GCC][6x]:MVE ACLE vaddq intrinsics using arithmetic plus operator.

2020-03-19 Thread Srinath Parvathaneni
Hello Kyrill, This patch addresses all the comments in patch version v2. (version v2) https://gcc.gnu.org/pipermail/gcc-patches/2019-November/534349.html Hello, This patch supports following MVE ACLE vaddq intrinsics. The RTL patterns for this intrinsics are added using arithmetic "plus"

Re: [PATCH] c++: Reject changing active member of union during initialization [PR94066]

2020-03-19 Thread Patrick Palka via Gcc-patches
On Thu, 19 Mar 2020, Marek Polacek wrote: > On Thu, Mar 19, 2020 at 01:06:35PM -0400, Patrick Palka via Gcc-patches wrote: > > On Thu, 19 Mar 2020, Patrick Palka wrote: > > > > > This patch adds a check to detect changing the active union member during > > > initialization of the union. It uses

RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature

2020-03-19 Thread Kyrylo Tkachov
Hi Dennis, > -Original Message- > From: Dennis Zhang > Sent: 19 March 2020 14:03 > To: Kyrylo Tkachov ; gcc-patches@gcc.gnu.org > Cc: nd ; Richard Earnshaw ; > Ramana Radhakrishnan > Subject: Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension > (CDE): enable the feature > >

Re: [PATCH] Fix PR90332 by extending half size vector mode

2020-03-19 Thread Segher Boessenkool
Hi! On Thu, Mar 19, 2020 at 09:18:06AM +0100, Richard Biener wrote: > On Wed, Mar 18, 2020 at 8:34 PM Segher Boessenkool > wrote: > > We don't have ops on short integer types, either, for similar reasons. > > How do you represent two vector input shuffles? The usual > way is (vec_select (vec_co

Re: [PATCH v2] generate EH info for volatile asm statements (PR93981)

2020-03-19 Thread Michael Matz
Hello, On Thu, 19 Mar 2020, J.W. Jagersma via Gcc-patches wrote: > I just realized that changing all outputs to in+out would generate > worse code for *every* single asm that has any outputs. Under -fnon-call-exception only. And I'm not sure what you mean, the only effect of the additional 'in

Re: [PATCH] c++: Reject changing active member of union during initialization [PR94066]

2020-03-19 Thread Marek Polacek via Gcc-patches
On Thu, Mar 19, 2020 at 01:06:35PM -0400, Patrick Palka via Gcc-patches wrote: > On Thu, 19 Mar 2020, Patrick Palka wrote: > > > This patch adds a check to detect changing the active union member during > > initialization of the union. It uses the CONSTRUCTOR_NO_CLEARING flag as a > > proxy for w

Re: [PATCH] c++: Reject changing active member of union during initialization [PR94066]

2020-03-19 Thread Patrick Palka via Gcc-patches
On Thu, 19 Mar 2020, Patrick Palka wrote: > This patch adds a check to detect changing the active union member during > initialization of the union. It uses the CONSTRUCTOR_NO_CLEARING flag as a > proxy for whether the non-empty CONSTRUCTOR of UNION_TYPE we're assigning to > in > cxx_eval_store_

Re: [PATCH v2] generate EH info for volatile asm statements (PR93981)

2020-03-19 Thread Michael Matz
Hello, On Wed, 18 Mar 2020, J.W. Jagersma via Gcc-patches wrote: > > Well, it's both: on the exception path the compiler has to assume that the > > the value wasn't changed (so that former defines are regarded as dead) or > > that it already has changed (so that the effects the throwing > > "i

Re: [PATCH v2] generate EH info for volatile asm statements (PR93981)

2020-03-19 Thread J.W. Jagersma via Gcc-patches
On 2020-03-19 00:56, Segher Boessenkool wrote: > On Tue, Mar 17, 2020 at 03:32:34PM +, Michael Matz wrote: >> On Mon, 16 Mar 2020, Richard Sandiford wrote: >>> Similarly for non-call exceptions on other statements. It sounds like >>> what you're describing requires the corresponding definitio

RE: [PATCH, GCC, Arm]: Fix no_cond issue introduced by MVE

2020-03-19 Thread Kyrylo Tkachov
Hi Andre, > -Original Message- > From: Andre Vieira (lists) > Sent: 19 March 2020 16:52 > To: Christophe Lyon ; Kyrylo Tkachov > > Cc: gcc-patches@gcc.gnu.org; Kyrill Tkachov > Subject: [PATCH, GCC, Arm]: Fix no_cond issue introduced by MVE > > Hi, > > This was a matter of mistaken lo

[PATCH, GCC, Arm]: Fix no_cond issue introduced by MVE

2020-03-19 Thread Andre Vieira (lists)
Hi, This was a matter of mistaken logic in (define_attr "conds" ..). This was setting the conds attribute for any neon instruction to no_cond which was messing up code generation. Bootsrapped and regression tested arm-linux-gnueabihf. Is this OK for trunk? 2020-03-19  Andre Vieira      *

Re: [PATCH] c++: Fix spelling of non-static

2020-03-19 Thread Marek Polacek via Gcc-patches
On Thu, Mar 19, 2020 at 10:45:01AM -0600, Martin Sebor via Gcc-patches wrote: > On 3/19/20 9:48 AM, Marek Polacek via Gcc-patches wrote: > > I was looking at DR 296 and noticed that we say "nonstatic" instead of > > "non-static", which is the version the standard uses. So this patch > > fixes the

Re: [PATCH][RFC] API extension for binutils (type of symbols).

2020-03-19 Thread H.J. Lu via Gcc-patches
On Thu, Mar 19, 2020 at 9:00 AM Martin Liška wrote: > > On 3/19/20 4:50 PM, H.J. Lu wrote: > > I like it and I will take case of binutils side. > > > > Thanks. > > Great. I've just installed the 2 patches to master. > Here is the binutils patch: https://sourceware.org/pipermail/binutils/2020-Mar

Re: [PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-19 Thread Patrick Palka via Gcc-patches
On Thu, 19 Mar 2020, Jason Merrill wrote: > On 3/18/20 3:26 PM, Patrick Palka wrote: > > + if (map) > > +{ > > + pp_cxx_whitespace (pp); > > + pp_cxx_left_bracket (pp); > > + pp->translate_string ("with"); > > + pp_cxx_whitespace (pp); > > + pp_cxx_parameter_mapping (

Re: [PATCH 0/6] aarch64: Implement TImode comparisons

2020-03-19 Thread Richard Henderson via Gcc-patches
On 3/19/20 8:47 AM, Wilco Dijkstra wrote: > Hi Richard, > > Thanks for these patches - yes TI mode expansions can certainly be improved! > So looking at your expansions for signed compares, why not copy the optimal > sequence from 32-bit Arm? > > Any compare can be done in at most 2 instructions:

Re: [PATCH] c++: Fix spelling of non-static

2020-03-19 Thread Martin Sebor via Gcc-patches
On 3/19/20 9:48 AM, Marek Polacek via Gcc-patches wrote: I was looking at DR 296 and noticed that we say "nonstatic" instead of "non-static", which is the version the standard uses. So this patch fixes the spelling throughout the front end. Did not check e.g. non-dependent or any other. Bootst

Re: [PATCH v2] generate EH info for volatile asm statements (PR93981)

2020-03-19 Thread Michael Matz
Hello, On Wed, 18 Mar 2020, Segher Boessenkool wrote: > > > Similarly for non-call exceptions on other statements. It sounds like > > > what you're describing requires the corresponding definition to happen > > > for memory outputs regardless of whether the asm throws or not, so that > > > th

[PATCH] c++: Reject changing active member of union during initialization [PR94066]

2020-03-19 Thread Patrick Palka via Gcc-patches
This patch adds a check to detect changing the active union member during initialization of the union. It uses the CONSTRUCTOR_NO_CLEARING flag as a proxy for whether the non-empty CONSTRUCTOR of UNION_TYPE we're assigning to in cxx_eval_store_expression is in the process of being initialized, whi

Re: [PATCH] c++: Fix spelling of non-static

2020-03-19 Thread Jason Merrill via Gcc-patches
On 3/19/20 11:48 AM, Marek Polacek wrote: I was looking at DR 296 and noticed that we say "nonstatic" instead of "non-static", which is the version the standard uses. So this patch fixes the spelling throughout the front end. Did not check e.g. non-dependent or any other. Bootstrapped/regteste

Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.

2020-03-19 Thread Martin Sebor via Gcc-patches
On 3/19/20 9:32 AM, Martin Liška wrote: On 3/19/20 10:09 AM, Jakub Jelinek wrote: I mean, optimize for the !flag_checking case... Sure, I transformed both situations into heap memory allocation. In gcc/c-family/c-attribs.c I faced maybe uninitialized warning when I only assigned (and checked)

Re: [PATCH][RFC] API extension for binutils (type of symbols).

2020-03-19 Thread Martin Liška
On 3/19/20 4:50 PM, H.J. Lu wrote: I like it and I will take case of binutils side. Thanks. Great. I've just installed the 2 patches to master. Martin

Re: [PATCH][RFC] API extension for binutils (type of symbols).

2020-03-19 Thread H.J. Lu via Gcc-patches
On Thu, Mar 19, 2020 at 8:46 AM Richard Biener wrote: > > On Thu, Mar 19, 2020 at 4:00 PM Martin Liška wrote: > > > > On 3/19/20 10:12 AM, Richard Biener wrote: > > > On Wed, Mar 18, 2020 at 9:52 AM Martin Liška wrote: > > >> > > >> On 3/18/20 12:27 AM, Jan Hubicka wrote: > > Hi. > > >

[PATCH] c++: Fix spelling of non-static

2020-03-19 Thread Marek Polacek via Gcc-patches
I was looking at DR 296 and noticed that we say "nonstatic" instead of "non-static", which is the version the standard uses. So this patch fixes the spelling throughout the front end. Did not check e.g. non-dependent or any other. Bootstrapped/regtested on x86_64-linux, ok for trunk? *

Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.

2020-03-19 Thread Jakub Jelinek via Gcc-patches
On Thu, Mar 19, 2020 at 04:32:05PM +0100, Martin Liška wrote: > + gcc_options *saved_global_options = NULL; > + if (flag_checking) > + { > + saved_global_options = (gcc_options *) xmalloc (sizeof (gcc_options)); XNEW (gcc_options) please. > + p->saved_global_options = (gc

Re: [PATCH 0/6] aarch64: Implement TImode comparisons

2020-03-19 Thread Wilco Dijkstra
Hi Richard, Thanks for these patches - yes TI mode expansions can certainly be improved! So looking at your expansions for signed compares, why not copy the optimal sequence from 32-bit Arm? Any compare can be done in at most 2 instructions: void doit(void); void f(long long a) { if (a <= 1)

Re: [PATCH][RFC] API extension for binutils (type of symbols).

2020-03-19 Thread Richard Biener via Gcc-patches
On Thu, Mar 19, 2020 at 4:00 PM Martin Liška wrote: > > On 3/19/20 10:12 AM, Richard Biener wrote: > > On Wed, Mar 18, 2020 at 9:52 AM Martin Liška wrote: > >> > >> On 3/18/20 12:27 AM, Jan Hubicka wrote: > Hi. > > There's updated version of the patch. > Changes from the previ

Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.

2020-03-19 Thread Martin Liška
On 3/19/20 10:09 AM, Jakub Jelinek wrote: I mean, optimize for the !flag_checking case... Sure, I transformed both situations into heap memory allocation. In gcc/c-family/c-attribs.c I faced maybe uninitialized warning when I only assigned (and checked) the variable in flag_checking context. M

Fix inliner ICE on alias with flatten attribute [PR92372]

2020-03-19 Thread Jan Hubicka
Hi, inliner ICEs upon trying to flatten alias. This patch fixes the ICE and also adds a warning that flattens on aliases makes no sense. Testing x86_64-linux in progress, intend to commit it after it finishes if there are no complains. gcc/ChangeLog: 2020-03-19 Jan Hubicka PR ipa/923

Re: [PATCH][RFC] API extension for binutils (type of symbols).

2020-03-19 Thread Martin Liška
On 3/19/20 10:12 AM, Richard Biener wrote: On Wed, Mar 18, 2020 at 9:52 AM Martin Liška wrote: On 3/18/20 12:27 AM, Jan Hubicka wrote: Hi. There's updated version of the patch. Changes from the previous version: - comment added to ld_plugin_symbol - new section renamed to ext_symtab - assert

Re: [PATCH] c++: Include the constraint parameter mapping in diagnostic constraint contexts

2020-03-19 Thread Jason Merrill via Gcc-patches
On 3/18/20 3:26 PM, Patrick Palka wrote: + if (map) +{ + pp_cxx_whitespace (pp); + pp_cxx_left_bracket (pp); + pp->translate_string ("with"); + pp_cxx_whitespace (pp); + pp_cxx_parameter_mapping (pp, map); + pp_cxx_right_bracket (pp); +} Perhaps we should

Re: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension (CDE): enable the feature

2020-03-19 Thread Dennis Zhang
Hi Kyrylo, > >From: Kyrylo Tkachov >Sent: Wednesday, March 18, 2020 9:04 AM >To: Dennis Zhang; gcc-patches@gcc.gnu.org >Cc: nd; Richard Earnshaw; Ramana Radhakrishnan >Subject: RE: [PATCH][Arm][1/3] Support for Arm Custom Datapath Extension >(CDE): enable

Re: [PATCH] c-family: Tighten vector handling in type_for_mode [PR94072]

2020-03-19 Thread Richard Sandiford
"H.J. Lu" writes: > On Thu, Mar 19, 2020 at 4:10 AM Richard Sandiford > wrote: >> >> In this PR we had a 512-bit VECTOR_TYPE whose mode is XImode >> (an integer mode used for four 128-bit vectors). When trying >> to expand a zero constant for it, we hit code in expand_expr_real_1 >> that tries t

[stage1][PATCH] Provide hint for misspelled -fdump-foo options.

2020-03-19 Thread Martin Liška
Hi. The patch is about basic hint support for -fdump-foo options where one can newly get something like: $ ./xgcc -B. /tmp/foo.c -fdump-ipa-ynline -c cc1: error: unrecognized command-line option ‘-fdump-ipa-ynline’; did you mean ‘-fdump-ipa-inline’? $ ./xgcc -B. /tmp/foo.c -fdump-tree-switchlow

Re: [PATCH] middle-end/94188 fix fold of addr expression generation

2020-03-19 Thread Christophe Lyon via Gcc-patches
On Thu, 19 Mar 2020 at 13:34, Richard Biener wrote: > > On Thu, 19 Mar 2020, Christophe Lyon wrote: > > > On Wed, 18 Mar 2020 at 20:30, Richard Biener wrote: > > > > > > On March 18, 2020 6:20:29 PM GMT+01:00, Maxim Kuvyrkov > > > wrote: > > > > > > > >> On 17 Mar 2020, at 17:40, Richard Biener

Re: [PATCH] c-family: Tighten vector handling in type_for_mode [PR94072]

2020-03-19 Thread H.J. Lu via Gcc-patches
On Thu, Mar 19, 2020 at 4:10 AM Richard Sandiford wrote: > > In this PR we had a 512-bit VECTOR_TYPE whose mode is XImode > (an integer mode used for four 128-bit vectors). When trying > to expand a zero constant for it, we hit code in expand_expr_real_1 > that tries to use the associated integer

Re: [PATCH] middle-end/94188 fix fold of addr expression generation

2020-03-19 Thread Richard Biener
On Thu, 19 Mar 2020, Christophe Lyon wrote: > On Wed, 18 Mar 2020 at 20:30, Richard Biener wrote: > > > > On March 18, 2020 6:20:29 PM GMT+01:00, Maxim Kuvyrkov > > wrote: > > > > > >> On 17 Mar 2020, at 17:40, Richard Biener wrote: > > >> > > >> > > >> This adds a missing type conversion to b

Re: [Patch, comitted] libgomp/testsuite: ignore blank-line output for function-not-offloaded.c

2020-03-19 Thread Andrew Stubbs
On 19/03/2020 11:47, Tobias Burnus wrote: This error only appears for C++ as the reason seems to be that there are two unresolved symbols: "foo" and "__gxx_personality_v0". Those error messages are separated by an empty line. The blank lines are a feature of using the LLVM linker. GNU bintils

Re: [PATCH] middle-end/94188 fix fold of addr expression generation

2020-03-19 Thread Christophe Lyon via Gcc-patches
On Wed, 18 Mar 2020 at 20:30, Richard Biener wrote: > > On March 18, 2020 6:20:29 PM GMT+01:00, Maxim Kuvyrkov > wrote: > > > >> On 17 Mar 2020, at 17:40, Richard Biener wrote: > >> > >> > >> This adds a missing type conversion to build_fold_addr_expr and > >adjusts > >> fallout - build_fold_ad

[Patch,comitted] libgomp/testsuite: ignore blank-line output for function-not-offloaded.c

2020-03-19 Thread Tobias Burnus
The libgomp.c-c++-common/function-not-offloaded.c is supposed to fail on "target offload_device_nonshared_as"; producing "unresolved symbol foo" and tons of additional (fatal) errors by collect, ld, lto1, mkoffload, lto-wrapper etc. On NVidia, the existing "dg-excess-errors" works, but with AMDGC

[committed] c++: Fix up handling of captured vars in lambdas in OpenMP clauses [PR93931]

2020-03-19 Thread Jakub Jelinek via Gcc-patches
Hi! Without the parser.c change we were ICEing on the testcase, because while the uses of the captured vars inside of the constructs were replaced with capture proxy decls, we didn't do that for decls in OpenMP clauses. With that fixed, we don't ICE anymore, but the testcase is miscompiled and FA

[PATCH] c-family: Tighten vector handling in type_for_mode [PR94072]

2020-03-19 Thread Richard Sandiford
In this PR we had a 512-bit VECTOR_TYPE whose mode is XImode (an integer mode used for four 128-bit vectors). When trying to expand a zero constant for it, we hit code in expand_expr_real_1 that tries to use the associated integer type instead. The code used type_for_mode (XImode, 1) to get this

Re: [PATCH] phiopt: Avoid -fcompare-debug bug in phiopt [PR94211]

2020-03-19 Thread Richard Biener
On Thu, 19 Mar 2020, Jakub Jelinek wrote: > Hi! > > Two years ago, I've added support for up to 2 simple preparation statements > in value_replacement, but the > - && estimate_num_insns (assign, &eni_time_weights) > + && estimate_num_insns (bb_seq (middle_bb), &eni_time_weights) > chang

Re: [PATCH][RFC] API extension for binutils (type of symbols).

2020-03-19 Thread Richard Biener via Gcc-patches
On Wed, Mar 18, 2020 at 9:52 AM Martin Liška wrote: > > On 3/18/20 12:27 AM, Jan Hubicka wrote: > >> Hi. > >> > >> There's updated version of the patch. > >> Changes from the previous version: > >> - comment added to ld_plugin_symbol > >> - new section renamed to ext_symtab > >> - assert added for

Re: [stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.

2020-03-19 Thread Jakub Jelinek via Gcc-patches
On Thu, Mar 19, 2020 at 09:56:00AM +0100, Martin Liška wrote: > I'm planning to work on the problematic options in next stage1 and this > patch will help me to catch another violations. > > Ready to be installed in next stage1? Isn't that costly even for the !flag_checking case? struct gcc_option

[PATCH] phiopt: Avoid -fcompare-debug bug in phiopt [PR94211]

2020-03-19 Thread Jakub Jelinek via Gcc-patches
Hi! Two years ago, I've added support for up to 2 simple preparation statements in value_replacement, but the - && estimate_num_insns (assign, &eni_time_weights) + && estimate_num_insns (bb_seq (middle_bb), &eni_time_weights) change, meant that we compute the cost of all those statements

[stage1][PATCH] Add gcc_assert that &global_options are not dirty modified.

2020-03-19 Thread Martin Liška
Hi. As seen in the mentioned PR we do have issues related to modification of global_options in context of #pragma GCC optimize/target and the corresponding function attributes. The patch brings a sanity check that these context related option modifications should not affect global state. The patc

[PATCH] c: Fix up cfun->function_end_locus from the C FE [PR94029]

2020-03-19 Thread Jakub Jelinek via Gcc-patches
Hi! On the following testcase we ICE because while DECL_STRUCT_FUNCTION (current_function_decl)->function_start_locus = c_parser_peek_token (parser)->location; and similarly DECL_SOURCE_LOCATION (fndecl) is set from some token's location, the end is set as: /* Store the end of the

Re: [PATCH] Fix PR90332 by extending half size vector mode

2020-03-19 Thread Richard Biener via Gcc-patches
On Wed, Mar 18, 2020 at 8:34 PM Segher Boessenkool wrote: > > On Wed, Mar 18, 2020 at 10:12:00PM +0800, Kewen.Lin wrote: > > > Btw, why not implement the neccessary vector init patterns? > > > > Power doesn't support 64bit vector size, it looks a bit hacky and > > confusing to introduce this kind

[PATCH 2/2] ipa/94217 simplify offsetted address build

2020-03-19 Thread Richard Biener
This avoids using build_ref_for_offset and build_fold_addr_expr where type mixup easily results in something not IP invariant. Bootstrap and regtest on x86_64-unknown-linux-gnu in progress. Richard. 2020-03-19 Richard Biener PR ipa/94217 * ipa-cp.c (ipa_get_jf_ancestor_result

[PATCH 1/2] middle-end/94216 fix another build_fold_addr_expr use

2020-03-19 Thread Richard Biener
Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2020-03-19 Richard Biener PR middle-end/94216 * fold-const.c (fold_binary_loc): Avoid using build_fold_addr_expr when we really want an ADDR_EXPR. * g++.dg/torture/pr94216.C: New testcas