[PATCH, middle-end/i386]: Fix PR88474, Inline built-in hypot for -ffast-math

2018-12-13 Thread Uros Bizjak
Attached patch inlines calls to hypotf and hypot using x87 XFmode arithmetic. 2018-12-14 Uros Bizjak PR target/88474 * internal-fn.def (HYPOT): New. * optabs.def (hypot_optab): New. * config/i386/i386.md (hypot3): New expander. Bootstrapped and regression tested on

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 09:03:57PM -0700, Martin Sebor wrote: > It's as good as the design of GCC attributes allows. Based on No. > the manual a function declaration like > > __attribute__ ((alloc_size (1), malloc)) > void* allocate (unsigned); > > should have those two attributes applied

Re: [RS6000] PR88311, mlongcall indirections are optimised away

2018-12-13 Thread Segher Boessenkool
On Fri, Dec 14, 2018 at 04:55:37PM +1030, Alan Modra wrote: > Masking CALL_LONG from the cookie was done in order to simplify and > correct length attribute calculations for indirect calls at one point > in my call series tidy when the indirect patterns used alternatives > "0,n" on the cookie

Re: [PATCH] x86: Don't use get_frame_size to finalize stack frame

2018-12-13 Thread Uros Bizjak
On Thu, Dec 13, 2018 at 6:36 PM H.J. Lu wrote: > > get_frame_size () returns used stack slots during compilation, which > may be optimized out later. Since ix86_find_max_used_stack_alignment > is called by ix86_finalize_stack_frame_flags to check if stack frame > is required, there is no need to

[RS6000] PR88311, mlongcall indirections are optimised away

2018-12-13 Thread Alan Modra
Masking CALL_LONG from the cookie was done in order to simplify and correct length attribute calculations for indirect calls at one point in my call series tidy when the indirect patterns used alternatives "0,n" on the cookie operand. (Leaving the CALL_LONG in place calculated the wrong length

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Martin Sebor
On 12/13/18 4:39 PM, Jakub Jelinek wrote: On Thu, Dec 13, 2018 at 02:05:29PM -0700, Martin Sebor wrote: So how is the builtin defined then? Is the argument always an expression and you only return whether its type has the attribute, or do something different if the expression is of certain

[ping] Fix ICE in pp_cxx_unqualified_id (PR c++/88348)

2018-12-13 Thread Zhouyi Zhou
Hello, Ping for https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00151.html By the way, are there any GCC open project for volunteer beginners to do in spare time. Thanks in advance for your feedback, Zhouyi

Re: [PATCH] [PR87012] canonicalize ref type for tmpl arg

2018-12-13 Thread Alexandre Oliva
On Dec 5, 2018, Jason Merrill wrote: > I would expect that this same issue would come up with other types; I > think we want to fix this sooner, when we are figuring out what type > we want to convert the argument to. You mean like this? [PR87012] canonicalize ref type for tmpl arg When

Re: [PATCH] [PR86823] retain deferred access checks from outside firewall

2018-12-13 Thread Alexandre Oliva
On Dec 6, 2018, Alexandre Oliva wrote: > I'm giving your proposed patch a full round of testing along with other > patches. [PR86823] retain deferred access checks from outside firewall We used to preserve deferred access check along with resolved template ids, but a tentative parsing

Re: [doc,committed] clarify docs for function attribute "const"

2018-12-13 Thread Sandra Loosemore
On 12/13/18 3:52 PM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00426.html (I have now committed the @code{const} cleanup mentioned below.) This patch is OK except for one nit. @cindex pointer arguments Note that a function that has pointer arguments and

Re: [PATCH] Added information about inline assembler in stack calculations (.su files)

2018-12-13 Thread Jeff Law
On 12/7/18 4:35 PM, Segher Boessenkool wrote: > Hi! > > On Fri, Dec 07, 2018 at 07:51:35AM +, Niklas DAHLQUIST wrote: >> On 12/1/18 1:15 AM, Jeff Law wrote: >>> One could argue that allocating stack space inside an ASM is a really >>> bad idea. Consider things like dwarf debugging and unwind

[PATCH] PR fortran 88116,88467 -- Catch array constructor errors

2018-12-13 Thread Steve Kargl
The attached patch has been regression tested on x86_64-*-freebsd. It fixes to PR. Both PR are related to errors in array constructors. PR fortran/88116 was not reporting an error on type mismatches with nested array constructors. PR fortran/88467 was silently accepting a CHARACTER entity

Re: [PATCH] handle function pointers in __builtin_object_size (PR 88372)

2018-12-13 Thread Jeff Law
On 12/6/18 4:01 PM, Martin Sebor wrote: > On 12/6/18 2:26 PM, Jakub Jelinek wrote: >> On Thu, Dec 06, 2018 at 01:21:58PM -0700, Martin Sebor wrote: >>> Bug 88372 - alloc_size attribute is ignored on function pointers >>> points out that even though the alloc_size attribute is accepted >>> on 

Re: [ping] Change static chain to r11 on aarch64

2018-12-13 Thread Wilco Dijkstra
Hi Martin, > One could also argue that it creates a false sense of security > and diverts resources from properly fixing the real problems > i.e. the buffer overflows which lets an attacker write to the > stack in the first place. A program without buffer overflows > is secure even without an

Re: [PATCH] Testcase for PR 88297 and minor fixes

2018-12-13 Thread Jeff Law
On 12/6/18 1:13 PM, Michael Ploujnikov wrote: > Thanks to Martin we now have a test that exercises (cp) cloning > machinery during the WPA stage of LTO. > > Also, during debugging I found that print_all_lattices would trigger > an assert if I tried to call it inside decide_whether_version_node. >

Re: [PATCH] Fix VRP with -fno-delete-null-pointer-checks (PR c/88367)

2018-12-13 Thread Jeff Law
On 12/6/18 1:32 PM, Jakub Jelinek wrote: >> For -fno-delete-null-pointer-checks ISTM >> we should indicate "we don't know anything about the result" of such an >> operation. > > There are cases where we still know something. The largest valid object > that can be supported is half of the

V5 [PATCH] C/C++: Add -Waddress-of-packed-member

2018-12-13 Thread H.J. Lu
On Thu, Dec 13, 2018 at 12:50 PM Jason Merrill wrote: > > On 9/25/18 11:46 AM, H.J. Lu wrote: > > On Fri, Aug 31, 2018 at 2:04 PM, Jason Merrill wrote: > >> On 07/23/2018 05:24 PM, H.J. Lu wrote: > >>> > >>> On Mon, Jun 18, 2018 at 12:26 PM, Joseph Myers > >>> wrote: > > On Mon, 18

Re: [PATCH 01/10] Fix LRA bug

2018-12-13 Thread Jeff Law
On 12/12/18 4:52 AM, Andrew Stubbs wrote: > > [This is new patch not included in the previously posted patch sets.] > > This patch fixes an ICE building libgfortran/random.c. > > The problem was an adddi3 instruction that had an eliminable frame pointer. > GCN adddi3 includes a match_scratch,

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 02:05:29PM -0700, Martin Sebor wrote: > > So how is the builtin defined then? Is the argument always an expression > > and you only return whether its type has the attribute, or do something > > different if the expression is of certain kind? > > For a DECL the built-in

Re: [PATCH/wwwdocs] add uses of @code to coding conventions

2018-12-13 Thread Jeff Law
On 12/13/18 4:34 PM, Martin Sebor wrote: > Attached is the update I propose to add to the Spelling, > terminology and markup section of the Coding conventions, to > give guidance for when to use the @code{} Texinfo command. >  I believe this reflects existing (if somewhat inconsistent) > practice. 

Re: [PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)

2018-12-13 Thread Jeff Law
On 12/13/18 4:32 PM, Jakub Jelinek wrote: > On Thu, Dec 13, 2018 at 04:28:10PM -0700, Jeff Law wrote: >>> 2018-12-13 Jakub Jelinek >>> >>> PR rtl-optimization/88470 >>> * cfgcleanup.c (outgoing_edges_match): If the function is >>> shrink-wrapped and bb1 ends with a JUMP_INSN with a

Re: [PATCH v4][C][ADA] use function descriptors instead of trampolines in C

2018-12-13 Thread Jeff Law
On 12/12/18 11:12 AM, Uecker, Martin wrote: > > Hi Jeff, > > thank you. I fixed all the minor issues, but see below. > > > Am Montag, den 03.12.2018, 14:56 -0700 schrieb Jeff Law: >> On 11/4/18 1:48 PM, Uecker, Martin wrote: >>> Hi Joseph, >>> >>> here is a new version of this patch which adds

[PATCH/wwwdocs] add uses of @code to coding conventions

2018-12-13 Thread Martin Sebor
Attached is the update I propose to add to the Spelling, terminology and markup section of the Coding conventions, to give guidance for when to use the @code{} Texinfo command. I believe this reflects existing (if somewhat inconsistent) practice. It's not intended to add a new requirement.

Re: [PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 04:28:10PM -0700, Jeff Law wrote: > > 2018-12-13 Jakub Jelinek > > > > PR rtl-optimization/88470 > > * cfgcleanup.c (outgoing_edges_match): If the function is > > shrink-wrapped and bb1 ends with a JUMP_INSN with a single fake > > edge to EXIT, return

[C++ PATCH] Sanity check __cxa_* user declarations (PR c++/88482)

2018-12-13 Thread Jakub Jelinek
Hi! If the user provides his own __cxa_* prototypes and does so incorrectly (or even worse declares them as variables etc.), we can get various ICEs. The following patch adds some sanity checking, mainly that they are actually functions and with a compatible return type and argument type(s). For

Re: [PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)

2018-12-13 Thread Jeff Law
On 12/13/18 3:53 PM, Jakub Jelinek wrote: > Hi! > > The following testcase ICEs, because we have an indirect jump with > a single (fake) successor edge to EXIT, one reachable from the body > of the function after prologue and another one reachable from before the > prologue (due to

Re: [PATCH] Fix stmt folding in the inliner (PR tree-optimization/88444)

2018-12-13 Thread Jeff Law
On 12/13/18 3:59 PM, Jakub Jelinek wrote: > Hi! > > The inliner doesn't want to fold statements immediately, but records them > and then fold_marked_statements is meant to fold them when inlining is done. > > On the following testcase it doesn't fold some of them though. > The problem is that it

[PATCH] Improve gimplification of constructors with RANGE_EXPRs (PR c++/82294, PR c++/87436)

2018-12-13 Thread Jakub Jelinek
Hi! With the previously posted patch to use RANGE_EXPRs in build_vec_init, the following patch attempts to do what the reporters were asking for - determine if it wouldn't be more efficient to use (perhaps nested) loops to initialize at runtime some automatic variable over having huge .rodata

[C++ PATCH] Use RANGE_EXPRs in build_vec_init (PR c++/82294, PR c++/87436)

2018-12-13 Thread Jakub Jelinek
Hi! The following patch makes use of RANGE_EXPRs in build_vec_init, instead of appending many ctor elements. E.g. on the PR87436 testcase the memory usage goes down from more than 5GB to a few megabytes and compile time decreases significantly too. Bootstrapped/regtested on x86_64-linux and

[PATCH] Fix stmt folding in the inliner (PR tree-optimization/88444)

2018-12-13 Thread Jakub Jelinek
Hi! The inliner doesn't want to fold statements immediately, but records them and then fold_marked_statements is meant to fold them when inlining is done. On the following testcase it doesn't fold some of them though. The problem is that it wants to scan only newly added basic blocks (i.e. those

[PATCH] Fix ICE due to cross-jumping (PR rtl-optimization/88470)

2018-12-13 Thread Jakub Jelinek
Hi! The following testcase ICEs, because we have an indirect jump with a single (fake) successor edge to EXIT, one reachable from the body of the function after prologue and another one reachable from before the prologue (due to shrink-wrapping). The patch fixes this by disallowing crossjumping

Re: [doc,committed] clarify docs for function attribute "const"

2018-12-13 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2018-12/msg00426.html (I have now committed the @code{const} cleanup mentioned below.) On 12/6/18 6:12 PM, Martin Sebor wrote: On 12/3/18 11:04 PM, Sandra Loosemore wrote: On 12/3/18 2:47 PM, Martin Sebor wrote: [snip] Attached is my proposed update. 

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Martin Sebor
On 12/13/18 12:56 PM, Jakub Jelinek wrote: On Thu, Dec 13, 2018 at 12:48:18PM -0700, Martin Sebor wrote: The support is necessary in order to determine the attributes in expressions such as:   struct S { __attribute__ ((packed)) int a[32]; };   extern struct S s;   _Static_assert

Re: [C++ Patch] PR 84644 ("internal compiler error: in warn_misplaced_attr_for_class_type, at cp/decl.c:4718")

2018-12-13 Thread Jason Merrill
On 10/30/18 9:22 PM, Paolo Carlini wrote: Hi, On 30/10/18 21:37, Jason Merrill wrote: On 10/26/18 2:02 PM, Paolo Carlini wrote: On 26/10/18 17:18, Jason Merrill wrote: On Fri, Oct 26, 2018 at 4:52 AM Paolo Carlini wrote: On 24/10/18 22:41, Jason Merrill wrote: On 10/15/18 12:45 PM, Paolo

Re: [PATCH] [RFC] PR target/52813 and target/11807

2018-12-13 Thread Dimitar Dimitrov
On Thu, Dec 13, 2018 at 8:48:38 EET Segher Boessenkool wrote: > On Wed, Dec 12, 2018 at 06:26:10PM +0200, Dimitar Dimitrov wrote: > > I expect that if I mark a HW register as "clobber", compiler would save > > its > > contents before executing the asm statement, and after that it would > > restore

patch to fix PR88414

2018-12-13 Thread Vladimir Makarov
The following patch fixes    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88414 The patch was bootstrapped and tested on x86-64. Committed as rev. 267109. Index: ChangeLog === --- ChangeLog (revision 267108) +++ ChangeLog

Re: V4 [PATCH] C/C++: Add -Waddress-of-packed-member

2018-12-13 Thread Jason Merrill
On 9/25/18 11:46 AM, H.J. Lu wrote: On Fri, Aug 31, 2018 at 2:04 PM, Jason Merrill wrote: On 07/23/2018 05:24 PM, H.J. Lu wrote: On Mon, Jun 18, 2018 at 12:26 PM, Joseph Myers wrote: On Mon, 18 Jun 2018, Jason Merrill wrote: On Mon, Jun 18, 2018 at 11:59 AM, Joseph Myers wrote: On

Re: C++ PATCH for c++/88216, ICE with class type in non-type template parameter

2018-12-13 Thread Jason Merrill
On 12/11/18 4:05 PM, Marek Polacek wrote: On Tue, Dec 11, 2018 at 10:48:17AM -0500, Jason Merrill wrote: On 12/10/18 2:52 PM, Marek Polacek wrote: + if (processing_template_decl && value_dependent_expression_p (expr)) You don't need to check processing_template_decl before

Re: [PATCH] v4: C++: more location wrapper nodes (PR c++/43064, PR c++/43486)

2018-12-13 Thread Jason Merrill
On 12/13/18 3:12 PM, David Malcolm wrote: On Wed, 2018-12-12 at 15:37 -0500, Jason Merrill wrote: On 12/7/18 3:13 PM, David Malcolm wrote: On Tue, 2018-12-04 at 18:31 -0500, Jason Merrill wrote: On 12/3/18 5:10 PM, Jeff Law wrote: On 11/19/18 9:51 AM, David Malcolm wrote: [...] @@ -1058,6

[PATCH] Fix handling of POSIX paths containing a root-name

2018-12-13 Thread Jonathan Wakely
Fix path appending and concatenating to work correctly for a leading root-name. Check a new macro, SLASHSLASH_IS_ROOT_NAME, instead of making the behaviour depend directly on __CYGWIN__. * src/filesystem/std-path.cc (SLASHSLASH_IS_ROOT_NAME): New macro to control whether

Re: [PATCH] PR libstdc++/71044 optimize std::filesystem::path construction

2018-12-13 Thread Jonathan Wakely
On 12/12/18 17:22 +, Jonathan Wakely wrote: This new implementation has a smaller footprint than the previous implementation, due to replacing std::vector<_Cmpt> with a custom pimpl type that only needs a single pointer. The _M_type enumeration is also combined with the pimpl type, by using

Re: [C++ PATCH] Fix up __builtin_is_constant_evaluated handling in array type sizes (PR c++/88446)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 03:05:10PM -0500, Jason Merrill wrote: > > Perhaps use /*pretend_const_required=*/true? > > Please. And the name of the parameter should change to match the other > patches. OK with those changes. You've already acked a newer version of that patch that has that in and

Re: [C++ PATCH] Fix up __builtin_is_constant_evaluated handling in array type sizes (PR c++/88446)

2018-12-13 Thread Jason Merrill
On 12/11/18 3:35 PM, Marek Polacek wrote: On Tue, Dec 11, 2018 at 05:39:25PM +0100, Jakub Jelinek wrote: Hi! As mentioned in the PR, while we allow VLAs in some contexts in C++ as an extension, they aren't standard and the standard requires in those spots constant expressions, thus

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 12:48:18PM -0700, Martin Sebor wrote: > > The support is necessary in order to determine the attributes > > in expressions such as: > > > >   struct S { __attribute__ ((packed)) int a[32]; }; > > > >   extern struct S s; > > > >   _Static_assert

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Martin Sebor
On 12/13/18 12:20 PM, Martin Sebor wrote: On 12/13/18 11:59 AM, Jeff Law wrote: On 12/5/18 8:55 PM, Martin Sebor wrote: The __builtin_has_attribute function fails with an ICE when its first argument is an expression such as INDIRECT_REF, or many others.  The code simply assumes it's either a 

Re: [PATCH/doc] consistently use @code for const and volatile qualifiers

2018-12-13 Thread Jeff Law
On 12/13/18 12:10 PM, Martin Sebor wrote: > As we discussed, the manual isn't completely consistent in its > use of @code for const and volatile qualifiers.  I made a pass > through extend.texi and added @code wherever it seemed to be > missing.  This doesn't mean all uses but only those that >

Re: [PATCH] rs6000: Fix AIX aggregate passing fix

2018-12-13 Thread David Edelsohn
On Tue, Dec 4, 2018 at 7:26 PM Segher Boessenkool wrote: > > David's fix for the AIX aggregate passing from yesterday unfortunately > also triggers on powerpc64-linux. This fixes it. > > David, looking at this once more, does this not need a "&& type" test > on AIX? Before the AGGREGATE_TYPE_P

[PATCH, rs6000] Replace X-form addressing with D-form addressing in new pass for Power9

2018-12-13 Thread Kelvin Nilsen
This patch is a refinement of a path first submitted to this list on Nov. 10, 2018. This new patch incorporates improvements suggested by seg...@gcc.gnu.org. Two regression observed at the time this patch was previously distributed have been resolved as described here:

[PATCH] v4: C++: more location wrapper nodes (PR c++/43064, PR c++/43486)

2018-12-13 Thread David Malcolm
On Wed, 2018-12-12 at 15:37 -0500, Jason Merrill wrote: > On 12/7/18 3:13 PM, David Malcolm wrote: > > On Tue, 2018-12-04 at 18:31 -0500, Jason Merrill wrote: > > > On 12/3/18 5:10 PM, Jeff Law wrote: > > > > On 11/19/18 9:51 AM, David Malcolm wrote: > > > > [...] > > > > @@ -1058,6 +1058,9 @@

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Martin Sebor
On 12/13/18 11:59 AM, Jeff Law wrote: On 12/5/18 8:55 PM, Martin Sebor wrote: The __builtin_has_attribute function fails with an ICE when its first argument is an expression such as INDIRECT_REF, or many others.  The code simply assumes it's either a type or a decl.  The attached patch corrects 

[PATCH/doc] consistently use @code for const and volatile qualifiers

2018-12-13 Thread Martin Sebor
As we discussed, the manual isn't completely consistent in its use of @code for const and volatile qualifiers. I made a pass through extend.texi and added @code wherever it seemed to be missing. This doesn't mean all uses but only those that specifically refer to the qualifiers. In terms like

Re: [PATCH AutoFDO/4]Fix profile count computation/propagation.

2018-12-13 Thread Jeff Law
On 12/10/18 6:36 PM, Bin.Cheng wrote: > On Thu, Nov 8, 2018 at 6:33 AM Jeff Law wrote: >> On 10/31/18 12:34 AM, bin.cheng wrote: >>> Hi, >>> This patch fixes AutoFDO breakage on trunk. The main reason for breakage >>> is AutoFDO >>> relies on standalone edge count computing and propagating

Re: [PATCH 1/3][GCC] Add new target hook asm_post_cfi_startproc

2018-12-13 Thread Jason Merrill
On 11/5/18 5:18 AM, Sam Tebbs wrote: On 11/05/2018 07:54 AM, Richard Biener wrote: On Fri, 2 Nov 2018, Sam Tebbs wrote: On 11/02/2018 05:28 PM, Sam Tebbs wrote: Hi all, This patch adds a new target hook called "asm_post_cfi_startproc". This hook is intended to be used by the aarch64

Re: [PATCH] handle expressions in __builtin_has_attribute (PR 88383)

2018-12-13 Thread Jeff Law
On 12/5/18 8:55 PM, Martin Sebor wrote: > The __builtin_has_attribute function fails with an ICE when > its first argument is an expression such as INDIRECT_REF, or > many others.  The code simply assumes it's either a type or > a decl.  The attached patch corrects this oversight. > > While 

Re: [PATCH] Fix cleanup_auto_inc_dec on x86 (PR rtl-optimization/88416)

2018-12-13 Thread Jeff Law
On 12/11/18 9:43 AM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, x86 (maybe a couple of other targets) isn't an > AUTO_INC_DEC target, it doesn't have REG_INC notes nor wants the generic > code to synthetize any pre/post inc/dec/modify, but does support push/pop > patterns that use

Re: [PATCH AutoFDO]Restoring indirect call value profile transformation

2018-12-13 Thread Jeff Law
On 12/12/18 8:50 PM, bin.cheng wrote: > Hi, > > Due to ICE and mal-functional bugs, indirect call value profile transformation > is disabled on GCC-7/8/trunk. This patch restores the transformation. The > main issue is AutoFDO should store cgraph_node's profile_id of callee func in > the first

Re: [PATCH] Fix split-path-5.c testcase (PR testsuite/88454)

2018-12-13 Thread Jeff Law
On 12/13/18 12:49 AM, Jakub Jelinek wrote: > Hi! > > On Mon, Dec 10, 2018 at 09:56:46PM -0700, Jeff Law wrote: >> Note that split-path-5 has the same basic structure. A half-diamond >> with a single statement in the middle block that should be trivially >> if-convertable if profitable. So I

Re: [RFC] Handle LHS zero_extracts in DSE

2018-12-13 Thread Jeff Law
On 12/7/18 8:57 AM, Andreas Krebbel wrote: > Hi, > > debugging a problem with an older GCC (4.6). I've seen RTXs using > ZERO_EXTRACT LHS operands on MEMs as in: > > (insn 7 6 0 (set (zero_extract:DI (mem/s/c:QI (plus:DI (reg/f:DI 39 > virtual-stack-vars) > (const_int -5

Re: [PATCH AutoFDO]Call update_max_bb_count even if autofdo counts are all zeros

2018-12-13 Thread Jeff Law
On 12/12/18 8:50 PM, bin.cheng wrote: > Hi, > This patch calls update_max_bb_count even if autofdo counts are all zeros, > otherwise it would trigger ICE because of mismatch between basic blocks' > count (all autofdo::zero) and cfun->cfg->max_count (guessed::non_zero). > For functions with all

Re: [PATCH] avoid folding snprintf calls with bounds > INT_MAX (PR 87096)

2018-12-13 Thread Jeff Law
On 12/12/18 4:18 PM, Martin Sebor wrote: > POSIX requires snprintf to fail with EOVERFLOW when the specified > bound exceeds INT_MAX.  This requirement conflicts with the C > requirements on valid calls to the function and isn't universally > implemented (e.g., Glibc doesn't seem to follow it, and 

Re: [PATCH, rs6000] Allow libitm to use HTM on newer hw and kernels

2018-12-13 Thread Peter Bergner
On 12/13/18 10:42 AM, Peter Bergner wrote: > On 12/13/18 2:41 AM, Segher Boessenkool wrote: >> Or like >> >> unsigned long htm_flags = PPC_FEATURE2_HAS_HTM >> #ifdef PPC_FEATURE2_HTM_NO_SUSPEND >> | PPC_FEATURE2_HTM_NO_SUSPEND >> #endif >> | 0;

Re: [PATCH] match_asm_constraints: Use copy_rtx where needed (PR88001)

2018-12-13 Thread Jeff Law
On 12/12/18 1:22 PM, Segher Boessenkool wrote: > The new insn here (temporarily) illegally shares RTL. This fixes it. > > Tested with an ARC cross, and regstrapped on powerpc64-linux {-m32,-m64}. > Is this okay for trunk? > > > Segher > > > 2018-12-12 Segher Boessenkool > > PR

Re: [PATCH AutoFDO]Skip generating histogram value for internal call

2018-12-13 Thread Jeff Law
On 12/12/18 8:50 PM, bin.cheng wrote: > Hi, > This patch skips generating histogram value for internal function call in > autofdo, > otherwise it would trigger ICE with following patch re-enabling indirect call > value > profile transformation. I think this patch is actually needed for GCC-6 on

Re: RFA: PATCH to add pp command to gdbinit.in

2018-12-13 Thread Marek Polacek
On Thu, Dec 13, 2018 at 12:48:37PM -0500, Jason Merrill wrote: > On Thu, Dec 13, 2018 at 12:26 PM Marek Polacek wrote: > > On Thu, Dec 13, 2018 at 10:15:07AM -0700, Jeff Law wrote: > > > On 12/6/18 1:59 PM, Jason Merrill wrote: > > > > Since pvt was removed, it's bugged me that to pretty-print a

Re: RFA: PATCH to add pp command to gdbinit.in

2018-12-13 Thread Jason Merrill
On Thu, Dec 13, 2018 at 12:26 PM Marek Polacek wrote: > On Thu, Dec 13, 2018 at 10:15:07AM -0700, Jeff Law wrote: > > On 12/6/18 1:59 PM, Jason Merrill wrote: > > > Since pvt was removed, it's bugged me that to pretty-print a vec I > > > needed to write out "call debug($)". So this patch adds a

[PATCH] x86: Don't use get_frame_size to finalize stack frame

2018-12-13 Thread H.J. Lu
get_frame_size () returns used stack slots during compilation, which may be optimized out later. Since ix86_find_max_used_stack_alignment is called by ix86_finalize_stack_frame_flags to check if stack frame is required, there is no need to call get_frame_size () which may give inaccurate final

Re: RFA: PATCH to add pp command to gdbinit.in

2018-12-13 Thread Marek Polacek
On Thu, Dec 13, 2018 at 10:15:07AM -0700, Jeff Law wrote: > On 12/6/18 1:59 PM, Jason Merrill wrote: > > Since pvt was removed, it's bugged me that to pretty-print a vec I > > needed to write out "call debug($)". So this patch adds a generic > > command "pp" to print anything handled by a debug

Re: RFA: PATCH to add pp command to gdbinit.in

2018-12-13 Thread Jeff Law
On 12/6/18 1:59 PM, Jason Merrill wrote: > Since pvt was removed, it's bugged me that to pretty-print a vec I > needed to write out "call debug($)". So this patch adds a generic > command "pp" to print anything handled by a debug overload. > > OK for trunk? > Seems quite reasonable. I didn't

Re: [ping] Change static chain to r11 on aarch64

2018-12-13 Thread Uecker, Martin
Hi Wilco, Am Donnerstag, den 13.12.2018, 16:33 + schrieb Wilco Dijkstra: > Uecker, Martin wrote: > > Am Mittwoch, den 12.12.2018, 22:04 + schrieb Wilco Dijkstra: > > > Hi Martin, > > > > > > > Does a non-executable stack actually improve security? > > > > > > Absolutely, it's like

Re: [PATCH][RS6000] Fix PR87870: ppc64 generates poor code when loading constants into TImode vars

2018-12-13 Thread Peter Bergner
On 11/16/18 5:29 PM, Segher Boessenkool wrote: > On Fri, Nov 16, 2018 at 04:26:18PM -0600, Peter Bergner wrote: >> However, when I made the change below, the length attribute seems a >> little off. For *_64bit, we have a length of 4, but for *_32bit, we >> have a length of 32. The "4" looks

Re: [PATCH] Delete powerpcspe

2018-12-13 Thread Jeff Law
On 12/12/18 10:33 AM, Segher Boessenkool wrote: > On Wed, Dec 12, 2018 at 11:36:29AM +0100, Richard Biener wrote: >> On Tue, Dec 11, 2018 at 2:37 PM Jeff Law wrote: >>> One way to deal with these problems is to create a fake simulator that >>> always returns success. That's what my tester does

Re: [PATCH, rs6000] Allow libitm to use HTM on newer hw and kernels

2018-12-13 Thread Peter Bergner
On 12/13/18 2:41 AM, Segher Boessenkool wrote: > Or like > > unsigned long htm_flags = PPC_FEATURE2_HAS_HTM > #ifdef PPC_FEATURE2_HTM_NO_SUSPEND > | PPC_FEATURE2_HTM_NO_SUSPEND > #endif > | 0; > > Okay for trunk with either style. Thanks!

Re: [ping] Change static chain to r11 on aarch64

2018-12-13 Thread Wilco Dijkstra
Hi Martin, Uecker, Martin wrote: >Am Mittwoch, den 12.12.2018, 22:04 + schrieb Wilco Dijkstra: >> Hi Martin, >> >> > Does a non-executable stack actually improve security? >> >> Absolutely, it's like closing your front door rather than just leave it open >> for anyone. > > The question is

Re: [PATCH] Support AVX512F masked gather loads (PR tree-optimization/88464)

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 05:09:17PM +0100, Richard Biener wrote: > Is there any chance you could look at replacing the i386 code to work with > the new IFN style used by Aarch64? Maybe for GCC 10, I'm afraid it is a lot of work mainly due to the weirdnesses of x86 mixed index vs. data sized

Re: [PATCH] Support AVX512F masked gather loads (PR tree-optimization/88464)

2018-12-13 Thread Richard Biener
On December 12, 2018 11:43:10 PM GMT+01:00, Jakub Jelinek wrote: >Hi! > >We support either the AVX2 gather loads (128-bit or 256-bit, using >masks in >vector registers), both conditional and unconditional, but AVX512F >gather >loads only unconditional. The problem was that tree-vect-stmts.c

Re: Add a loop versioning pass

2018-12-13 Thread Richard Biener
On December 12, 2018 7:43:10 PM GMT+01:00, Richard Sandiford wrote: >Richard Biener writes: >> On Thu, Dec 6, 2018 at 2:19 PM Richard Sandiford >>> Tested on x86_64-linux-gnu, aarch64-linux-gnu and aarch64_be-elf. >>> Also repeated the performance testing (but haven't yet tried an >>> LTO

Re: [committed] Clean up Fortran OpenACC wait clause handling

2018-12-13 Thread Thomas Schwinge
Hi Julian! On Mon, 3 Dec 2018 16:02:23 +, Julian Brown wrote: > On Fri, 30 Nov 2018 21:48:20 +0100 > Thomas Schwinge wrote: > > commit 3e3de40a5ab21d72f08071a7a40120dd05608cc1 > > Author: tschwinge > > Date: Fri Nov 30 20:39:18 2018 + > > > > Clean up Fortran OpenACC wait clause

Re: [patch] various OpenACC reduction enhancements - ME and nvptx changes

2018-12-13 Thread Julian Brown
On Tue, 4 Dec 2018 16:55:04 +0100 Tom de Vries wrote: > On 04-12-18 13:29, Jakub Jelinek wrote: > > On Fri, Jun 29, 2018 at 11:19:53AM -0700, Cesar Philippidis wrote: > >> The attached patch includes the nvptx and GCC ME reductions > >> enhancements. > >> > >> Is this patch OK for trunk? It

Re: [PATCH 0/6, OpenACC, libgomp] Async re-work

2018-12-13 Thread Thomas Schwinge
Hi! On Thu, 13 Dec 2018 23:28:49 +0800, Chung-Lin Tang wrote: > On 2018/12/7 6:26 AM, Julian Brown wrote: > > On Thu, 6 Dec 2018 22:22:46 + > > Julian Brown wrote: > > > >> On Thu, 6 Dec 2018 21:42:14 +0100 > >> Thomas Schwinge wrote: > >> > >>> [...] > >>> ..., where the "Invalid read

Re: [PATCH, OpenACC] Enable GOMP_MAP_FIRSTPRIVATE_INT for OpenACC

2018-12-13 Thread Julian Brown
On Fri, 7 Dec 2018 15:05:46 +0100 Jakub Jelinek wrote: > On Thu, Dec 06, 2018 at 10:40:41PM +, Julian Brown wrote: > > + && (TREE_CODE (inner_type) == REAL_TYPE > > + || (!omp_is_reference (var) > > + && INTEGRAL_TYPE_P (inner_type)) > > +

Re: [PATCH 0/6, OpenACC, libgomp] Async re-work

2018-12-13 Thread Chung-Lin Tang
On 2018/12/7 6:26 AM, Julian Brown wrote: On Thu, 6 Dec 2018 22:22:46 + Julian Brown wrote: On Thu, 6 Dec 2018 21:42:14 +0100 Thomas Schwinge wrote: [...] ..., where the "Invalid read of size 8" happens, and which eventually would try to "free (tgt)" again, via

Re: [RS6000] Don't pass -many to the assembler

2018-12-13 Thread David Edelsohn
On Thu, Dec 13, 2018 at 5:26 AM Alan Modra wrote: > > On Wed, Nov 14, 2018 at 01:43:57PM +1030, Alan Modra wrote: > > On Tue, Nov 13, 2018 at 05:17:41AM -0600, Segher Boessenkool wrote: > > > On Tue, Nov 13, 2018 at 12:02:55PM +1030, Alan Modra wrote: > > > > OK, fair enough. Another option is

Re: [testsuite] Include gdc.test prefix in test names (PR testsuite/88041)

2018-12-13 Thread Rainer Orth
Hi Iain, >> I'm omitting the changes (also mentioned in the PR) to >> compilable/ddoc9676a.d and compilable/depsOutput9948.d which contain >> absolute path names in EXTRA_SOURCES because those need to go upstream >> first. >> > > This has been committed upstream >

Re: [ping] Change static chain to r11 on aarch64

2018-12-13 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 10:04:11PM +, Wilco Dijkstra wrote: > Hi Martin, > > > Does a non-executable stack actually improve security? > > Absolutely, it's like closing your front door rather than just leave it open > for anyone. On many Linux systems, if you use trampolines anywhere then

Re: [PATCH, OpenACC, 7/8] Multi-dimensional dynamic array support for OpenACC data clauses, libgomp support

2018-12-13 Thread Chung-Lin Tang
On 2018/12/6 10:43 PM, Jakub Jelinek wrote: On Thu, Dec 06, 2018 at 10:19:43PM +0800, Chung-Lin Tang wrote: Why do you call the non-contiguous arrays dynamic arrays? Is that some OpenACC term? I'd also prefix those with gomp_ and it is important to make it clear what is the ABI type shared

Re: [PATCH, OpenACC, 4/8] Multi-dimensional dynamic array support for OpenACC data clauses, omp-low: dynamic array descriptor creation

2018-12-13 Thread Chung-Lin Tang
On 2018/10/16 8:56 PM, Chung-Lin Tang wrote: The next two patches are the bulk of the compiler patch in the middle-ends. The first patch here, implements the creation of dynamic array descriptors to pass to the runtime, a different way than completely using map-clauses. Because we support

Re: [PATCH] [RFC] PR target/52813 and target/11807

2018-12-13 Thread Segher Boessenkool
On Wed, Dec 12, 2018 at 06:26:10PM +0200, Dimitar Dimitrov wrote: > I expect that if I mark a HW register as "clobber", compiler would save its > contents before executing the asm statement, and after that it would restore > its contents. This is the GCC behaviour for all but the SP and PIC

Re: [patch] various OpenACC reduction enhancements - test cases

2018-12-13 Thread Julian Brown
On Tue, 4 Dec 2018 13:59:33 +0100 Jakub Jelinek wrote: > On Fri, Jun 29, 2018 at 11:23:21AM -0700, Cesar Philippidis wrote: > > Attached are the updated reductions tests cases. Again, these have > > been bootstrapped and regression tested cleanly for x86_64 with > > nvptx offloading. Is it OK

Re: [patch] various OpenACC reduction enhancements - FE changes

2018-12-13 Thread Julian Brown
On Tue, 4 Dec 2018 13:57:24 +0100 Jakub Jelinek wrote: > On Fri, Jun 29, 2018 at 11:22:00AM -0700, Cesar Philippidis wrote: > > 2018-06-29 Cesar Philippidis > > Nathan Sidwell > > > > gcc/c/ > > * c-parser.c (c_parser_omp_variable_list): New > > c_omp_region_type argument.

[PR c++/87531] Fix second bug

2018-12-13 Thread Nathan Sidwell
This patch addresses the regression caused by the first fix. For reasons that used to make more sense, an overload set of template members would present as just a dependent using-decl, if it contained any such using decls. Then we'd defer repeat lookup to instantiation time. Except in a

Re: [PATCH] error on missing LTO symbols

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 02:31:45PM +0100, Tom de Vries wrote: > > 2015-07-24 Cesar Philippidis Please use current date ;) > > > > gcc/ > > * lto-cgraph.c (input_overwrite_node): Error instead of assert > > on missing cgraph partitions. > > (input_varpool_node): Likewise. > >

Re: [libgomp, nvptx] Fix libgomp.c/target-5.c compilation

2018-12-13 Thread Jakub Jelinek
On Thu, Dec 13, 2018 at 01:09:25PM +0100, Tom de Vries wrote: > 2018-12-13 Tom de Vries > > * affinity-fmt.c (gomp_print_string): New function, factored out of ... > (omp_display_affinity, gomp_display_affinity_thread): ... here, and ... > * fortran.c (omp_display_affinity_):

Re: [PATCH] error on missing LTO symbols

2018-12-13 Thread Tom de Vries
[ adding gcc-patches ] On 13-12-18 14:30, Tom de Vries wrote: > [ Patch copy-pasted from here ( > https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02076.html ). Patch was > resubmitted here ( > https://gcc.gnu.org/ml/gcc-patches/2016-07/msg00043.html ). ] > > Hi, > > this issue just popped up

[committed] Fix libgomp.c++/for-24.C testcase (PR libgomp/88460)

2018-12-13 Thread Jakub Jelinek
Hi! This is PR86660 problem repeated on another testcase (copied + modified from the buggy one before it has been fixed, sorry for that). Fixed thusly, tested on x86_64-linux without offloading and by Tom with offloading, committed to trunk. Thanks Tom for reporting it and testing it.

Re: [PATCH][AArch64][doc] Clarify -msve-vector-bits=128 behaviour

2018-12-13 Thread Richard Sandiford
Ramana Radhakrishnan writes: > On Thu, Dec 13, 2018 at 10:15 AM Richard Sandiford > wrote: >> >> Thanks for doing this. >> >> "Kyrill Tkachov" writes: >> > @@ -15716,16 +15716,19 @@ an effect when SVE is enabled. >> > >> > GCC supports two forms of SVE code generation: ``vector-length >> >

Re: [PATCH] Fix split-path-5.c testcase (PR testsuite/88454)

2018-12-13 Thread Segher Boessenkool
On Thu, Dec 13, 2018 at 08:49:53AM +0100, Jakub Jelinek wrote: > On Mon, Dec 10, 2018 at 09:56:46PM -0700, Jeff Law wrote: > > Note that split-path-5 has the same basic structure. A half-diamond > > with a single statement in the middle block that should be trivially > > if-convertable if

Re: [PATCH] PR libstdc++/80762 avoid ambiguous __constructible_from

2018-12-13 Thread Jonathan Wakely
On 13/12/18 13:10 +0100, Christophe Lyon wrote: On Thu, 13 Dec 2018 at 12:00, Jonathan Wakely wrote: On 13/12/18 08:56 +0100, Christophe Lyon wrote: >On Wed, 12 Dec 2018 at 17:13, Jonathan Wakely wrote: >> >> Ensure we don't try to instantiate __is_constructible_from, >> because there are

Re: [PATCH] PR libstdc++/80762 avoid ambiguous __constructible_from

2018-12-13 Thread Christophe Lyon
On Thu, 13 Dec 2018 at 12:00, Jonathan Wakely wrote: > > On 13/12/18 08:56 +0100, Christophe Lyon wrote: > >On Wed, 12 Dec 2018 at 17:13, Jonathan Wakely wrote: > >> > >> Ensure we don't try to instantiate __is_constructible_from, > >> because there are two partial specializations that are

Re: [PATCH] Overload std::distance and std::advance for path::iterator

2018-12-13 Thread Jonathan Wakely
On 12/12/18 16:14 +, Jonathan Wakely wrote: +void +test04() +{ + std::filesystem::path p = "/a/b/c/d/e/f/g"; + VERIFY( std::distance(p.begin(), p.end()) == 8); + auto it = p.begin(); + std::advance(it, 1); + VERIFY( std::distance(p.begin(), it) == 1 ); + VERIFY( it->native() == "a" );

[Committed 1/2] S/390: Use VEC_INEXACT/VEC_NOINEXACT instead of magic numbers.

2018-12-13 Thread Andreas Krebbel
2018-12-13 Andreas Krebbel * config/s390/vx-builtins.md ("vec_ctd_s64", "vec_ctd_u64") ("vec_ctsl", "vec_ctul"): Replace 0 with VEC_NOINEXACT. ("vec_double_s64", "vec_double_u64"): Replace 4 with VEC_INEXACT. --- gcc/config/s390/vx-builtins.md | 12 ++-- 1 file

  1   2   >