Re: Enable no-exec stacks for more targets using the Linux kernel

2017-09-18 Thread Jim Wilson
On Mon, 2017-09-18 at 22:03 +, Joseph Myers wrote: > Thus, I'd like the architecture maintainers to advise on whether any > such issues apply for their architecture.  If they do, that will > provide the information needed for a comment on XFAILing the test in > glibc.  If no such reasons apply

Re: [libstdc++/71500] make back reference work with icase

2017-09-18 Thread Tim Shen via gcc-patches
On Mon, Sep 18, 2017 at 4:01 PM, Jonathan Wakely wrote: > On 18/09/17 10:58 -0700, Tim Shen via libstdc++ wrote: >> >> On Mon, Sep 18, 2017 at 10:26 AM, Jonathan Wakely >> wrote: We need to rewrite this to check the lengths are equal first, and

Re: Merge from trunk to gccgo branch

2017-09-18 Thread Ian Lance Taylor
On Mon, Sep 18, 2017 at 3:24 PM, Ian Lance Taylor wrote: > I merged revision 252949 from trunk to the gccgo branch. Missed a patch. Merged revision 252954 to the gccgo branch. Ian

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-18 Thread Daniel Santos
Mike, can you take a look at this please? On 09/18/2017 10:17 AM, Dominique d'Humières wrote: > This patch (r252896) breaks bootstrap on x86_64-apple-darwin10 configured with > > ../work/configure --prefix=/opt/gcc/gcc8w > --enable-languages=c,c++,fortran,objc,obj-c++,ada,lto

Re: [libstdc++/71500] make back reference work with icase

2017-09-18 Thread Jonathan Wakely
On 18/09/17 10:58 -0700, Tim Shen via libstdc++ wrote: On Mon, Sep 18, 2017 at 10:26 AM, Jonathan Wakely wrote: We need to rewrite this to check the lengths are equal first, and then call the 3-argument version of std::equal. Alternatively, we could move the implementation

Re: [PATCH] lra: make reload_pseudo_compare_func a proper comparator

2017-09-18 Thread Vladimir Makarov
On 09/15/2017 01:38 PM, Alexander Monakov wrote: Hello, I'd like to apply the following LRA patch to make qsort comparator reload_pseudo_compare_func proper (right now it lacks transitivity due to incorrect use of non_reload_pseudos bitmap, PR 68988). This function was originally a proper

libgo patch committed: always initialize str field in __go_string_slice result

2017-09-18 Thread Ian Lance Taylor
This patch to libgo alwayss initializes the str field in the result of __go_string_slice. Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed to mainline. Ian Index: gcc/go/gofrontend/MERGE === ---

Merge from trunk to gccgo branch

2017-09-18 Thread Ian Lance Taylor
I merged revision 252949 from trunk to the gccgo branch. Ian

Enable no-exec stacks for more targets using the Linux kernel

2017-09-18 Thread Joseph Myers
Building glibc for many different configurations and running the compilation parts of the testsuite runs into failures of the elf/check-execstack test for hppa, ia64 and microblaze. This fails because those configurations are not generating .note.GNU-stack sections to indicate that programs do

Re: [PATCH,rs6000] Replace swap of a loaded vector constant with load of a swapped vector constant

2017-09-18 Thread Segher Boessenkool
Hi Kelvin, On Fri, Sep 15, 2017 at 03:04:52PM -0600, Kelvin Nilsen wrote: > On Power8 little endian, two instructions are needed to load from the > natural in-memory representation of a vector into a vector register: a > load followed by a swap. When the vector value to be loaded is a >

Re: [PATCH] detect incompatible aliases (PR c/81854)

2017-09-18 Thread Joseph Myers
On Mon, 18 Sep 2017, Martin Sebor wrote: > It's meant as an escape hatch. It allows declaring compatibility > symbols, for example by the libstdc++ _GLIBCXX_3_4_SYMVER macro > defined in libstdc++-v3/src/c++98/compatibility.cc. The macro is > used to declare compatibility functions of all sorts

Re: [gotools] Fix some gotools testing problems

2017-09-18 Thread Ian Lance Taylor via gcc-patches
On Tue, Sep 12, 2017 at 6:18 AM, Rainer Orth wrote: > > A couple of gotools test FAIL on Solaris, and there are several issues > that make investigation particularly tedious. > > * The one invocation of gotest doesn't support passing additional flags > (--keep in

Re: [PATCH] detect incompatible aliases (PR c/81854)

2017-09-18 Thread Martin Sebor
On 09/12/2017 10:17 AM, Joseph Myers wrote: On Thu, 17 Aug 2017, Martin Sebor wrote: + || (prototype_p (t1) + && prototype_p (t2) + && !types_compatible_p (t1, t2 Why the restriction to prototyped types? I'd expect a warning for an

Re: [PATCH] PR target/80556

2017-09-18 Thread Simon Wright
On 18 Sep 2017, at 21:09, Iain Sandoe wrote: > > Hi Simon, > >> On 29 Jun 2017, at 21:41, Simon Wright wrote: >> >> On 28 Jun 2017, at 18:40, Jeff Law wrote: >>> >>> On 06/09/2017 07:57 AM, Simon Wright wrote: 2017-06-09

Re: [PATCH v2, middle-end]: Introduce memory_blockage named insn pattern

2017-09-18 Thread Uros Bizjak
On Tue, Sep 5, 2017 at 3:50 PM, Uros Bizjak wrote: > Revised patch, incorporates fixes from Alexander's review comments. > > I removed some implementation details from Alexander's description of > memory_blockage named pattern. > > > 2017-09-05 Uros Bizjak

Re: [PATCH] PR target/80556

2017-09-18 Thread Iain Sandoe
Hi Simon, > On 29 Jun 2017, at 21:41, Simon Wright wrote: > > On 28 Jun 2017, at 18:40, Jeff Law wrote: >> >> On 06/09/2017 07:57 AM, Simon Wright wrote: >>> 2017-06-09 Simon Wright >>> >>> PR target/80556 >>> *

Re: [Ada] Validity check failure with packed array and pragma

2017-09-18 Thread Eric Botcazou
> That’s right, will do, thank you! Do I need to create a new ChangeLog > entry in gcc/testsuite/ or is it fine if I just keep the current “New > testcase.”? I'm not sure anyone really cares so it's up to you I'd say. -- Eric Botcazou

Re: [PATCH] PR libstdc++/81468 constrain std::chrono::time_point constructor

2017-09-18 Thread Jonathan Wakely
On 13/09/17 21:30 -0400, Tim Song wrote: On Wed, Sep 13, 2017 at 10:55 AM, Jonathan Wakely wrote: +// DR 1177 +static_assert(is_constructible{}, +"can convert duration with one floating point rep to another");

demangler output format question

2017-09-18 Thread Nathan Sidwell
I discovered a bug in my fix for 82195, but it leads me towards a design question whose answer is not obvious to me the simplest testcase is: void Foo () { // _ZZ3FoovENKUlT_E_clIiEEfS_ [](auto) ->float { struct Local { // _ZZZ3FoovENKUlT_E_clIiEEfS_EN5Local2fnEv static

Re: [PATCH] Fix PR82220

2017-09-18 Thread Richard Sandiford
Richard Biener writes: > The following is said to fix a 482.sphinx3 regression. > > Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. > > Richard. > > 2017-09-18 Richard Biener > > PR tree-optimization/82220 > * tree-vect-loop.c

Re: [PATCH][aarch64] Fix error calls in aarch64 code so they can be tranlated

2017-09-18 Thread Martin Sebor
On 09/18/2017 12:26 PM, Steve Ellcey wrote: This patch is for PR target/79868, where some aarch64 diagnostics are said to be not translatable due to how they are implemented. See the bug report for more details on why the current setup of passing the string 'pragma' or 'attribute' doesn't work.

Re: [PATCH][x86] Knights Mill -march/-mtune options

2017-09-18 Thread Uros Bizjak
On Mon, Sep 18, 2017 at 12:42 PM, Peryt, Sebastian wrote: >> -Original Message- >> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- >> ow...@gcc.gnu.org] On Behalf Of Uros Bizjak >> Sent: Monday, September 18, 2017 12:23 PM >> To: Peryt, Sebastian

Re: [PR target/25512] Optimize certain equality tests on m68k

2017-09-18 Thread Andreas Schwab
I have checked in this patch to fix PR target/81613. Andreas. PR target/81613 * config/m68k/m68k.md (moveq feeding equality comparison): Check that the registers are different. --- gcc/config/m68k/m68k.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff

[PATCH, i386]: Add missing M_AMDFAM17H CPU type to fold_builtin_cpu

2017-09-18 Thread Uros Bizjak
We have to synchronize fold_builtin_cpu with libgcc. 2017-09-18 Uros Bizjak * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H to processor_model and "amdfam17h" to arch_names_table. * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.

[committed] Add @findex for __builtin_shuffle (PR c/82234)

2017-09-18 Thread Jakub Jelinek
Hi! Our docs were missing @findex entry for __builtin_shuffle, added thusly, tested on x86_64-linux, committed to trunk. 2017-09-18 Jakub Jelinek PR c/82234 * doc/extend.texi: Add @findex entry for __builtin_shuffle. --- gcc/doc/extend.texi.jj

[C++ PATCH] Add a testcase for -std=c++1z

2017-09-18 Thread Jakub Jelinek
Hi! On Fri, Sep 15, 2017 at 12:08:07PM -0400, Nathan Sidwell wrote: > On 09/14/2017 04:26 PM, Jakub Jelinek wrote: > > Hi! > > > > Given https://herbsutter.com/2017/09/06/c17-is-formally-approved/ > > this patch makes -std=c++17 and -std=gnu++17 the documented options > > and -std=c++1z and

Re: [PATCH, rs6000 version 3] Add support for vec_xst_len_r() and vec_xl_len_r() builtins

2017-09-18 Thread Carl Love
GCC maintianers: Addressed the comments from Segher about copying operands in define_expand lxvll and stxvll. Added new temp for the output of the sldi instructions to give the allocator the freedom to select the registers. Removed constraints in the expanders. Cleaned up issues left over from

[PATCH][aarch64] Fix error calls in aarch64 code so they can be tranlated

2017-09-18 Thread Steve Ellcey
This patch is for PR target/79868, where some aarch64 diagnostics are said to be not translatable due to how they are implemented.  See the bug report for more details on why the current setup of passing the string 'pragma' or 'attribute' doesn't work. This patch fixes it, unfortunately by

Re: [Patch, Fortran] PR 82143: add a -fdefault-real-16 flag

2017-09-18 Thread Janus Weil
2017-09-18 11:31 GMT+02:00 Dominique d'Humières : > (1) real(16) is an order of magnitude slower than real(8) for the codes I > have tested (a long time ago). So its real utility is quite low. I am fully aware that performance with quad-precision is lower than with double

Re: [libstdc++/71500] make back reference work with icase

2017-09-18 Thread Tim Shen via gcc-patches
On Mon, Sep 18, 2017 at 10:26 AM, Jonathan Wakely wrote: >> We need to rewrite this to check the lengths are equal first, and then >> call the 3-argument version of std::equal. >> >> Alternatively, we could move the implementation of the C++14 >> std::equal overloads to

Re: [Patch, Fortran] PR 82143: add a -fdefault-real-16 flag

2017-09-18 Thread Janus Weil
2017-09-18 16:08 GMT+02:00 Steve Kargl : > On Mon, Sep 18, 2017 at 09:02:22AM +0200, Janus Weil wrote: >> Hi Steve, >> >> >> attached is a (technically) simple patch that implements the compiler >> >> flag "-fdefault-real-16" for gfortran. >> > >> > What about

Re: [PATCH 1/2] (header usage fix) remove unused system header includes

2017-09-18 Thread Mike Stump
I was hoping an RM would approve this as it seems just a hair beyond a normal darwin approval. I'm fine with this, and it does help darwin. Other ports should not care. On Sep 18, 2017, at 10:30 AM, Jack Howarth wrote: > > Pinging for the final gcc 5.5 release. >

Re: [PATCH 0/2] backport c++ header fixes to gcc-5-branch

2017-09-18 Thread Mike Stump
I was hoping an RM would approve this as it seems just a hair beyond a normal darwin approval. I'm fine with this, and it does help darwin. Other ports should not care. On Sep 18, 2017, at 10:31 AM, Jack Howarth wrote: > > Pinging for the final gcc 5.5 release. >

C++ PATCH for c++/82069, ICE with lambda in template

2017-09-18 Thread Jason Merrill
The code that avoids all implicit capture in template contexts got confused by fold_non_dependent_expr, which temporarily clears processing_template_decl. Fixed by using uses_template_parms instead, which does not depend on the current value of processing_template_decl. Tested

Re: [PATCH 0/2] backport c++ header fixes to gcc-5-branch

2017-09-18 Thread Jack Howarth
Pinging for the final gcc 5.5 release. On Mon, Aug 7, 2017 at 1:12 AM, Ryan Mounce wrote: > Fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81037 > > Bootstrap now succeeds using Xcode 9 toolchain. > > Tested on macOS 10.13 beta, however same issue reported on macOS 10.12

Re: [PATCH 1/2] (header usage fix) remove unused system header includes

2017-09-18 Thread Jack Howarth
Pinging for the final gcc 5.5 release. On Mon, Aug 7, 2017 at 1:12 AM, Ryan Mounce wrote: > 2017-08-05 Ryan Mounce > > cherry picked from trunk r235361 > 2016-04-22 Szabolcs Nagy > > * auto-profile.c:

Re: [libstdc++/71500] make back reference work with icase

2017-09-18 Thread Jonathan Wakely
On 15/09/17 16:39 +0100, Jonathan Wakely wrote: On 04/09/17 03:31 -0700, Tim Shen via libstdc++ wrote: This fixes the follow-up comments in 71500. Back-reference matching is different from other matching, as the content the back-reference refers to is at "run-time", aka during regex_match(),

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 - V3

2017-09-18 Thread Jeff Law
On 09/18/2017 10:09 AM, Andreas Schwab wrote: > On Sep 18 2017, Jeff Law wrote: > >> Can you confirm if the probe was in the red zone vs the live areas on >> the stack? > > It overwrites a nearby variable. sp + 8 happens to be the address of > file_entries_new_size. > >

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 - V3

2017-09-18 Thread Jeff Law
On 09/18/2017 10:09 AM, Andreas Schwab wrote: > On Sep 18 2017, Jeff Law wrote: > >> Can you confirm if the probe was in the red zone vs the live areas on >> the stack? > > It overwrites a nearby variable. sp + 8 happens to be the address of > file_entries_new_size. > >

[AArch64] PR71307: Define union class of POINTER+FP

2017-09-18 Thread Richard Sandiford
ALL_REGS doesn't function as a union class of POINTER_REGS and FP_REGS since it includes the CC register as well. REGNO_REG_CLASS (CC_REGNUM) is NO_REGS, but of course NO_REGS rightly doesn't include CC_REGNUM. Adding a union class for POINTER+FP allows the RA to use it as the preferred or

Ping for some "make more use of ..." patches

2017-09-18 Thread Richard Sandiford
Ping for some minor cleanups that help with the move to variable-length modes. Segher has approved the combine.c parts (thanks). https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01339.html Make more use of HWI_COMPUTABLE_MODE_P https://gcc.gnu.org/ml/gcc-patches/2017-08/msg01452.html Make more use

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 - V3

2017-09-18 Thread Andreas Schwab
On Sep 18 2017, Jeff Law wrote: > Can you confirm if the probe was in the red zone vs the live areas on > the stack? It overwrites a nearby variable. sp + 8 happens to be the address of file_entries_new_size. 0x000140e8 <+1172>: mov r6, sp 0x000140ec <+1176>: add

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 - V3

2017-09-18 Thread Jeff Law
On 09/18/2017 03:29 AM, Andreas Schwab wrote: > On Jul 30 2017, Jeff Law wrote: > >> This patch introduces generic mechanisms to protect the dynamically >> allocated stack space against stack-clash attacks. >> >> Changes since V2: >> >> Dynamic allocations can be emitted as

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 - V3

2017-09-18 Thread Jeff Law
On 09/18/2017 03:29 AM, Andreas Schwab wrote: > On Jul 30 2017, Jeff Law wrote: > >> This patch introduces generic mechanisms to protect the dynamically >> allocated stack space against stack-clash attacks. >> >> Changes since V2: >> >> Dynamic allocations can be emitted as

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 - V3

2017-09-18 Thread Joseph Myers
On Mon, 18 Sep 2017, Andreas Schwab wrote: > Does that work correctly when the VLA is smaller than the probe size > (word_mode by default)? I see a failure in glibc on armv7 where > ldconfig is using a zero-size VLA, which is invalid in C, but it could > also end up using a VLA of size 1. FWIW,

Re: [PATCH] [i386, libgcc] PR 82196 -mcall-ms2sysv-xlogues emits wrong AVX/SSE MOV

2017-09-18 Thread Dominique d'Humières
This patch (r252896) breaks bootstrap on x86_64-apple-darwin10 configured with ../work/configure --prefix=/opt/gcc/gcc8w --enable-languages=c,c++,fortran,objc,obj-c++,ada,lto --with-gmp=/opt/mp-new --with-system-zlib --with-isl=/opt/mp-new --enable-lto --enable-plugin

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 - V3

2017-09-18 Thread Jeff Law
On 09/18/2017 03:29 AM, Andreas Schwab wrote: > On Jul 30 2017, Jeff Law wrote: > >> This patch introduces generic mechanisms to protect the dynamically >> allocated stack space against stack-clash attacks. >> >> Changes since V2: >> >> Dynamic allocations can be emitted as

Re: [Patch, Fortran] PR 82143: add a -fdefault-real-16 flag

2017-09-18 Thread Steve Kargl
On Mon, Sep 18, 2017 at 09:02:22AM +0200, Janus Weil wrote: > Hi Steve, > > >> attached is a (technically) simple patch that implements the compiler > >> flag "-fdefault-real-16" for gfortran. > > > > What about -fdefault-real-10? If you're going to add bloat to the > > compiler, then you might

Re: Let the target choose a vectorisation alignment

2017-09-18 Thread Richard Sandiford
Richard Biener writes: > On Mon, Sep 18, 2017 at 1:58 PM, Richard Sandiford > wrote: >> The vectoriser aligned vectors to TYPE_ALIGN unconditionally, although >> there was also a hard-coded assumption that this was equal to the type >>

RE: [PATCH] [ARC] Check the assembler for gdwarf2 support.

2017-09-18 Thread Claudiu Zissulescu
> > gcc/ > > 2017-06-21 Claudiu Zissulescu > > > > * configure.ac: Add arc and check if assembler supports gdwarf2. > > * configure: Regenerate. > OK. > jeff Committed. Thank you for your review, Claudiu

Re: [AArch64] Tweak aarch64_classify_address interface

2017-09-18 Thread Richard Sandiford
Richard Sandiford writes: > James Greenhalgh writes: >> On Tue, Aug 22, 2017 at 10:23:47AM +0100, Richard Sandiford wrote: >>> Previously aarch64_classify_address used an rtx code to distinguish >>> LDP/STP addresses from normal addresses;

Re: Let the target choose a vectorisation alignment

2017-09-18 Thread Richard Biener
On Mon, Sep 18, 2017 at 1:58 PM, Richard Sandiford wrote: > The vectoriser aligned vectors to TYPE_ALIGN unconditionally, although > there was also a hard-coded assumption that this was equal to the type > size. This was inconvenient for SVE for two reasons: > > -

[PATCH][GRAPHITE] Fix PR69728

2017-09-18 Thread Richard Biener
The following fixes the (old) ICE in outer_projection_mupa we now run into with SPEC CPU 2006 as well. As I don't understand what the code does or how it should behave when the scheduling domain is empty the following simply adds a way to indicate failure when we'd previously ICE. Bootstrap and

Re: Backport fix: [PATCH] Fix target attribute handling (PR c++/81355).

2017-09-18 Thread Jakub Jelinek
On Mon, Sep 18, 2017 at 03:01:53PM +0200, Martin Liška wrote: > As discussed here: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81224 > > We have fallout caused by the patch and it's backport to active branches. > I'm planning to revert the patch and install patch that will ignore empty >

[PATCH][GRAPHITE] Another SCOP verification goof

2017-09-18 Thread Richard Biener
The following enables another 35% more loop nest optimizations on SPEC CPU 2006. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied to trunk. Richard. 2017-09-18 Richard Biener * graphite-scop-detection.c (scop_detection::can_represent_loop): Do

Backport fix: [PATCH] Fix target attribute handling (PR c++/81355).

2017-09-18 Thread Martin Liška
Hello. As discussed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81224 We have fallout caused by the patch and it's backport to active branches. I'm planning to revert the patch and install patch that will ignore empty string values. I'm testing the patch. Jakub do we really want it also

[PATCH] Use built-in for std::make_integer_sequnce

2017-09-18 Thread Jonathan Wakely
I forgot to commit this patch at the start of stage 1 when Jason added the __integer_pack builtin. This patch uses __has_builtin to detect Clang's __make_integer_seq builtin and uses that instead when available. This means it works with either __integer_pack or __make_integer_seq. whichever is

Let the target choose a vectorisation alignment

2017-09-18 Thread Richard Sandiford
The vectoriser aligned vectors to TYPE_ALIGN unconditionally, although there was also a hard-coded assumption that this was equal to the type size. This was inconvenient for SVE for two reasons: - When compiling for a specific power-of-2 SVE vector length, we might want to align to a full

[PATCH] PR libstdc++/71187 reimplement declval without add_rvalue_reference

2017-09-18 Thread Jonathan Wakely
This implements Eric Niebler's suggestion of a more lightweight std::declval, which doesn't need to instantiate std::add_rvalue_reference (and its base class and helpers). PR libstdc++/71187 * include/std/type_traits (__declval): New function to deduce return type of

Prevent invalid register mode changes in combine

2017-09-18 Thread Richard Sandiford
This patch stops combine from changing the mode of an existing register in-place if doing so would change the size of the underlying register allocation size, as given by REGMODE_NATURAL_SIZE. Without this, many tests fail in adjust_reg_mode after SVE is added. One example is

Re: [PATCH] Bump downloaded ISL version to 0.18

2017-09-18 Thread Markus Trippelsdorf
On 2017.09.18 at 09:41 +0200, Richard Biener wrote: > > Committed. > > Richard. > > 2017-09-18 Richard Biener > > * download_prerequisites (isl): Bump version to 0.18. > > Index: contrib/download_prerequisites >

Base subreg rules on REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD

2017-09-18 Thread Richard Sandiford
Originally subregs operated at the word level and subreg offsets were measured in words. The offset units were later changed from words to bytes (SUBREG_WORD became SUBREG_BYTE), but the fundamental assumption that subregs should operate at the word level remained. Whether (subreg:M1 (reg:M2 R2)

RE: [PATCH][x86] Knights Mill -march/-mtune options

2017-09-18 Thread Peryt, Sebastian
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Uros Bizjak > Sent: Monday, September 18, 2017 12:23 PM > To: Peryt, Sebastian > Cc: gcc-patches@gcc.gnu.org; Kirill Yukhin

Re: [PATCH][x86] Knights Mill -march/-mtune options

2017-09-18 Thread Uros Bizjak
On Mon, Sep 18, 2017 at 12:17 PM, Peryt, Sebastian wrote: >> -Original Message- >> From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- >> ow...@gcc.gnu.org] On Behalf Of Uros Bizjak >> Sent: Sunday, September 17, 2017 6:14 PM >> To: Peryt, Sebastian

Re: [Ada] Validity check failure with packed array and pragma

2017-09-18 Thread Pierre-Marie de Rodat
On 09/18/2017 12:02 PM, Eric Botcazou wrote: You don't need this, just use: -- { dg-options "-O -gnatn -gnatVa -gnatws" } The -cargs/-margs trick is only needed for special switches like -dA. That’s right, will do, thank you! Do I need to create a new ChangeLog entry in gcc/testsuite/ or

RE: [PATCH][x86] Knights Mill -march/-mtune options

2017-09-18 Thread Peryt, Sebastian
> -Original Message- > From: gcc-patches-ow...@gcc.gnu.org [mailto:gcc-patches- > ow...@gcc.gnu.org] On Behalf Of Uros Bizjak > Sent: Sunday, September 17, 2017 6:14 PM > To: Peryt, Sebastian > Cc: gcc-patches@gcc.gnu.org; Kirill Yukhin

Re: 0006-Part-6.-Add-x86-tests-for-Intel-CET-implementation

2017-09-18 Thread Uros Bizjak
Hello! > gcc/testsuite/ > > * g++.dg/cet-notrack-1.C: New test. > * gcc.target/i386/cet-intrin-1.c: Likewise. > * gcc.target/i386/cet-intrin-10.c: Likewise. > * gcc.target/i386/cet-intrin-2.c: Likewise. > * gcc.target/i386/cet-intrin-3.c: Likewise. > * gcc.target/i386/cet-intrin-4.c: Likewise. >

Re: Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-18 Thread Wilco Dijkstra
Richard Sandiford wrote: > I don't think it's literally always.  Testing the inputs instead of a > multi-use result tends to mean that all three are live at once.  If the > == 0 condition is only one component of a more complex condition that > relies on the result of division regardless, then

Re: Transform (x / y) != 0 to x >=y and (x / y) == 0 to x < y if x, y are unsigned

2017-09-18 Thread Prathamesh Kulkarni
On 15 September 2017 at 22:09, Marc Glisse wrote: > On Fri, 15 Sep 2017, Wilco Dijkstra wrote: > >> Marc Glisse wrote: >> >>> The question is whether, having computed c=a/b, it is cheaper to test a>> or c!=0. >>> I think it is usually the second one, but not for all types on

[PATCH] Fix PR82220

2017-09-18 Thread Richard Biener
The following is said to fix a 482.sphinx3 regression. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2017-09-18 Richard Biener PR tree-optimization/82220 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude

Re: [Ada] Validity check failure with packed array and pragma

2017-09-18 Thread Eric Botcazou
> 2017-09-18 Bob Duff > > * gnat.dg/validity_check.adb: New testcase. +-- { dg-options "-cargs -O -gnatn -gnatVa -gnatws -margs" } You don't need this, just use: -- { dg-options "-O -gnatn -gnatVa -gnatws" } The -cargs/-margs trick is only needed for special

Re: 0004-Part-4.-Update-x86-backend-to-enable-Intel-CET

2017-09-18 Thread Uros Bizjak
Hello! > gcc/ > > * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New. > (OPTION_MASK_ISA_SHSTK_SET): Likewise. > (OPTION_MASK_ISA_IBT_UNSET): Likewise. > (OPTION_MASK_ISA_SHSTK_UNSET): Likewise. > (ix86_handle_option): Add -mibt, -mshstk, -mcet handling. > * config.gcc

[Ada] Fix spurious error on component of overloaded function result

2017-09-18 Thread Pierre-Marie de Rodat
This fixes a weird error given by the compiler on an access attribute applied to the component of the result of a function call, if the called function returns an access type designating a record containing the component declared as aliased, and is overloaded with another function returning

[Ada] Spurious error with unqualified aggregate in instantiation.

2017-09-18 Thread Pierre-Marie de Rodat
When an aggregate appears without an explicit qualification in a generic unit, the compiler builds a qualified expression for it, using the type of the aggregate and when possible the scope of that type, so that both of these entities are properly resolved in an instantiation. This patch verifies

[Ada] Spurious error in ASIS on static predicate aspects/

2017-09-18 Thread Pierre-Marie de Rodat
This patch fixes an error in ASIS mode when processing queries on a static predicate for an enumeration type that involves a case expression. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-18 Ed Schonberg * sem_ch3.adb (Analyze_Declarations): In

[Ada] Ravenscar simple barriers and validity checks

2017-09-18 Thread Pierre-Marie de Rodat
If validity checks are enabled in Ravenscar mode, avoid incorrect error messages complaining that simple barriers are not simple. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-18 Bob Duff * exp_ch9.adb (Is_Simple_Barrier_Name): Follow Original_Node, in

[Ada] Undefined symbol due to pragma Inline_Always

2017-09-18 Thread Pierre-Marie de Rodat
This patch modifies the semantics of pragma Inline_Always to require that the pragma appears on the initial declaration of the related subprogram. This rule ensures that the back end will properly carry out the "always" semantic of the pragma, regardless of whether a call to the related subprogram

[Ada] Validity check failure with packed array and pragma

2017-09-18 Thread Pierre-Marie de Rodat
Fix a bug in which if validity checking is enabled, Initialize_Scalars is enabled, optimization is turned on, and inlining is enabled, the initialization of a packed array can cause Constraint_Error to be incorrectly raised. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ 2017-09-18

[Ada] Iterable aspect of derived types

2017-09-18 Thread Pierre-Marie de Rodat
This patch avoids incorrect compilation errors if a derived type has a parent type for which the Iterable aspect is specified, and a "for ... of" loop is used on an object of the derived type. The following test should compile quietly. gcc -c seqs-main.adb package Seqs is type Container is

[Ada] Implicit_Dereference with access to access and prefix notation

2017-09-18 Thread Pierre-Marie de Rodat
Fix a bug in which a call of the form X.Y (the prefix notation of Y(X)) where X is of a reference type (i.e. a type with the Implicit_Dereference aspect specified), and the access discriminant of X has a designated type that is also an access type, incorrectly gets compilation errors. Tested on

Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra

2017-09-18 Thread Dominique d'Humières
As said in bugzilla, I am against this change. If you want to use -Wconversion-extra, just add it to your favorite options. -Wconversion-extra is extremely noisy and -Wextra has been stable for some years. IMO we cannot afford to have people complaining about the change. If you really want a

Re: [PATCH, i386] Enable option -mprefer-avx256 added for Intel AVX512 configuration

2017-09-18 Thread Uros Bizjak
On Thu, Sep 14, 2017 at 2:10 PM, Shalnov, Sergey wrote: > Hi, > GCC has the option "mprefer-avx128" to use 128-bit AVX registers instead of > 256-bit AVX registers in the auto-vectorizer. > This patch enables the command line option "mprefer-avx256" that reduces >

Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra

2017-09-18 Thread Janus Weil
> As a sidenote, I made an observation that is not directly related to > the patch: The second warning in the test case, on "i4 = i8" shows > [-Wconversion] when compiled with -Wall, but [-Wconversion-extra] when > compiled with -Wextra. Does anyone understand how that inconsistency > comes about?

Re: [Patch, Fortran] PR 82143: add a -fdefault-real-16 flag

2017-09-18 Thread Dominique d'Humières
As said in bugzilla (1) real(16) is an order of magnitude slower than real(8) for the codes I have tested (a long time ago). So its real utility is quite low. (2) I think your time would be better used by dealing with your assigned PRs. But now the wasted time is done, I don’t have further

Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra

2017-09-18 Thread Janus Weil
Hi Thomas, >> here is a small patch that enables -Wconversion-extra with -Wextra and >> updates the documentation. > > I grepped for warn_conversion_extra and found 14 occurrences in the > gfortran source tree. > > Are we sure we want to enable each of these warnings with -Wextra? I'd say: Yes,

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 02/08 - V3

2017-09-18 Thread Andreas Schwab
On Jul 30 2017, Jeff Law wrote: > This patch introduces generic mechanisms to protect the dynamically > allocated stack space against stack-clash attacks. > > Changes since V2: > > Dynamic allocations can be emitted as unrolled inlined probes or with a > rotated loop. Blockage

Re: [PATCH] Better fix for the x86_64 -mcmodel=large ICEs (PR target/82145)

2017-09-18 Thread Uros Bizjak
On Sun, Sep 17, 2017 at 7:27 PM, Jakub Jelinek wrote: > On Sun, Sep 17, 2017 at 05:47:11PM +0200, Uros Bizjak wrote: >> > The postreload change is ok. >> >> The revert is OK even without approval. I see. The patch is also OK. Thanks, Uros. > Well, it isn't a pure reversion,

[Ada] Scalar_Storage_Order support in conjunction with overlay

2017-09-18 Thread Pierre-Marie de Rodat
Toggling the scalar storage order by means of type punning or aliasing is not supported in the general case, but it might be reasonable to support simple overlays precisely used to test the effect of the attribute. The following procedure must give the same output at all optimization levels:

Re: Backports for GCC 6 branch

2017-09-18 Thread Martin Liška
On 09/16/2017 12:11 PM, Eric Botcazou wrote: >> One more that I've just tested. > > On which platform? Here's what I have on x86_64-suse-linux: > > FAIL: gcc.dg/asan/pr81224.c -O0 (internal compiler error) > FAIL: gcc.dg/asan/pr81224.c -O0 (test for excess errors) > FAIL:

[Ada] Crash on mutable record component with box initialization

2017-09-18 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on a record declaration that includes a mutable record component whose default value is an aggregate that includes a box-initialized component whose value depends on a discriminant of the component. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/

[Ada] Crash on illegal current instance

2017-09-18 Thread Pierre-Marie de Rodat
If the type_mark of a qualified_expression refers to the current instance of the type, do not crash; instead give a proper error message. This is illegal by RM-8.6(17). The following test should get an error: current_instance_default.ads:2:54: current instance not allowed package

[RFC][PATCH] ipa: fix dumping with deleted multiversioning nodes

2017-09-18 Thread Evgeny Kudryashov
Hello, The code below causes an internal compiler error in cc1plus (trunk on x86-64) if it is compiled with -fdump-ipa-cgraph. int foo () __attribute__ ((target ("default"))); int foo () __attribute__ ((target ("sse4.2"))); __attribute__ ((target ("sse4.2"))) int foo () { return 1; } The

[Ada] Spurious unreferenced warning in pramga Linker_Section

2017-09-18 Thread Pierre-Marie de Rodat
This patch corrects an issue whereby actuals within the aspect/pragma Linker_Section were incorrectly flagged as unreferenced causing spurious warnings when compiling with -gnatwu. Pramga_Linker_Section is now correctly classified within the Sig_Flags table as significant correcting this behavior.

[Ada][PR ada/71358] GNAT.Command_Line: crash in Getopt on empty Config

2017-09-18 Thread Pierre-Marie de Rodat
This patch revisits the fix for a bug in GNAT.Command_Line.Getopt: instead of checking everywhere that an pointer is not null, we allocate a dummy object and remove all null pointer checks. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-18 Bob Duff

[Ada] Allow generic package holding state

2017-09-18 Thread Pierre-Marie de Rodat
SPARK RM 7.2.6(5) allows the hidden state of a generic package to be Part_Of the state of the generic package. This was not properly supported. Now fixed. The following code compiles without errors. $ gcc -c gen.ads 1. generic 2. J : Integer; 3. package Gen with 4. SPARK_Mode => On,

Re: [patch] Fix PR target/81361

2017-09-18 Thread Jakub Jelinek
On Mon, Sep 18, 2017 at 09:50:45AM +0200, Eric Botcazou wrote: > .set L$set$24,LEFDE3-LASFDE3 > .long L$set$24 # FDE Length > LASFDE3: > .long LASFDE3-EH_frame1 # FDE CIE offset > .quad LCOLDB1-. # FDE initial location > .set L$set$25,LCOLDE1-LCOLDB1 >

[patch] Fix PR target/81361

2017-09-18 Thread Eric Botcazou
Hi, exception handling is currently broken in all languages for Darwin at -O2 on the mainline because of what appears to be a bug in either the assembler or the system unwinder. The problem occurs when the compiler decides to split a function into hot & cold parts and the cold part is active

Re: [RFC][PATCH 1/5] Add separate parms for rtl unroller

2017-09-18 Thread Richard Biener
On Mon, Sep 18, 2017 at 3:36 AM, Kugan Vivekanandarajah wrote: > Hi Richard, > > On 15 September 2017 at 19:31, Richard Biener > wrote: >> On Fri, Sep 15, 2017 at 3:27 AM, Kugan Vivekanandarajah >>

[PATCH] Bump downloaded ISL version to 0.18

2017-09-18 Thread Richard Biener
Committed. Richard. 2017-09-18 Richard Biener * download_prerequisites (isl): Bump version to 0.18. Index: contrib/download_prerequisites === --- contrib/download_prerequisites (revision 252906)

[PATCH][GRAPHITE] Enhance handled data-refs

2017-09-18 Thread Richard Biener
The following removes odd restrictions from data-ref handling, resulting in 15% more optimized loop nests in SPEC CPU 2006. We're now also running into existing PRs when building 481.wrf, I'll have a second look into the respective PRs as a followup. Bootstrapped and tested on

  1   2   >