Re: [PATCH] warn on returning alloca and VLA (PR 71924, 90549)

2019-07-10 Thread Martin Sebor
On 7/2/19 2:59 PM, Jeff Law wrote: On 6/30/19 3:50 PM, Martin Sebor wrote: On 6/26/19 6:11 PM, Jeff Law wrote: [ Another big snip ] Is there a strong need for an overloaded operator?  Our guidelines generally discourage operator overloads.  This one seems on the border to me.  Others may 

Re: [PATCH] integrate sprintf pass into strlen (PR 83431)

2019-07-10 Thread Martin Sebor
On 7/2/19 4:38 PM, Jeff Law wrote: On 7/1/19 7:47 PM, Martin Sebor wrote: Attached is a more complete solution that fully resolves the bug report by avoiding a warning in cases like:   char a[32], b[8];   void f (void)   { if (strlen (a) < sizeof b - 2)   snprintf (b, sizeof b, 

[wwwdocs] gcc-4.7/changes.html - adjust link to "Collecting User-Mode Dumps"

2019-07-10 Thread Gerald Pfeifer
Applied. Gerald Index: changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-4.7/changes.html,v retrieving revision 1.154 diff -u -r1.154 changes.html --- changes.html11 Dec 2018 04:03:15 - 1.154 +++ changes.html

Re: [PATCH] integrate sprintf pass into strlen (PR 83431)

2019-07-10 Thread Martin Sebor
On 7/2/19 3:59 AM, Richard Biener wrote: On Tue, Jul 2, 2019 at 3:48 AM Martin Sebor wrote: Attached is a more complete solution that fully resolves the bug report by avoiding a warning in cases like: char a[32], b[8]; void f (void) { if (strlen (a) < sizeof b - 2)

[PATCH], PowerPC, Patch #6, revision 2, Create pc-relative addressing insns

2019-07-10 Thread Michael Meissner
Here is the revision of patch #6. Changes from the previous version of the patch: 1) I provided separate get_TOC_alias_set and get_pc_relative_alias_set functions, and changed all of the places that had been changed to call get_data_alias_set to revert to calling get_TOC_alias_set. 2) I added

[patch] Small improvements to coverage info (4/n)

2019-07-10 Thread Eric Botcazou
Hi, the returns are a little problematic for coverage info because they are commonalized in GIMPLE, i.e. turned into gotos to a representative return. This means that you need to clear the location of the representative return, see lower_gimple_return: /* Remove the line number from

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Gaius Mulley
Matthias Klose writes: > I don't know about a best solution, but I contributed changes to > DRUNTIME_LIBRARIES_ZLIB in libphobos/m4/druntime/libraries.m4 and > gcc/doc/install.texi (--with-target-system-zlib). > > Or you look at libffi/libgo, with libgo always linking the convenience libffi >

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Gaius Mulley
Matthias Klose writes: >>> - The internal tools in the gcclibdir are installed twice, with >>>both vanilla names and prefixed/suffixed names. >>> The installed tree: >>> >>> ./usr/bin >>> ./usr/bin/x86_64-linux-gnu-gm2-9 >>> ./usr/bin/x86_64-linux-gnu-gm2m-9 >>>

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Gaius Mulley
Matthias Klose writes: > In both gcc/gm2 and libgm2, there are explicit calls to make, which probably > should bre replaced by $(MAKE). thanks - now fixed in 9.1.0 and master regards, Gaius

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Matthias Klose
On 10.07.19 22:07, Gaius Mulley wrote: > Matthias Klose writes: > >> On 09.07.19 23:30, Matthias Klose wrote: >>> On 09.07.19 21:48, Gaius Mulley wrote: Matthias Klose writes: >> - libpth.{a,so} is installed in the system libdir, which >>conflicts with the installation of

Re: PR90723

2019-07-10 Thread Richard Sandiford
Prathamesh Kulkarni writes: > Hi, > For following test-case: > > typedef double v4df __attribute__ ((vector_size (32))); > void foo(v4df); > > int > main () > { > volatile v4df x1; > x1 = (v4df) { 10.0, 20.0, 30.0, 40.0 }; > foo (x1); > return 0; > } > > Compiling with

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Gaius Mulley
Matthias Klose writes: > On 09.07.19 23:30, Matthias Klose wrote: >> On 09.07.19 21:48, Gaius Mulley wrote: >>> Matthias Klose writes: >>> > - libpth.{a,so} is installed in the system libdir, which >conflicts with the installation of the libpth packages >on most distros.

[Darwin, PPC, committed] Collate the system library spec into one expression.

2019-07-10 Thread Iain Sandoe
There's no need to redefine this dependent on the target header (that only works in the case that we have self-hosting which is less and less likely for the older system versions). Actually, what we need is for the correct library set to be used based on the SDK(s) that can target the chosen

Re: [PATCH] Add hints for slim dumping if fallthrough bb of jump isn't next bb

2019-07-10 Thread Richard Sandiford
"Kewen.Lin" writes: > Hi all, > > 6: NOTE_INSN_BASIC_BLOCK 2 > >12: r135:CC=cmp(r122:DI,0) >13: pc={(r135:CC!=0)?L52:pc} > REG_DEAD r135:CC > REG_BR_PROB 1041558836 >31: L31: >17: NOTE_INSN_BASIC_BLOCK 3 > > The above RTL sequence is from pass doloop

Re: [PATCH] i386: Add AVX512 unaligned intrinsics

2019-07-10 Thread Uros Bizjak
On Wed, Jul 10, 2019 at 9:11 PM Sunil Pandey wrote: > > Thanks Uros. I incorporated suggested changes in attached patch. > > --Sunil Pandey > > i386: Add AVX512 unaligned intrinsics > > __m512i _mm512_loadu_epi32( void * sa); > __m512i _mm512_loadu_epi64( void * sa); > void

Re: [PATCH] i386: Add AVX512 unaligned intrinsics

2019-07-10 Thread Sunil Pandey
Thanks Uros. I incorporated suggested changes in attached patch. --Sunil Pandey i386: Add AVX512 unaligned intrinsics __m512i _mm512_loadu_epi32( void * sa); __m512i _mm512_loadu_epi64( void * sa); void _mm512_storeu_epi32(void * d, __m512i a); void _mm256_storeu_epi32(void

[PATCH, GCC, AArch64] Enable Transactional Memory Extension

2019-07-10 Thread Sudakshina Das
Hi This patch enables the new Transactional Memory Extension announced recently as part of Arm's new architecture technologies. We introduce a new optional extension "tme" to enable this. The following instructions are part of the extension: * tstart * ttest * tcommit *

Re: [PATCH], PowerPC, Patch #6, Create pc-relative addressing insns

2019-07-10 Thread Segher Boessenkool
On Wed, Jul 10, 2019 at 01:56:07PM -0400, Michael Meissner wrote: > On Wed, Jul 10, 2019 at 12:11:49PM -0500, Segher Boessenkool wrote: > > On Tue, Jul 09, 2019 at 06:30:00PM -0400, Michael Meissner wrote: > > > @@ -8760,12 +8762,34 @@ rs6000_cannot_force_const_mem (machine_m > > > static bool >

Re: [PATCH], PowerPC, Patch #7, Split up SIGNED_34BIT and SIGNED_16BIT macros

2019-07-10 Thread Segher Boessenkool
On Tue, Jul 09, 2019 at 07:46:26PM -0400, Michael Meissner wrote: > This patch splits up the macros SIGNED_16BIT_OFFSET_P and > SIGNED_34BIT_OFFSET_P > into two separate macros as you asked for previously in private mail. The > main > macros: > > SIGNED_16BIT_OFFSET_P >

Re: [wwwdocs] Introducing C++ DR status table

2019-07-10 Thread Marek Polacek
On Wed, Jul 10, 2019 at 02:20:24PM -0400, Nathan Sidwell wrote: > On 7/8/19 1:43 PM, Marek Polacek wrote: > > For a long time I wished we had a table documenting the status of C++ defect > > reports in the C++ FE, like clang has [1]. I finally got around to tackling > > this bad boy and created

Re: [wwwdocs] Introducing C++ DR status table

2019-07-10 Thread Nathan Sidwell
On 7/8/19 1:43 PM, Marek Polacek wrote: For a long time I wished we had a table documenting the status of C++ defect reports in the C++ FE, like clang has [1]. I finally got around to tackling this bad boy and created and will now commit the

Go patch committed: Finalize methods when importing types

2019-07-10 Thread Ian Lance Taylor
This patch to the Go frontend by Than McIntosh changes the compiler to be more aggressive about finalizing methods on imported types, to avoid problems with interface types that are imported but remain unreachable until a later stage in the compilation. The normal pattern prior to this change was

Go patch committed: Add break label in 1,2 case select statement lowering

2019-07-10 Thread Ian Lance Taylor
This patch by Cherry Zhang adds a break label when lowering a select statement with one or two cases. The earlier change https://golang.org/cl/184998 (https://gcc.gnu.org/ml/gcc-patches/2019-07/msg00322.html) added optimizations for one- and two-case select statements. But it didn't handle break

Re: [PATCH], PowerPC, Patch #6, Create pc-relative addressing insns

2019-07-10 Thread Michael Meissner
On Wed, Jul 10, 2019 at 12:11:49PM -0500, Segher Boessenkool wrote: > Hi Mike, > > On Tue, Jul 09, 2019 at 06:30:00PM -0400, Michael Meissner wrote: > > @@ -8760,12 +8762,34 @@ rs6000_cannot_force_const_mem (machine_m > > static bool > > use_toc_relative_ref (rtx sym, machine_mode mode) > > {

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Matthias Klose
On 09.07.19 23:30, Matthias Klose wrote: > On 09.07.19 21:48, Gaius Mulley wrote: >> Matthias Klose writes: >> - libpth.{a,so} is installed in the system libdir, which conflicts with the installation of the libpth packages on most distros. >>> >>> found out that a system

Re: [PATCH], PowerPC, Patch #6, Create pc-relative addressing insns

2019-07-10 Thread Segher Boessenkool
Hi Mike, On Tue, Jul 09, 2019 at 06:30:00PM -0400, Michael Meissner wrote: > @@ -8760,12 +8762,34 @@ rs6000_cannot_force_const_mem (machine_m > static bool > use_toc_relative_ref (rtx sym, machine_mode mode) > { > - return ((constant_pool_expr_p (sym) > -&&

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Matthias Klose
On 09.07.19 23:35, Matthias Klose wrote: > On 08.07.19 23:19, Matthias Klose wrote: >> On 14.06.19 15:09, Gaius Mulley wrote: >>> >>> Hello, >>> >>> here is version two of the patches which introduce Modula-2 into the >>> GCC trunk. The patches include: >>> >>> (*) a patch to allow all front

Re: [PATCH] Perform case-insensitive comparison when decoding register names (PR target/70320)

2019-07-10 Thread Segher Boessenkool
On Wed, Jul 10, 2019 at 05:23:28PM +0100, Jozef Lawrynowicz wrote: > On Tue, 9 Jul 2019 16:36:46 -0500 > Segher Boessenkool wrote: > > But it is data, not a constant, so it does not allow optimising based > > on its potentially constant value? Where "potentially" in this case > > means "always"

Re: [PATCH] Perform case-insensitive comparison when decoding register names (PR target/70320)

2019-07-10 Thread Jozef Lawrynowicz
On Tue, 9 Jul 2019 16:36:46 -0500 Segher Boessenkool wrote: > On Tue, Jul 09, 2019 at 10:16:31PM +0100, Jozef Lawrynowicz wrote: > > On Mon, 8 Jul 2019 16:42:15 -0500 > > Segher Boessenkool wrote: > > > > > > Ok, yes a DEFHOOKPOD or similar sounds like a good idea, I'll look into > > > >

Re: [PATCH PR Fortran/89286] Intrinsic sign and GNU Extension

2019-07-10 Thread Bernhard Reutner-Fischer
On 10 July 2019 17:52:40 CEST, Steve Kargl wrote: >On Wed, Jul 10, 2019 at 02:50:47PM +0100, Mark Eggleston wrote: >> The attached patch treats the intrinsic SIGN in the same way as MOD >and >> DIM as it has the same arguments. >> >> Tested using make -j 8 check-fortran on x86_64 >> >>

Re: Fix folding of vector EQ/NE

2019-07-10 Thread Richard Biener
On July 10, 2019 12:52:13 PM GMT+02:00, Richard Sandiford wrote: >For vector1 != vector2, we returned false if any elements were equal, >rather than if all elements were equal. > >Tested on aarch64-linux-gnu, armeb-eabi and x86_64-linux-gnu. >OK for trunk, gcc 9 and gcc 8? Ok. Richard.

patch to fix PR91102

2019-07-10 Thread Vladimir Makarov
  The following patch fixes https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91102   The patch was bootstrapped and tested on x86-64 Committed as rev. 273357 Index: ChangeLog === --- ChangeLog (revision 273356) +++ ChangeLog

Re: [PATCH PR Fortran/89286] Intrinsic sign and GNU Extension

2019-07-10 Thread Steve Kargl
On Wed, Jul 10, 2019 at 02:50:47PM +0100, Mark Eggleston wrote: > The attached patch treats the intrinsic SIGN in the same way as MOD and > DIM as it has the same arguments. > > Tested using make -j 8 check-fortran on x86_64 > > Conditional compilation using #ifdef __GFC_REAL_16__ has been

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-10 Thread Richard Biener
On July 10, 2019 2:11:17 PM GMT+02:00, Michael Matz wrote: >Hi, > >On Tue, 9 Jul 2019, Richard Biener wrote: > >> >The basic block index is not a DFS index, so no, that's not a test >for >> >backedge. >> >> I think in CFG RTL mode the BB index designates the order of the BBs >in >> the object

[C++] Don't fold __builtin_constant_p prematurely

2019-07-10 Thread Marc Glisse
Hello, this avoids folding __builtin_constant_p to 0 early when we are not forced to do so. Clearly this has an effect, since it uncovered a bug in wi::lshift, fixed today ;-) I wasn't sure about using |= or just =, the first one seemed more conservative. Bootstrap+regtest on

Re: [PATCH] Fix PR91126

2019-07-10 Thread Jeff Law
On 7/10/19 5:15 AM, Richard Biener wrote: > > The following patch fixes an old (but now manifesting in a testsuite > fail) issue with value-numbering on big-endian machines. I've > checked the VN results after the patch on aarch64 with -mbig-endian. > > Bootstrap and regtest running on

[PATCH] Fix PR91131

2019-07-10 Thread Richard Biener
The PR complains that we fail to properly initialize a volatile struct with a single assignment if the initializer is all-zeros. Fixed as follows. Bootstrap / regtest running on x86_64-unknown-linux-gnu. Richard. 2019-07-10 Richard Biener PR middle-end/91131 * gimplify.c

[PATCH PR Fortran/89286] Intrinsic sign and GNU Extension

2019-07-10 Thread Mark Eggleston
The attached patch treats the intrinsic SIGN in the same way as MOD and DIM as it has the same arguments. Tested using make -j 8 check-fortran on x86_64 Conditional compilation using #ifdef __GFC_REAL_16__ has been employed where appropriate in the test cases so should be OK on platforms

[PATCH] Fix -O2 vs. -O1 missed optimizations in VN

2019-07-10 Thread Richard Biener
The "do fancy stuff" routine failed to look at the valueized LHS in some cases which makes it regress at -O2 compared to -O1 (because with -O1 all preceeding stmts have gone through elimination already). Noticed when working on aarch64 support for PR83518. Bootstrapped and tested on

Re: [PATCH] Deprecate -frepo option.

2019-07-10 Thread Jakub Jelinek
On Wed, Jul 10, 2019 at 02:53:35PM +0200, Martin Liška wrote: > On 7/10/19 2:48 PM, Nathan Sidwell wrote: > > On 7/10/19 7:28 AM, Martin Liška wrote: > > > >> Great, thank you. > >> > >> There's a patch for deprecating of the option in GCC 9 changes. > >> > >> May I install the patch right now or

Re: [PATCH] Deprecate -frepo option.

2019-07-10 Thread Nathan Sidwell
On 7/10/19 8:53 AM, Martin Liška wrote: nathan That's done by 'Deprecated' keyword put on frepo in *.opt file: $ ./gcc/xgcc -Bgcc -frepo /tmp/main.c xgcc: warning: switch ‘-frepo’ is no longer supported I've already used the same mechanism for other deprecated options e.g.: $ ./gcc/xgcc

Re: [PATCH] Deprecate -frepo option.

2019-07-10 Thread Martin Liška
On 7/10/19 2:48 PM, Nathan Sidwell wrote: > On 7/10/19 7:28 AM, Martin Liška wrote: > >> Great, thank you. >> >> There's a patch for deprecating of the option in GCC 9 changes. >> >> May I install the patch right now or should I wait? >> > > I think there needs to be a code patch so that use of

Re: [PATCH] Deprecate -frepo option.

2019-07-10 Thread Nathan Sidwell
On 7/10/19 7:28 AM, Martin Liška wrote: Great, thank you. There's a patch for deprecating of the option in GCC 9 changes. May I install the patch right now or should I wait? I think there needs to be a code patch so that use of the option gives a warning. nathan -- Nathan Sidwell

Re: (C++) Remove -fdeduce-init-list?

2019-07-10 Thread Nathan Sidwell
On 7/9/19 5:23 PM, Marek Polacek wrote: On Mon, May 20, 2019 at 02:38:31PM -0400, Marek Polacek wrote: Back in 2011, -fdeduce-init-list was marked as deprecated: . 7.5 years later, is it time to rip it out completely from the compiler?

Re: [PATCH] Restrict LOOP_ALIGN to loop headers only.

2019-07-10 Thread Michael Matz
Hi, On Tue, 9 Jul 2019, Richard Biener wrote: > >The basic block index is not a DFS index, so no, that's not a test for > >backedge. > > I think in CFG RTL mode the BB index designates the order of the BBs in > the object file? So this is a way to identify backwards jumps? Even if it means a

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Rainer Orth
Hi Gaius, > Many thanks for all the feedback/bugs/patches. > I've been working through some of these. The parallel build is now done. thank you for the blazingly quick fixes. >> * The mc output is far too verbose right now: this isn't of interest to >> anyone but gm2 developers ;-) > > added

Re: [PATCH V4] PR88497 - Extend reassoc for vector bit_field_ref

2019-07-10 Thread Richard Biener
On Mon, 8 Jul 2019, Kewen.Lin wrote: > Hi Richard, > > Thanks a lot for your review and reply, I've updated the patch accordingly. > > Main changes compared to previous one: > - Consider SVE (poly_int) on bit_field_ref size/offset. > - Filter valid candidates with sbitmap first. > -

Re: [PATCH, Modula-2 (C/C++/D/F/Go/Jit)] (Register spec fn) (v2)

2019-07-10 Thread Rainer Orth
Hi Gaius, > Rainer Orth writes: > >> here are some initial issues. I'll reply to Matthias' mail to expand on >> other problems he's raised. >> >> * First, the build broke like this: >> >> /vol/gcc/src/hg/trunk/solaris/gcc/gm2/mc-boot/GRTint.c:57:30: error: >> 'time' redeclared as different kind

Re: [PATCH] Deprecate -frepo option.

2019-07-10 Thread Martin Liška
On 7/9/19 11:14 PM, Jason Merrill wrote: > On 7/9/19 1:48 PM, Nathan Sidwell wrote: >> On 7/9/19 9:00 AM, Martin Liška wrote: >>> On 7/9/19 1:41 PM, Nathan Sidwell wrote: On 7/9/19 6:39 AM, Richard Biener wrote: > On Mon, Jul 8, 2019 at 2:04 PM Martin Liška wrote: >> >>

PR90724 - ICE with __sync_bool_compare_and_swap with -march=armv8.2-a

2019-07-10 Thread Prathamesh Kulkarni
Hi, For following test-case, static long long AL[24]; int check_ok (void) { return (__sync_bool_compare_and_swap (AL+1, 0x20003ll, 0x1234567890ll)); } Compiling with -O2 -march=armv8.2-a results in: pr90724.c: In function ‘check_ok’: pr90724.c:7:1: error: unrecognizable insn: 7 | }

Re: [PATCH][armeb] PR 91060 gcc.c-torture/execute/scal-to-vec1.c fails since r272843

2019-07-10 Thread Ramana Radhakrishnan
On Wed, Jul 10, 2019 at 11:07 AM Richard Sandiford wrote: > > Christophe Lyon writes: > > On Mon, 8 Jul 2019 at 11:04, Richard Sandiford > > wrote: > >> > >> Christophe Lyon writes: > >> > Hi, > >> > > >> > This patch fixes PR 91060 where the lane ordering was no longer the > >> > right one

Re: [PATCH] Use -flto instead of -flto=N in DWARF producer string.

2019-07-10 Thread Martin Liška
On 7/10/19 1:15 PM, Jakub Jelinek wrote: > On Wed, Jul 10, 2019 at 01:08:52PM +0200, Martin Liška wrote: >> --- a/gcc/dwarf2out.c >> +++ b/gcc/dwarf2out.c >> @@ -24460,6 +24460,13 @@ gen_producer_string (void) >>case OPT_fchecking_: >> /* Ignore these. */ >> continue; >> +

[PATCH] Fix PR91126

2019-07-10 Thread Richard Biener
The following patch fixes an old (but now manifesting in a testsuite fail) issue with value-numbering on big-endian machines. I've checked the VN results after the patch on aarch64 with -mbig-endian. Bootstrap and regtest running on x86_64-unknown-linux-gnu. I'll commit after this succeeded.

Re: [PATCH] Use -flto instead of -flto=N in DWARF producer string.

2019-07-10 Thread Jakub Jelinek
On Wed, Jul 10, 2019 at 01:08:52PM +0200, Martin Liška wrote: > --- a/gcc/dwarf2out.c > +++ b/gcc/dwarf2out.c > @@ -24460,6 +24460,13 @@ gen_producer_string (void) >case OPT_fchecking_: > /* Ignore these. */ > continue; > + case OPT_flto_: > + { > + const

Contents of PO file 'cpplib-9.1-b20190203.zh_TW.po'

2019-07-10 Thread Translation Project Robot
cpplib-9.1-b20190203.zh_TW.po.gz Description: Binary data The Translation Project robot, in the name of your translation coordinator.

New Chinese (traditional) PO file for 'cpplib' (version 9.1-b20190203)

2019-07-10 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'cpplib' has been submitted by the Chinese (traditional) team of translators. The file is available at: https://translationproject.org/latest/cpplib/zh_TW.po (This file,

[PATCH] Use -flto instead of -flto=N in DWARF producer string.

2019-07-10 Thread Martin Liška
Hi. We're using LTO in openSUSE package builds and we use -flto=N based on number of CPU that a builder machine has. That leads to debug info divergence and so that I would like to canonize the option in producer string. Ready to be installed after tests & bootstrap? Thanks, Martin

Re: Fix wi::lshift

2019-07-10 Thread Richard Sandiford
Marc Glisse writes: > Hello, > > because of an other bug, __builtin_constant_p is ignored in some cases, > and this bug in wide_int went unnoticed. I am fixing it by making it match > more closely the comment above. > > Bootstrap+regtest together with a fix for __builtin_constant_p on >

Fix folding of vector EQ/NE

2019-07-10 Thread Richard Sandiford
For vector1 != vector2, we returned false if any elements were equal, rather than if all elements were equal. Tested on aarch64-linux-gnu, armeb-eabi and x86_64-linux-gnu. OK for trunk, gcc 9 and gcc 8? Richard 2019-07-10 Richard Sandiford gcc/ * fold-const.c

Re: [PATCH 3/3] change class-key of PODs to struct and others to class (PR 61339)

2019-07-10 Thread Richard Sandiford
Richard Biener writes: > On Tue, Jul 9, 2019 at 8:34 PM Martin Sebor wrote: >> >> On 7/9/19 9:17 AM, Richard Sandiford wrote: >> > Martin Sebor writes: >> >> diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h >> >> index cfc41e1ed86..625d5b17413 100644 >> >> --- a/gcc/cp/cp-tree.h >> >> +++

Re: [PATCH][armeb] PR 91060 gcc.c-torture/execute/scal-to-vec1.c fails since r272843

2019-07-10 Thread Richard Sandiford
Christophe Lyon writes: > On Mon, 8 Jul 2019 at 11:04, Richard Sandiford > wrote: >> >> Christophe Lyon writes: >> > Hi, >> > >> > This patch fixes PR 91060 where the lane ordering was no longer the >> > right one (GCC's vs architecture's). >> >> Sorry, we clashed :-) >> >> I'd prefer to go

Re: **ping** Re: [PATCH] Automatics in equivalence statements

2019-07-10 Thread Mark Eggleston
Apologies typo in ChangeLog. On 08/07/2019 14:51, Mark Eggleston wrote: **ping** On 01/07/2019 10:35, Mark Eggleston wrote: On 25/06/2019 14:17, Mark Eggleston wrote: On 25/06/2019 00:17, Jeff Law wrote: On 6/24/19 2:19 AM, Bernhard Reutner-Fischer wrote: On Fri, 21 Jun 2019 07:10:11

Re: [PATCH 3/3] change class-key of PODs to struct and others to class (PR 61339)

2019-07-10 Thread Richard Biener
On Tue, Jul 9, 2019 at 8:34 PM Martin Sebor wrote: > > On 7/9/19 9:17 AM, Richard Sandiford wrote: > > Martin Sebor writes: > >> diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h > >> index cfc41e1ed86..625d5b17413 100644 > >> --- a/gcc/cp/cp-tree.h > >> +++ b/gcc/cp/cp-tree.h > >> @@ -6428,7

[Ada] Do not attempt to re-arm guard page on x86_64-vx7(r2)

2019-07-10 Thread Pierre-Marie de Rodat
A change in the API prohibits accessing Tcb fields directly. The bug in VxWorks7 (failure to re-arm the guard page) now appears to be fixed, so this is no long necessary. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Doug Rupp gcc/ada/ * init.c: Do not attempt to

[Ada] System.Strings.Stream_Ops: do not depend on Stream_IO

2019-07-10 Thread Pierre-Marie de Rodat
Dependence was only from Ada.Streams.Stream_IO.End_Error exception which is renaming of the Ada.IO_Exceptions.End_Error. Use Ada.IO_Exceptions.End_Error directly. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Dmitriy Anisimkov gcc/ada/ * libgnat/s-ststop.adb: Remove

[Ada] Crash on aggregate for limited type in extended return

2019-07-10 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on an extended return statement whose expression is an aggregate (to be built in place) for a discriminated record with a limited component. The build-in-place mechanism creates an access type and a renaming declaration through which individual components are

[Ada] Spurious run-time error with 64-bit modular types

2019-07-10 Thread Pierre-Marie de Rodat
As a lexical element an integer literal has type Universal_Integer, i.e is compatible with any integer type. This is semantically consistent and simplifies type checking and subsequent constant folding when applicable. An exception is caused by 64-bit modular types, whose upper bound is not

[Ada] Fix possible crashes in GNATprove analysis of pointers

2019-07-10 Thread Pierre-Marie de Rodat
The new analysis of SPARK pointer rules could crash on some constructs. Now fixed. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Claire Dross gcc/ada/ * sem_spark.adb (Check_Expression): Allow digits constraints as input.

[Ada] Spurious error on discriminant of incomplete type

2019-07-10 Thread Pierre-Marie de Rodat
This patch corrects the conformance verification of discriminants to provide symmetry between the analysis of incomplete and full view discriminants. As a result, types of discriminants always resolve to the proper view. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Hristian

[Ada] Fix spurious messages on global variables for SPARK pointer support

2019-07-10 Thread Pierre-Marie de Rodat
Pointer support in GNATprove leads to spurious messages about global variables, with local variables declared in local packages and protected components. Now fixed. There is no impact on compilation. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Yannick Moy gcc/ada/

[Ada] Entity names are not unique

2019-07-10 Thread Pierre-Marie de Rodat
This patch updates the Unique_Name procedure in order to prefix the string "ada___" to child units that have a nested subprogram or package, so that they do not clash with a parent package of the same name. This is for GNATprove only and does not affect regular compilation. Tested on

[Ada] Allow multiple units per file in GNATprove

2019-07-10 Thread Pierre-Marie de Rodat
For analysis tools that rely on information generated in ALI files, but do not generate object files, the frontend did not generate the special extension names like file~2.ali for unit 2 in the file. This is needed to be able to analyze files with multiple units. Now fixed. There is no impact on

[Ada] Spelling mistakes in error messages

2019-07-10 Thread Pierre-Marie de Rodat
This patch updates certain error messages to eliminate spelling mistakes. No need for a test as this is a minor cosmetic fix. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Hristian Kirtchev gcc/ada/ * sem_ch3.adb (Check_Nonoverridable_Aspects): Correct the

[Ada] Improve support for tuning branch probability heuristics

2019-07-10 Thread Pierre-Marie de Rodat
This adds a new GNAT.Branch_Prediction package to make it possible to tune the branch probability heuristics more finely. This package contains the equivalent of __builtin_expect in C/C++ plus a couple of specializations. The following program gives a summary of the usage: package Q is I :

[Ada] sysdep.c: correct include directives ordering

2019-07-10 Thread Pierre-Marie de Rodat
Some VxWorks headers are relying on types that are defined in `vxWorks.h` but do not include it themselves, we move the include directive for `vxWorks.h` at the top of the include directives. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Corentin Gay gcc/ada/ *

[Ada] Spurious error on case expression with limited result

2019-07-10 Thread Pierre-Marie de Rodat
This patch modifies the expansion of case expressions to prevent a spurious error caused by the use of assignment statements to capture the result of the case expression when the associated type is limited. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Hristian Kirtchev

[Ada] Elaboration order v4.0 and cycle detection

2019-07-10 Thread Pierre-Marie de Rodat
This patch introduces a new cycle detection algorithm which is based on Tarjan's "Enumeration of the Elementary Circuits of a Directed Graph" algorithm, with several ideas borrowed from Jonson's "Finding all the Elementary Circuits of a Directed Graph" algorithm. No need for a test because the

[Ada] Vxworks7r2 SR0610 coalesced some macro values

2019-07-10 Thread Pierre-Marie de Rodat
SR0600 and SR0610 cannot be differentiated by macro testing (arguably an oversight in header file version.h) so: The case statement testing for "file not found" is reformulated into an if/else series of statements to avoid a problem where two cases have identical values in SR0610, but different

[Ada] Add contracts to Strings libraries

2019-07-10 Thread Pierre-Marie de Rodat
This patch adds contracts to Ada.Strings libraries, in order to remove warnings when using these libraries in SPARK. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Joffrey Huguet gcc/ada/ * libgnat/a-strbou.ads, libgnat/a-strfix.ads, libgnat/a-strunb.ads,

[Ada] The environ macro is broken on vxworks7r2 SR0610

2019-07-10 Thread Pierre-Marie de Rodat
In SR0610, the TCB is made private, so the task environ field used by the environ macro is no longer visible. Arguably this is a bug, however a more correct approach is to use accessor functions to retrieve this field and not use the environ macro, thus avoiding the problem. Tested on

[Ada] Missing implicit interface type conversion

2019-07-10 Thread Pierre-Marie de Rodat
The compiler skips adding an implicit type conversion when the interface type is visible through a limited-with clause. No small reproducer available. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Javier Miranda gcc/ada/ * exp_ch6.adb (Is_Class_Wide_Interface_Type):

[Ada] Fix crashes on ownership checking in SPARK

2019-07-10 Thread Pierre-Marie de Rodat
Code that violates the conditions for ownership checking should lead to error messages pointing to the violations instead of crashes. There is no impact on compilation, only GNATprove. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Yannick Moy gcc/ada/ * sem_spark.adb

[Ada] Elaboration order v4.0 and linker switches

2019-07-10 Thread Pierre-Marie de Rodat
This patch adds a missing functionality with respect to elaboration order v3.0. Units carry an attribute called Elab_Position which among other things controls the sorting of linker switches by gnatbind. Setting the proper position ensures the gnatbind will output the linker switches in an order

[Ada] Spurious error on overloaded equality in postcondition

2019-07-10 Thread Pierre-Marie de Rodat
This patch fixes a spurious error in a postcondition in a nested instantiation when the expression includes an inherited equality and checks are enabled. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-07-10 Ed Schonberg gcc/ada/ * sem_res.adb (Resolve_Equality_Op): Do not

[Ada] Use renamings in GNATprove mode for side-effects extraction

2019-07-10 Thread Pierre-Marie de Rodat
In the GNATprove mode for formal verification, prefer renamings over declaration of a constant to extract side-effects from expressions, whenever the constant could be of an owning type, as declaring a constant of an owning type has an effect on ownership which is undesirable. There is no impact

Re: [PATCH] i386: Add AVX512 unaligned intrinsics

2019-07-10 Thread Uros Bizjak
On Tue, Jul 9, 2019 at 11:44 PM Sunil Pandey wrote: > > __m512i _mm512_loadu_epi32( void * sa); > __m512i _mm512_loadu_epi64( void * sa); > void _mm512_storeu_epi32(void * d, __m512i a); > void _mm256_storeu_epi32(void * d, __m256i a); > void _mm_storeu_epi32(void * d, __m128i a); > void