Re: [PATCH] DWARF: Handle expressions containing "-1" in dw2_asm_output_delta_uleb128.

2018-05-28 Thread Jakub Jelinek
On Mon, May 28, 2018 at 08:50:46AM +0200, Mark Wielaard wrote: > gcc/ > > * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around > lab2 if it is an expression containing a minus sign. Ok, thanks. > diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c > index 93577d1..62a1da9 100

Re: [ARM/FDPIC 02/21] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts

2018-05-28 Thread Christophe Lyon
On 25/05/2018 18:32, Joseph Myers wrote: On Fri, 25 May 2018, Christophe Lyon wrote: In libtool.m4, we use uclinuxfdpiceabi in cases where ELF shared libraries support is required, as uclinux does not guarantee that. To confirm: has this libtool.m4 patch gone upstream (or at least been submit

[Ada] Misleading warning on unresolvable package name

2018-05-28 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby the compiler misidentified a package name containing the name of a standard runtime package as said package - leading to and improper error message prompting the user to "With" a package already in scope. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-

[Ada] Further evaluation of type bounds in GNATprove mode

2018-05-28 Thread Pierre-Marie de Rodat
Some static bounds of types are not recognized and evaluated as such in the semantic analysis phase of the frontend, which leads to incomplete information in GNATprove. Fix that in the GNATprove mode only, as this is not needed when full expansion is used. There is no impact on compilation. Teste

[Ada] Warning on recursive call within postcondition

2018-05-28 Thread Pierre-Marie de Rodat
This patch adds a warning to a function call that appears within a postcondition for said function. This may mean an omission of an attribute reference 'Result, and may lead to an infinite loop on a call to that function. Compiling post_error.ads must yield: post_error.ads:3:11: warning:

[Ada] Minor tweak to output of -gnatR

2018-05-28 Thread Pierre-Marie de Rodat
This changes the output of -gnatR for extensions of tagged record types to avoid displaying the internal _Parent component, which overlaps with other components and is thus more confusing than helpful. For the following hierarchy: type R1 is tagged record I : Integer; end record; type

[Ada] Crash on aspect/pragma Linked_Section with -gnatR2

2018-05-28 Thread Pierre-Marie de Rodat
This patch modifies the output of the representation information related to aspect or pragma Linker_Section, achieved with compiler switch -gnatR2. The value of the section argument is now properly retrieved. Previously it was assumed that the value is always a N_String_Literal, however the semanti

[Ada] Spurious constraint error on array of null-excluding components

2018-05-28 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby the compiler would raise spurious runtime errors when an array of null-excluding components was initialized with an expression which required the secondary stack (such as with an concatination operation) due to certain generated checks which were incorrected perfor

[Ada] Spurious error on aspect Volatile

2018-05-28 Thread Pierre-Marie de Rodat
This patch modifies the analysis of aspect/pragma Volatile to correct accept the annotation when it applies to single protected and single task types, and SPARK_Mode On is in effect. -- Source -- -- pack.ads package Pack with SPARK_Mode is protected PO_Aspect with V

[Ada] Fix internal error on nested record types with representation clause

2018-05-28 Thread Pierre-Marie de Rodat
This fixes a long-standing issue with the expansion of equality functions generated for discriminated record types with variant part. In this case the front-end recursively expands equality functions for the composite sub-components, in particular the array sub-components. But it systematically u

[Ada] Better accuracy in float-to-fixed conversions

2018-05-28 Thread Pierre-Marie de Rodat
This patch improves the accuracy of conversions from a floating point to a fixed point type when the fixed point type has a specified Snall that is not a power of two. Previously the conversion of Fixed_Point_Type'First to some floating point number and back to Fixed_Point_Type raised Constraint er

[Ada] Fix internal error on renaming of equality for record type

2018-05-28 Thread Pierre-Marie de Rodat
This adjusts the previous change to the cases where the array type is not yet frozen and, therefore, where Size_Depends_On_Discriminant is not yet computed, by doing the computation manually. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-28 Eric Botcazou gcc/ada/ * exp_ch

[Ada] Update FE check following change in SPARK RM 7.1.3(12)

2018-05-28 Thread Pierre-Marie de Rodat
SPARK Reference Manual changed to accept attributes First, Last and Length as not leading to an evaluation of a part of the prefix object. This is reflected here in the checking code for that rule. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-28 Yannick Moy gcc/ada/ * se

[Ada] Minor cleanup in repinfo unit

2018-05-28 Thread Pierre-Marie de Rodat
This removes the Truth_Andif_Expr and Truth_Orif_Expr codes for expressions handled by the repinfo unit, since they are redundant with Truth_And_Expr and Truth_Or_Expr respectively in this context. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-28 Eric Botcazou

[Ada] Remove Valop from the Repinfo unit

2018-05-28 Thread Pierre-Marie de Rodat
This removes the recently added Valop as redundant. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-28 Eric Botcazou gcc/ada/ * repinfo.adb (List_GCC_Expression): Remove Valop and replace calls to it with calls to Unop.--- gcc/ada/repinfo.adb

Re: [PATCH] consider MIN_EXPR in get_size_range() (PR 85888)

2018-05-28 Thread Richard Biener
On Fri, May 25, 2018 at 10:15 PM Martin Sebor wrote: > Attached is revision 3 of the patch incorporating your > determine_value_range function with the requested changes. I'm somewhat torn about removing the "basic" interface on SSA names so can you please not change get_range_info for now and i

Re: [PING] [PATCH] Avoid excessive function type casts with splay-trees

2018-05-28 Thread Richard Biener
On Sat, May 26, 2018 at 10:19 AM Bernd Edlinger wrote: > On 05/17/18 16:37, Bernd Edlinger wrote: > > On 05/17/18 15:39, Richard Biener wrote: > >> On Thu, May 17, 2018 at 3:21 PM Bernd Edlinger > >> > >> wrote: > >> > >>> Ping... > >> > >> So this makes all traditional users go through the in

Re: [PATCH, rs6000] Remove incorrect built-in function documentation

2018-05-28 Thread Segher Boessenkool
Hi Kelvin, On Wed, May 23, 2018 at 05:04:23PM -0500, Kelvin Nilsen wrote: > The following two functions are removed because they are not implemented: > > vector float vec_copysign (vector float); > vector float vec_recip (vector float, vector float); Should they be though? The corresponding

[PATCH] Introduce VEC_UNPACK_FIX_TRUNC_{LO,HI}_EXPR and VEC_PACK_FLOAT_EXPR, use it in x86 vectorization (PR target/85918)

2018-05-28 Thread Jakub Jelinek
Hi! AVX512DQ and AVX512DQ/AVX512VL has instructions for vector float <-> {,unsigned} long long conversions. The following patch adds the missing tree codes, optabs and expanders to make this possible. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-05-28 Jakub Jelinek

[PATCH] Fix doc/invoke.texi ARM buglet

2018-05-28 Thread Jakub Jelinek
Hi! I've noticed ../../gcc/doc/invoke.texi:15971: warning: @itemx should not begin @table errors, fixed thusly, committed as obvious to trunk. Probably it needs backporting too. 2018-05-28 Jakub Jelinek * doc/invoke.texi (ARM Options): Use @item instead of @itemx for armv5te.

Re: [PATCH GCC][5/6]implement live range, reg pressure computation class

2018-05-28 Thread Richard Biener
On Fri, May 18, 2018 at 1:57 PM Bin.Cheng wrote: > On Fri, May 4, 2018 at 5:23 PM, Bin Cheng wrote: > > Hi, > > Based on previous patch, this one implements live range, reg pressure computation > > class in tree-ssa-live.c. The user would only need to instantiate the class and > > call the comp

[PATCH] [MSP430] Fix PR39240 execution failure for msp430-elf

2018-05-28 Thread Jozef Lawrynowicz
pr39240.c fails at execution at -O1 and above for msp430, due to an erroneous subreg expression in the zero_extendqisi2 msp430 insn pattern. This causes the zero extension operation to get optimized out. The attached patch fixes the insn pattern, and also removes the msp430x ISA restriction on ze

Re: [PATCH 1/3] Add vec::reverse.

2018-05-28 Thread Richard Biener
On Fri, May 25, 2018 at 1:04 PM marxin wrote: > gcc/ChangeLog: > 2018-05-25 Martin Liska > David Malcolm > * vec.c (test_reverse): New. > (vec_c_tests): Add new test. > * vec.h (vl_ptr>::reverse): New function. OK. Richard. > --- > gcc/vec.c | 3

Re: [PATCH] PR target/85358 patch v2: Add target hook to prevent default widening

2018-05-28 Thread Segher Boessenkool
On Fri, May 25, 2018 at 02:49:47PM -0400, Michael Meissner wrote: > * target.def (default_fp_widening_p): New target hook to automatic > widening betwen two floating point modes. "default" is a pretty bad name. The rs6000 parts are fine of course, if the rest is. Segher

[PATCH] Update comment about the format of attribute name in attribute_spec handler

2018-05-28 Thread Jozef Lawrynowicz
With the changes in r250911 to canonicalize attribute names (i.e. remove leading and trailing underscores if present) a comment for "handler" in the attribute_spec struct needs to be updated to reflect that the NAME argument is now stripped of any underscores. Patch is attached. If the patch is

Re: [PATCH] Introduce VEC_UNPACK_FIX_TRUNC_{LO,HI}_EXPR and VEC_PACK_FLOAT_EXPR, use it in x86 vectorization (PR target/85918)

2018-05-28 Thread Uros Bizjak
On Mon, May 28, 2018 at 11:58 AM, Jakub Jelinek wrote: > Hi! > > AVX512DQ and AVX512DQ/AVX512VL has instructions for vector float <-> > {,unsigned} long long conversions. The following patch adds the missing > tree codes, optabs and expanders to make this possible. > > Bootstrapped/regtested on x

[PATCH] [MSP430] Fix -fleading-underscore having no effect

2018-05-28 Thread Jozef Lawrynowicz
Fix -fleading-underscore having no effect for msp430-elf by prepending user_label_prefix to name when outputting assembly labels. Successfully regtested the GCC testsuite for msp430-elf, and this fixed unwind-1.c from dg.exp. If the patch is acceptable, I would appreciate if someone would commit

Re: [PING] [PATCH] Avoid excessive function type casts with splay-trees

2018-05-28 Thread Bernd Edlinger
On 05/28/18 11:19, Richard Biener wrote: > On Sat, May 26, 2018 at 10:19 AM Bernd Edlinger > wrote: > > > >> On 05/17/18 16:37, Bernd Edlinger wrote: >>> On 05/17/18 15:39, Richard Biener wrote: On Thu, May 17, 2018 at 3:21 PM Bernd Edlinger wrote: > Ping... S

[PATCH] Fix PR85933

2018-05-28 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. >From f7b8dc6184448bc7fb7f8faa27281f2ac64b75a9 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 28 May 2018 09:48:28 +0200 Subject: [PATCH] fix-pr85933 2018-05-28 Richard Biener PR tree-optimization/85

Re: [PATCH] Introduce VEC_UNPACK_FIX_TRUNC_{LO,HI}_EXPR and VEC_PACK_FLOAT_EXPR, use it in x86 vectorization (PR target/85918)

2018-05-28 Thread Richard Biener
On Mon, 28 May 2018, Jakub Jelinek wrote: > Hi! > > AVX512DQ and AVX512DQ/AVX512VL has instructions for vector float <-> > {,unsigned} long long conversions. The following patch adds the missing > tree codes, optabs and expanders to make this possible. > > Bootstrapped/regtested on x86_64-linux

[PATCH] Fix PR85934

2018-05-28 Thread Richard Biener
Bootstraped and tested on x86_64-unknown-linux-gnu, applied. Richard. >From f21624d5d1b9bb6b65f499f5af34781acfa6c927 Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Mon, 28 May 2018 09:41:39 +0200 Subject: [PATCH] fix-pr85934 PR tree-optimization/85934 * tree-vect-generic

Re: Remove support for FreeBSD 4.x (and earlier)

2018-05-28 Thread Andreas Tobler
On 28.05.18 08:57, Gerald Pfeifer wrote: On Thu, 24 May 2018, Jeff Law wrote: Happy to trust you on what versions can be dropped and the resulting simplifications. Is it worth noting those old versions as deprecated/obsolete in config.gcc? Good catch, Jeff, thanks. Updated patch (also wrt. c

[PATCH] Implement Fortran 2018's RANDOM_INIT

2018-05-28 Thread Steve Kargl
The attached patch implements the RANDOM_INIT intrinsic subroutine specified in Fortran 2018. I have had this patch in my local tree for the last 5+ months. Now that 8.1 is out, it is time to submit it. It has been built and regression tested on x86_64-*-freebsd. OK to commit? Note, I have onl

Re: [PING] [PATCH] Avoid excessive function type casts with splay-trees

2018-05-28 Thread Richard Biener
On May 28, 2018 4:25:02 PM GMT+02:00, Bernd Edlinger wrote: >On 05/28/18 11:19, Richard Biener wrote: >> On Sat, May 26, 2018 at 10:19 AM Bernd Edlinger > >> wrote: >> >> >> >>> On 05/17/18 16:37, Bernd Edlinger wrote: On 05/17/18 15:39, Richard Biener wrote: > On Thu, May 17, 2018 at

[patch, libgfortran] Bug 85840 - Memory leak in write.c

2018-05-28 Thread Jerry DeLisle
The attached patch is a follow on from my previous for this PR. I could not reproduce the problem on these code paths, but one should not assume it won't happen. Patch is obvious and I will commit shortly. Regression tested on x86_64. 2018-05-28 Jerry DeLisle PR libgfortran/85840