Re: Ping on MIPS specific patch adds `short_call` synonym for `near` attribute

2017-09-08 Thread Paul Hua
Hi, Simon: I would like to testing your patch on mips64el target. but your patch can't apply to current trunk. error likes: --cut--- xuchenghua@fc21-2k4w:61: gcc_git_trunk $

Re: [PATCH] Improve alloca alignment

2017-09-08 Thread Wilco Dijkstra
Hi Rainer, Can you post the disassembly for say the 8-byte aligned tests? It may not be built correctly or hit an offset that is accidentally aligned, however pass/fail status can't change due to my patch as it doesn't change alignment at all. Wilco

Re: [PATCH] Improve alloca alignment

2017-09-08 Thread Rainer Orth
Hi Wilco, > Eric Botcazou wrote: > >> The stack is aligned before the allocation but it gets misaligned during the >> allocation because the dynamic offset is not a multiple of STACK_BOUNDARY. > > No, the stack never gets misaligned - my patch doesn't change that at > all. The issue is that Sparc

Re: [PATCH] Improve alloca alignment

2017-09-08 Thread Wilco Dijkstra
Eric Botcazou wrote: > The stack is aligned before the allocation but it gets misaligned during the > allocation because the dynamic offset is not a multiple of STACK_BOUNDARY. No, the stack never gets misaligned - my patch doesn't change that at all. The issue is that Sparc backend doesn't

Re: [PATCH, rs6000] Fix PR target/80210: ICE in extract_insn

2017-09-08 Thread Peter Bergner
On 9/8/17 2:11 PM, Andreas Schwab wrote: > Executing on host: /daten/gcc/gcc-20170907/Build/gcc/xgcc > -B/daten/gcc/gcc-20170907/Build/gcc/ > /daten/gcc/gcc-20170907/gcc/testsuite/gcc.target/powerpc/pr80125.c -m32 > -fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -maltivec -S -o

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

2017-09-08 Thread Jeff Law
On 08/23/2017 10:39 AM, Richard Biener wrote: > On August 23, 2017 6:36:32 PM GMT+02:00, Jeff Law wrote: >> On 08/23/2017 03:07 AM, Richard Biener wrote: >> > Both -fstack-clash-protection and -fstack-check cannot be turned > off per function. This means they would need

Re: Ping on target independent stack clash protection patches

2017-09-08 Thread Jeff Law
On 08/18/2017 09:56 AM, Eric Botcazou wrote: >> #01 of #08: >> https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01971.html >> >> #02 of #08: >> https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01972.html >> >> #03 of #08: >> https://gcc.gnu.org/ml/gcc-patches/2017-07/msg01974.html >> >> Need to reach

[PATCH] PR c++/81852 define feature-test macro for -fthreadsafe-statics

2017-09-08 Thread Jonathan Wakely
Define the __cpp_lib_threadsafe_static_init feature-test macro as per recent SD-6 drafts. Tested powerpc64le-linux and x86_64-linux. OK for trunk? The branches too? commit 3ff1faeb36fad84f682f9b353152d450f8dfff92 Author: Jonathan Wakely Date: Fri Sep 8 19:07:24 2017

Re: [PATCH, rs6000] Fix PR target/80210: ICE in extract_insn

2017-09-08 Thread Andreas Schwab
Executing on host: /daten/gcc/gcc-20170907/Build/gcc/xgcc -B/daten/gcc/gcc-20170907/Build/gcc/ /daten/gcc/gcc-20170907/gcc/testsuite/gcc.target/powerpc/pr80125.c -m32 -fno-diagnostics-show-caret -fdiagnostics-color=never -O2 -maltivec -S -o pr80125.s(timeout = 300) FAIL:

Re: [PATCH], PR target/82015, add PowerPC warning for unpack_vector_int128 with illegal 2nd argument

2017-09-08 Thread Andreas Schwab
FAIL: gcc.target/powerpc/pr82015.c (test for errors, line 8) FAIL: gcc.target/powerpc/pr82015.c (test for errors, line 13) FAIL: gcc.target/powerpc/pr82015.c (test for excess errors) Excess errors: /daten/gcc/gcc-20170907/gcc/testsuite/gcc.target/powerpc/pr82015.c:6:22: error: unknown type name

[PATCH version 2, rs6000] Add builtins to convert from float/double to int/long using current rounding mode

2017-09-08 Thread Carl Love
GCC Maintainers: The following patch adds support for a couple of requested builtins that convert from float/double to int / long using the current rounding mode. I initially posted an early version of this patch which generated redundant instructions. The patch has been tested on

Re: [Ada] Move non-tasking runtime sources to libgnat subdirectory

2017-09-08 Thread Arnaud Charlet
> Given that you're moving the files, I wonder what the rationale is for > moving them to another subdirectory within gcc/ada, rather than to > something within the top-level libada directory (or some other top-level > directory or directories, as appropriate), since such top-level > directories

Re: [Ada] Move non-tasking runtime sources to libgnat subdirectory

2017-09-08 Thread Joseph Myers
On Fri, 8 Sep 2017, Arnaud Charlet wrote: > This is the second big source reorg in the GNAT sources, this time all > runtimme source belonging to libgnat are moved to a new subdirectory > libgnat. Given that you're moving the files, I wonder what the rationale is for moving them to another

Re: [doc,libgomp] Updates for www.openacc.org URLs

2017-09-08 Thread Mike Stump
On Sep 8, 2017, at 5:27 AM, Gerald Pfeifer wrote: > > I committed the patch below, but am wondering whether we really, > really, really need as many instances of one and the same URL in > one section of the documentation? Can we simplify this somehow? Curious that they

[SPARC] Fix PR target/81988

2017-09-08 Thread Eric Botcazou
This is a regression present on the mainline and 7 branch: when the register pressure is high, the use of DI/SI paradoxical subregs causes LRA to generate invalid accesses to odd-numbered FP registers when registers are spilled. The attached patch is aimed at drying up a big source of DI/SI

Re: [PATCH] Improve alloca alignment

2017-09-08 Thread Eric Botcazou
> This patch brought back PR libgomp/78468, which had caused its > predecessor to be backed out of gcc-7. Yes, it's exactly the same mistake: + /* Since the stack is presumed to be aligned before this allocation, + we only need to increase the size of the allocation if the required +

Re: RFA (langhook): PATCH for c++/70029, ICE in verify_type with ref-qualifier

2017-09-08 Thread Richard Biener
On September 8, 2017 4:56:18 PM GMT+02:00, Jason Merrill wrote: >The issue here is that the C++ front end represents the ref-qualifier >as a variant but includes it in the canonical type, because at the >language level the types are distinct. Note that this is also true of

Re: [PATCH] Fix atomic builtins on arrays (PR target/82112)

2017-09-08 Thread Jason Merrill
On Thu, Sep 7, 2017 at 11:38 PM, Joseph Myers wrote: > On Thu, 7 Sep 2017, Jakub Jelinek wrote: > >> Ah, ok, so like this instead? >> >> 2017-09-07 Jakub Jelinek >> >> PR target/82112 >> * c-common.c (sync_resolve_size): Instead of

Re: std::forward_list optim for always equal allocator

2017-09-08 Thread Jonathan Wakely
On 28/08/17 21:09 +0200, François Dumont wrote: Hi Any news for this patch ? It does remove a constructor: -_Fwd_list_impl(const _Node_alloc_type& __a) -: _Node_alloc_type(__a), _M_head() It was already unused before the patch. Do you think it has ever been used and

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

2017-09-08 Thread Jonathan Wakely
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(), not regex() compilation. For compilation we do

Re: Rb_tree constructor optimization

2017-09-08 Thread Jonathan Wakely
On 28/08/17 21:12 +0200, François Dumont wrote: Hi Here is the always equal allocator optimization for associative containers. Tested under Linux x86_64. * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&, _Node_allocator&&)): New. (_Rb_tree(_Rb_tree&&,

[Ada] Move non-tasking runtime sources to libgnat subdirectory

2017-09-08 Thread Arnaud Charlet
This is the second big source reorg in the GNAT sources, this time all runtimme source belonging to libgnat are moved to a new subdirectory libgnat. Diff is too large to be attached, even compressed with bzip2 -9. I'm only including the diff on gcc-interface which is the not completely trivial

RFA (langhook): PATCH for c++/70029, ICE in verify_type with ref-qualifier

2017-09-08 Thread Jason Merrill
The issue here is that the C++ front end represents the ref-qualifier as a variant but includes it in the canonical type, because at the language level the types are distinct. Note that this is also true of language-independent qualifiers like "const", so this doesn't seem like an unreasonable

[PATCH, alpha]: Fix bootstrap failure due to -Wtautological-compare warning

2017-09-08 Thread Uros Bizjak
The alpha bootstrap currently fails due to always true condition warning in a dead code. Patch removes the unneeded code. 2017-09-08 Uros Bizjak * config/alpha/alpha.c (alpha_print_operand) : Remove. Bootstrapped and regression tested on alphaev68-linux-gnu.

[Ada] New pragma Ada_2020

2017-09-08 Thread Arnaud Charlet
This patch allows pragma Ada_2020 to be used to enable Ada 2020 features that have been implemented in GNAT. Ada_2020 is a configuration pragma. This is in addition to the -gnat2020 command-line switch. Note: There is no synonym pragma Ada_20. We have Ada_05 and Ada_12, but we decided long ago

[Ada] Extend efficient array reset to all elementary types

2017-09-08 Thread Arnaud Charlet
This change extends the efficient handling of an array reset to 0 by means of an aggregate with a single Others choice from a discrete component type to any elementary type. The 3 instances of the Reset procedure below must invoke memset: with G; package P is subtype Index is Positive range

[Ada] No room for new warning switches

2017-09-08 Thread Arnaud Charlet
This patch adds machinary to create new warning flags using the underscore "_" prefix. This is necessary because all letters of the alphabet and letters prefixed with a dot "." are used already. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Justin Squirek

[Ada] Missing error in function expressions

2017-09-08 Thread Arnaud Charlet
The compiler skips reporting errors located in function expressions. After this patch the error is reported in the following sources: package Base is type Base_Type is tagged record V : Integer; end record; function Func_1 (B : Base_Type) return Integer is (B.V); end; with Base;

[Ada] Spurious error on formal package with Inline_Always

2017-09-08 Thread Arnaud Charlet
This patch removes spurious errors appearing on a formal package of an instantiation nestled within an enclosing instance body. when the inner instance is a package that includes a subprogram with an Inline_Always aspect. The following must compile quietly: gnstmske -q -gnatws main --- with

[Ada] Crash on string concatenation

2017-09-08 Thread Arnaud Charlet
This patch replaces several calls to New_Copy in aggregage expansion and all calls to New_Copy in concatenation expansion with calls to New_Copy_Tree. The former left the syntactic structure of the tree ambiguous, where certain nodes would theoretically have two parents, while the AST supports

[doc,libgomp] Updates for www.openacc.org URLs

2017-09-08 Thread Gerald Pfeifer
We were nearly down to around a dozen of problematic links on gcc.gnu.org and our online docs, when the following popped up: www.openacc.org switched to https (and does not require a trailing slash). I committed the patch below, but am wondering whether we really, really, really need as many

[Ada] Compiler crash on mixed-case source file names

2017-09-08 Thread Arnaud Charlet
This patch fixes a bug in which if mixed-case file names are used, and a file name contains any of the capital letters 'U', 'W', 'Q', or 'O', then in rare cases the compiler can crash. No small test is available. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Bob Duff

[Ada] T'Class'Input reading corrupted data

2017-09-08 Thread Arnaud Charlet
If T'Class'Input is called on a stream containing data that does not look like it comes from T'Class'Output, it could crash. This patch fixes that bug by making sure it raises an exception. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Bob Duff *

[Ada] New debug switch -gnatdJ

2017-09-08 Thread Arnaud Charlet
Introduce a new debug switch -gnatdJ to prepend the name of the enclosing entity (subprogram, task, ...) relevant for a given warning or style message. This can be useful in the context of integrating these messages in other tools, e.g. CodePeer or gnatcheck. Tested on x86_64-pc-linux-gnu,

[Ada] Infinite loop on call to nested subprogram with -gnatE in SPARK

2017-09-08 Thread Arnaud Charlet
This patch suppresses the processing of references to internal variables for SPARK. As a result, this eliminates an infinite loop triggered by walking the scope chain of an internal variable which plays the role of an elaboration flag. -- Source -- -- gnat.adc pragma

[Ada] Copy representation aspects from type to constrained subtype

2017-09-08 Thread Arnaud Charlet
This change ensures that the representation aspects Atomic, Independent and Volatile_Full_Access are copied from the base type to the subtype when it is declared with an explicit constraint. For the following package: package P is type Bit is mod 2**1 with Size => 1; type UInt2 is

[Ada] Fix crash on expression function that is a completion

2017-09-08 Thread Arnaud Charlet
This change fixes a crash on an expression function which is the completion of a previous declaration, when the type of the expression is a record type which contains private components. Such a code is illegal as per AI12-0103, which says that expression functions that are a completion freeze

[Ada] Generic dispatching constructors of limited interface types

2017-09-08 Thread Arnaud Charlet
The compiler crashes processing a generic dispatching constructor that is invoked to build-in-place objects that cover limited interface types. After this patch the following test compiles without errors: package Base is type Root is limited interface; function Constructor (Params :

[Ada] Compiler crash on anonymous array with component with invariant

2017-09-08 Thread Arnaud Charlet
This patch fixes a compiler abort on an object declaration with an anonymous array when the component type of the array has an invariant aspect. The following must compile quietly: gcc -c -gnata main.adb with Lrs; procedure Main is begin Lrs.Initialise; end Main; --- with Global;

[Ada] Wrong interface tag visible through limited with clause

2017-09-08 Thread Arnaud Charlet
If the designated type of an access to a class-wide interface type is visible through a limited-with clause, and attribute 'Tag is applied to the dereference of a pointer of such type, and such 'Tag value is used to invoke the routines of the Ada.Tags runtime package then the Ada.Tags routine may

[Ada] Subtype indications inherit predicates

2017-09-08 Thread Arnaud Charlet
A subtype indication whose type mark is a predicated subtype inherits the predicates of its parent type. A loop whose specification has the form: for S1 in T range Lo .. Hi loop ... and in which T has a static predicate, is executed over the values of T in the specified range that satisfy the

[Ada] PR ada/80888 Text_IO encoding should match source encoding

2017-09-08 Thread Arnaud Charlet
The wide character encoding used for Text_IO files is supposed to match the encoding of the source files, as specified by the -gnatW switch, unless it is specified explicitly in the Form string. Instead it incorrectly defaults to brackets encoding. The same applies to Wide_Text_IO and

[Ada] Implement extended version of -gnatR for record sub-components

2017-09-08 Thread Arnaud Charlet
This adds a -gnatRe variant to the -gnatR switch, which displays extended representation information for components of records that are themselves records by recursing on the layout of sub-components. This also makes the compiler accept -gnatR0, as documented in the User Guide. For the following

[Ada] Spurious error on actual array type in generic child instantiation.

2017-09-08 Thread Arnaud Charlet
This patch suppresses the check for compatibility of the component types of the formal and the corresponding actual in the instantiation of a generic child unit, when the component type of the formal is itself a formal of an enclosing generic unit. This removes spurious conformance errors in

[Ada] Failure to allocate on storage subpool

2017-09-08 Thread Arnaud Charlet
This patch modifies the processing of allocators to account for a case where a simple allocation still requires a call to Allocate_Any_Controlled due to subpool management. No small reproducer possible. Tested on x86_64-pc-linux-gnu, committed on trunk 2017-09-08 Hristian Kirtchev

[Ada] Inheritance of Default_Iterator from interfaces

2017-09-08 Thread Arnaud Charlet
This patch fixes a bug in which if a type implements interfaces, the Default_Iterator aspect is not inherited from all interfaces, but only from the parent type. The following test should compile and run quietly. with Ada.Iterator_Interfaces; procedure Main is type Element_Type is null

[Ada] Do not generate .ali files for subunits

2017-09-08 Thread Arnaud Charlet
This patch fixes a bug in which the compiler creates .ali files when a subunit is compiled. Given the following code: package P is procedure F; end P; package body P is procedure F is separate; end P; separate (P) procedure F is begin null; end F; The command: gcc -c p-f.adb should

[Ada] Expand barrier conditions permitted by the restriction Pure_Barrier

2017-09-08 Thread Arnaud Charlet
This patch permits the use of type conversions and components of objects subject to the following conditions: type conversions cannot potentially raise contraint errors and access types cannot be dereferenced. These additions provide greater functionality to users while respecting the aims of the

[Ada] Infinite loop on an interface conversion involving private extensions.

2017-09-08 Thread Arnaud Charlet
This patch fixes a loop in the compiler, on an interface conversion from an interface declared as a synchronized private extension to one of its ancestors. databases-instantiations,adb below must compile quietly: --- package body Databases.Generics is New_Data_ID : Data_ID_Type := 1;

[Ada] Small fix for couple of internal glitches with record layout

2017-09-08 Thread Arnaud Charlet
This change ensures that (1) -gnatR always displays the record layout that was used internally by the compiler for code generation and (2) the record layout is fully adjusted internally when the reverse bit order is specified. No functional changes expected because the first issue was papering

[Ada] Use of renamings of function results in SPARK annotations

2017-09-08 Thread Arnaud Charlet
This patch changes the expansion of object renamings in SPARK to reuse the entity associated with the renaming when the name denotes a function call. The patch also modifies a routine used to extract the entity of references to abstract states and whole objects to handle renamings of function

Re: Add support to trace comparison instructions and switch statements

2017-09-08 Thread Rainer Orth
Hi David, > On Thu, Sep 7, 2017 at 6:57 PM, Rainer Orth > wrote: >> Jakub Jelinek writes: >> >>> On Wed, Sep 06, 2017 at 10:08:01PM +0200, David Edelsohn wrote: This change broke bootstrap on AIX because sancov.c now references a macro