[PATCH, rs6000] altivec_resolve_overloaded_builtin fixes (PR target/81622)

2017-07-31 Thread Jakub Jelinek
Hi! On Mon, Jul 31, 2017 at 02:42:21PM -0500, Bill Schmidt wrote: > > On Jul 31, 2017, at 11:27 AM, Jakub Jelinek wrote: > > On Mon, Jul 31, 2017 at 11:19:26AM -0500, Bill Schmidt wrote: > >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81622 reports an > >> ICE-on-invalid > >> for the vec_ld an

RE: [PATCH][Aarch64] Add support for overflow add and sub operations

2017-07-31 Thread Michael Collison
Updated the patch per Richard's comments in particular the issues relating to use of NE: " Use of ne is wrong here. The condition register should be set to the result of a compare rtl construct. The same applies elsewhere within this patch. NE is then used on the result of the comparison. Th

Re: [PATCH 0/6] [i386] PR80969 Fix ICE with -mabi=ms -mavx512f

2017-07-31 Thread Uros Bizjak
On Mon, Jul 31, 2017 at 7:28 PM, Daniel Santos wrote: > Well I just learned how to test 32-bit earlier and I've uncovered a problem > when running 32-bit tests. Do you want me to commit the the two patches > (squashed together) in the mean time? Yes, please commit two approved patches (with corr

Re: [PATCH] i386: Update naked-1.c for PIC

2017-07-31 Thread Uros Bizjak
On Tue, Aug 1, 2017 at 12:48 AM, H.J. Lu wrote: > For ia32 targets, -fPIC may generate > > call __x86.get_pc_thunk.ax > ... > __x86.get_pc_thunk.ax: > movl(%esp), %eax > ret > > We should check "ret" only for non-PIC or non-ia32 targets. I have added -fno-pic t

[PING #2] [PATCH] enhance -Wrestrict to handle string built-ins (PR 78918)

2017-07-31 Thread Martin Sebor
Richard, in discussing this work Jeff mentioned that your comments on the tree-ssa-alias.c parts would be helpful. When you have a chance could you please give it a once over and let me know if you have any suggestions or concerns? There are no visible changes to existing clients of the pass, j

Re: PING: [PATCH] PR driver/81523: Make -static override -pie

2017-07-31 Thread H.J. Lu
On Mon, Jul 31, 2017 at 5:37 PM, Alan Modra wrote: > On Mon, Jul 31, 2017 at 08:04:13AM -0700, H.J. Lu wrote: >> On Mon, Jul 24, 2017 at 10:24 AM, H.J. Lu wrote: >> > On Sun, Jul 23, 2017 at 8:14 AM, H.J. Lu wrote: >> >> -static and -pie together behave differently depending on whether GCC is >>

Re: [PATCH 0/2] add unique_ptr class

2017-07-31 Thread David Malcolm
On Mon, 2017-07-31 at 19:46 -0400, tbsaunde+...@tbsaunde.org wrote: > From: Trevor Saunders > > Hi, > > I've been saying I'd do this for a long time, but I'm finally getting > to > importing the C++98 compatable unique_ptr class Pedro wrote for gdb a > while > back. I believe the gtl namespace

Re: PING: [PATCH] PR driver/81523: Make -static override -pie

2017-07-31 Thread Alan Modra
On Mon, Jul 31, 2017 at 08:04:13AM -0700, H.J. Lu wrote: > On Mon, Jul 24, 2017 at 10:24 AM, H.J. Lu wrote: > > On Sun, Jul 23, 2017 at 8:14 AM, H.J. Lu wrote: > >> -static and -pie together behave differently depending on whether GCC is > >> configured with --enable-default-pie. On x86, "-stati

[PATCH 1/5] Rename existing insn_cost to insn_sched_cost

2017-07-31 Thread Segher Boessenkool
haifa-sched exports an insn_cost function, but it is only used in a few places and specialised to scheduling. This patch renames it to insn_sched_cost. --- gcc/haifa-sched.c | 14 +++--- gcc/sched-int.h| 2 +- gcc/sched-rgn.c| 4 ++-- gcc/sel-sched-ir.c | 2 +- 4 files change

[PATCH 0/5] RFC, WIP: RTL cost improvements

2017-07-31 Thread Segher Boessenkool
This series creates pattern_cost and insn_cost functions that together replace the existing insn_rtx_cost function. pattern_cost is like the old insn_rtx_cost function; insn_cost takes an actual rtx_insn * as input, not just a pattern. Also a targetm.insn_cost is added, which targets can use to i

[PATCH 5/5] rs6000: Implement insn_cost hook

2017-07-31 Thread Segher Boessenkool
This is a pretty minimalistic implementation of the insn_cost hook: it just counts how many machine instructions will be generated. Some improvements are needed: loads should get extra cost; some instructions like mul and div should be more expensive than others; and it exposes some suboptimalitie

Re: [PATCH 00/19] cleanup of memory stats prototypes

2017-07-31 Thread Martin Sebor
On 07/31/2017 05:11 PM, Trevor Saunders wrote: On Mon, Jul 31, 2017 at 04:58:15PM -0600, Martin Sebor wrote: On 07/31/2017 03:34 PM, Trevor Saunders wrote: On Mon, Jul 31, 2017 at 02:56:40PM -0600, Martin Sebor wrote: On 07/27/2017 02:30 AM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saund

[PATCH 4/5] Add targetm.insn_cost hook

2017-07-31 Thread Segher Boessenkool
This introduces a hook to implement insn_cost. If a target does not implement the hook, the old function (i.e. pattern_cost) is used. --- gcc/doc/tm.texi| 12 gcc/doc/tm.texi.in | 2 ++ gcc/rtlanal.c | 3 +++ gcc/target.def | 14 ++ 4 files changed, 31 ins

[PATCH 2/5] Replace insn_rtx_cost with insn_cost and pattern_cost

2017-07-31 Thread Segher Boessenkool
This renames insn_rtx_cost to pattern cost, and adds a new function insn_cost that takes an rtx_insn * instead of an instruction pattern as input. It uses the latter function anywhere an instruction is readily available (instead of just an instruction pattern). The actual implementation of insn_c

[PATCH] rs6000: Trailing comma warning in enum

2017-07-31 Thread Segher Boessenkool
Committed. Segher 2017-07-31 Segher Boessenkool * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma. --- gcc/config/rs6000/rs6000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index

[PATCH 3/5] combine: Use insn_cost instead of pattern_cost everywhere

2017-07-31 Thread Segher Boessenkool
This changes combine to always use insn_cost, not pattern_cost. I don't intend to commit it like this: it calls recog more often than necessary, and it is very ugly (no, don't look at it). But it's good enough to test things with. --- gcc/combine.c | 31 +-- 1 file c

[Patch] Testsuite fixes for failures caused by patch for PR 80925 (part deux)

2017-07-31 Thread Steve Ellcey
Here is a second set of patches to fix tests that started failing with the patch for PR 80925.  It uses the same testsuite changes I did for no-section-anchors-vect-69.c and section-anchors-vect-69.c on new set of gcc.dg/vect/vect-* tests. 2017-07-31  Steve Ellcey   PR tree-optimization/8

[PATCH 1/2] add unique_ptr header

2017-07-31 Thread tbsaunde+gcc
From: Trevor Saunders For most of the history of this see https://sourceware.org/ml/gdb-patches/2016-10/msg00223.html The changes are mostly s/gdb/gtl/g include/ChangeLog: 2017-07-29 Trevor Saunders * unique-ptr.h: New file. --- include/unique-ptr.h | 386 +

[PATCH 2/2] use unique_ptr some

2017-07-31 Thread tbsaunde+gcc
From: Trevor Saunders gcc/ChangeLog: 2017-07-31 Trevor Saunders * cse.c (find_comparison_args): Make visited a unique_ptr. * lto-streamer-out.c (write_global_references): Make data a unique_ptr. * tree-cfg.c (move_sese_region_to_fn): Make several variables

[PATCH 0/2] add unique_ptr class

2017-07-31 Thread tbsaunde+gcc
From: Trevor Saunders Hi, I've been saying I'd do this for a long time, but I'm finally getting to importing the C++98 compatable unique_ptr class Pedro wrote for gdb a while back. I believe the gtl namespace also comes from Pedro, but GNU template library seems as reasonable as any other name

Re: [PATCH 00/19] cleanup of memory stats prototypes

2017-07-31 Thread Trevor Saunders
On Mon, Jul 31, 2017 at 04:58:15PM -0600, Martin Sebor wrote: > On 07/31/2017 03:34 PM, Trevor Saunders wrote: > > On Mon, Jul 31, 2017 at 02:56:40PM -0600, Martin Sebor wrote: > > > On 07/27/2017 02:30 AM, tbsaunde+...@tbsaunde.org wrote: > > > > From: Trevor Saunders > > > > > > > > The preC++

Re: ping [PATCH] [MSP430] Fix PR78849: ICE on initialization of global struct containing __int20 array

2017-07-31 Thread Joseph Myers
On Wed, 26 Jul 2017, Jeff Law wrote: > TYPE_SIZE, according to my understanding, should be a tree for the size > of the expression in bits. > > The problem is for msp430 that size varies depending on where it's used. > ie, in a register an object might have a bitsize of 20 bits, but in > memory

Re: [PATCH 4/N] Recover GOTO predictor.

2017-07-31 Thread David Edelsohn
This patch breaks bootstrap on AIX and probably is a hidden bug on all targets. With the patch, libbacktrace/xcoff.c fails to compile with the error: /nasfarm/edelsohn/src/src/libbacktrace/xcoff.c: In function 'xcoff_add': /nasfarm/edelsohn/src/src/libbacktrace/xcoff.c:822:13: error: 'incl' may b

Re: [PATCH 00/19] cleanup of memory stats prototypes

2017-07-31 Thread Martin Sebor
On 07/31/2017 03:34 PM, Trevor Saunders wrote: On Mon, Jul 31, 2017 at 02:56:40PM -0600, Martin Sebor wrote: On 07/27/2017 02:30 AM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders The preC++ way of passing information about the call site of a function was to use a macro that passed __

[PATCH] i386: Update naked-1.c for PIC

2017-07-31 Thread H.J. Lu
For ia32 targets, -fPIC may generate call __x86.get_pc_thunk.ax ... __x86.get_pc_thunk.ax: movl(%esp), %eax ret We should check "ret" only for non-PIC or non-ia32 targets. OK for trunk? H.J. --- * gcc.target/i386/naked-1.c: Check "ret" only for non-PI

Re: C PATCH to detect clashing attributes (PR c/81544)

2017-07-31 Thread Joseph Myers
On Tue, 25 Jul 2017, Marek Polacek wrote: > PR c/81544 complaints that we aren't detecting clashing noreturn / > warn_unused_result attributes so this patch adds that checking. Martin > plans to do more systematic checking in this area but meanwhile we > might want to go with this. > > Bootstrap

Re: [RFC] Remaining references of Java

2017-07-31 Thread Joseph Myers
On Tue, 25 Jul 2017, Richard Biener wrote: > > 2) fold-const.c: > > > > 1882/* The following code implements the floating point to integer > > 1883 conversion rules required by the Java Language Specification, > > 1884 that IEEE NaNs are mapped to zero and values that overflo

Re: [PATCH 00/19] cleanup of memory stats prototypes

2017-07-31 Thread Trevor Saunders
On Mon, Jul 31, 2017 at 02:56:40PM -0600, Martin Sebor wrote: > On 07/27/2017 02:30 AM, tbsaunde+...@tbsaunde.org wrote: > > From: Trevor Saunders > > > > The preC++ way of passing information about the call site of a function was > > to > > use a macro that passed __file__, __LINE__, and __FUNC

Re: [PATCH 00/19] cleanup of memory stats prototypes

2017-07-31 Thread Martin Sebor
On 07/27/2017 02:30 AM, tbsaunde+...@tbsaunde.org wrote: From: Trevor Saunders The preC++ way of passing information about the call site of a function was to use a macro that passed __file__, __LINE__, and __FUNCTION__ to a function with the same name with _stat appended to it. The way this is

Re: [PATCH, RFC] Proposed PowerPC IEEE 128-bit floating point changes

2017-07-31 Thread Joseph Myers
On Fri, 21 Jul 2017, Michael Meissner wrote: > The first change is to enable the C language to use _Float128 keyword (but not > __float128) without having to use the -mfloat128 option on power7-power9 > systems. My question is in the TR that introduced _Float128, is there any > expectation that o

New French PO file for 'gcc' (version 7.1.0)

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

Re: [PATCH, rs6000] Fix PR81622

2017-07-31 Thread Bill Schmidt
> On Jul 31, 2017, at 11:27 AM, Jakub Jelinek wrote: > > On Mon, Jul 31, 2017 at 11:19:26AM -0500, Bill Schmidt wrote: >> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81622 reports an ICE-on-invalid >> for the vec_ld and vec_st built-in functions. This fires when the last >> argument of the bui

Re: [PATCH] enhance overflow and truncation detection in strncpy and strncat (PR 81117)

2017-07-31 Thread Martin Sebor
So I think the fixes exposed by the new warning are OK to go in as-is immediately if you wish to do so. Minor questions on the actual improved warnings inline. Sure, thanks. -static inline tree +static tree compute_objsize (tree dest, int ostype) { ... + type = TYPE_MAIN_VARIANT (type

[PATCH, Fortran] Support for legacy %FILL fields in STRUCTUREs

2017-07-31 Thread Fritz Reese
All, Attached is a patch which extends the DEC STRUCTURE support to include special fields named '%FILL'. These fields generate anonymous inaccessible components, commonly used in DEC FORTRAN to control alignment of fields within STRUCTUREs. The patch is fairly straightforward. The match is perfor

[PATCH] Update myself in MAINTAINERS

2017-07-31 Thread Richard Henderson
A change of jobs requires a change of email. And I'm going to finally admit that I've not been active gcc development in the last year or two. I am far enough behind that I cannot globally review changes. That said, I do not plan to abandon Alpha just yet. r~ --- MAINTAINERS | 7 ++- 1 fil

Re: [1/2] PR 78736: New warning -Wenum-conversion

2017-07-31 Thread Prathamesh Kulkarni
On 11 July 2017 at 17:59, Prathamesh Kulkarni wrote: > On 13 June 2017 at 01:47, Joseph Myers wrote: >> This is OK with one fix: >> >>> +C ObjC Var(warn_enum_conversion) Init(0) Warning LangEnabledBy(C Objc,Wall) >> >> I believe the LangEnabledBy arguments are case-sensitive, so you need to >> ha

Re: [PATCH 00/19] cleanup of memory stats prototypes

2017-07-31 Thread Jeff Law
On 07/27/2017 02:43 AM, Richard Biener wrote: > On Thu, Jul 27, 2017 at 10:30 AM, wrote: >> From: Trevor Saunders >> >> The preC++ way of passing information about the call site of a function was >> to >> use a macro that passed __file__, __LINE__, and __FUNCTION__ to a function >> with >> the

Re: [PATCH] Make mempcpy more optimal (PR middle-end/70140).

2017-07-31 Thread Jeff Law
On 07/20/2017 12:59 AM, Martin Liška wrote: > Hello. > > Following patch does sharing of expansion for mem{p,}cpy and also strpcy > (with a known constant as source) > so that we use same type of expansion (direct insns emission, direct emission > with a loop instruction and > library call). As

Re: [PATCH 6/6] qsort comparator consistency checking

2017-07-31 Thread Alexander Monakov
On Mon, 31 Jul 2017, Jeff Law wrote: > I must have missed something. Can't you just define > > qsort (BASE, NMEMB, SIZE, COMPARE) into > > qsort_chk (BASE, NMEMB, SIZE, COMPARE) > > That shouldn't affect the qsort from vec? Right? Or am I missing something If you do #define qsort(base, n

Re: [RFC] propagate malloc attribute in ipa-pure-const pass

2017-07-31 Thread Prathamesh Kulkarni
On 23 May 2017 at 19:10, Prathamesh Kulkarni wrote: > On 19 May 2017 at 19:02, Jan Hubicka wrote: >>> >>> * LTO and memory management >>> This is a general question about LTO and memory management. >>> IIUC the following sequence takes place during normal LTO: >>> LGEN: generate_summary, write_su

Re: [PATCH 6/6] qsort comparator consistency checking

2017-07-31 Thread Jeff Law
On 07/15/2017 02:47 PM, Alexander Monakov wrote: > This is the updated qsort comparator verifier. > > Since we have vec::qsort(cmp), the patch uses the macro argument counting > trick to redirect only the four-argument invocations of qsort to qsort_chk. > I realize that won't win much sympathies,

Re: [PATCH 1/2] x86,s390: add compiler memory barriers when expanding atomic_thread_fence (PR 80640)

2017-07-31 Thread Alexander Monakov
On Mon, 31 Jul 2017, Jeff Law wrote: > > Please consider that expand_mem_thread_fence is used to place fences around > > seq-cst atomic loads&stores when the backend doesn't provide a direct > > pattern. > > With compiler barriers on both sides of the machine barrier, the generated > > sequence fo

Re: [PATCH] Add -std=c++2a

2017-07-31 Thread Joseph Myers
On Thu, 20 Jul 2017, Andrew Sutton wrote: > This adds a new C++ dialect, enabled by -std=c++2a. I don't see documentation here. I'd expect additions to invoke.texi and standards.texi discussing the new option. -- Joseph S. Myers jos...@codesourcery.com

Re: [PATCH] Fix libquadmath regression (bootstrap failure) on FreeBSD

2017-07-31 Thread Joseph Myers
On Wed, 19 Jul 2017, Jakub Jelinek wrote: > > And can you please push this > > to glibc as well (which I do not have access to)? > > glibc uses u_int32_t in all the places of *powl.c where libquadmath > uses uint32_t, and various other files, so I guess it is intentional. I'd consider it a reli

Re: [PATCH 5/6] haifa-sched.c: give up qsort checking when autoprefetch heuristic is in use

2017-07-31 Thread Jeff Law
On 07/15/2017 02:47 PM, Alexander Monakov wrote: > The autopref_rank_for_schedule sub-comparator and its subroutine > autopref_rank_data lack transitivity. Skip checking if they are in use. > > This heuristic is disabled by default everywhere except ARM and AArch64, > so on other targets this doe

Re: [PATCH], PR target/81593, Optimize PowerPC vector sets coming from a vector extracts

2017-07-31 Thread Bill Schmidt
> On Jul 31, 2017, at 12:40 PM, Michael Meissner > wrote: > > On Sun, Jul 30, 2017 at 09:00:58AM -0500, Bill Schmidt wrote: (define_insn "vsx_concat_" - [(set (match_operand:VSX_D 0 "gpc_reg_operand" "=,we") + [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa,we")

Re: [PATCH], PR target/81593, Optimize PowerPC vector sets coming from a vector extracts

2017-07-31 Thread Michael Meissner
On Sun, Jul 30, 2017 at 09:00:58AM -0500, Bill Schmidt wrote: > >> (define_insn "vsx_concat_" > >> - [(set (match_operand:VSX_D 0 "gpc_reg_operand" "=,we") > >> + [(set (match_operand:VSX_D 0 "vsx_register_operand" "=wa,we") > >>(vec_concat:VSX_D > >> - (match_operand: 1 "gpc_reg_operand" "

Re: [PATCH 4/6] lra-assigns.c: give up on qsort checking in assign_by_spills

2017-07-31 Thread Jeff Law
On 07/15/2017 02:47 PM, Alexander Monakov wrote: > The reload_pseudo_compare_func comparator, when used from assign_by_spills, > can be non-transitive, indicating A < B < C < A if both A and C satisfy > !bitmap_bit_p (&non_reload_pseudos, rAC), but B does not. > > This function was originally a pr

Re: [PATCH], PR target/81593, Optimize PowerPC vector sets coming from a vector extracts

2017-07-31 Thread Michael Meissner
On Fri, Jul 28, 2017 at 04:08:50PM -0500, Segher Boessenkool wrote: > Hi! > > On Thu, Jul 27, 2017 at 07:21:14PM -0400, Michael Meissner wrote: > > This patches optimizes the PowerPC vector set operation for 64-bit doubles > > and > > longs where the elements in the vector set may have been extra

Re: [PATCH 1/2] x86,s390: add compiler memory barriers when expanding atomic_thread_fence (PR 80640)

2017-07-31 Thread Jeff Law
On 07/31/2017 11:02 AM, Alexander Monakov wrote: > On Mon, 31 Jul 2017, Jeff Law wrote: In the middle end patch, do we need a barrier before the fence as well? The post-fence barrier prevents reordering the fence with anything which follows the fence. But do we have to also prevent

Re: [PATCH] enhance overflow and truncation detection in strncpy and strncat (PR 81117)

2017-07-31 Thread Jeff Law
On 07/08/2017 02:45 PM, Martin Sebor wrote: > PR 81117 asks for improved detection of common misuses(*) of > strncpy and strncat. The attached patch is my solution. It > consists of three related sets of changes: > > 1) Adds a new option, -Wstringop-truncation, that diagnoses calls > to strncpy,

Re: [PATCH] libstdc++: Support std::is_aggregate on clang++ (was [cfe-dev] clang++: std::is_aggregate unusable with clang-5.0/libstdc++-7)

2017-07-31 Thread Tim Song
On Mon, Jul 31, 2017 at 11:13 AM, Tim Song wrote: > > https://clang.llvm.org/docs/LanguageExtensions.html#checks-for-type-trait-primitives > seems to suggest using __has_extension instead. Hmm, that doesn't work. Oh well.

Re: [PATCH 0/6] [i386] PR80969 Fix ICE with -mabi=ms -mavx512f

2017-07-31 Thread Daniel Santos
Well I just learned how to test 32-bit earlier and I've uncovered a problem when running 32-bit tests. Do you want me to commit the the two patches (squashed together) in the mean time? Thanks, Daniel

[PATCH, Fortran] Slight cleanup in set_dec_flags

2017-07-31 Thread Fritz Reese
All, Attached is a trivial patch which exists for posterity: currently set_dec_flags(int value) enables support for legacy standards and disables warnings for them etc... Unfortunately it does this irrespective of the int value parameter. Since set_dec_flags(0) is called on initialization, the leg

[PATCH, Fortran] Correctly set -fd-lines-as-comments with -fdec

2017-07-31 Thread Fritz Reese
All, This is a simple patch. The original intent was for -fdec to set -fd-lines-as-comments by default if flag_d_lines was unspecified by the user. However, currently flag_d_lines is interrogated in set_dec_flags(), usually before its final value is determined. The attached patch fixes this behavi

Re: C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-07-31 Thread Martin Sebor
On 07/31/2017 10:05 AM, Marek Polacek wrote: On Mon, Jul 31, 2017 at 09:54:03AM -0600, Martin Sebor wrote: On 07/31/2017 08:14 AM, Marek Polacek wrote: This patch improves the diagnostic of -Wsign-compare for ?: by also printing the types, similarly to my recent patch. But we can do even bette

Re: [PATCH 1/2] x86,s390: add compiler memory barriers when expanding atomic_thread_fence (PR 80640)

2017-07-31 Thread Alexander Monakov
On Mon, 31 Jul 2017, Jeff Law wrote: > >> In the middle end patch, do we need a barrier before the fence as well? > >> The post-fence barrier prevents reordering the fence with anything which > >> follows the fence. But do we have to also prevent reordering the fence > >> with prior instructions w

Re: [PATCH, rs6000] Fix PR81622

2017-07-31 Thread Jakub Jelinek
On Mon, Jul 31, 2017 at 11:19:26AM -0500, Bill Schmidt wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81622 reports an ICE-on-invalid > for the vec_ld and vec_st built-in functions. This fires when the last > argument of the built-in is not a pointer or array type, as is required. > We brea

[PATCH, rs6000] Fix PR81622

2017-07-31 Thread Bill Schmidt
Hi, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81622 reports an ICE-on-invalid for the vec_ld and vec_st built-in functions. This fires when the last argument of the built-in is not a pointer or array type, as is required. We break on this during early expansion of the built-ins into tree code

[PATCH] Fix reassoc var_bound range test optimization (PR tree-optimization/81588)

2017-07-31 Thread Jakub Jelinek
Hi! This patch fixes a couple of issues in optimize_range_tests_var_bound. One is that if we have ranges[i].in_p, we should be inverting the comparison rather than just swapping or not swapping operands. Then because we want to handle only LT/LE, we want to swap operands and the comparison code i

Re: [WWW PATCH]: Mention that x86 now supports "naked" function attribute.

2017-07-31 Thread Gerald Pfeifer
On Mon, 31 Jul 2017, Uros Bizjak wrote: > One liner that mentions new addition to x86 port. > > OK for wwwdocs? Sure. (Even without asking. ;-) Thanks, Gerald

Re: C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-07-31 Thread Marek Polacek
On Mon, Jul 31, 2017 at 09:54:03AM -0600, Martin Sebor wrote: > On 07/31/2017 08:14 AM, Marek Polacek wrote: > > This patch improves the diagnostic of -Wsign-compare for ?: by also printing > > the types, similarly to my recent patch. But we can do even better here if > > we > > actually point to

[PATCH][AArch64] PR71951: Fix unwinding with -fomit-frame-pointer

2017-07-31 Thread Wilco Dijkstra
As described in PR71951, if libgcc is built with -fomit-frame-pointer, unwinding crashes, for example while doing a backtrace. The underlying reason is the Dwarf unwinder does not setup the frame pointer register in the initialization code. When later unwinding a function that uses the frame poin

Re: C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-07-31 Thread Martin Sebor
On 07/31/2017 08:14 AM, Marek Polacek wrote: This patch improves the diagnostic of -Wsign-compare for ?: by also printing the types, similarly to my recent patch. But we can do even better here if we actually point to the operand in question, so I passed the locations of the operands from the pa

Re: [PATCH][RFA/RFC] Stack clash mitigation patch 05/08

2017-07-31 Thread Jeff Law
On 07/21/2017 02:25 PM, Segher Boessenkool wrote: > On Thu, Jul 20, 2017 at 08:20:52AM -0600, Jeff Law wrote: >>> Can only combine-stack-adjustments do this? It seems like something >>> many passes could do, and then your new note doesn't help. >> SO far it's only been observed with c-s-a, but fur

Re: [PATCH 1/2] x86,s390: add compiler memory barriers when expanding atomic_thread_fence (PR 80640)

2017-07-31 Thread Jeff Law
On 07/26/2017 12:13 PM, Alexander Monakov wrote: > On Wed, 26 Jul 2017, Jeff Law wrote: >> I'm not sure what you mean by extraneous compiler barriers -- isn't the >> worst case scenario here that the target emits them as well? So there >> would be an extraneous one in that case, but that ought to

Re: [PATCH 1/2] x86,s390: add compiler memory barriers when expanding atomic_thread_fence (PR 80640)

2017-07-31 Thread Jeff Law
On 07/26/2017 02:02 PM, Alexander Monakov wrote: > On Wed, 26 Jul 2017, Alexander Monakov wrote: > >> On Wed, 26 Jul 2017, Jeff Law wrote: >>> I'm not sure what you mean by extraneous compiler barriers -- isn't the >>> worst case scenario here that the target emits them as well? So there >>> woul

Re: C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-07-31 Thread David Malcolm
On Mon, 2017-07-31 at 16:14 +0200, Marek Polacek wrote: > This patch improves the diagnostic of -Wsign-compare for ?: by also > printing > the types, similarly to my recent patch. But we can do even better > here if we > actually point to the operand in question, so I passed the locations > of the

Re: [PATCH] libstdc++: Support std::is_aggregate on clang++ (was [cfe-dev] clang++: std::is_aggregate unusable with clang-5.0/libstdc++-7)

2017-07-31 Thread Tim Song
On Mon, Jul 31, 2017 at 10:53 AM, Jonathan Wakely wrote: > On 27/07/17 16:27 +0900, Katsuhiko Nishimra wrote: >> >> From 56c4a18d0d8c8ce7aa1239880138775e4db06645 Mon Sep 17 00:00:00 2001 >> From: Katsuhiko Nishimra >> Date: Thu, 27 Jul 2017 16:03:54 +0900 >> Subject: [PATCH] libstdc++: Support st

PING: [PATCH] PR driver/81523: Make -static override -pie

2017-07-31 Thread H.J. Lu
On Mon, Jul 24, 2017 at 10:24 AM, H.J. Lu wrote: > On Sun, Jul 23, 2017 at 8:14 AM, H.J. Lu wrote: >> -static and -pie together behave differently depending on whether GCC is >> configured with --enable-default-pie. On x86, "-static -pie" fails to >> create executable when --enable-default-pie i

Re: [PATCH] libstdc++: Support std::is_aggregate on clang++ (was [cfe-dev] clang++: std::is_aggregate unusable with clang-5.0/libstdc++-7)

2017-07-31 Thread Jonathan Wakely
On 27/07/17 16:27 +0900, Katsuhiko Nishimra wrote: From 56c4a18d0d8c8ce7aa1239880138775e4db06645 Mon Sep 17 00:00:00 2001 From: Katsuhiko Nishimra Date: Thu, 27 Jul 2017 16:03:54 +0900 Subject: [PATCH] libstdc++: Support std::is_aggregate on clang++ Currently, libstdc++ tries to detect __is_agg

C PATCH to further improve diagnostic for -Wsign-compare (PR c/81417)

2017-07-31 Thread Marek Polacek
This patch improves the diagnostic of -Wsign-compare for ?: by also printing the types, similarly to my recent patch. But we can do even better here if we actually point to the operand in question, so I passed the locations of the operands from the parser. So instead of x.c:8:16: warning: signe

[PATCH PR81267]Rewrite into loop closed ssa form in case of any store-store chain

2017-07-31 Thread Bin Cheng
-optimization/81627 * gcc.dg/tree-ssa/pr81627.c: New.From d366015187de926a8fe3248325b229bed99b27b5 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Mon, 31 Jul 2017 11:16:44 +0100 Subject: [PATCH 2/2] pr81627-20170731.txt --- gcc/testsuite/gcc.dg/tree-ssa/pr81627.c | 28

[PATCH PR81620]Don't set has_max_use_after flag for store-store chain

2017-07-31 Thread Bin Cheng
c3e44 Mon Sep 17 00:00:00 2001 From: Bin Cheng Date: Mon, 31 Jul 2017 10:24:07 +0100 Subject: [PATCH 1/2] pr81620-20170731.txt --- gcc/testsuite/gcc.dg/tree-ssa/pr81620-1.c | 20 gcc/testsuite/gcc.dg/tree-ssa/pr81620-2.c | 25 + gcc/tree-pred

Re: [PATCH] Fix PR81354 (rewrite gimple_split_edge)

2017-07-31 Thread Bill Schmidt
> On Jul 31, 2017, at 8:19 AM, Bill Schmidt wrote: > > That would certainly be much simpler! I'll regstrap it and test it on the > other > occurrence I've found to be certain. Unfortunately, this fails bootstrap: /home/wschmidt/gcc/gcc-mainline-test/gcc/calls.c: In function 'rtx_def* emit

Re: [PATCH 3/6] [i386] Remove machine_function::call_ms2sysv_pad_out

2017-07-31 Thread Uros Bizjak
On Mon, Jul 31, 2017 at 1:24 PM, Daniel Santos wrote: > The -mcall-ms2sysv-xlogues project added the boolean fields > call_ms2sysv_pad_in and call_ms2sysv_pad_out to struct machine_function > to track rather or not an additional 8 bytes of padding was needed for > stack alignment prior to and afte

Re: [PATCH 2/6] [i386] Remove ix86_frame::outlined_save_offset

2017-07-31 Thread Uros Bizjak
On Mon, Jul 31, 2017 at 1:24 PM, Daniel Santos wrote: > This value was used in an earlier incarnation of the > -mcall-ms2sysv-xlogues patch set but is now set and never read. The > value of ix86_frame::sse_reg_save_offset serves the same purpose. OK as obvious patch. Thanks, Uros. > Signed-off

Re: [PATCH] Compile pr79793-[12].c with -mtune=generic

2017-07-31 Thread Uros Bizjak
On Mon, Jul 31, 2017 at 3:47 PM, H.J. Lu wrote: > pr79793-1.c and pr79793-2.c are failed when GCC is configured with > --with-cpu=slm since lea is used to adjust stack, instead of sub/add. > This patch uses -mtune=generic to always generate sub and add. > > OK for trunk? OK. Thanks, Uros. > H.J

[PATCH] Compile pr79793-[12].c with -mtune=generic

2017-07-31 Thread H.J. Lu
pr79793-1.c and pr79793-2.c are failed when GCC is configured with --with-cpu=slm since lea is used to adjust stack, instead of sub/add. This patch uses -mtune=generic to always generate sub and add. OK for trunk? H.J. * gcc.target/i386/pr79793-1.c: Compile with -mtune=generic.

Re: [PATCH] Fix typo in std::stack (PR libstdc++/81599)

2017-07-31 Thread Marek Polacek
On Mon, Jul 31, 2017 at 04:37:19PM +0300, Ville Voutilainen wrote: > On 31 July 2017 at 16:25, Marek Polacek wrote: > > The documentation of std::stack says that the underlying container must > > support > > pop_front, but that is wrong, it meant to say pop_back, so this patch fixes > > that. >

Re: [PATCH] Fix typo in std::stack (PR libstdc++/81599)

2017-07-31 Thread Ville Voutilainen
On 31 July 2017 at 16:25, Marek Polacek wrote: > The documentation of std::stack says that the underlying container must > support > pop_front, but that is wrong, it meant to say pop_back, so this patch fixes > that. Indeed, the documentation has a copy-pasto originating from bits/stl_queue.h.

[WWW PATCH]: Mention that x86 now supports "naked" function attribute.

2017-07-31 Thread Uros Bizjak
One liner that mentions new addition to x86 port. OK for wwwdocs? Uros. Index: htdocs/gcc-8/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v retrieving revision 1.7 diff -u -r1.7 changes.html --- htdocs/gcc-8/c

[PATCH] Fix typo in std::stack (PR libstdc++/81599)

2017-07-31 Thread Marek Polacek
The documentation of std::stack says that the underlying container must support pop_front, but that is wrong, it meant to say pop_back, so this patch fixes that. Ok for trunk? 2017-07-31 Marek Polacek PR libstdc++/81599 * include/bits/stl_stack.h: Fix typo. diff --git gcc/inc

Re: [PATCH] Fix PR81354 (rewrite gimple_split_edge)

2017-07-31 Thread Bill Schmidt
That would certainly be much simpler! I'll regstrap it and test it on the other occurrence I've found to be certain. -- Bill > On Jul 31, 2017, at 4:15 AM, Richard Biener > wrote: > > On Sun, Jul 30, 2017 at 8:04 PM, Bill Schmidt > wrote: >> Hi, >> >> PR81354 identifies a latent bug that ca

Re: [PATCH, i386]: Implement attribute ((naked))

2017-07-31 Thread Uros Bizjak
On Sun, Jul 30, 2017 at 10:14 PM, Uros Bizjak wrote: > Hello! > > attribute ((naked)) generates function body without function frame, > and as shown in PR 25967 [1], users are looking for this feature also > for x86 targets. Recently, Daniel introduced a testcase that would > benefit from this att

[PATCH, committed] Add myself to MAINTAINERS

2017-07-31 Thread Robin Dapp
ChangeLog: 2017-07-31 Robin Dapp * MAINTAINERS (write after approval): Add myself. Index: MAINTAINERS === --- MAINTAINERS (revision 250740) +++ MAINTAINERS (working copy) @@ -356,6 +356,7 @@ Lawrence Crowl Ian Dall

Re: [PATCH v12] add -fpatchable-function-entry=N,M option

2017-07-31 Thread Maxim Kuvyrkov
On Jul 26, 2017, at 5:33 PM, Andreas Schwab wrote: > > On Jul 26 2017, Torsten Duwe wrote: > >> On Wed, Jul 26, 2017 at 04:16:25PM +0200, Andreas Schwab wrote: >>> On Jul 07 2017, Torsten Duwe wrote: >>> diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/

Re: [PATCH] Make inlining consistent in LTO and non-LTO mode (PR target/71991).

2017-07-31 Thread Martin Liška
Honza? Thanks, Martin On 06/30/2017 03:50 PM, Martin Liška wrote: > On 06/28/2017 05:18 PM, Jan Hubicka wrote: >>> On 06/28/2017 04:24 PM, Jan Hubicka wrote: > - /* If callee has no option attributes, then it is ok to inline. */ > - if (!callee_tree) > + /* If callee has no option

[Committed] S/390: Support z14 as CPU name.

2017-07-31 Thread Andreas Krebbel
With IBM z14 officially announced we can add support for z14 as preferred CPU name. We still pass arch12 to Binutils in order to keep older Binutils versions supported. Bootstrapped and regression-tested on s390x. Committed to mainline and GCC 7 branch. Bye, -Andreas- gcc/ChangeLog: 2017-07

Re: C PATCH to display types when printing a conversion warning (PR c/81233)

2017-07-31 Thread Marek Polacek
Ping. On Thu, Jul 20, 2017 at 12:53:10PM +0200, Marek Polacek wrote: > On Wed, Jul 19, 2017 at 10:51:33AM -0400, David Malcolm wrote: > > The changes to diagnostic-core.h and diagnostic.c are OK. > > Thanks. > > > > Also, > > > PEDWARN_FOR_ASSIGNMENT didn't work with the addition of printing TY

[PATCH][v2] Introduce TARGET_SUPPORTS_ALIASES

2017-07-31 Thread Martin Liška
On 07/31/2017 11:57 AM, Yuri Gribov wrote: > On Mon, Jul 31, 2017 at 9:04 AM, Martin Liška wrote: >> Hi. >> >> Doing the transformation suggested by Honza. >> >> Patch can bootstrap on ppc64le-redhat-linux and x86_64-linux-gnu and >> survives regression tests. >> And I also verified that works on

[PATCH 6/6] [i386, testsuite] Add tests, fix bug in check_avx2_hw_available

2017-07-31 Thread Daniel Santos
The testcase in the PR is used as a base and relevant variants are added to test other factors affected by the patch set. pr80969-1.c Base test case. pr80969-2.c With ms to sysv call. pr80969-2a.c With ms to sysv call using stubs. pr80969-3.c With alloca (for DRAP test). pr80969-4.c With

[PATCH 5/6] [i386] Modify SP realignment in ix86_expand_prologue, et. al.

2017-07-31 Thread Daniel Santos
The SP allocation calculation is now done in ix86_compute_frame_layout and the result stored in ix86_frame::stack_realign_allocate. This change also updates comments for choose_baseaddr to clarify that the alignment returned doesn't necessarily reflect the alignment of the cfa_offset passed (e.g.,

[PATCH 4/6] [i386] Modify ix86_compute_frame_layout

2017-07-31 Thread Daniel Santos
These changes affect how the stack frame is calculated from the region starting at frame.reg_save_offset until frame.frame_pointer_offset, which includes either the stub save area or the (inline) SSE register save area and the va_args register save area. The calculation used when not realigning th

[PATCH 3/6] [i386] Remove machine_function::call_ms2sysv_pad_out

2017-07-31 Thread Daniel Santos
The -mcall-ms2sysv-xlogues project added the boolean fields call_ms2sysv_pad_in and call_ms2sysv_pad_out to struct machine_function to track rather or not an additional 8 bytes of padding was needed for stack alignment prior to and after the stub save area. This design was based upon the faulty as

[PATCH 2/6] [i386] Remove ix86_frame::outlined_save_offset

2017-07-31 Thread Daniel Santos
This value was used in an earlier incarnation of the -mcall-ms2sysv-xlogues patch set but is now set and never read. The value of ix86_frame::sse_reg_save_offset serves the same purpose. Signed-off-by: Daniel Santos --- gcc/config/i386/i386.c | 1 - gcc/config/i386/i386.h | 4 +--- 2 files chan

[PATCH 1/6] [i386] Correct comments, add assertions to sp_valid_at and fp_valid_at

2017-07-31 Thread Daniel Santos
When we realign the stack frame (without DRAP), there may be a range of CFA offsets that should never be touched because they are alignment padding and any reference to them is almost certainly an error. Previously, only the offset of where the realigned stack frame starts was recorded and checked

[PATCH 0/6] [i386] PR80969 Fix ICE with -mabi=ms -mavx512f

2017-07-31 Thread Daniel Santos
When working on the Wine64 project to use aligned SSE MOVs after SP realignment and adding -mcall-ms2sysv-xlogues, I overlooked the fact that the function body may require a stack alignment greater than 16-bytes. This can result in an ICE with -mabi=ms -mavx512f and some other cases. This pat

C++ PATCH to fix ICE with bit-fields and ?: (PR c++/81607)

2017-07-31 Thread Marek Polacek
We crash in the gimplifier because it sees a shift expression with different types of op1/op2. The problem arises in cp_fold: it gets "1 ? d.c : 0" of type int which is folded to "d.c", but it then sees that d.c is a bit-field with declared type long int, so if produces "(long int) d.c" -- but tha

Re: [PING] [PATCH v4 0/12] [i386] Improve 64-bit Microsoft to System V ABI pro/epilogues

2017-07-31 Thread Daniel Santos
On 07/28/2017 09:41 AM, H.J. Lu wrote: On Fri, Jul 28, 2017 at 6:57 AM, Daniel Santos wrote: On 07/26/2017 02:03 PM, H.J. Lu wrote: This patch caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81563 Hello. I've rebased my patch set and I'm now retesting. I'm afraid that your changes are

  1   2   >