[PATCH 1/2] i386: Use scalar operand in floating point vec_dup patterns

2018-10-17 Thread H.J. Lu
Since vector registers are also used for scalar floating point values, we can use scalar operand in floating point vec_dup patterns, which enables combiner to generate (set (reg:V8SF 84) (vec_duplicate:V8SF (mem/c:SF (symbol_ref:DI ("y") For AVX512 broadcast instructions from integer

Re: [C++ Patch] Remove quick fix for c++/85553

2018-10-17 Thread Jakub Jelinek
On Wed, Oct 17, 2018 at 07:20:53PM +0200, Paolo Carlini wrote: > Hi, > > as you probably remember, very close to the release of 8.1.0 we noticed that > my fix for c++/70808 was causing c++/85553, which Jakub promptly fixed. > However, we later found out that the real problem was a latent issue in

[PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-17 Thread H.J. Lu
We may simplify (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) to X when mode of X is the same as of mode of subreg. gcc/ PR target/87537 * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge of vec_duplicate. gcc/testsuite/ PR

[C++ Patch] Remove quick fix for c++/85553

2018-10-17 Thread Paolo Carlini
Hi, as you probably remember, very close to the release of 8.1.0 we noticed that my fix for c++/70808 was causing c++/85553, which Jakub promptly fixed. However, we later found out that the real problem was a latent issue in convert, which I fixed in r259966. Thus, I think that in current

Fix PR middle-end/87623

2018-10-17 Thread Eric Botcazou
The compiler generates wrong code on the attached testcase using the scalar_storage_order attribute when optimization is enabled because it respectively coaslesces the LHSes and the RHSes of the two consecutive comparisons without checking that both sides have same scalar storage order (but it

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-17 Thread Richard Sandiford
"H.J. Lu" writes: > We may simplify > > (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) > > to X when mode of X is the same as of mode of subreg. > > gcc/ > > PR target/87537 > * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge > of vec_duplicate.

Re: [C++ Patch, obvious] PR 84705 ("[6/7/8/9 Regression] internal compiler error: in add_stmt, at cp/semantics.c:390")

2018-10-17 Thread Jason Merrill
OK. On Tue, Oct 16, 2018 at 5:16 PM Paolo Carlini wrote: > > Hi, > > On 16/10/18 22:49, Jason Merrill wrote: > > On Tue, Oct 16, 2018 at 2:39 PM Paolo Carlini > > wrote: > >> the main issue is already fixed in trunk - we don't ICE anymore - but I > >> noticed that for ill-formed code like: > >>

[PATCH v2] lra: fix spill_hard_reg_in_range clobber check

2018-10-17 Thread Ilya Leoshkevich
Boostrapped and regtested on x86_64-redhat-linux. Changes since v1: * Added the missing INSN_P () check. * Rewrote the commit message. FROM..TO range might contain NOTE_INSN_DELETED insns, for which the corresponding entries in lra_insn_recog_data[] are NULLs. Example from the problematic code

Re: [PATCH] __debug::list use C++11 direct initialization

2018-10-17 Thread François Dumont
I've just reverted the controversial changes. 2018-10-18  François Dumont      Partial revert.     2018-10-08  François Dumont      * include/debug/list (list<>::cbegin()): Use C++11 direct     initialization.     (list<>::cend()): Likewise.     (list<>::erase(const_iterator,

[Patch, Fortan] PR 87632 - fix select type ICE

2018-10-17 Thread Tobias Burnus
Due to using the wrong variable, gfortran will segfault – as ref is always NULL. Build and regtested on x86-64-gnu-linux. Committed as obvious in Rev. 265248. Tobias PR fortran/87632 * resolve.c (resolve_select_type): Use correct variable. PR fortran/87632 *

Re: [PATCH 2/2] Simplify subreg of vec_merge of vec_duplicate

2018-10-17 Thread H.J. Lu
On 10/17/18, Richard Sandiford wrote: > "H.J. Lu" writes: >> We may simplify >> >> (subreg (vec_merge (vec_duplicate X) (vector) (const_int 1)) 0) >> >> to X when mode of X is the same as of mode of subreg. >> >> gcc/ >> >> PR target/87537 >> * simplify-rtx.c (simplify_subreg):

Add -std=c2x, -std=gnu2x, -Wc11-c2x-compat, C2X _Static_assert support

2018-10-17 Thread Joseph Myers
Now new features are starting to be added to a C2X draft (in the C2x branch of the C standard git repository, no public WG14 document yet), it's time to add -std=c2x and associated options to GCC for use in enabling C2X features. This patch adds the expected set of options: -std=c2x, -std=gnu2x,

Re: C++: is there a good way to check for a valid no-op conversion?

2018-10-17 Thread Martin Sebor
On 10/16/2018 02:06 PM, David Malcolm wrote: I've been extending -fopt-info to cover inlining, and I added a %S format code to dump_printf which accepts a symtab_node *. Unfortunately, -Wformat doesn't like the fact that I'm passing in a subclass pointer (cgraph_node *), e.g.: ipa-inline.c: In

Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules

2018-10-17 Thread Giuliano Augusto Faulin Belinassi
Oh, please note that the error that I'm talking about is the comparison with the result obtained before and after the simplification. It is possible that the result obtained after the simplification be more precise when compared to an arbitrary precise value (example, a 30 digits precise

[C++ PATCH] Allow __ prefix+suffix on C++11 attribute namespaces (PR c++/86288)

2018-10-17 Thread Jakub Jelinek
Hi! As mentioned in the PR, for use in headers for the same reason like we support __aligned__ form next to aligned (user defining such a macro) this patch allows to mangle the scope the same way. In addition to that, it fixes an ICE, where because we didn't canonicalize the attribute name in

Re: [PATCH] add udivhi3, umodhi3 functions to libgcc

2018-10-17 Thread Paul Koning
This is a revision of a patch I proposed a while back, to add udivhi3 and umodhi3 functions to libgcc since some platforms (like pdp11) need it. The code is adopted from that of udivsi3. In earlier discussion it was pointed out that internal functions need to start with __. The code I had

PATCH to enable testing C++17 by default

2018-10-17 Thread Marek Polacek
As discussed in it seems to be a high time we turned on testing C++17 by default. The only interesting part is at the very end, otherwise most of the changes is just using { target c++17 } instead of explicit dg-options. Removing

Re: Update manual references for C17 having been published

2018-10-17 Thread Jakub Jelinek
On Wed, Oct 17, 2018 at 09:33:44PM +, Joseph Myers wrote: > This patch makes references in the manual to C17 reflect it having > been published in July 2018. (For the reasons it took so long to get > to ballot and publication, see the WG14 convenor's report to the last > SC22 plenary - SC22

Re: [Patch, Fortan] PR 87632 - fix select type ICE

2018-10-17 Thread Paul Richard Thomas
Hi Tobias, Thanks for taking care of that so quickly. Juergen is proving to be a loyal friend to gfortran by coming back to us so quickly on regressions and reducing testcases. He deserves a good service. Cheers Paul On Wed, 17 Oct 2018 at 20:59, Tobias Burnus wrote: > > Due to using the

Re: PATCH to enable testing C++17 by default

2018-10-17 Thread Jeff Law
On 10/17/18 1:31 PM, Marek Polacek wrote: > As discussed in it > seems to be a high time we turned on testing C++17 by default. > > The only interesting part is at the very end, otherwise most of the changes is > just using { target c++17

Re: [PATCH v5 01/10] Initial TI PRU GCC port

2018-10-17 Thread Richard Sandiford
Hi Dimitar, Thanks for the updates, looks good. Just a few minor things: Dimitar Dimitrov writes: > +(define_predicate "pru_muldst_operand" > + (match_code "subreg,reg") > +{ > + if (register_operand (op, mode)) > +{ > + int regno; > + > + if (REG_P (op)) > + regno = REGNO

Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules

2018-10-17 Thread Giuliano Augusto Faulin Belinassi
> Hmm, do we have problems as we get close to -1 or 1 where the outputs of > the two forms might diverge? Well, I did some minor testing with that with input x around nextafter(1, -1); There are a minor imprecision when comparing directly with sinh(atanh(x)) and cosh(atanh(x)). * On 32-bits

Update manual references for C17 having been published

2018-10-17 Thread Joseph Myers
This patch makes references in the manual to C17 reflect it having been published in July 2018. (For the reasons it took so long to get to ballot and publication, see the WG14 convenor's report to the last SC22 plenary - SC22 N5297 - where it references "A troubling new trend where ISO CS has

Re: [C++ Patch] Remove quick fix for c++/85553

2018-10-17 Thread Paolo Carlini
Hi Jakub, On 17/10/18 19:42, Jakub Jelinek wrote: On Wed, Oct 17, 2018 at 07:20:53PM +0200, Paolo Carlini wrote: Hi, as you probably remember, very close to the release of 8.1.0 we noticed that my fix for c++/70808 was causing c++/85553, which Jakub promptly fixed. However, we later found out

Re: [Patch, fortran] PR58618 - Wrong code with character substring and ASSOCIATE

2018-10-17 Thread Tobias Burnus
Hi Paul, Paul Richard Thomas wrote: This problem concerned associate targets being substrings. It turns out that they are returned as pointer types (with a different cast for unity based substrings ***sigh***) and so can be assigned directly to the associate name. The patch quite simply removed

Re: Update manual references for C17 having been published

2018-10-17 Thread Joseph Myers
Updates to c.opt now committed as well. 2018-10-17 Joseph Myers * c.opt (std=c17, std=c18, std=gnu17, std=gnu18, std=iso9899:2017) (std=iso9899:2018): Document C17 as published in 2018. Index: c-family/c.opt ===

Re: [PATCH] Add sinh(tanh(x)) and cosh(tanh(x)) rules

2018-10-17 Thread Jeff Law
On 10/17/18 3:25 PM, Giuliano Augusto Faulin Belinassi wrote: >> Hmm, do we have problems as we get close to -1 or 1 where the outputs of >> the two forms might diverge? > > Well, I did some minor testing with that with input x around nextafter(1, -1); > There are a minor imprecision when

Re: [PATCH] Make strlen range computations more conservative

2018-10-17 Thread Jeff Law
On 10/12/18 9:34 PM, Bernd Edlinger wrote: > On 10/12/18 16:55, Jeff Law wrote: >> On 9/15/18 2:43 AM, Bernd Edlinger wrote: >>> Hi, >>> >>> this is an update on my strlen range patch (V7). Again re-based and >>> retested to current trunk. >>> >>> I am aware that Martin wants to re-factor the

Re: [v3 PATCH] PR libstdc++/87619

2018-10-17 Thread Jonathan Wakely
On 16/10/18 22:59 +0300, Ville Voutilainen wrote: Simple, short, and sweet, just a thinko. 2018-10-16 Ville Voutilainen PR libstdc++/87619 * include/std/variant (__select_index): Fix an off-by-one. * testsuite/20_util/variant/87619.cc: New. diff --git

Re: [v3, testsuite] Introduce dg-add-options net_ts

2018-10-17 Thread Rainer Orth
Hi Jonathan, >>Btw., one may want to do similarly for the Filesystem TS tests, >>introducing dg-add-options fs_ts (or filesystem_ts) instead of repeating >>dg-options "-DUSE_FILESYSTEM_TS -lstdc++fs" over and over again. > > I tried to add this: > > diff --git

Re: [PATCH] lra: fix spill_hard_reg_in_range clobber check

2018-10-17 Thread Ilya Leoshkevich
> Am 16.10.2018 um 19:35 schrieb Jeff Law : > > On 10/16/18 10:10 AM, Ilya Leoshkevich wrote: >> >> So I plan to keep using lra_get_insn_recog_data (), but with an extra >> INSN_P () check. > Seems reasonable. Though note that INSN_P will accept DEBUG_INSNs. > That may be OK -- those routines

Re: [v3 PATCH] PR libstdc++/87619

2018-10-17 Thread Ville Voutilainen
On Wed, 17 Oct 2018 at 12:07, Jonathan Wakely wrote: > It might be worth also calling f<256>() and doing: > > template > void f_impl(std::index_sequence is) > { > using V = std::variant...>; > > // For a variant of 255 alternatives the valid indices are [0,254] > // and index 255 means

Re: VRP: undefined shifting calculation should not need sign bit

2018-10-17 Thread Aldy Hernandez
On 9/13/18 3:33 AM, Richard Sandiford wrote: Aldy Hernandez writes: On 09/12/2018 12:57 PM, Richard Sandiford wrote: Aldy Hernandez writes: diff --git a/gcc/wide-int-range.h b/gcc/wide-int-range.h index 589fdea4df6..e9ee418e5b2 100644 --- a/gcc/wide-int-range.h +++ b/gcc/wide-int-range.h

Re: VRP: rewrite the division code (to handle corner cases including 0)

2018-10-17 Thread Aldy Hernandez
On 8/23/18 8:51 AM, Richard Biener wrote: On Tue, Aug 21, 2018 at 7:35 PM Aldy Hernandez wrote: On 08/21/2018 05:46 AM, Richard Biener wrote: On Wed, Aug 15, 2018 at 3:33 AM Aldy Hernandez wrote: Yeah, nice work. Few comments: + TYPE_OVERFLOW_UNDEFINED

[Patch, Fortran] PR87625 - fix reallocate on assign with polymophic arrays

2018-10-17 Thread Tobias Burnus
for some reasons, the two calls to gfc_is_reallocatable_lhs(expr1) differ, the first one is a simple "var" + full-array reference while the second one is "var->_data" + full-array reference. Neither was handled and, hence, using var = [ t(11), t(12) ] didn't do any memory allocation; the

GCC 9.0 Status Report (2018-10-17), Stage 3 starts Nov. 12th

2018-10-17 Thread Richard Biener
Status == GCC trunk is open for general development (Stage 1) until the end of Nov 11th after which it will transition to bugfixing mode (Stage 3) which in turn will end Jan 6th after which only regression and documentation fixes will be possible. This means you have an additional three

Re: VRP: undefined shifting calculation should not need sign bit

2018-10-17 Thread Richard Sandiford
Aldy Hernandez writes: > On 9/13/18 3:33 AM, Richard Sandiford wrote: >> Aldy Hernandez writes: >>> On 09/12/2018 12:57 PM, Richard Sandiford wrote: Aldy Hernandez writes: > diff --git a/gcc/wide-int-range.h b/gcc/wide-int-range.h > index 589fdea4df6..e9ee418e5b2 100644 > ---

[Patch, fortran] PR58618 - Wrong code with character substring and ASSOCIATE

2018-10-17 Thread Paul Richard Thomas
This problem concerned associate targets being substrings. It turns out that they are returned as pointer types (with a different cast for unity based substrings ***sigh***) and so can be assigned directly to the associate name. The patch quite simply removed the condition that such targets be

Re: [patch] new API for value_range

2018-10-17 Thread Richard Biener
On Thu, Oct 11, 2018 at 8:25 PM Aldy Hernandez wrote: > > > > On 10/11/18 5:47 AM, Richard Biener wrote: > > On Thu, Oct 11, 2018 at 10:19 AM Aldy Hernandez wrote: > >> > >> Hi Richard. Thanks for reviewing. > >> > >> On 10/10/18 6:27 AM, Richard Biener wrote: > >>> On Tue, Oct 9, 2018 at 6:23

Re: VRP: rewrite the division code (to handle corner cases including 0)

2018-10-17 Thread Richard Biener
On Wed, Oct 17, 2018 at 12:20 PM Aldy Hernandez wrote: > > > > On 8/23/18 8:51 AM, Richard Biener wrote: > > On Tue, Aug 21, 2018 at 7:35 PM Aldy Hernandez wrote: > >> > >> > >> > >> On 08/21/2018 05:46 AM, Richard Biener wrote: > >>> On Wed, Aug 15, 2018 at 3:33 AM Aldy Hernandez wrote: > >

[gomp5] Disallow zero sized task reductions for C

2018-10-17 Thread Jakub Jelinek
Hi! For the way we implement task reductions, making it work with zero sized aggregates is impossible and those aren't really useful anyway. The patch also disallows reductions on variable sized structures for the same reason, but when trying to add test coverage for that I've discovered we don't

[PATCH] S/390: Allow immediates in loc expander

2018-10-17 Thread Robin Dapp
Hi, this allows immediates in the load-on-condition expander on z13 or later. Regtested on z14. Regards Robin -- gcc/ChangeLog: 2018-10-17 Robin Dapp * config/s390/predicates.md: Allow immediate operand in loc_operand for z13. * config/s390/s390.md: Use

Re: [v3 PATCH] PR libstdc++/87619

2018-10-17 Thread Ville Voutilainen
On Wed, 17 Oct 2018 at 12:20, Ville Voutilainen wrote: > > On Wed, 17 Oct 2018 at 12:07, Jonathan Wakely wrote: > > It might be worth also calling f<256>() and doing: > > > > template > > void f_impl(std::index_sequence is) > > { > > using V = std::variant...>; > > > > // For a variant of

Re: [00/10][RFC] Splitting the C and C++ concept of "complete type"

2018-10-17 Thread Richard Sandiford
[ Sorry that there were so many typos in my last reply, will try to do better this time... ] Joseph Myers writes: > On Tue, 16 Oct 2018, Richard Sandiford wrote: >> The patches therefore add a new "__sizeless_struct" keyword to denote >> structures that are sizeless rather than sized. Unlike

Re: [patch][RFC] bitmaps as lists *or* trees

2018-10-17 Thread Richard Biener
On Thu, Mar 7, 2013 at 9:18 PM Steven Bosscher wrote: > > > Attached is a version that passes bootstrap on > > x86_64-unknown-linux-gnu. and with a ChangeLog. > > Hello, > > Testing with some bitmap view changes revealed a few bugs: > > - Listifying a tree was broken, the prev pointer was never

Re: [PATCH] v2: Run selftests for C++ as well as C

2018-10-17 Thread David Malcolm
On Tue, 2018-10-16 at 14:26 -0600, Jeff Law wrote: > On 10/13/18 7:12 AM, David Malcolm wrote: > > On Fri, 2018-10-12 at 14:17 -0400, David Malcolm wrote: > > > On Fri, 2018-10-12 at 14:45 -0400, David Malcolm wrote: > > > > [re this thread "ToT build failure?": > > > >

Re: VRP: undefined shifting calculation should not need sign bit

2018-10-17 Thread Aldy Hernandez
On 10/17/18 6:52 AM, Richard Sandiford wrote: Aldy Hernandez writes: On 9/13/18 3:33 AM, Richard Sandiford wrote: Aldy Hernandez writes: On 09/12/2018 12:57 PM, Richard Sandiford wrote: Aldy Hernandez writes: diff --git a/gcc/wide-int-range.h b/gcc/wide-int-range.h index

Re: [v3 PATCH] PR libstdc++/87619

2018-10-17 Thread Jonathan Wakely
On 17/10/18 15:06 +0300, Ville Voutilainen wrote: On Wed, 17 Oct 2018 at 12:20, Ville Voutilainen wrote: On Wed, 17 Oct 2018 at 12:07, Jonathan Wakely wrote: > It might be worth also calling f<256>() and doing: > > template > void f_impl(std::index_sequence is) > { > using V =

Re: [00/10][RFC] Splitting the C and C++ concept of "complete type"

2018-10-17 Thread Uecker, Martin
Am Mittwoch, den 17.10.2018, 13:30 +0100 schrieb Richard Sandiford: > [ Sorry that there were so many typos in my last reply, will try to > do better >   this time... ] ... > I think the key difference between sizeless types and full C99-style > VLAs is that the size and layout of sizeless

Re: [00/10][RFC] Splitting the C and C++ concept of "complete type"

2018-10-17 Thread Joseph Myers
On Wed, 17 Oct 2018, Richard Sandiford wrote: > > But as shown in the related discussions, there are other possible features > > that might also involve non-VLA types whose size is not a compile-time > > constant. And so it's necessary to work with the people interested in > > those features

Re: [00/10][RFC] Splitting the C and C++ concept of "complete type"

2018-10-17 Thread Richard Sandiford
"Uecker, Martin" writes: > Am Mittwoch, den 17.10.2018, 13:30 +0100 schrieb Richard Sandiford: >> [ Sorry that there were so many typos in my last reply, will try to >> do better >>   this time... ] > > ... >> I think the key difference between sizeless types and full C99-style >> VLAs is that

Re: [00/10][RFC] Splitting the C and C++ concept of "complete type"

2018-10-17 Thread Joseph Myers
On Wed, 17 Oct 2018, Richard Sandiford wrote: > Yeah, can't deny that if you look at it as a general-purpose extension. > But that's not really what this is supposed to be. It's fairly special > purpose: there has to be some underlying variable-length/sizeless > built-in type that you want to

RE: [PATCH 3/6] [ARC] Add BI/BIH instruction support.

2018-10-17 Thread Claudiu Zissulescu
Hi, > > This removes the compact-casesi as an option for earlier ARC, right? > Was there a reason why that had to be done? > The compact-casesi was only designed for ARCv1 types of CPUs. Unfortunately, it was error prone leading to all kinds of runtime and compile time errors. Fixing it will

Re: [patch] new API for value_range

2018-10-17 Thread Aldy Hernandez
On 10/17/18 6:50 AM, Richard Biener wrote: On Thu, Oct 11, 2018 at 8:25 PM Aldy Hernandez wrote: On 10/11/18 5:47 AM, Richard Biener wrote: On Thu, Oct 11, 2018 at 10:19 AM Aldy Hernandez wrote: Hi Richard. Thanks for reviewing. On 10/10/18 6:27 AM, Richard Biener wrote: On Tue,