Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Andreas Schwab
On Jul 05 2018, Jim Wilson wrote: > Tested with native riscv-linux bootstrap with Ada enabled. I'm getting a lot of errors from the assembler "non-constant .uleb128 is not supported" when trying to bootstrap the compiler with the cross-compiled ada compiler. Andreas. -- Andreas Schwab, sch...

Re: [committed][gcc][patch] Require sse for testcase on i686.

2018-07-07 Thread Jakub Jelinek
On Fri, Jul 06, 2018 at 11:46:43AM +0100, Tamar Christina wrote: > This fixes an ABI warning generated on i686-pc-linux-gnu when using > `vector_size` with no sse enabled explicitly. > > Regtested single test on x86_64-pc-linux-gnu with -m32 and no issues. > > Committed under the GCC obvious rule

[PATCH] Don't fold nextafter/nexttoward if -ftrapping-math or -fmath-errno if they produce denormal results (PR c/86420)

2018-07-07 Thread Jakub Jelinek
Hi! So, apparently I've misread when exceptions are raised by nextafter/nexttoward (and errno set). if(((ix>=0x7ff0)&&((ix-0x7ff0)|lx)!=0) || /* x is nan */ ((iy>=0x7ff0)&&((iy-0x7ff0)|ly)!=0)) /* y is nan */ return x+y; I believe the above only

[PATCH] Fix __mmask* types on many AVX512 intrinsics

2018-07-07 Thread Jakub Jelinek
Hi! On Fri, Jul 06, 2018 at 12:47:07PM +0200, Jakub Jelinek wrote: > On Thu, Jul 05, 2018 at 11:57:26PM +0300, Grazvydas Ignotas wrote: > > I think it would be more efficient if you took care of it. I won't > > have time for at least a few days anyway. Here is the complete patch, I found two furt

Re: calculate overflow type in wide int arithmetic

2018-07-07 Thread Richard Sandiford
Richard Biener writes: > On Fri, Jul 6, 2018 at 9:50 AM Aldy Hernandez wrote: >> >> >> >> On 07/05/2018 05:50 AM, Richard Biener wrote: >> > On Thu, Jul 5, 2018 at 9:35 AM Aldy Hernandez wrote: >> >> >> >> The reason for this patch are the changes showcased in tree-vrp.c. >> >> Basically I'd lik

Re: [PATCH] Don't fold nextafter/nexttoward if -ftrapping-math or -fmath-errno if they produce denormal results (PR c/86420)

2018-07-07 Thread Marc Glisse
On Sat, 7 Jul 2018, Jakub Jelinek wrote: 2018-07-07 Jakub Jelinek PR c/86420 * real.c (real_nextafter): Return true if result is denormal. I have a question on the side: would it be hard / useful, in cases where nextafter may set errno or some exception flag, to fold the r

[Ada] Optimize calls to pure functions with by-ref In parameter

2018-07-07 Thread Eric Botcazou
With GNAT you can declare a function as pure with a dedicated pragma, even if it takes a parameter passed by reference. In this case, if the parameter is declared as In (the default), the language additionally guarantees that it is not modified, thus making the function also pure in the GCC sen

Re: [PATCH] Don't fold nextafter/nexttoward if -ftrapping-math or -fmath-errno if they produce denormal results (PR c/86420)

2018-07-07 Thread Jakub Jelinek
On Sat, Jul 07, 2018 at 11:55:17AM +0200, Marc Glisse wrote: > On Sat, 7 Jul 2018, Jakub Jelinek wrote: > > > 2018-07-07 Jakub Jelinek > > > > PR c/86420 > > * real.c (real_nextafter): Return true if result is denormal. > > I have a question on the side: would it be hard / useful, in

[Ada] Do not generate debug info for actual subtypes

2018-07-07 Thread Eric Botcazou
These actual subtypes are artificial subtypes generated for parameters whose nominal subtype is an unconstrained array type in order to expose the bounds. There is no point in generating debug info for them so avoid doing it now. Tested on x86-64/Linux, applied on the mainline. 2018-07-07 Eri

[Ada] Reduce -Wstack-usage false positives on variant records

2018-07-07 Thread Eric Botcazou
This reduces the number of false positives of -Wstack-usage in the presence of variables whose nominal subtype is a discriminated record with a variant part. Tested on x86-64/Linux, applied on the mainline. 2018-07-07 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity): Add GN

[c-family] Swich -fdump-ada-spec output for Ada 2012

2018-07-07 Thread Eric Botcazou
The aspect syntax introduced in Ada 2012 makes it much easier to support function overloading in particular, so the patch removes a lot of lines: c-ada-spec.c | 322 ++--- 1 file changed, 105 insertions(+), 217 deletions(-) Tested on x86-64/L

Re: [committed][gcc][patch] Require sse for testcase on i686.

2018-07-07 Thread Tamar Christina
Hi Jakub, > > On Fri, Jul 06, 2018 at 11:46:43AM +0100, Tamar Christina wrote: > > This fixes an ABI warning generated on i686-pc-linux-gnu when using > > `vector_size` with no sse enabled explicitly. > > > > Regtested single test on x86_64-pc-linux-gnu with -m32 and no issues. > > > > Committed

Re: [committed][gcc][patch] Require sse for testcase on i686.

2018-07-07 Thread Jakub Jelinek
On Sat, Jul 07, 2018 at 11:07:28AM +, Tamar Christina wrote: > > On Fri, Jul 06, 2018 at 11:46:43AM +0100, Tamar Christina wrote: > > > This fixes an ABI warning generated on i686-pc-linux-gnu when using > > > `vector_size` with no sse enabled explicitly. > > > > > > Regtested single test on x8

Re: [PATCH] Don't fold nextafter/nexttoward if -ftrapping-math or -fmath-errno if they produce denormal results (PR c/86420)

2018-07-07 Thread Marc Glisse
On Sat, 7 Jul 2018, Jakub Jelinek wrote: On Sat, Jul 07, 2018 at 11:55:17AM +0200, Marc Glisse wrote: On Sat, 7 Jul 2018, Jakub Jelinek wrote: 2018-07-07 Jakub Jelinek PR c/86420 * real.c (real_nextafter): Return true if result is denormal. I have a question on the side:

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Jason Merrill
Did you consider handling this in check_local_shadow? On Fri, Jul 6, 2018 at 7:50 PM, Ville Voutilainen wrote: > Tested on Linux-PPC64. Ok for trunk, perhaps with the change > that I move the test under cpp1y, since it's a c++14 test anyway? > > I considered pushing the captures into the paramete

New Spanish PO file for 'gcc' (version 8.1.0)

2018-07-07 Thread Translation Project Robot
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the Spanish team of translators. The file is available at: http://translationproject.org/latest/gcc/es.po (This file, 'gcc-8.1.0.es.po', has just

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Jim Wilson
On Sat, Jul 7, 2018 at 12:25 AM, Andreas Schwab wrote: > On Jul 05 2018, Jim Wilson wrote: > >> Tested with native riscv-linux bootstrap with Ada enabled. > > I'm getting a lot of errors from the assembler "non-constant .uleb128 is > not supported" when trying to bootstrap the compiler with the >

Re: [PATCH, Ada] RISC-V: Initial riscv linux Ada port.

2018-07-07 Thread Jim Wilson
On Fri, Jul 6, 2018 at 12:55 AM, Eric Botcazou wrote: >> Ada doesn't use trampolines if you define... >> >> > + Always_Compatible_Rep : constant Boolean := False; >> >> ...this to False. > > And also define TARGET_CUSTOM_FUNCTION_DESCRIPTORS for the architecture. I tried adding the missing

Re: [PATCH, Ada] RISC-V: Initial riscv linux Ada port.

2018-07-07 Thread Arnaud Charlet
> I tried adding the missing definition. I now get > > === acats Summary === > # of expected passes2320 > # of unexpected failures0 > > === gnat Summary === > > # of expected passes2779 > # of unexpected failures4 > # of ex

[PATCH] RISC-V: Finish Ada port.

2018-07-07 Thread Jim Wilson
Thanks to Eric Botcazou, this eliminates almost all of the remaining Ada testsuite failures by adding a missing definition for the target specific handling of function descriptors. Tested with a native riscv64-linux bootstrap with Ada, and running the Ada testsuite. There are only 4 failures left

Re: [PATCH, Ada] RISC-V: Initial riscv linux Ada port.

2018-07-07 Thread Eric Botcazou
> I tried adding the missing definition. I now get > > === acats Summary === > # of expected passes2320 > # of unexpected failures0 > > === gnat Summary === > > # of expected passes2779 > # of unexpected failures4 > # of ex

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Andreas Schwab
On Jul 07 2018, Jim Wilson wrote: > If you build and install binutils, and then build and install gcc, the > build will work. Not if the compiler was built in a canadian cross. That's the only way to bootstrap an Ada compiler. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerp

Re: [PATCH, Ada] RISC-V: Initial riscv linux Ada port.

2018-07-07 Thread Jim Wilson
On Sat, Jul 7, 2018 at 9:41 AM, Eric Botcazou wrote: > You're welcome. Are the 4 remaining failures related to stack checking? FAIL: gnat.dg/debug11.adb scan-assembler-times 0x5a.*DW_AT_discr_list 1 FAIL: gnat.dg/debug11.adb scan-assembler-times 0x80.*DW_AT_discr_list 1 FAIL: gnat.dg/trampoline4

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Jim Wilson
On Sat, Jul 7, 2018 at 10:06 AM, Andreas Schwab wrote: > On Jul 07 2018, Jim Wilson wrote: > >> If you build and install binutils, and then build and install gcc, the >> build will work. > > Not if the compiler was built in a canadian cross. That's the only way > to bootstrap an Ada compiler. I

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Paolo Carlini
Hi, On 07/07/2018 01:50, Ville Voutilainen wrote: + error_at (DECL_SOURCE_LOCATION (parms), + "capture %qE and lambda parameter %qE " + "have the same name", + cap, parms); Should we really print the same name twice? Looks lik

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Andreas Schwab
On Jul 07 2018, Jim Wilson wrote: > You should only see the gas error if your gas sources are in the same > source tree as your gcc sources. Nope. > if you have separate binutils and gcc source trees, the build should > work. It's not the canadian cross build that fails, but the subsequent nat

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Ville Voutilainen
On 7 July 2018 at 16:15, Jason Merrill wrote: > Did you consider handling this in check_local_shadow? Roughly like this, not fully tested yet: 2018-07-07 Ville Voutilainen gcc/cp/ PR c++/79133 * name-lookup.c (check_local_shadow): Reject captures and parameters with the same

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Ville Voutilainen
On 7 July 2018 at 21:12, Paolo Carlini wrote: > Should we really print the same name twice? Looks like we don't have > available (yet) a location for cap - that would likely enable fancy things - > but in that case too I don't think the user would find that interesting > seeing the same name twice

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Ville Voutilainen
On 7 July 2018 at 21:55, Ville Voutilainen wrote: > On 7 July 2018 at 21:12, Paolo Carlini wrote: >> Should we really print the same name twice? Looks like we don't have >> available (yet) a location for cap - that would likely enable fancy things - >> but in that case too I don't think the user

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Jim Wilson
On Sat, Jul 7, 2018 at 11:30 AM, Andreas Schwab wrote: > On Jul 07 2018, Jim Wilson wrote: >> if you have separate binutils and gcc source trees, the build should >> work. > > It's not the canadian cross build that fails, but the subsequent native > build using the (misconfigured) canadian cross

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Ville Voutilainen
Needed one more tweak; when dealing with a capture proxy, always bail out and never fall through to the warning-handling code below the DR 2211 check. diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c index 3aafb0f..fee5482 100644 --- a/gcc/cp/name-lookup.c +++ b/gcc/cp/name-lookup.c @@ -264

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Paolo Carlini
Hi, On 07/07/2018 23:20, Ville Voutilainen wrote: + error_at (DECL_SOURCE_LOCATION (old), + "capture %qD and lambda parameter %qD " + "have the same name", + decl, old); Let's consider, say (with -Wshadow): int main() {   in

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Andreas Schwab
On Jul 07 2018, Jim Wilson wrote: > This is also presumably what the debian, fedora, and gentoo folks did > to get their first native compiler. They didn't report any problems. Of course, they didn't build an ada compiler. > Is this the first time you are trying to build a native RISC-V > comp

[PATCH] fold strings as long as the array they're stored in (PR 86428)

2018-07-07 Thread Martin Sebor
While working on other string folding improvements (PR 77357) I came across another distinct case where GCC could do better: it doesn't consider as candidates strings that have as many elements as the size of the array they are stored in, even if their length is within the bounds of the array. Fo

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Jim Wilson
On Sat, Jul 7, 2018 at 2:43 PM, Andreas Schwab wrote: > On Jul 07 2018, Jim Wilson wrote: > >> This is also presumably what the debian, fedora, and gentoo folks did >> to get their first native compiler. They didn't report any problems. > > Of course, they didn't build an ada compiler. But buil

Re: [PATCH, Ada] Makefile patches from initial RISC-V cross/native build.

2018-07-07 Thread Andreas Schwab
On Jul 07 2018, Jim Wilson wrote: > But building an Ada compiler works exactly the same as building C and > C++ compilers. There should really be no difference. That Ada compiler is unique in that it uses exceptions. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 757

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Ville Voutilainen
On 8 July 2018 at 00:35, Paolo Carlini wrote: > Hi, > > On 07/07/2018 23:20, Ville Voutilainen wrote: >> >> + error_at (DECL_SOURCE_LOCATION (old), >> + "capture %qD and lambda parameter %qD " >> + "have the same name", >> + dec

Re: [PATCH, Ada] RISC-V: Initial riscv linux Ada port.

2018-07-07 Thread Eric Botcazou
> I haven't tried looking at the failures yet, and might not spend much > more time on this. Two of them are debug related, and debug support > is a work in progress. I need to finish the native riscv64-linux > support before we can do anything useful there, and I'd like to get > back to working

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Paolo Carlini
Hi, On 08/07/2018 00:09, Ville Voutilainen wrote: On 8 July 2018 at 00:35, Paolo Carlini wrote: Hi, On 07/07/2018 23:20, Ville Voutilainen wrote: + error_at (DECL_SOURCE_LOCATION (old), + "capture %qD and lambda parameter %qD " + "have the sa

Re: [C++ PATCH] PR c++/79133

2018-07-07 Thread Ville Voutilainen
On 8 July 2018 at 01:54, Paolo Carlini wrote: >> That would make this more consistent with such a shadow warning, but I >> don't want >> to use the shadowing wording (which would be easy to do; just set >> 'shadowed' and do >> a 'goto inform'), because this isn't shadowing in the precise sense; >>

Re: [PATCH] Fix __mmask* types on many AVX512 intrinsics

2018-07-07 Thread Grazvydas Ignotas
On Sat, Jul 7, 2018 at 11:15 AM, Jakub Jelinek wrote: > Hi! > > On Fri, Jul 06, 2018 at 12:47:07PM +0200, Jakub Jelinek wrote: >> On Thu, Jul 05, 2018 at 11:57:26PM +0300, Grazvydas Ignotas wrote: >> > I think it would be more efficient if you took care of it. I won't >> > have time for at least a

Re: [PATCH] fold strlen() of aggregate members (PR 77357)

2018-07-07 Thread Martin Sebor
On 07/06/2018 09:52 AM, Richard Biener wrote: On Fri, Jul 6, 2018 at 1:54 AM Martin Sebor wrote: GCC folds accesses to members of constant aggregates except for character arrays/strings. For example, the strlen() call below is not folded: const char a[][4] = { "1", "12" }; int f (void