C++ PATCH to static auto in template

2018-05-10 Thread Jason Merrill
Normally we defer instantiation of static data member initializers until they are needed, but we were doing it immediately for auto variables. Tested x86_64-pc-linux-gnu, applying to trunk. commit a16c8170ac1c148087ee7798b9783656e53ab490 Author: Jason Merrill Date: Wed Mar 14

Re: [libstdc++, PATCH] PR libstdc++/83140 - assoc_legendre returns negated value when m is odd.

2018-05-10 Thread Ed Smith-Rowland
On 05/10/2018 01:44 PM, Rainer Orth wrote: Hi Ed, 2018-05-07  Edward Smith-Rowland  <3dw...@verizon.net> PR libstdc++/83140 - assoc_legendre returns negated value when m is odd * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add __phase argument defaulted to +1.  Doxy

Re: [PATCH 1/3] Add PTWRITE builtins for x86

2018-05-10 Thread Andi Kleen
> @@ -31325,7 +31329,21 @@ ix86_init_mmx_sse_builtins (void) > continue; > >ftype = (enum ix86_builtin_func_type) d->flag; > - def_builtin2 (d->mask, d->name, ftype, d->code); > + decl = def_builtin2 (d->mask, d->name, ftype, d->code); > + > + /* Avoid edges for

[PATCH] Fortran cleanup patch

2018-05-10 Thread Steve Kargl
The attached patch removed an unused function. OK to commit? 2018-05-10 Steven G. Kargl * gfortran.h: Remove prototype. * symbol.c (gfc_new_undo_checkpoint): Remove unused function. -- Steve Index: gcc/fortran/gfortran.h

Re: [PATCH] PowerPC address support clean, patch 3 of 4

2018-05-10 Thread Michael Meissner
On Thu, May 10, 2018 at 05:20:52PM -0500, Segher Boessenkool wrote: > On Thu, May 10, 2018 at 05:49:12PM -0400, Michael Meissner wrote: > > > > -/* Return true if we have D-form addressing in altivec registers. */ > > > > +/* Return true if we have D-form addressing (register+offset) in > > > >

Re: [PATCH] PowerPC address support clean, patch 3 of 4

2018-05-10 Thread Segher Boessenkool
On Thu, May 10, 2018 at 05:49:12PM -0400, Michael Meissner wrote: > > > -/* Return true if we have D-form addressing in altivec registers. */ > > > +/* Return true if we have D-form addressing (register+offset) in either a > > > + specific reload register class or whether some reload register

Re: [PATCH] PowerPC: Reformat move insns to make them clearing, patch #5 of 5

2018-05-10 Thread Segher Boessenkool
On Thu, May 03, 2018 at 02:14:34PM -0400, Michael Meissner wrote: > 2018-05-03 Michael Meissner > > * config/rs6000/rs6000.md (mov_softfloat, FMOVE32): > Reformat alternatives and attributes so it is easier to identify > which

Re: [PATCH] PowerPC: Reformat move insns to make them clearing, patch #3 of 5

2018-05-10 Thread Segher Boessenkool
Hi, On Thu, May 03, 2018 at 02:12:55PM -0400, Michael Meissner wrote: > ; ld/std require word-aligned displacements -> 'Y' constraint. > ; List Y->r and r->Y before r->r for reload. > + > +;; STFD LFD FMR LXSDSTXSD > +;; LXSDXSTXSDX

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-10 Thread Marc Glisse
On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to Jeff's question below and confirm whether my understanding of the restriction (below) is correct? I don't remember it at all, I really should have expanded that comment... The documentation of nonzero_chars seems to

Re: [PATCH] PowerPC: Reformat move insns to make them clearing, patch #4 of 5

2018-05-10 Thread Segher Boessenkool
On Thu, May 03, 2018 at 02:13:42PM -0400, Michael Meissner wrote: > 2018-05-03 Michael Meissner > > * config/rs6000/rs6000.md (mov_softfloat64, FMOVE64): > Reformat alternatives and attributes so it is easier to identify > which

Re: [PATCH] PowerPC: Reformat move insns to make them clearing, patch #2 of 5

2018-05-10 Thread Segher Boessenkool
On Thu, May 03, 2018 at 02:12:05PM -0400, Michael Meissner wrote: > 2018-05-03 Michael Meissner > > * config/rs6000/rs6000.md (mov_softfloat32, FMOVE64): > Reformat alternatives and attributes so it is easier to identify > which

Re: [PATCH] PowerPC address support clean, patch 4 of 4

2018-05-10 Thread Michael Meissner
On Thu, May 10, 2018 at 04:55:02PM -0500, Segher Boessenkool wrote: > Hi, > > On Thu, May 03, 2018 at 01:23:24PM -0400, Michael Meissner wrote: > > -/* Helper function to say whether a mode supports PRE_INC or PRE_DEC. */ > > +/* Helper function to say whether a mode supports PRE_INC or PRE_DEC

Re: [PATCH] PowerPC: Reformat move insns to make them clearing, patch #1 of 5

2018-05-10 Thread Segher Boessenkool
On Thu, May 03, 2018 at 02:10:50PM -0400, Michael Meissner wrote: > 2018-05-03 Michael Meissner > > * config/rs6000/rs6000.md (mov_hardfloat32, FMOVE64): > Reformat alternatives and attributes so it is easier to identify > which

Re: [PATCH] PowerPC address support clean, patch 1 of 4

2018-05-10 Thread Michael Meissner
On Wed, May 09, 2018 at 05:54:53PM -0500, Segher Boessenkool wrote: > Hi Mike, > > On Thu, May 03, 2018 at 01:17:03PM -0400, Michael Meissner wrote: > > 2018-05-03 Michael Meissner > > > > * config/rs6000/rs6000.c (mode_supports_dq_form): Rename > >

Re: [PATCH] PowerPC address support clean, patch 4 of 4

2018-05-10 Thread Segher Boessenkool
Hi, On Thu, May 03, 2018 at 01:23:24PM -0400, Michael Meissner wrote: > -/* Helper function to say whether a mode supports PRE_INC or PRE_DEC. */ > +/* Helper function to say whether a mode supports PRE_INC or PRE_DEC in a > given > + reload register class or if some reload register class

Re: [PATCH] PowerPC address support clean, patch 3 of 4

2018-05-10 Thread Michael Meissner
On Wed, May 09, 2018 at 06:14:27PM -0500, Segher Boessenkool wrote: > On Thu, May 03, 2018 at 01:22:10PM -0400, Michael Meissner wrote: > > 2018-05-03 Michael Meissner > > > > * config/rs6000/rs6000.c (mode_supports_d_form): Rename > >

Re: [PATCH] Use two source permute for vector initialization (PR 85692, take 2)

2018-05-10 Thread Allan Sandfeld Jensen
On Donnerstag, 10. Mai 2018 09:57:22 CEST Jakub Jelinek wrote: > On Wed, May 09, 2018 at 04:53:19PM +0200, Allan Sandfeld Jensen wrote: > > > > @@ -2022,8 +2022,9 @@ simplify_vector_constructor > > > > (gimple_stmt_iterator > > > > *gsi)> > > > > > > > >elem_type = TREE_TYPE (type); > > > >

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-10 Thread Martin Sebor
Hi Marc, Can you please comment/respond to Jeff's question below and confirm whether my understanding of the restriction (below) is correct? Thanks Martin On 04/30/2018 11:50 AM, Jeff Law wrote: On 01/12/2018 02:30 PM, Martin Sebor wrote: A failure in a test for the recently enhanced

[PATCH, i386]: Fix and improve a couple of builtin expansions

2018-05-10 Thread Uros Bizjak
Hello! The missing return in _xgetbv is a bug and will be backported to release branches. 2018-05-10 Uros Bizjak * config/i386/i386.c (ix86_expand_builtin) : Generate SImode target register for null target. : Ditto. : Optimize LSHIFTRT generation. *

Re: Fix PR85726 (div-div suboptimization) and a rant on match.pd :s-flag

2018-05-10 Thread Hans-Peter Nilsson
> Date: Thu, 10 May 2018 07:23:05 -0500 > From: Segher Boessenkool > On Thu, May 10, 2018 at 10:33:39AM +0200, Marc Glisse wrote: > > int x, y; > > void f(int n){ > > int c = 3 << 20; > > x = n / c; > > y = x / c; > > } > Without the replacement we have two

Re: Fix PR85726 (div-div suboptimization) and a rant on match.pd :s-flag

2018-05-10 Thread Hans-Peter Nilsson
> Date: Thu, 10 May 2018 14:03:10 +0200 > From: Jakub Jelinek > On Thu, May 10, 2018 at 01:51:29PM +0200, Marc Glisse wrote: > > > > There are probably more > > > > complicated transformations this disables. > > > > > > I'm providing an example from *real* code where the > > >

Re: [PATCH, rs6000] Map dcbtstt, dcbtt to n2=0 for __builtin_prefetch builtin.

2018-05-10 Thread Segher Boessenkool
Hi Carl, On Thu, May 10, 2018 at 11:10:29AM -0700, Carl Love wrote: > * config/rs6000/rs6000.md (prefetch): Generate dcbtt and dcbtstt > instructions if operands[2] is 0. "and TARGET_POPCNTD"? Or "and generating code for ISA 2.06 or later". Something like that. Looks good,

Re: [PATCH, rs6000] Fix expected BE counts for vsx-vector-6.h

2018-05-10 Thread Segher Boessenkool
Hi, On Thu, May 10, 2018 at 10:57:16AM -0700, Carl Love wrote: > The following patch fixes issues found with the instruction counts for > the vsx-vector-6.h test. It was found that on a BE system where GCC is > configured with --with-cpu=power6 the expected counts in vsx-vector-6- > be.c do not

Re: RFA (make_dispatcher_decl): PATCH for c++/83911, ICE with multiversioned constructor

2018-05-10 Thread Jason Merrill
On Fri, Mar 16, 2018 at 8:38 AM, Jason Merrill wrote: > On Thu, Mar 15, 2018 at 4:50 AM, Richard Biener > wrote: >> On Wed, Mar 14, 2018 at 8:57 PM, Jason Merrill wrote: >>> Ping >>> >>> On Fri, Mar 2, 2018 at 1:23 PM, Jason

[PATCH] use string length to relax -Wstringop-overflow for nonstrings (PR 85623)

2018-05-10 Thread Martin Sebor
GCC 8.1 warns for unbounded (and some bounded) string comparisons involving arrays declared attribute nonstring (i.e., char arrays that need not be nul-terminated). For instance: extern __attribute__((nonstring)) char a[4]; int f (void) { return strncmp (a, "123", sizeof a); }

Re: [PATCH] Document Dual ABI for std::ios_base::failure

2018-05-10 Thread Jonathan Wakely
On 10/05/18 12:17 +0100, Jonathan Wakely wrote: And a couple of other doc improvements, and regenerated the HTML pages. Please read the proposed change to using.xml and let me know if it's clear. * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer. *

Re: [PATCH v2, rs6000] Improve Documentation of Built-In Functions Part 1

2018-05-10 Thread Segher Boessenkool
Hi! On Wed, May 09, 2018 at 12:42:11PM -0500, Kelvin Nilsen wrote: > 1. Change the name of the first PowerPC built-in section from >"PowerPC Built-in Functions" to "Basic PowerPC Built-in Functions". >This section has never described all PowerPC built-in functions. After the patch it

Re: [v3] PATCH to make _BracketMatcher::_S_cache_size a variable

2018-05-10 Thread Jonathan Wakely
On 10/05/18 13:59 -0400, Jason Merrill wrote: There doesn't seem to be any reason for _S_cache_size to be a function rather than a variable. OK for trunk? I vaguely recall some problem with that constant, maybe it didn't work as a variable once upon a time. If that was ever true it was fixed

Re: random_device implementation

2018-05-10 Thread Jason Merrill
On Sat, May 5, 2018 at 8:34 PM, sotrdg sotrdg wrote: > https://github.com/euloanty/mingw-std-random_device/blob/master/random_device_gcc_withcxx11abi/random.cc It's best to CC the gcc-patches and libstdc++ lists on library contributions. Jason

C++ PATCHes for core issue resolutions

2018-05-10 Thread Jason Merrill
2310: We were crashing on this testcase; the proposed resolution of 2310 clarifies that we should reject it. 2267: brace and paren initialization should have the same semantics here. Tested x86_64-pc-linux-gnu, applying to trunk. commit ac97fad727f7ebcba2d2b345d95867331042a4af Author: Jason

Re: [PATCH 1/2] gcc_qsort: source code changes

2018-05-10 Thread DJ Delorie
Alexander Monakov writes: > I'm not sure. It has a weaker contract compared to qsort, and I believe > functions in libiberty are understood to provide stronger/better replacements. The original intent of libiberty was to provide a stronger *portability* contract, i.e. to

Various small C++ cleanup PATCHes

2018-05-10 Thread Jason Merrill
1) There's a function to count how many template headers we should have, we should use it. 2) While working on something a while back I ran into trying to instantiate a nested function while still in processing_template_decl context, which doesn't work so well. Let's check for that. 3) A

Re: [PATCH] Add constant folding support for next{after,toward}{,f,l} (PR libstdc++/85466)

2018-05-10 Thread Steve Ellcey
I think this patch is causing a glibc testing error.  The tests math/bug-nextafter and math/bug-nexttoward are failing due to underflow not getting set.  Here is a test case that should print nothing but is currently printing the 'did not underflow' message. #include #include #include

Re: PATCH for fortran/85735, f951 crash on empty input

2018-05-10 Thread Steve Kargl
On Thu, May 10, 2018 at 02:17:15PM -0400, Marek Polacek wrote: > ./f951 -quiet > ^D > crashes in gfc_create_decls: > /* Build our translation-unit decl. */ > current_translation_unit > = build_translation_unit_decl (get_identifier (main_input_filename)); > because main_input_filename is

PATCH for fortran/85735, f951 crash on empty input

2018-05-10 Thread Marek Polacek
Running ./f951 -quiet ^D crashes in gfc_create_decls: /* Build our translation-unit decl. */ current_translation_unit = build_translation_unit_decl (get_identifier (main_input_filename)); because main_input_filename is null in this case. We can fix it like below, where

Re: [PATCH, rs6000] Map dcbtstt, dcbtt to n2=0 for __builtin_prefetch builtin.

2018-05-10 Thread Carl Love
GCC Maintainers: I updated the patch so the dcbtt and dctstt instructions are only generated if the supported ISA is 2.06 or newer. I addressed the use of REG instead of REG_P and formatting issues as requested. The regression testing of the patch was done on     powerpc64le-unknown-linux-gnu

Re: [PATCH][i386] Adding WAITPKG instructions

2018-05-10 Thread Uros Bizjak
On Thu, May 10, 2018 at 7:47 PM, Uros Bizjak wrote: > Please find attached the patch that fixes all the issues (plus some > whitespace fixes). It is tested and generates acceptable code. Please > update the ChangeLog (do not use past tense in the ChangeLog entry!) > and, if it

Re: [PATCH 1/2] gcc_qsort: source code changes

2018-05-10 Thread Alexander Monakov
On Thu, 10 May 2018, Richard Biener wrote: > > Just a quick first remark - how about putting this into libiberty? And then > name it xqsort? I'm not sure. It has a weaker contract compared to qsort, and I believe functions in libiberty are understood to provide stronger/better replacements.

Re: [PATCH] PR fortran/85521 -- Zero length substrings in array aconstructors

2018-05-10 Thread Steve Kargl
On Thu, May 10, 2018 at 07:56:59PM +0200, Thomas Koenig wrote: > Am 10.05.2018 um 17:41 schrieb Steve Kargl: > > It is certainly possible to give a warning, but it > > would be odd (to me) to warn about technically > > standard conforming code. > > Maybe we could add > > gfc_warning (0,

[v3] PATCH to make _BracketMatcher::_S_cache_size a variable

2018-05-10 Thread Jason Merrill
There doesn't seem to be any reason for _S_cache_size to be a function rather than a variable. OK for trunk? commit bf6843a87d3f64c9ffa29ce8d50aaa6fe8aabcfa Author: Jason Merrill Date: Wed Mar 14 21:39:06 2018 -0400 * include/bits/regex_compiler.h

Re: [PATCH] PR fortran/85521 -- Zero length substrings in array aconstructors

2018-05-10 Thread Thomas Koenig
Am 10.05.2018 um 17:41 schrieb Steve Kargl: It is certainly possible to give a warning, but it would be odd (to me) to warn about technically standard conforming code. Maybe we could add gfc_warning (0, "Standard-conforming code found, your code may run as expected"); at the end of the

[PATCH, rs6000] Fix expected BE counts for vsx-vector-6.h

2018-05-10 Thread Carl Love
GCC Maintainers: The following patch fixes issues found with the instruction counts for the vsx-vector-6.h test. It was found that on a BE system where GCC is configured with --with-cpu=power6 the expected counts in vsx-vector-6- be.c do not match. This patch fixes the expected counts when

Re: [PATCH 0/2] Introduce gcc_qsort

2018-05-10 Thread Alexander Monakov
On Thu, 10 May 2018, Richard Biener wrote: > > - signature-compatible to C qsort, but relaxed contract: > > - may apply the comparator to elements in a temporary buffer > > What consequences has this or rather how is this observable and makes > comparators behave differently? The only

Re: [PATCH][i386] Adding WAITPKG instructions

2018-05-10 Thread Uros Bizjak
On Thu, May 10, 2018 at 3:44 PM, Peryt, Sebastian wrote: >> -Original Message- >> From: Uros Bizjak [mailto:ubiz...@gmail.com] >> Sent: Thursday, May 10, 2018 3:26 PM >> To: Peryt, Sebastian >> Cc: gcc-patches@gcc.gnu.org; Kirill

Re: [PATCH 0/2] Introduce gcc_qsort

2018-05-10 Thread Alexander Monakov
On Thu, 10 May 2018, Jakub Jelinek wrote: > Have you gathered some statistics on the element sizes and how often they > appear in qsort calls (perhaps weighted by n*log(n) of the element count) > across bootstrap+regtest? No, but Adhemerval Zanella collected stats on bootstrap, and they are

Re: [libstdc++, PATCH] PR libstdc++/83140 - assoc_legendre returns negated value when m is odd.

2018-05-10 Thread Rainer Orth
Hi Ed, >>> 2018-05-07  Edward Smith-Rowland  <3dw...@verizon.net> >>> >>> PR libstdc++/83140 - assoc_legendre returns negated value when m is >>> odd >>> * include/tr1/legendre_function.tcc (__assoc_legendre_p): Add >>> __phase >>> argument defaulted to +1.  Doxy comments on same. >>>

Re: [PATCH 1/2] gcc_qsort: source code changes

2018-05-10 Thread Richard Biener
On May 10, 2018 5:56:40 PM GMT+02:00, Alexander Monakov wrote: > * sort.cc: New file. >* system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort. >* vec.c (qsort_chk): Use gcc_qsort. Just a quick first remark - how about putting this into libiberty? And

Re: [PATCH 0/2] Introduce gcc_qsort

2018-05-10 Thread Richard Biener
On May 10, 2018 5:56:39 PM GMT+02:00, Alexander Monakov wrote: >Hello. > >This introduces a replacement for qsort() in GCC. The main selling >point is >reproducibility (currently compiler output may change depending on how >libc >qsort reorders not-bitwise-identical elements

Re: [build] Fix Solaris gty handling (PR target/84379)

2018-05-10 Thread Eric Botcazou
> As described in the PR, there are a couple of jit testsuite failures on > Solaris when using /bin/as. The errors point to GC issues and indeed, > gcc/config/sol2.c lacked GTY markup. This patch fixes that, following > what darwin.c does for machopic_indirections. I confess I have no idea >

Re: [PATCH 0/2] Introduce gcc_qsort

2018-05-10 Thread Jakub Jelinek
On Thu, May 10, 2018 at 06:56:39PM +0300, Alexander Monakov wrote: > Overall the new implementation is roughly 30% faster compared to Glibc qsort, > with 2x or more speedup for cases with tiny element count. I see one instance > where the new approach is significantly (1.5x) slower: it is

Re: [PATCH 1/2] gcc_qsort: source code changes

2018-05-10 Thread David Malcolm
On Thu, 2018-05-10 at 18:56 +0300, Alexander Monakov wrote: > * sort.cc: New file. > * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort. > * vec.c (qsort_chk): Use gcc_qsort. [...snip...] I'm not a reviewer for this, but there's a lot of fiddly implementation logic

[PING #2] [PATCH] avoid duplicate warning for strcmp with a nonstring (PR 85359)

2018-05-10 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-04/msg00650.html On 04/19/2018 10:03 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-04/msg00650.html This just suppresses a duplicate warning. Please let me know if it's preferable to defer it until GCC 9. Otherwise, I'll

[PATCH 1/2] gcc_qsort: source code changes

2018-05-10 Thread Alexander Monakov
* sort.cc: New file. * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort. * vec.c (qsort_chk): Use gcc_qsort. --- gcc/sort.cc | 232 +++ gcc/system.h | 7 +- gcc/vec.c| 2 +- 3 files changed, 238

[PATCH 2/2] gcc_qsort: build system changes

2018-05-10 Thread Alexander Monakov
* Makefile.in (OBJS-libcommon): Add sort.o. (build/sort.o): New target. Use it... (BUILD_RTL): ... here, and... (build/gencfn-macros): ... here, and... (build/genmatch): ... here. --- gcc/Makefile.in | 9 + 1 file changed, 5 insertions(+), 4

[PATCH 0/2] Introduce gcc_qsort

2018-05-10 Thread Alexander Monakov
Hello. This introduces a replacement for qsort() in GCC. The main selling point is reproducibility (currently compiler output may change depending on how libc qsort reorders not-bitwise-identical elements that compare equal) with a small improvement speed-wise and small code growth (under 2K on

Re: [PATCH] PR fortran/85521 -- Zero length substrings in array aconstructors

2018-05-10 Thread Steve Kargl
It is certainly possible to give a warning, but it would be odd (to me) to warn about technically standard conforming code. gfortran doesn't warn for zero-sized array references or zero-length substrings in other context. program foo real a(4) character(len=10) s s = '12345' a = 1

Re: Document PR 84073 change in /gcc-8/porting_to.html

2018-05-10 Thread Andre Vehreschild
Hi Thomas, looks ok to me. - Andre On Thu, 10 May 2018 17:19:39 +0200 Thomas König wrote: > Am 10.05.2018 um 14:20 schrieb Thomas Koenig: > > Am 10.05.2018 um 12:33 schrieb Jonathan Wakely: > >> Should the fix for PR 84073 be documented, so that users whose code is > >> now

Re: [PATCH] PR fortran/70870 -- Reject data object with default initialization

2018-05-10 Thread Andre Vehreschild
Hi Steve, ok for trunk. - Andre On Wed, 9 May 2018 15:32:10 -0700 Steve Kargl wrote: > I plan to commit the attach patch on Saturday unless someone objects. > > 2018-05-09 Steven G. Kargl > > PR fortran/70870 > * data.c

Re: [C++ PATCH] Fix offsetof constexpr handling (PR c++/85662, take 4)

2018-05-10 Thread Jason Merrill
OK, thanks. On Wed, May 9, 2018 at 4:49 PM, Jakub Jelinek wrote: > On Wed, May 09, 2018 at 11:01:18AM -0400, Jason Merrill wrote: >> On Wed, May 9, 2018 at 10:47 AM, Jakub Jelinek wrote: >> > On Wed, May 09, 2018 at 10:40:26AM -0400, Jason Merrill wrote: >>

Re: Document PR 84073 change in /gcc-8/porting_to.html

2018-05-10 Thread Thomas König
Am 10.05.2018 um 14:20 schrieb Thomas Koenig: Am 10.05.2018 um 12:33 schrieb Jonathan Wakely: Should the fix for PR 84073 be documented, so that users whose code is now rejected understand why, and how to fix it? https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84073

Re: [PATCH] PR fortran/85521 -- Zero length substrings in array aconstructors

2018-05-10 Thread Andre Vehreschild
Hi Steve, the patch looks OK to me. Is it possible to give a warning there, at least with some higher warning-level? Or is there already one? I haven't tested it. Regards, Andre On Thu, 10 May 2018 07:15:21 -0700 Steve Kargl wrote: > On Thu, May 10,

[patch, fortran, doc, committed] Document BACK for MINLOC and MAXLOC

2018-05-10 Thread Thomas König
Hello world, I just commmitted the attached patch as obvious after checking that it passes "make info", "make dvi" and "make pdf". Regards Thomas 2018-05-10 Thomas Koenig PR fortran/54613 * intrinsic.texi: Document BACK for MINLOC and MAXLOC.

Quo Vadis tr1? Was: [libstdc++, PATCH] PR libstdc++/83140 - assoc_legendre returns negated value when m is odd.

2018-05-10 Thread Ed Smith-Rowland
All, We could consider dropping the TR1 support, and just provide these functions for ISO/IEC 29124:2010 in C++11 (or later) and for C++17. But that decision should be taken separately, and should only happen on trunk anyway so we need to use _Tp(+1) here. I am in favour of splitting new

Re: [PATCH] PR fortran/85521 -- Zero length substrings in array aconstructors

2018-05-10 Thread Steve Kargl
On Thu, May 10, 2018 at 11:48:24AM +0200, Dominique d'Humières wrote: > Hi Steve, > > AFAICT the patch is missing. > > Thanks for working on these PRs. > Whoops. Looks like attached the log instead of diff. Index: gcc/fortran/array.c

Re: [libstdc++, PATCH] PR libstdc++/83140 - assoc_legendre returns negated value when m is odd.

2018-05-10 Thread Ed Smith-Rowland
On 05/09/2018 05:30 AM, Jonathan Wakely wrote: On 07/05/18 12:39 -0400, Ed Smith-Rowland wrote: All, We were using a different convention for P_l^m assoc_legendre(int l, int m, FloatTp x)  - the so-called Condon-Shortley convention which includes (-1)^m.  This unfortunately is common.

[PR 85655] Check is_single_const in intersect_with_plats

2018-05-10 Thread Martin Jambor
Hi, bug 85655 happens because intersect_with_plats encounters a BOTTOM lattice and does not check for it. On closer inspection, the real check that should be performed is is_single_const, so this patch adds it. It has passed bootstrap and testing, LTO bootstrap is underway. OK for trunk if it

RE: [PATCH][i386] Adding WAITPKG instructions

2018-05-10 Thread Peryt, Sebastian
> -Original Message- > From: Uros Bizjak [mailto:ubiz...@gmail.com] > Sent: Thursday, May 10, 2018 3:26 PM > To: Peryt, Sebastian > Cc: gcc-patches@gcc.gnu.org; Kirill Yukhin > Subject: Re: [PATCH][i386] Adding WAITPKG instructions > >

[build] Fix Solaris gty handling (PR target/84379)

2018-05-10 Thread Rainer Orth
As described in the PR, there are a couple of jit testsuite failures on Solaris when using /bin/as. The errors point to GC issues and indeed, gcc/config/sol2.c lacked GTY markup. This patch fixes that, following what darwin.c does for machopic_indirections. I confess I have no idea why I had to

[build] Support SHF_EXCLUDE on non-x86 and with Solaris as

2018-05-10 Thread Rainer Orth
Prompted by PR go/85429 (gotools unconditionally using gas syntax for setting SHF_EXCLUDE), I looked into what it takes to enable the flag (SECTION_EXCLUDE in gcc) on Solaris with /bin/as. Here's what I found: * Unlike most (all?) other section flags, the Solaris/x86 as doesn't accept the "e"

Re: [PATCH][i386] Adding WAITPKG instructions

2018-05-10 Thread Uros Bizjak
On Thu, May 10, 2018 at 2:50 PM, Peryt, Sebastian wrote: > Hi Uros, > > Updated patch attached, please find comments below. > >> -Original Message- >> From: Uros Bizjak [mailto:ubiz...@gmail.com] >> Sent: Wednesday, May 9, 2018 1:47 PM >> To: Peryt, Sebastian

Re: Incremental LTO linking part 7: documentation

2018-05-10 Thread Martin Jambor
Hi, just small nits: On Tue, May 08 2018, Jan Hubicka wrote: > Hi, > this patch adds documentation of -flinker-output. > > * doc/invoke.texi (-flinker-output): Document > Index: doc/invoke.texi > === > --- doc/invoke.texi

RE: [PATCH][i386] Adding CLDEMOTE instruction

2018-05-10 Thread Peryt, Sebastian
> -Original Message- > From: Uros Bizjak [mailto:ubiz...@gmail.com] > Sent: Wednesday, May 9, 2018 1:53 PM > To: Peryt, Sebastian > Cc: gcc-patches@gcc.gnu.org; Kirill Yukhin > Subject: Re: [PATCH][i386] Adding CLDEMOTE instruction > >

RE: [PATCH][i386] Adding WAITPKG instructions

2018-05-10 Thread Peryt, Sebastian
Hi Uros, Updated patch attached, please find comments below. > -Original Message- > From: Uros Bizjak [mailto:ubiz...@gmail.com] > Sent: Wednesday, May 9, 2018 1:47 PM > To: Peryt, Sebastian > Cc: gcc-patches@gcc.gnu.org; Kirill Yukhin

[PATCH] PR libstdc++/85729 add linkage specifications to headers

2018-05-10 Thread Jonathan Wakely
This works around user error where our headers get included within an extern "C" block. PR libstdc++/85729 * include/bits/c++config.h (__replacement_assert): Add linkage specification. * include/bits/std_abs.h: Add comment to closing brace of block. *

Re: Fix PR85726 (div-div suboptimization) and a rant on match.pd :s-flag

2018-05-10 Thread Segher Boessenkool
On Thu, May 10, 2018 at 10:33:39AM +0200, Marc Glisse wrote: > (not a review) > > On Thu, 10 May 2018, Hans-Peter Nilsson wrote: > > >Replacing a division feeding a division helps only when the > >second division is the only user, and "fusing" the divisions is > > Well, that's not quite true. >

Re: Fix PR85726 (div-div suboptimization) and a rant on match.pd :s-flag

2018-05-10 Thread Jakub Jelinek
On Thu, May 10, 2018 at 01:51:29PM +0200, Marc Glisse wrote: > > > There are probably more > > > complicated transformations this disables. > > > > I'm providing an example from *real* code where the > > transformation is bad (admittedly just for the div-div case). Isn't the case of the posted

Re: Fix PR85726 (div-div suboptimization) and a rant on match.pd :s-flag

2018-05-10 Thread Marc Glisse
On Thu, 10 May 2018, Hans-Peter Nilsson wrote: Date: Thu, 10 May 2018 10:33:39 +0200 (CEST) From: Marc Glisse On Thu, 10 May 2018, Hans-Peter Nilsson wrote: Replacing a division feeding a division helps only when the second division is the only user, and "fusing" the

Re: [PATCH] Handle no_sanitize attribute values in the right way (PR sanitizer/85556).

2018-05-10 Thread Jakub Jelinek
On Thu, May 10, 2018 at 12:59:39PM +0200, Martin Liška wrote: > >From 9e2570eee9bb160b58075f6802d6ac1bb7b77341 Mon Sep 17 00:00:00 2001 > From: marxin > Date: Thu, 10 May 2018 10:27:02 +0200 > Subject: [PATCH] Support LLVM style of no_sanitize attribute (PR > sanitizer/85556). >

[PATCH] Document Dual ABI for std::ios_base::failure

2018-05-10 Thread Jonathan Wakely
And a couple of other doc improvements, and regenerated the HTML pages. Please read the proposed change to using.xml and let me know if it's clear. * doc/xml/faq.xml: Link to C++17 status. Add note to outdated answer. * doc/xml/manual/debug_mode.xml: Add array and forward_list

Re: Fix PR85726 (div-div suboptimization) and a rant on match.pd :s-flag

2018-05-10 Thread Hans-Peter Nilsson
> Date: Thu, 10 May 2018 10:33:39 +0200 (CEST) > From: Marc Glisse > On Thu, 10 May 2018, Hans-Peter Nilsson wrote: > > > Replacing a division feeding a division helps only when the > > second division is the only user, and "fusing" the divisions is > > Well, that's not

Re: [PATCH] Handle no_sanitize attribute values in the right way (PR sanitizer/85556).

2018-05-10 Thread Martin Liška
On 05/10/2018 11:45 AM, Jakub Jelinek wrote: > On Thu, May 10, 2018 at 11:28:15AM +0200, Martin Liška wrote: >> Parsing of no_sanitize attribute now supports >> __attribute__((no_sanitize("address,undefined"))) > > Why is that wrong? I don't see why we shouldn't support it that way. > It matches

[Patch, fortran] PR68846 - Pointer function as LValue doesn't work when the assignment regards a dummy argument.

2018-05-10 Thread Paul Richard Thomas
Committed as obvious in revision 260113. I will commence backporting as soon as I can. Thanks to Mirco Valentini for the initial fix, which he posted on 2017-02-28. Cheers Paul 2018-05-10 Paul Thomas PR fortran/68846 PR fortran/70864 * resolve.c

Re: [PATCH, v2] Recognize a missed usage of a sbfiz instruction

2018-05-10 Thread Luis Machado
On 05/09/2018 10:44 AM, Kyrill Tkachov wrote: On 09/05/18 13:30, Luis Machado wrote: Hi Kyrill, On 05/08/2018 11:09 AM, Kyrill Tkachov wrote: Hi Luis, On 07/05/18 15:28, Luis Machado wrote: Hi, On 02/08/2018 10:45 AM, Luis Machado wrote: Hi Kyrill, On 02/08/2018 09:48 AM, Kyrill

Re: [PATCH][AARCH64][PR target/84882] Add mno-strict-align

2018-05-10 Thread Sudakshina Das
Ping! On 27/03/18 13:58, Sudakshina Das wrote: Hi This patch adds the no variant to -mstrict-align and the corresponding function attribute. To enable the function attribute, I have modified aarch64_can_inline_p () to allow checks even when the callee function has no attribute. The need for

[PATCH] rs6000: Remove -maltivec={be,le}

2018-05-10 Thread Segher Boessenkool
This removes the -maltivec=be and -maltivec=le options. Those were deprecated in GCC 8. Altivec will keep working on both BE and LE; it is just the BE-vectors- on-LE that is removed (the other way around was never supported). The main change is replacing VECTOR_ELT_ORDER_BIG by BYTES_BIG_ENDIAN

[ping] Use response files from the driver in more cases

2018-05-10 Thread Eric Botcazou
https://gcc.gnu.org/ml/gcc-patches/2018-04/msg01172.html Thanks in advance. -- Eric Botcazou

Re: [PATCH] PR fortran/85521 -- Zero length substrings in array aconstructors

2018-05-10 Thread Dominique d'Humières
Hi Steve, AFAICT the patch is missing. Thanks for working on these PRs. Dominique

Re: [PATCH 1/2] extend.texi: update Global Register Variables section

2018-05-10 Thread Alexander Monakov
On Mon, 23 Apr 2018, Alexander Monakov wrote: > This rewrites global register vars doc to reflect that the register is no > longer > reserved exclusively, but in fact is available for general allocation, and > also > adds the requirement to properly inform the compiler where inline asms are >

Re: [PATCH] Handle no_sanitize attribute values in the right way (PR sanitizer/85556).

2018-05-10 Thread Jakub Jelinek
On Thu, May 10, 2018 at 11:28:15AM +0200, Martin Liška wrote: > Parsing of no_sanitize attribute now supports > __attribute__((no_sanitize("address,undefined"))) Why is that wrong? I don't see why we shouldn't support it that way. It matches how we handle other similar attributes, say target

Fix bad interaction between sysroot and C++ include dir

2018-05-10 Thread Eric Botcazou
This fixes an annyoing regression introduced in 2012 by this change: https://codereview.appspot.com/5394041 The idea of the change is to interpolate the value passed to --with-sysroot in the value passed to --with-gxx-include-dir, so that you can change the sysroot at run time, i.e. pass

[PATCH] Handle no_sanitize attribute values in the right way (PR sanitizer/85556).

2018-05-10 Thread Martin Liška
Hi. Parsing of no_sanitize attribute now supports __attribute__((no_sanitize("address,undefined"))) which is wrong. And on the other hand this is not recognized: __attribute__((no_sanitize("address", "undefined"))) Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Then I

Re: Fix PR85726 (div-div suboptimization) and a rant on match.pd :s-flag

2018-05-10 Thread Marc Glisse
(not a review) On Thu, 10 May 2018, Hans-Peter Nilsson wrote: Replacing a division feeding a division helps only when the second division is the only user, and "fusing" the divisions is Well, that's not quite true. int x, y; void f(int n){ int c = 3 << 20; x = n / c; y = n / c; } Here

[PATCH] Do not ICE for incomplete types in ICF (PR ipa/85607).

2018-05-10 Thread Martin Liška
Hi. It's removal of an assert at place where we calculate hash of a type. For incomplete types, let's skip it. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Martin gcc/ChangeLog: 2018-05-09 Martin Liska PR ipa/85607

[PATCH] Use two source permute for vector initialization (PR 85692, take 2)

2018-05-10 Thread Jakub Jelinek
On Wed, May 09, 2018 at 04:53:19PM +0200, Allan Sandfeld Jensen wrote: > > > @@ -2022,8 +2022,9 @@ simplify_vector_constructor (gimple_stmt_iterator > > > *gsi)> > > >elem_type = TREE_TYPE (type); > > >elem_size = TREE_INT_CST_LOW (TYPE_SIZE (elem_type)); > > > > > > - vec_perm_builder

Re: [PATCH] Workaround glibc <= 2.23 nextafterl/nexttowardl bug (PR tree-optimization/85699)

2018-05-10 Thread Jakub Jelinek
On Thu, May 10, 2018 at 07:53:15AM +0200, Richard Biener wrote: > On May 9, 2018 10:52:05 PM GMT+02:00, Jakub Jelinek wrote: > >Hi! > > > >glibc <= 2.23 has buggy nextafterl/nexttowardl as can be seen on the > >nextafter-2.c testcase. > > > >Do we want to workaround this bug,

Re: Handle vector boolean types when calculating the SLP unroll factor

2018-05-10 Thread Richard Sandiford
Richard Biener writes: > On Wed, May 9, 2018 at 1:29 PM, Richard Sandiford > wrote: >> Richard Biener writes: >>> On Wed, May 9, 2018 at 12:34 PM, Richard Sandiford >>> wrote: