Re: [PATCH] Fix debug stmt handling in optimize_recip_sqrt (PR tree-optimization/87977)

2018-11-14 Thread Richard Biener
On Wed, 14 Nov 2018, Jakub Jelinek wrote: > On Tue, Nov 13, 2018 at 10:19:10AM +0100, Jakub Jelinek wrote: > > > > Though, in this particular case the sqrt call is > > > > optimized away, so it wouldn't make a difference. > > > > > > > > Bootstrapped/regtested on x86_64-linux and i686-linux, ok

Re: [PATCH] Fix bootstrap with GCC 4.1.2 (PR bootstrap/86739)

2018-11-14 Thread Richard Biener
On Wed, 14 Nov 2018, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, with GCC before 4.3 one can't instantiate std::pair > where one or both of the template parameters are reference types, because > the std::pair constructor has arguments references to the template parameter > types and th

Re: [PATCH][LRA] Fix PR87899: r264897 cause mis-compiled native arm-linux-gnueabihf toolchain

2018-11-14 Thread Christophe Lyon
On Tue, 13 Nov 2018 at 23:18, Peter Bergner wrote: > > On 11/13/18 4:09 PM, Vladimir Makarov wrote: > > On 11/13/2018 10:53 AM, Peter Bergner wrote: > >> I think with the above results, I think the patch is ready for review. > >> I'm attaching the latest updated patch below. > >> > >> Again, this

Re: [PATCH] Fix x86 bzhi/bextr iff zero_extract with zero size is undefined (PR rtl-optimization/87817)

2018-11-14 Thread Richard Biener
On Wed, 14 Nov 2018, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, it is unclear if zero_extract is well defined > if the second argument is 0. x86 intrinsic require bzhi and bextr to be > well defined in those cases (extraction of 0 bits results in 0), but > e.g. combiner hapilly trans

Re: [PATCH] Fix x86 bzhi/bextr iff zero_extract with zero size is undefined (PR rtl-optimization/87817)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 09:29:15AM +0100, Richard Biener wrote: > On Wed, 14 Nov 2018, Jakub Jelinek wrote: > > As mentioned in the PR, it is unclear if zero_extract is well defined > > if the second argument is 0. x86 intrinsic require bzhi and bextr to be > > well defined in those cases (extract

Re: [C++ Patch] Fix two grokdeclarator locations

2018-11-14 Thread Paolo Carlini
Hi, On 14/11/18 01:30, Jason Merrill wrote: On 11/12/18 6:39 AM, Paolo Carlini wrote: Hi again, On 08/11/18 10:26, Paolo Carlini wrote: Hi, two additional grokdeclarator locations that we can easily fix by using declarator->id_loc. Slightly more interesting, testing revealed a latent issue

Re: [PATCH] Fix incorrect assertion when deallocating big block

2018-11-14 Thread Christophe Lyon
On Tue, 13 Nov 2018 at 23:58, Jonathan Wakely wrote: > > Since a big_block rounds up the size to a multiple of big_block::min it > is wrong to assert that the supplied number of bytes equals the > big_block's size(). Add big_block::alloc_size(size_t) to calculate the > allocated size consistently,

[wwwdocs] [committed] Add ARC news

2018-11-14 Thread claziss
Hi, I've just committed the attached patch containing the news for the ARC backend. Thank you, Claudiu ? backends.html.~1.82.~ ? wwwdocs_arc.patch Index: backends.html === RCS file: /cvs/gcc/wwwdocs/htdocs/backends.html,v retrieving

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Alexander Monakov
On Tue, 13 Nov 2018, Martin Sebor wrote: > In PR 88000 the reporter expects to be able to use an explicit > register local variable in a context where it isn't supported > i.e., for something other than an input or output of an asm > statement: namely to pass it as argument to a user-defined > fun

Re: [PATCH v3] Add sinh(atanh(x)) and cosh(atanh(x)) optimizations

2018-11-14 Thread Richard Biener
On Tue, Nov 13, 2018 at 10:25 PM Giuliano Augusto Faulin Belinassi wrote: > > Only do the optimization if flag_signed_zeros && > !flag_finite_math_only is set, as suggested in the previous iteration. > > Before, the patch did the optimization even when -fno-signed-zeros and > -ffinite-math-only wa

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Jakub Jelinek
On Tue, Nov 13, 2018 at 09:11:41PM -0700, Martin Sebor wrote: > --- gcc/c-family/c-warn.c (revision 266086) > +++ gcc/c-family/c-warn.c (working copy) > @@ -2609,3 +2609,39 @@ warn_for_multistatement_macros (location_t body_lo > inform (guard_loc, "some parts of macro expansion are not

Re: [PATCH] Add missing ZLIBINC to CFLAGS-optinfo-emit-json.o

2018-11-14 Thread Kyrill Tkachov
On 13/11/18 18:45, David Malcolm wrote: On Tue, 2018-11-13 at 17:58 +, Kyrill Tkachov wrote: Hi David, On 09/11/18 21:00, Jeff Law wrote: On 11/9/18 10:51 AM, David Malcolm wrote: One of the concerns noted at Cauldron about -fsave-optimization- record was the size of the output files.

Re: [PATCH] [ARC] Cleanup, fix and set LRA default.

2018-11-14 Thread claziss
Thank you all for your review. I have pushed the patch with the suggested mods. I also made a new patch (and pushed) for wwwdocs. Claudiu

Re: RFA: vectorizer patches 1/2 : WIDEN_MULT_PLUS support

2018-11-14 Thread Richard Biener
On Wed, Nov 14, 2018 at 12:09 AM Joern Wolfgang Rennecke wrote: > > > On 12/11/18 14:30, Richard Biener wrote: > > I guess I already asked this question when WIDEN_MULT_PLUS_EXPR was > > introduced - but isn't that fully contained within a DOT_PROD_EXPR? > > I'm not sure what exactly you mean here

[PATCH] Support simd function declarations via a pre-include. (was: [PATCH][RFC]Overloading intrinsics)

2018-11-14 Thread Martin Liška
Hi. I'm CCing gcc-patches ML and Jakub, who significantly helped me yesterday. The idea now is to have a driver search for the math header file. When it exists, Fortran FE loads the file (via new -fpre-include option). I can confirm that e.g. roms_r CPU2017 benchmark utilizes couple of simd clone

Re: [PATCH PR84648]Adjust loop exit conditions for loop-until-wrap cases.

2018-11-14 Thread bin.cheng
f_iterations_cond): Adjust exit cond for loop-until-wrap case by calling adjust_cond_for_loop_until_wrap. 2018-11-11 Bin Cheng PR tree-optimization/84648 * gcc.dg/tree-ssa/pr84648.c: New test. * gcc.dg/pr68317.c: Add warning check on overflow. pr84648-20181114.txt Description: Binary data

Re: [PATCH PR84648]Adjust loop exit conditions for loop-until-wrap cases.

2018-11-14 Thread Richard Biener
On Wed, Nov 14, 2018 at 11:09 AM bin.cheng wrote: > > -- > Sender:Richard Biener > Sent at:2018 Nov 13 (Tue) 23:03 > To:bin.cheng > Cc:GCC Patches > Subject:Re: [PATCH PR84648]Adjust loop exit conditions for loop-until-wrap > case

[PATCH] Fix PR87927, implement TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP

2018-11-14 Thread Jozef Lawrynowicz
Use of the patchable_function_entry attribute when the pointer mode is a partial int mode can cause a segfault. The handler for this attribute tries to write out the assembler directive for an integer with bytesize POINTER_SIZE_UNITS, so if this is not 2, 4, 8 or 16 NULL is returned, resulting in

[PATCH] Fix PR88019

2018-11-14 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-11-14 Richard Biener PR tree-optimization/88019 * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite COND_EXPR arguments to non-trapping overflow. diff --git a/gcc/graphite-isl-ast-t

Re: [PATCH] Support simd function declarations via a pre-include. (was: [PATCH][RFC]Overloading intrinsics)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 11:06:04AM +0100, Martin Liška wrote: > Question I have is about default search locations for the header file. On my > machine I can > see: > access("/home/marxin/bin/gcc2/lib64/gcc/x86_64-pc-linux-gnu/9.0.0/math-vector-fortran.h", > R_OK) = -1 ENOENT (No such file or dire

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Segher Boessenkool
On Wed, Nov 14, 2018 at 10:47:57AM +0100, Jakub Jelinek wrote: > This makes no sense to me. There is nothing unsupported in passing > a local hard register variable to a function, that is well defined, > and as your testcase changes show, you broke quite some completely valid > testcases with that

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 05:35:06AM -0600, Segher Boessenkool wrote: > On Wed, Nov 14, 2018 at 10:47:57AM +0100, Jakub Jelinek wrote: > > This makes no sense to me. There is nothing unsupported in passing > > a local hard register variable to a function, that is well defined, > > and as your testca

[Ada] Lingering loop for ignored Ghost assignment

2018-11-14 Thread Pierre-Marie de Rodat
The following patch ensures that loops generated for aggregates as part of ignored Ghost assignments are correctly eliminated from the generated code. -- Source -- -- pack.ads package Pack is type addr4k is new Integer range 0 .. 100 with Size => 32; type Four_K

[Ada] Crash on tagged equality

2018-11-14 Thread Pierre-Marie de Rodat
This patch corrects the retrieval of the equality function when it is inherited from a parent tagged type. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-11-14 Hristian Kirtchev gcc/ada/ * exp_ch4.adb (Expand_N_Op_Eq): Remove duplicated code and use routine Find_Equal

Re: [PATCH][GCC] Make DR_TARGET_ALIGNMENT compile time variable

2018-11-14 Thread Iain Sandoe
> On 13 Nov 2018, at 19:31, Dominique d'Humières wrote: > > Revision r266072 breaks bootstrap on darwin: > > In file included from ../../work/gcc/coretypes.h:430, > from ../../work/gcc/tree-vect-data-refs.c:24: > ../../work/gcc/poly-int.h: In instantiation of 'typename if_nonpo

[Ada] Record components do not appear in the Global contract

2018-11-14 Thread Pierre-Marie de Rodat
In the Global contract there can be only entire objects, which are represented either as N_Identifier or N_Expanded_Name. The test for record components was dead. Now removed. Semantics unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-11-14 Piotr Trojanek gcc/ada/ *

[Ada] Fix handling of generic actuals with default expression in SPARK

2018-11-14 Thread Pierre-Marie de Rodat
Both in the GNAT frontend and in the GNATprove backend we have several checks related to generic actuals of mode IN that rely on the Corresponding_Generic_Association flag. However, this flag was only set for actuals with explicit expressions from the generic instance and unset for actuals with imp

[Ada] Improper extension of bounds of fixed-point type

2018-11-14 Thread Pierre-Marie de Rodat
If the given Delta of an ordinariy fixed-point type is not a machine number and there is no specified 'Small for the type, the compiler chooses the actual bounds of the type using the nearest model numbers that include the given bounds, but it is free to exclude those bounds if a size clause restri

[Ada] Limited function violates No_Exception_Propagation

2018-11-14 Thread Pierre-Marie de Rodat
This patch suppresses the generation of raise statements in the context of build-in-place and elaboration checks for primitives of tagged types when exceptions cannot be used. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-11-14 Hristian Kirtchev gcc/ada/ * checks.adb (Instal

[Ada] Unnesting transformations for blocks in package bodies

2018-11-14 Thread Pierre-Marie de Rodat
The declarations in the package body may have created blocks with nested subprograms. Such a block must be transformed into a procedure followed by a call to it, so that unnesting can handle uplevel references within these nested subprograms (typically generated subprograms to handle finalization a

[Ada] Visibility error on used enumerated type

2018-11-14 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby the freezing of a nested package containing an enumerated type declaration would cause visibility errors on literals of such type when a use_all_type_clause for it appears within the same declarative region. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-

[Ada] Crash on ignored Ghost assignment

2018-11-14 Thread Pierre-Marie de Rodat
This patch modifies the way analysis determine whether an assignment is an ignored Ghost assignment. This is now achieved by preanalyzing a copy of the left hand side in order to account for potential code generated by the left hand side itself. No small reproducer possible. Tested on x86_64-pc-l

[Ada] System'To_Address not always static

2018-11-14 Thread Pierre-Marie de Rodat
System'To_Address is supposed to be static when its parameter is static. This patch fixes a bug in which it is considered nonstatic when used as the initial value of a variable with the Thread_Local_Storage aspect, so the compiler incorrectly gives an error when initializing such a variable with Sy

[Ada] Renamed equality leads to spurious errors

2018-11-14 Thread Pierre-Marie de Rodat
The following patch corrects the search for the equality function to handle cases where the equality could be a renaming of another routine. No simple reproducer possible because this requires PolyORB. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-11-14 Hristian Kirtchev gcc/ada/

[Ada] Enhance constraints propagation to ease the work of optimizers

2018-11-14 Thread Pierre-Marie de Rodat
This patch recognizes additional object declarations whose defining identifier is known statically to be valid. This allows additional optimizations to be performed by the front-end. Executing: gcc -c -gnatDG p.ads On the following sources: with G; With Q; package P is Val : constan

[Ada] Compiler crash on decl. with limited aggregate and address clause

2018-11-14 Thread Pierre-Marie de Rodat
This patch fixes a compiler abort on an object declaration whose expression is an aggregate, when the type of the object is limited and the declaration is followed by an address clause for the declared object. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-11-14 Ed Schonberg gcc/ada/

[Ada] Fix assertion failure on pragma Compile_Time_Error in generic unit

2018-11-14 Thread Pierre-Marie de Rodat
There is no point in validating 'Alignment or 'Size of an entity declared in a generic unit after the back-end has been run, since such an entity is not passed to the back-end, and this can even lead to an assertion failure. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-11-14 Eric Botca

[Ada] Crash on use of generic formal package

2018-11-14 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby a complicated set of generic formal packages in conjunction with use_clauses may cause a crash during visibility checking due to a homonym being out of scope during the checking stage. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-11-14 Justin Squirek

[Ada] Missing constraint check on if-expression returning a string

2018-11-14 Thread Pierre-Marie de Rodat
If the context of an if-expression is constrained, its dependent expressions must obey the constraints of the expected type. Prior to this patch, this check was performed only for scalar types, by means of an added conversion. This is now enforced on all types by means of a qualified expression on

[Ada] Use of Suppress_Initialization with pragma Thread_Local_Storage

2018-11-14 Thread Pierre-Marie de Rodat
This patch allows for aspect/pragma Suppress_Initialization to be an acceptable form of missing initialization with respect to the semantics of pragma Thread_Local_Storage. -- Source -- -- gnat.adc pragma Initialize_Scalars; -- pack.ads with System; package Pack is

[Ada] More complete information level for -gnatR output

2018-11-14 Thread Pierre-Marie de Rodat
This adds a 4th information level for the -gnatR output, where relevant compiler-generated types are listed in addition to the information already output by -gnatR3. For the following package P: package P is type Arr0 is array (Positive range <>) of Boolean; type Rec (D1 : Positive; D2 :

[Ada] Crash on interface equality covered by a renaming declaration

2018-11-14 Thread Pierre-Marie de Rodat
The frontend crashes processing a tagged type that implements an interface which has an equality primitive (that is, "=") and covers such primitive by means of a renaming declaration. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-11-14 Javier Miranda gcc/ada/ * exp_disp.adb

[Ada] Spurious error on Ghost null procedure

2018-11-14 Thread Pierre-Marie de Rodat
This patch modifies the analysis (which is really expansion) of null procedures to set the Ghost mode of the spec when the null procedure acts as a completion. This ensures that all nodes and entities generated by the expansion are marked as Ghost, and provide a proper context for references to Gh

[Ada] Remove couple of recently added dead tests

2018-11-14 Thread Pierre-Marie de Rodat
N_Quantified_Expression and N_Iterated_Component_Association are unrelated nodes that cannot appear in the same context: the former can appear wherever an expression node is acceptable whereas the latter can appear only as an element of a component association list. So a test combining both most l

[Ada] Fix small regression with others choice in array aggregate

2018-11-14 Thread Pierre-Marie de Rodat
This change is aimed at fixing a fallout of bumping the default value of the Max_Others_Replicate parameter of the Convert_To_Positional routine. This parameter is responsible for taming the duplication of the expression of an others choice in an array aggregate so that it doesn't result in a code

[Ada] Problem with boundary case of XOR operation and unnesting

2018-11-14 Thread Pierre-Marie de Rodat
The XOR operation applied to a boolean array whose component type has the range True .. True raises constraint error. Previous to this patch, the expansion of the operation could lead to uplevel references that were not handled properly when unnesting is in effect. Tested on x86_64-pc-linux-gnu, c

Re: Bug 52869 - [DR 1207] "this" not being allowed in noexcept clauses

2018-11-14 Thread Umesh Kalappa
Thank you Jason and Marek for the suggestions . Attached patch(pr86512.patch) along the Changelog . and also please note tested the patch for x86_64 only with "make -k check-gcc RUNTESTFLAGS=dg.exp=g++.dg" and see no regressions. We are runing the make check-gcc(x86_64) and will let know for an

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Segher Boessenkool
On Wed, Nov 14, 2018 at 12:40:01PM +0100, Jakub Jelinek wrote: > On Wed, Nov 14, 2018 at 05:35:06AM -0600, Segher Boessenkool wrote: > > On Wed, Nov 14, 2018 at 10:47:57AM +0100, Jakub Jelinek wrote: > > > This makes no sense to me. There is nothing unsupported in passing > > > a local hard regist

Re: [PATCH] Support simd function declarations via a pre-include. (was: [PATCH][RFC]Overloading intrinsics)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 12:56:26PM +0100, Jakub Jelinek wrote: > One possibility is > if (gfc_match ("(%n) attributes simd", name) == MATCH_YES) " (%n) attributes simd" to be precise, so that whitespace is allowed in free form between builtin and (. And the following parsing might be " ( notinb

[debug/88006] -fdebug-types-section gives undefined ref

2018-11-14 Thread Nathan Sidwell
PR88006 and 87462 turn out to be the same problem, but started by different commits. The problem is that debug wants to emit a constant (for a non-type template parameter of a template instantiation) that refers to the address of some local function. That local might not be emitted though.

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 05:50:39AM -0600, Segher Boessenkool wrote: > > You mean for all local hard register variables living across function calls > > save them into temporary and restore them around the calls? > > One issue is that those variables aren't in SSA form, so liveness analysis > > is h

Re: [PATCH] Support simd function declarations via a pre-include. (was: [PATCH][RFC]Overloading intrinsics)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 12:35:27PM +0100, Jakub Jelinek wrote: > > + > > + When we come here, we have already matched the !GCC$ builtin string. */ > > +match > > +gfc_match_gcc_builtin (void) > > +{ > > + char builtin[GFC_MAX_SYMBOL_LEN + 1]; > > + > > + if (gfc_match_name (builtin) != MATCH_Y

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Segher Boessenkool
On Wed, Nov 14, 2018 at 01:00:43PM +0100, Jakub Jelinek wrote: > On Wed, Nov 14, 2018 at 05:50:39AM -0600, Segher Boessenkool wrote: > > > You mean for all local hard register variables living across function > > > calls > > > save them into temporary and restore them around the calls? > > > One i

[C++ PATCH] P1236R1 - Signed integers are two's complement

2018-11-14 Thread Jakub Jelinek
Hi! This paper from what I can see mostly just codifies our implementation-defined behavior as standard (two's complement as the only possible representation of signed integers, but still keeping UB signed integer overflows), the only changes I found that IMHO need changing in GCC are that left sh

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 06:11:37AM -0600, Segher Boessenkool wrote: > It doesn't "break" anything because it currently isn't guaranteed to work > either. There is __builtin_frame_address(0) for this of course (well, > almost the same semantics, and it is actually well-defined and actually > works)

[PATCH] Fix GC ICE with optimize attribute (PR other/88007)

2018-11-14 Thread Jakub Jelinek
Hi! As mentioned in the PR, ggc_collect is ok with GTY char * fields to point outside of GC memory, or if it points at the start of a GC chunk, or to the start of the STRING_CST string, anything else is not allowed. parse_optimize_options constructs the whole option like "-falign-jumps=16" into G

Re: [PATCH 1/9][GCC][AArch64][middle-end] Implement SLP recognizer for Complex addition with rotate and complex MLA with rotation

2018-11-14 Thread Richard Biener
On Sun, Nov 11, 2018 at 11:26 AM Tamar Christina wrote: > > Hi All, > > This patch adds support for SLP vectorization of Complex number arithmetic > with rotations > along with Argand plane. > > For this to work it has to recognize two statements in parallel as it needs > to match > against oper

[PATCH] Fold x86 bzhi with zero last operand (PR rtl-optimization/87817)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 09:29:15AM +0100, Richard Biener wrote: > So where do the zero_extracts come from? Can we somehow avoid > zero-sized bit-extracts at expansion time by folding them to zero? The following patch implements the missing folding. Note, as I've mentioned, it is just an optimizat

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Segher Boessenkool
Btw, if you just add void * retsp (void) { register void *sp __asm ("sp"); asm ("" : "+g" (sp)); // <-- this line return sp; } everything works fine. Segher

Re: [PATCH 8/9][GCC][Arm] Add autovectorization support for complex multiplication and addition

2018-11-14 Thread Richard Biener
On Sun, Nov 11, 2018 at 11:28 AM Tamar Christina wrote: > > Hi All, > > This patch adds the expander support for supporting autovectorization of > complex number operations > such as Complex addition with a rotation along the Argand plane. This also > adds support for complex > FMA. > > The ins

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 06:22:51AM -0600, Segher Boessenkool wrote: > Btw, if you just add > > void * > retsp (void) > { > register void *sp __asm ("sp"); > asm ("" : "+g" (sp)); // <-- this line > return sp; > } > > everything works fine. Even in what you are proposing, i.e. handle the v

Re: [PATCH] Fold x86 bzhi with zero last operand (PR rtl-optimization/87817)

2018-11-14 Thread Uros Bizjak
On Wed, Nov 14, 2018 at 1:21 PM Jakub Jelinek wrote: > > On Wed, Nov 14, 2018 at 09:29:15AM +0100, Richard Biener wrote: > > So where do the zero_extracts come from? Can we somehow avoid > > zero-sized bit-extracts at expansion time by folding them to zero? > > The following patch implements the

Re: [PATCH][GCC] Make DR_TARGET_ALIGNMENT compile time variable

2018-11-14 Thread Richard Biener
On Wed, Nov 14, 2018 at 12:43 PM Iain Sandoe wrote: > > > > On 13 Nov 2018, at 19:31, Dominique d'Humières wrote: > > > > Revision r266072 breaks bootstrap on darwin: > > > > In file included from ../../work/gcc/coretypes.h:430, > > from ../../work/gcc/tree-vect-data-refs.c:24: >

[PATCH][AArch64] Fix PR81800

2018-11-14 Thread Wilco Dijkstra
PR81800 is about the lrint inline giving spurious FE_INEXACT exceptions. The previous change for PR81800 didn't fix this: when lrint is disabled in the backend, the midend will simply use llrint. This actually makes things worse since llrint now also ignores FE_INVALID exceptions! The fix is to di

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Alexander Monakov
On Wed, 14 Nov 2018, Jakub Jelinek wrote: > On Wed, Nov 14, 2018 at 06:22:51AM -0600, Segher Boessenkool wrote: > > Btw, if you just add > > > > void * > > retsp (void) > > { > > register void *sp __asm ("sp"); > > asm ("" : "+g" (sp)); // <-- this line > > return sp; > > } > > > > everyt

Re: [debug/88006] -fdebug-types-section gives undefined ref

2018-11-14 Thread Richard Biener
On Wed, Nov 14, 2018 at 12:58 PM Nathan Sidwell wrote: > > PR88006 and 87462 turn out to be the same problem, but started by > different commits. > > The problem is that debug wants to emit a constant (for a non-type > template parameter of a template instantiation) that refers to the > address of

[Committed][AArch64] Fix PR62178 testcase failures

2018-11-14 Thread Wilco Dijkstra
The testcase for PR62178 has been failing for a while due to the pass conditions being too tight, resulting in failures with -mcmodel=tiny: ldr q2, [x0], 124 ld1r{v1.4s}, [x1], 4 cmp x0, x2 mla v0.4s, v2.4s, v1.4s bne .L7 -mcmodel=small

Re: [PATCH] Fix GC ICE with optimize attribute (PR other/88007)

2018-11-14 Thread Richard Biener
On Wed, 14 Nov 2018, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, ggc_collect is ok with GTY char * fields to point > outside of GC memory, or if it points at the start of a GC chunk, or > to the start of the STRING_CST string, anything else is not allowed. > > parse_optimize_options c

Re: [PATCH] Fold x86 bzhi with zero last operand (PR rtl-optimization/87817)

2018-11-14 Thread Richard Biener
On Wed, 14 Nov 2018, Jakub Jelinek wrote: > On Wed, Nov 14, 2018 at 09:29:15AM +0100, Richard Biener wrote: > > So where do the zero_extracts come from? Can we somehow avoid > > zero-sized bit-extracts at expansion time by folding them to zero? > > The following patch implements the missing fold

[PATCH] S/390: Disable 3 global-array-* tests for 31-bit mode

2018-11-14 Thread Ilya Leoshkevich
These tests rely on larl->movdi merge, which is not implemented for 31-bit mode. gcc/testsuite/ChangeLog: 2018-11-14 Ilya Leoshkevich * gcc.target/s390/global-array-almost-huge-element.c: Run only in 64-bit mode. * gcc.target/s390/global-array-almost-negative-huge-elem

[PATCH] S/390: Fix expectation in mrecord-mcount test for 31-bit mode

2018-11-14 Thread Ilya Leoshkevich
The emitted address is .long, not .quad, in that case. gcc/testsuite/ChangeLog: 2018-11-14 Ilya Leoshkevich * gcc.target/s390/mrecord-mcount.c (profileme): Expect .long in 31-bit mode. --- gcc/testsuite/gcc.target/s390/mrecord-mcount.c | 3 ++- 1 file changed, 2 insertions(+)

Re: [PATCH v3] Add sinh(atanh(x)) and cosh(atanh(x)) optimizations

2018-11-14 Thread Giuliano Augusto Faulin Belinassi
On Wed, Nov 14, 2018 at 7:41 AM Richard Biener wrote: > > On Tue, Nov 13, 2018 at 10:25 PM Giuliano Augusto Faulin Belinassi > wrote: > > > > Only do the optimization if flag_signed_zeros && > > !flag_finite_math_only is set, as suggested in the previous iteration. > > > > Before, the patch did t

Re: [PATCH] S/390: Fix expectation in mrecord-mcount test for 31-bit mode

2018-11-14 Thread Andreas Krebbel
On 14.11.18 13:55, Ilya Leoshkevich wrote: > The emitted address is .long, not .quad, in that case. > > gcc/testsuite/ChangeLog: > > 2018-11-14 Ilya Leoshkevich > > * gcc.target/s390/mrecord-mcount.c (profileme): Expect .long in > 31-bit mode. Ok. Thanks! Andreas

Re: [PATCH] S/390: Disable 3 global-array-* tests for 31-bit mode

2018-11-14 Thread Andreas Krebbel
On 14.11.18 13:50, Ilya Leoshkevich wrote: > These tests rely on larl->movdi merge, which is not implemented for > 31-bit mode. > > gcc/testsuite/ChangeLog: > > 2018-11-14 Ilya Leoshkevich > > * gcc.target/s390/global-array-almost-huge-element.c: Run only > in 64-bit mode. >

[PATCH] Fix PR88021

2018-11-14 Thread Richard Biener
This reportedly fixes PR88021 - I forgot to change some ints to lambda_ints when widening the representation of lambda_vectors. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-11-14 Richard Biener PR middle-end/88021 * tree-data-ref.c (lambda_mat

[PATCH 0/6] If conversion with multiple sets.

2018-11-14 Thread Robin Dapp
Hi, the follow patch set was created in an attempt to allow multiple sets to be if converted. I was not able to make it work out of the box since I found the cost estimation for the newly created sequence to always be much higher than the sequence before. This is due to noce_convert_multiple_set

[PATCH 2/6] ifcvt: Allow constants operands in noce_convert_multiple_sets.

2018-11-14 Thread Robin Dapp
This patch checks whether the current target supports conditional moves with immediate then/else operands and allows noce_convert_multiple_sets to deal with constants subsequently. Also, minor refactoring is performed. -- gcc/ChangeLog: 2018-11-14 Robin Dapp * ifcvt.c (have_const_cmo

Re: [PATCH][libbacktrace] Handle DW_FORM_GNU_strp_alt

2018-11-14 Thread Tom de Vries
On 13-11-18 14:42, Tom de Vries wrote: > diff --git a/libbacktrace/Makefile.am b/libbacktrace/Makefile.am > index 3c1bd49dd7b..2fec9bbb4b6 100644 > --- a/libbacktrace/Makefile.am > +++ b/libbacktrace/Makefile.am > @@ -96,6 +96,28 @@ btest_LDADD = libbacktrace.la > > check_PROGRAMS += btest > >

[PATCH 3/6] ifcvt: Use enum instead of transform_name string.

2018-11-14 Thread Robin Dapp
This patch introduces an enum for ifcvt's various noce transformations. As the transformation might be queried by the backend, I find it nicer to allow checking for a proper type instead of a string comparison. -- gcc/ChangeLog: 2018-11-14 Robin Dapp * ifcvt.c (noce_try_move): Use ne

[PATCH 5/6] ifcvt: Only created temporaries as needed.

2018-11-14 Thread Robin Dapp
noce_convert_multiple_sets creates temporaries for the destination of every emitted cmov and expects subsequent passes to get rid of them. This does not happen every time and even if the temporaries are removed, code generation can be affected adversely. In this patch, temporaries are only create

[PATCH 6/6] S/390: Add test for noce_convert_multiple_sets.

2018-11-14 Thread Robin Dapp
New test. -- gcc/testsuite/ChangeLog: 2018-11-14 Robin Dapp * gcc.target/s390/ifcvt-two-insns-int.c: New test. --- .../gcc.target/s390/ifcvt-two-insns-int.c | 26 +++ 1 file changed, 26 insertions(+) create mode 100644 gcc/testsuite/gcc.target/s390/ifcvt-two-ins

[PATCH 1/6] ifcvt: Store the number of created cmovs.

2018-11-14 Thread Robin Dapp
This patch saves the number of created conditional moves by noce_convert_multiple_sets in the IF_INFO struct. This may be used by the backend to easier decide whether to accept a generated sequence or not. -- gcc/ChangeLog: 2018-11-14 Robin Dapp * ifcvt.c (noce_convert_multiple_sets

[PATCH 4/6] S/390: Implement noce_conversion_profitable_p.

2018-11-14 Thread Robin Dapp
This patch implements noce_conversion_profitable_p by checking for the transformation ifcvt used and only return positively if noce_convert_multiple_sets created less than MAX_IFCVT_INSNS insns. -- gcc/ChangeLog: 2018-11-14 Robin Dapp * config/s390/s390.c (MAX_IFCVT_INSNS): Define.

Re: [PATCH] Add C++ runtime support for new 128-bit long double format

2018-11-14 Thread Michael Meissner
On Mon, Nov 12, 2018 at 11:09:45AM +, Jonathan Wakely wrote: > This adds support for the new 128-bit long double format on powerpc64, > see https://fedoraproject.org/wiki/Changes/PPC64LE_Float128_Transition > for more details. > > Most of the required changes are to the locale facets that pars

Re: [PR81878]: fix --disable-bootstrap --enable-languages=ada, and cross-back gnattools build

2018-11-14 Thread Arnaud Charlet
> Huh, indeed - it's a host_module without bootstrap ... and libada is > a target_module not bootstrapped either. So we're indeed in a curious > situation where we have a bootstrap of Ada requiring a host Ada but > nothing of Ada is actually bootstrapped ... ;) Not sure what you mean by that, al

Re: Bug 52869 - [DR 1207] "this" not being allowed in noexcept clauses

2018-11-14 Thread Umesh Kalappa
>>We are runing the make check-gcc(x86_64) and will let know for any >>regressions . No regress found . ~Umesh On Wed, Nov 14, 2018 at 5:18 PM Umesh Kalappa wrote: > > Thank you Jason and Marek for the suggestions . > > Attached patch(pr86512.patch) along the Changelog . > > and also please not

Re: [PATCH][libbacktrace] Handle DW_FORM_GNU_strp_alt

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 02:08:05PM +0100, Tom de Vries wrote: > > +btest_dwz_CFLAGS = $(AM_CFLAGS) -g -O0 > > Hmm, I already discovered that specifying the -O0 doesn't work, since > it's overridden by $(CFLAGS). > > With a hack like this: > ... > diff --git a/libbacktrace/Makefile.am b/libbacktra

Re: [PATCH v3] Add sinh(atanh(x)) and cosh(atanh(x)) optimizations

2018-11-14 Thread Wilco Dijkstra
Hi, > Indeed. After plotting the graph of both functions, it is very clear > that this check isn't required. Sorry about that. It wouldn't be clear from the graph, you need to check that +0.0, -0.0, out of range values, infinities, NaNs give the same answer before/after your transformation. If s

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Segher Boessenkool
On Wed, Nov 14, 2018 at 01:27:26PM +0100, Jakub Jelinek wrote: > On Wed, Nov 14, 2018 at 06:22:51AM -0600, Segher Boessenkool wrote: > > Btw, if you just add > > > > void * > > retsp (void) > > { > > register void *sp __asm ("sp"); > > asm ("" : "+g" (sp)); // <-- this line > > return sp; >

Re: [PATCH] diagnose unsupported uses of hardware register variables (PR 88000)

2018-11-14 Thread Segher Boessenkool
On Wed, Nov 14, 2018 at 03:33:43PM +0300, Alexander Monakov wrote: > On Wed, 14 Nov 2018, Jakub Jelinek wrote: > > > On Wed, Nov 14, 2018 at 06:22:51AM -0600, Segher Boessenkool wrote: > > > Btw, if you just add > > > > > > void * > > > retsp (void) > > > { > > > register void *sp __asm ("sp");

Re: [PATCH] Support simd function declarations via a pre-include.

2018-11-14 Thread Martin Liška
On 11/14/18 12:35 PM, Jakub Jelinek wrote: > On Wed, Nov 14, 2018 at 11:06:04AM +0100, Martin Liška wrote: >> Question I have is about default search locations for the header file. On my >> machine I can >> see: >> access("/home/marxin/bin/gcc2/lib64/gcc/x86_64-pc-linux-gnu/9.0.0/math-vector-fortr

Re: [PATCH] Support simd function declarations via a pre-include.

2018-11-14 Thread Jakub Jelinek
On Wed, Nov 14, 2018 at 03:09:49PM +0100, Martin Liška wrote: > > So omp-simd-notinbranch or omp_simd_notinbranch? > > Any particular reason for this weird syntax and for not also > > supporting inbranch or just simd? > > Questionable whether to support as current glibc vector ABI only uses > not

Re: [PATCH] Fix bootstrap with GCC 4.1.2 (PR bootstrap/86739)

2018-11-14 Thread Jonathan Wakely
On 14/11/18 09:25 +0100, Richard Biener wrote: On Wed, 14 Nov 2018, Jakub Jelinek wrote: Hi! As mentioned in the PR, with GCC before 4.3 one can't instantiate std::pair where one or both of the template parameters are reference types, because the std::pair constructor has arguments references

[PATCH] Add missing dir to create_testsuite_files script

2018-11-14 Thread Jonathan Wakely
* scripts/create_testsuite_files: Add special_functions to the list of directories to search. Add comment referring to conformance.exp. * testsuite/libstdc++-dg/conformance.exp: Add comment referring to create_testsuite_files. Committed to trunk. commit de90993957

Re: [PATCH] Fix PR87985

2018-11-14 Thread Richard Biener
On Mon, 12 Nov 2018, Richard Biener wrote: > > The following fixes split_constant_offset unbound un-CSEing of > expressions when following SSA def stmts. Simply limiting it to > single-uses isn't good for consumers so the following instead > limits analysis by implementing a cache. Note this ma

Re: Bug 52869 - [DR 1207] "this" not being allowed in noexcept clauses

2018-11-14 Thread Marek Polacek
On Wed, Nov 14, 2018 at 05:18:40PM +0530, Umesh Kalappa wrote: > Thank you Jason and Marek for the suggestions . > > Attached patch(pr86512.patch) along the Changelog . It seems you've attached the wrong patch. Marek

Re: [PATCH][libbacktrace] Handle DW_FORM_GNU_strp_alt

2018-11-14 Thread Tom de Vries
On 14-11-18 14:25, Jakub Jelinek wrote: > On Wed, Nov 14, 2018 at 02:08:05PM +0100, Tom de Vries wrote: >>> +btest_dwz_CFLAGS = $(AM_CFLAGS) -g -O0 >> >> Hmm, I already discovered that specifying the -O0 doesn't work, since >> it's overridden by $(CFLAGS). >> >> With a hack like this: >> ... >> dif

Fix PR86575

2018-11-14 Thread Michael Matz
Hi, our warning code sometimes adds locations to statement which didn't have them before, which can in turn lead to code changes (here only label numbers change). It seems better to not do that from warning code, and here it's easy to do: just return the location we want to use for warnings,

Re: [Committed][AArch64] Fix PR62178 testcase failures

2018-11-14 Thread Segher Boessenkool
On Wed, Nov 14, 2018 at 12:37:05PM +, Wilco Dijkstra wrote: > +/* { dg-final { scan-assembler-not { dup } } } */ > +/* { dg-final { scan-assembler-not { fmov } } } */ { dup } is the same as " dup " , that is, with spaces and all. I don't think you want that (there usually is a tab charact

C++ PATCH for c++/87781, detect invalid elaborated-type-specifier

2018-11-14 Thread Marek Polacek
In elaborated-type-specifier, the typename keyword can only follow a nested-name-specifier: class-key nested-name-specifier template[opt] simple-template-id but we weren't detecting it. Bootstrapped/regtested on x86_64-linux, ok for trunk? 2018-11-14 Marek Polacek PR c++/87781 - d

  1   2   >