[PATCH] Fix PR82132

2018-01-16 Thread Richard Biener
Tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-01-16 Richard Biener PR testsuite/82132 * gcc.dg/vect/vect-tail-nomask-1.c: Copy posix_memalign boiler-plate from gcc.dg/torture/pr60092.c. Index: gcc/testsuite/gcc.dg/vect/vect-tail-nomask-1.c ==

Re: [PATCH] Preserve CROSSING_JUMP_P in peephole2 (PR rtl-optimization/83213)

2018-01-16 Thread Richard Biener
On Mon, 15 Jan 2018, Jakub Jelinek wrote: > Hi! > > On the testcase in the PR (too large and creduce not making sufficient > progress) we ICE because i386.md: > ;; Combining simple memory jump instruction > > (define_peephole2 > [(set (match_operand:W 0 "register_operand") > (match_ope

Re: [PATCH] Fix PR83435

2018-01-16 Thread Richard Biener
On Mon, 15 Jan 2018, Szabolcs Nagy wrote: > On 11/01/18 13:41, Richard Biener wrote: > > 2018-01-11 Richard Biener > > > > PR tree-optimization/83435 > > * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges. > > * graphite-scop-detection.c (scop_detection::get_sese):

Re: Don't group gather loads (PR83847)

2018-01-16 Thread Richard Biener
On Mon, Jan 15, 2018 at 4:12 PM, Richard Sandiford wrote: > In the testcase we were trying to group two gather loads, even though > that isn't supported. Fixed by explicitly disallowing grouping of > gathers and scatters. > > This problem didn't show up on SVE because there we convert to > IFN_GA

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread Richard Biener
On Mon, Jan 15, 2018 at 5:53 PM, H.J. Lu wrote: > On Mon, Jan 15, 2018 at 3:38 AM, H.J. Lu wrote: >> On Mon, Jan 15, 2018 at 12:31 AM, Richard Biener >> wrote: >>> On Sun, Jan 14, 2018 at 4:08 PM, H.J. Lu wrote: Now my patch set has been checked into trunk. Here is a patch set to mov

Re: [PATCH, rs6000] Support for gimple folding of mergeh, mergel intrinsics

2018-01-16 Thread Richard Biener
On Mon, Jan 15, 2018 at 6:20 PM, Will Schmidt wrote: > On Mon, 2018-01-15 at 10:24 +, Richard Sandiford wrote: >> >> + for (int i = 0; i < midpoint; i++) >> >> +{ >> >> + tree tmp1 = build_int_cst (lhs_type_type, offset + i); >> >> + tree tmp2 = build_int_cst (lhs_type_type, off

Re: [PATCH] Bump minimum value for max-sched-ready-insns param to 1 (PR rtl-optimization/86620)

2018-01-16 Thread Richard Biener
On Mon, Jan 15, 2018 at 11:04 PM, Jakub Jelinek wrote: > Hi! > > This param allows minimum of 0, which doesn't make much sense. > On the i386/pr83620.c test (when used with the =0 value) we ICE > because ix86_adjust_priority which has code to prevent moving of likely > spilled hard regs doesn't ha

Re: [PATCH v3, rs6000] Add -mspeculate-indirect-jumps option and implement non-speculating bctr / bctrl

2018-01-16 Thread Richard Biener
On Tue, Jan 16, 2018 at 12:09 AM, Bill Schmidt wrote: > Hi, > > This patch supercedes v2: > https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01204.html, > and fixes the problems noted in its review. It also adds the test cases from > https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01261.html and adju

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread Jan Hubicka
> On Mon, Jan 15, 2018 at 5:53 PM, H.J. Lu wrote: > > On Mon, Jan 15, 2018 at 3:38 AM, H.J. Lu wrote: > >> On Mon, Jan 15, 2018 at 12:31 AM, Richard Biener > >> wrote: > >>> On Sun, Jan 14, 2018 at 4:08 PM, H.J. Lu wrote: > Now my patch set has been checked into trunk. Here is a patch set

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread Richard Biener
On Tue, Jan 16, 2018 at 9:34 AM, Jan Hubicka wrote: >> On Mon, Jan 15, 2018 at 5:53 PM, H.J. Lu wrote: >> > On Mon, Jan 15, 2018 at 3:38 AM, H.J. Lu wrote: >> >> On Mon, Jan 15, 2018 at 12:31 AM, Richard Biener >> >> wrote: >> >>> On Sun, Jan 14, 2018 at 4:08 PM, H.J. Lu wrote: >> Now my

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread Jan Hubicka
> On Tue, Jan 16, 2018 at 9:34 AM, Jan Hubicka wrote: > >> On Mon, Jan 15, 2018 at 5:53 PM, H.J. Lu wrote: > >> > On Mon, Jan 15, 2018 at 3:38 AM, H.J. Lu wrote: > >> >> On Mon, Jan 15, 2018 at 12:31 AM, Richard Biener > >> >> wrote: > >> >>> On Sun, Jan 14, 2018 at 4:08 PM, H.J. Lu wrote: > >

[PATCH][WWWDOCS][AArch64][ARM] Update GCC 8 release notes

2018-01-16 Thread Tamar Christina
Hi All, This patch updates the GCC 8 release notes for ARM and AArch64. Ok for cvs? Thanks, Tamar -- Index: htdocs/gcc-8/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-8/changes.html,v retrieving revision 1.26 diff -u -r1.

Re: [PATCH] Fix warn_if_not_align ICE (PR c/83844)

2018-01-16 Thread Jakub Jelinek
On Tue, Jan 16, 2018 at 08:57:38AM +0100, Richard Biener wrote: > > - unsigned HOST_WIDE_INT off > > -= (tree_to_uhwi (DECL_FIELD_OFFSET (field)) > > - + tree_to_uhwi (DECL_FIELD_BIT_OFFSET (field)) / BITS_PER_UNIT); > > - if ((off % warn_if_not_align) != 0) > > -warning (opt_w, "%q

Re: [PATCH 00/10][ARC] Critical fixes

2018-01-16 Thread Andrew Burgess
* Claudiu Zissulescu [2018-01-08 15:18:30 +]: > > [ARC][LRA] Use TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV. > > [ARC] Don't allow the last ZOL insn to be in a delay slot. > > [ARC] Add trap instruction. > > [ARC] Update legitimate constant hook. > > [ARC] Enable unaligned access. > > [A

Re: [PATCH 1/6] [ARC] Add JLI support.

2018-01-16 Thread Andrew Burgess
* Claudiu Zissulescu [2017-11-02 13:30:30 +0100]: > The ARCv2 ISA provides the JLI instruction, which is two-byte instructions > that can be used to reduce code size in an application. To make use of it, > we provide two new function attributes 'jli_always' and 'jli_fixed' which > will force the

Re: [PATCH] Fix warn_if_not_align ICE (PR c/83844)

2018-01-16 Thread Richard Biener
On Tue, 16 Jan 2018, Jakub Jelinek wrote: > On Tue, Jan 16, 2018 at 08:57:38AM +0100, Richard Biener wrote: > > > - unsigned HOST_WIDE_INT off > > > -= (tree_to_uhwi (DECL_FIELD_OFFSET (field)) > > > - + tree_to_uhwi (DECL_FIELD_BIT_OFFSET (field)) / BITS_PER_UNIT); > > > - if ((off %

Re: [PATCH][ARM] Fix test fail with conflicting -mfloat-abi

2018-01-16 Thread Sudakshina Das
Hi Christophe On 12/01/18 18:32, Christophe Lyon wrote: Le 12 janv. 2018 15:26, "Sudakshina Das" a écrit : Hi This patch fixes my earlier test case that fails for arm-none-eabi with explicit user option for -mfloat-abi which conflict with the test case options. I have added a guard to skip th

Re: [PATCH 2/6] [ARC] Add SJLI support.

2018-01-16 Thread Andrew Burgess
* Claudiu Zissulescu [2017-11-02 13:30:31 +0100]: > gcc/ > 2017-02-20 Claudiu Zissulescu > > * config/arc/arc-protos.h: Add arc_is_secure_call_p proto. > * config/arc/arc.c (arc_handle_secure_attribute): New function. > (arc_attribute_table): Add 'secure_call' attribute. >

[C++ Patch] PR 81054 ("[7/8 Regression] ICE with volatile variable in constexpr function")

2018-01-16 Thread Paolo Carlini
Hi, in this error recovery regression we ICE when we end-up in an inconsistent state after meaningful diagnostic emitted by ensure_literal_type_for_constexpr_object and then some redundant / slightly misleading one emitted by check_static_variable_definition. I think we can just return early

Re: [PATCH PR82096] Fix ICE in int_mode_for_mode, at stor-layout.c:403 with arm-linux-gnueabi

2018-01-16 Thread Sudakshina Das
Hi Jeff On 12/01/18 23:00, Jeff Law wrote: On 01/12/2018 01:45 AM, Christophe Lyon wrote: Hi, On 11 January 2018 at 11:58, Sudakshina Das wrote: Hi Jeff On 10/01/18 21:08, Jeff Law wrote: On 01/10/2018 09:25 AM, Sudakshina Das wrote: Hi Jeff On 10/01/18 10:44, Sudakshina Das wrote:

Re: [PATCH 3/6] [ARC] Add support for "register file 16" reduced register set

2018-01-16 Thread Andrew Burgess
* Claudiu Zissulescu [2017-11-02 13:30:32 +0100]: > gcc/ > 2017-03-20 Claudiu Zissulescu > > * config/arc/arc-arches.def: Option mrf16 valid for all > architectures. > * config/arc/arc-c.def (__ARC_RF16__): New predefined macro. > * config/arc/arc-cpus.def (em_mini):

Move pa.h FUNCTION_ARG_SIZE to pa.c (PR83858)

2018-01-16 Thread Richard Sandiford
The port-local FUNCTION_ARG_SIZE: MODE) != BLKmode \ ? (HOST_WIDE_INT) GET_MODE_SIZE (MODE) \ : int_size_in_bytes (TYPE)) + UNITS_PER_WORD - 1) / UNITS_PER_WORD) is used by code in pa.c and by ASM_DECLARE_FUNCTION_NAME in som.h. Treating GET_MODE_SIZE as a constant is OK for the f

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread H.J. Lu
On Tue, Jan 16, 2018 at 12:34 AM, Jan Hubicka wrote: >> On Mon, Jan 15, 2018 at 5:53 PM, H.J. Lu wrote: >> > On Mon, Jan 15, 2018 at 3:38 AM, H.J. Lu wrote: >> >> On Mon, Jan 15, 2018 at 12:31 AM, Richard Biener >> >> wrote: >> >>> On Sun, Jan 14, 2018 at 4:08 PM, H.J. Lu wrote: >> Now my

Re: [PATCH] Fix warn_if_not_align ICE (PR c/83844)

2018-01-16 Thread Richard Sandiford
Jakub Jelinek writes: > On Tue, Jan 16, 2018 at 08:57:38AM +0100, Richard Biener wrote: >> > - unsigned HOST_WIDE_INT off >> > -= (tree_to_uhwi (DECL_FIELD_OFFSET (field)) >> > - + tree_to_uhwi (DECL_FIELD_BIT_OFFSET (field)) / BITS_PER_UNIT); >> > - if ((off % warn_if_not_align) != 0)

Re: [PATCH][WWWDOCS][AArch64][ARM] Update GCC 8 release notes

2018-01-16 Thread Kyrill Tkachov
Hi Tamar, On 16/01/18 10:04, Tamar Christina wrote: Hi All, This patch updates the GCC 8 release notes for ARM and AArch64. Ok for cvs? Thanks, Tamar -- + + +New Armv8.4-A FP16 Floating Point Multiplication Variant instructions have been added. These instructions are +mandat

[PATCH] i386: More use reference of struct ix86_frame to avoid copy

2018-01-16 Thread H.J. Lu
This patch has been used with my Spectre backport for GCC 7 for many weeks and has been checked into GCC 7 branch. Should I revert it on GCC 7 branch or check it into trunk? H.J. --- When there is no need to make a copy of ix86_frame, we can use reference of struct ix86_frame to avoid copy.

Avoid GCC 4.1 build failure in fold-const.c

2018-01-16 Thread Richard Sandiford
We had: tree t = fold_vec_perm (type, arg1, arg2, vec_perm_indices (sel, 2, nelts)); where fold_vec_perm takes a const vec_perm_indices &. GCC 4.1 apparently required a public copy constructor: gcc/vec-perm-indices.h:85: error: 'vec_perm_indic

Re: Avoid GCC 4.1 build failure in fold-const.c

2018-01-16 Thread Jakub Jelinek
On Tue, Jan 16, 2018 at 12:11:28PM +, Richard Sandiford wrote: > We had: > > tree t = fold_vec_perm (type, arg1, arg2, > vec_perm_indices (sel, 2, nelts)); > > where fold_vec_perm takes a const vec_perm_indices &. GCC 4.1 apparently > required

Re: [PATCH v3, rs6000] Add -mspeculate-indirect-jumps option and implement non-speculating bctr / bctrl

2018-01-16 Thread Segher Boessenkool
Hi! On Tue, Jan 16, 2018 at 09:29:13AM +0100, Richard Biener wrote: > Did you consider simply removing the tablejump/casesi support so > expansion always > expands to a balanced tree? At least if we have any knobs to tune we > should probably > tweak them away from the indirect jump using variant

[PATCH, committed] Add myself to MAINTAINERS

2018-01-16 Thread Sebastian Perta
Hi, Just added myself to MAINTAINERS (write after approval) Best Regards, Sebastian Index: ChangeLog === --- ChangeLog(revision 256737) +++ ChangeLog(working copy) @@ -1,3 +1,7 @@ +2018-01-16 Sebastian Perta + +* MAINTAINERS (wri

Re: [PATCH v3, rs6000] Add -mspeculate-indirect-jumps option and implement non-speculating bctr / bctrl

2018-01-16 Thread Segher Boessenkool
Hi! On Mon, Jan 15, 2018 at 05:09:06PM -0600, Bill Schmidt wrote: > @@ -12933,9 +12974,27 @@ >"" > { >if (TARGET_32BIT) > -emit_jump_insn (gen_tablejumpsi (operands[0], operands[1])); > +{ > + if (rs6000_speculate_indirect_jumps) > + emit_jump_insn (gen_tablejumpsi (opera

Re: [PATCH] i386: More use reference of struct ix86_frame to avoid copy

2018-01-16 Thread H.J. Lu
On Tue, Jan 16, 2018 at 3:40 AM, H.J. Lu wrote: > This patch has been used with my Spectre backport for GCC 7 for many > weeks and has been checked into GCC 7 branch. Should I revert it on > GCC 7 branch or check it into trunk? Ada build failed with this on trunk: raised STORAGE_ERROR : stack o

[PATCH] PR libstdc++/83834 replace wildcard pattern in linker script

2018-01-16 Thread Jonathan Wakely
The soon-to-be-released binutils 2.30 makes a small change to how lambda functions are demangled, which causes some unwanted symbols to match a wildcard pattern in the GLIBCXX_3.4 version node of our linker script. The only symbol that is supposed to match the pattern is std::cerr so we should jus

Re: GCC 8.0.0 Status Report (2018-01-15), Trunk in Regression and Documentation fixes only mode

2018-01-16 Thread Segher Boessenkool
On Mon, Jan 15, 2018 at 09:21:07AM +0100, Richard Biener wrote: > We're still in pretty bad shape regression-wise. Please also take > the opportunity to check the state of your favorite host/target > combination to make sure building and testing works appropriately. I tested building Linux (the k

Re: [PATCH] Fix store-merging for ~ of bswap (PR tree-optimization/83843)

2018-01-16 Thread Christophe Lyon
On 15 January 2018 at 22:44, Jakub Jelinek wrote: > Hi! > > When using the bswap pass infrastructure, BIT_NOT_EXPRs aren't allowed in > the middle, but due to the way process_store handles those it can appear > around the value, which is something output_merged_store didn't handle. > > Fixed thusl

Re: [C++ Patch] PR 81054 ("[7/8 Regression] ICE with volatile variable in constexpr function")

2018-01-16 Thread Paolo Carlini
.. nevermind, this requires more work: my simple patchlet would cause a few regression in the libstdc++-v3 testsuite (the assert at the beginning of finish_expr_stmt triggers) Paolo.

Two fixes for live-out SLP inductions (PR 83857)

2018-01-16 Thread Richard Sandiford
vect_analyze_loop_operations was calling vectorizable_live_operation for all live-out phis, which led to a bogus ncopies calculation in the pure SLP case. I think v_a_l_o should only be passing phis that are vectorised using normal loop vectorisation, since vect_slp_analyze_node_operations handles

Re: [PATCH] rtlanal: dead_or_set_regno_p should handle CLOBBER (PR83424)

2018-01-16 Thread Segher Boessenkool
On Mon, Dec 18, 2017 at 12:16:13PM -0700, Jeff Law wrote: > On 12/16/2017 02:03 PM, Segher Boessenkool wrote: > > In PR83424 combine's move_deaths puts a REG_DEAD not in the wrong place > > because dead_or_set_regno_p does not account for CLOBBER insns. This > > fixes it. > > > > Bootstrapped and

Re: [PATCH][WWWDOCS][AArch64][ARM] Update GCC 8 release notes

2018-01-16 Thread Tamar Christina
Hi Kyrill, > > xgene1 was added a few releases ago, better to use one of the new additions > from the above list. > For example -mtune=cortex-r52. Thanks, I have updated the patch. I'll wait for an ok from an AArch64 maintainer and a Docs maintainer. > > With that nit the arm changes look ok

Re: [PATCH v3, rs6000] Add -mspeculate-indirect-jumps option and implement non-speculating bctr / bctrl

2018-01-16 Thread Bill Schmidt
On Jan 16, 2018, at 6:13 AM, Segher Boessenkool wrote: > > Hi! > > On Tue, Jan 16, 2018 at 09:29:13AM +0100, Richard Biener wrote: >> Did you consider simply removing the tablejump/casesi support so >> expansion always >> expands to a balanced tree? At least if we have any knobs to tune we >>

Re: Move pa.h FUNCTION_ARG_SIZE to pa.c (PR83858)

2018-01-16 Thread John David Anglin
On 2018-01-16 5:52 AM, Richard Sandiford wrote: 2018-01-16 Richard Sandiford gcc/ PR target/83858 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete. * config/pa/pa-protos.h (pa_function_arg_size): Declare. * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use pa_

Re: Move pa.h FUNCTION_ARG_SIZE to pa.c (PR83858)

2018-01-16 Thread Richard Sandiford
John David Anglin writes: > On 2018-01-16 5:52 AM, Richard Sandiford wrote: >> 2018-01-16 Richard Sandiford >> >> gcc/ >> PR target/83858 >> * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete. >> * config/pa/pa-protos.h (pa_function_arg_size): Declare. >> * config/pa/som.h (ASM_DECL

[PATCH] Fix gimplify_one_sizepos (PR libgomp/83590, take 4)

2018-01-16 Thread Jakub Jelinek
Hi! After lengthy IRC discussions, here is an updated patch, which should also fix the problem that variably_modified_type_p on a REAL_TYPE returns true even when it has constant maximum and minimum. Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk? 2018-01-16 Jakub Jelinek

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread Rainer Orth
Hi Richard, >>> Backport is blocked by >>> >>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83838 >>> >>> There are many test failures due to lack of comdat support in linker on >>> Solaris. actually this is lack of hidden .gnu.linkonce support right now. Currently that's disabled for all but gld

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread Rainer Orth
Hi Jan, >> It makes the option using thunks unusable though, right? Can you simply make >> them hidden on systems without comdat support? That duplicates them per TU >> but at least the feature works. Or those systems should provide the >> thunks via >> libgcc. >> >> I agree we can followup wi

Re: Move pa.h FUNCTION_ARG_SIZE to pa.c (PR83858)

2018-01-16 Thread John David Anglin
On 2018-01-16 9:48 AM, Richard Sandiford wrote: Oops, yes. Installed with that change, thanks. Oops, I just realized the CEIL function needs to be applied to the GET_MODE_SIZE return as well... Dave -- John David Anglin dave.ang...@bell.net

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread Rainer Orth
Hi Richard, > I'm quite sure Solaris supports comdats, after all it invented ELF ;) true: gcc/configure.ac has # Sun ld has COMDAT group support since Solaris 9, but it doesn't # interoperate with GNU as until Solaris 11 build 130, i.e. ld # version 1.688. # # If us

Re: [PATCH] i386: More use reference of struct ix86_frame to avoid copy

2018-01-16 Thread Martin Liška
On 01/16/2018 01:35 PM, H.J. Lu wrote: > On Tue, Jan 16, 2018 at 3:40 AM, H.J. Lu wrote: >> This patch has been used with my Spectre backport for GCC 7 for many >> weeks and has been checked into GCC 7 branch. Should I revert it on >> GCC 7 branch or check it into trunk? > > Ada build failed wit

Re: [PATCH] Fix gimplify_one_sizepos (PR libgomp/83590, take 4)

2018-01-16 Thread Richard Biener
On Tue, 16 Jan 2018, Jakub Jelinek wrote: > Hi! > > After lengthy IRC discussions, here is an updated patch, which should also > fix the problem that variably_modified_type_p on a REAL_TYPE returns true > even when it has constant maximum and minimum. > > Bootstrapped/regtested on x86_64-linux a

Re: [C++ PATCH] Fix ICE in member_vec_dedup (PR c++/83825)

2018-01-16 Thread Nathan Sidwell
On 01/15/2018 04:46 PM, Jakub Jelinek wrote: Hi! As the testcase shows, calls to member_vec_dedup and qsort are just guarded by the vector being non-NULL, which doesn't mean it must be non-empty, so we can't do (*member_vec)[0] on it. Fixed by the second hunk, the rest is just a small cleanup t

Re: Two fixes for live-out SLP inductions (PR 83857)

2018-01-16 Thread Richard Biener
On Tue, Jan 16, 2018 at 2:29 PM, Richard Sandiford wrote: > vect_analyze_loop_operations was calling vectorizable_live_operation > for all live-out phis, which led to a bogus ncopies calculation in > the pure SLP case. I think v_a_l_o should only be passing phis > that are vectorised using normal

[PATCH] Fix PR83867

2018-01-16 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2018-01-16 Richard Biener PR tree-optimization/83867 * tree-vect-stmts.c (vect_transform_stmt): Precompute nested_in_vect_loop_p since the scalar stmt may get invalidated. * gcc.dg/vect/pr

Re: [PATCH] rtlanal: dead_or_set_regno_p should handle CLOBBER (PR83424)

2018-01-16 Thread Jeff Law
On 01/16/2018 06:41 AM, Segher Boessenkool wrote: > On Mon, Dec 18, 2017 at 12:16:13PM -0700, Jeff Law wrote: >> On 12/16/2017 02:03 PM, Segher Boessenkool wrote: >>> In PR83424 combine's move_deaths puts a REG_DEAD not in the wrong place >>> because dead_or_set_regno_p does not account for CLOBBER

Re: [PATCH v2] Change default to -fno-math-errno

2018-01-16 Thread Wilco Dijkstra
Joseph Myers wrote: > Another question to consider: what about configurations (mostly > soft-float) where floating-point exceptions are not supported?  (glibc > wrongly defines math_errhandling to include MATH_ERREXCEPT there, but the > only option actually permitted by C99 in that case would b

Re: [PATCH] i386: More use reference of struct ix86_frame to avoid copy

2018-01-16 Thread H.J. Lu
On Tue, Jan 16, 2018 at 7:03 AM, Martin Liška wrote: > On 01/16/2018 01:35 PM, H.J. Lu wrote: >> On Tue, Jan 16, 2018 at 3:40 AM, H.J. Lu wrote: >>> This patch has been used with my Spectre backport for GCC 7 for many >>> weeks and has been checked into GCC 7 branch. Should I revert it on >>> GC

VIEW_CONVERT_EXPR slots for strict-align targets (PR 83884)

2018-01-16 Thread Richard Sandiford
This PR is about a case in which we VIEW_CONVERT a variable-sized unaligned record: unit-size align:8 ...> to an aligned 32-bit integer. The strict-alignment handling of this case creates an aligned temporary slot, moves the operand into the slot in the operand's original mode, then a

[PATCH v2][AArch64] Remove remaining uses of * in patterns

2018-01-16 Thread Wilco Dijkstra
v2: Rebased after the big SVE commits Remove the remaining uses of '*' from aarch64.md. Using '*' in alternatives is typically incorrect as it tells the register allocator to ignore those alternatives. Also add a missing '?' so we prefer a floating point register for same-size int<->fp conversion

Re: [PATCH][WWWDOCS][AArch64][ARM] Update GCC 8 release notes

2018-01-16 Thread James Greenhalgh
On Tue, Jan 16, 2018 at 02:21:30PM +, Tamar Christina wrote: > Hi Kyrill, > > > > > xgene1 was added a few releases ago, better to use one of the new additions > > from the above list. > > For example -mtune=cortex-r52. > > Thanks, I have updated the patch. I'll wait for an ok from an AArch

Re: [PATCH][WWWDOCS][AArch64][ARM] Update GCC 8 release notes

2018-01-16 Thread Tamar Christina
Th 01/16/2018 16:36, James Greenhalgh wrote: > On Tue, Jan 16, 2018 at 02:21:30PM +, Tamar Christina wrote: > > Hi Kyrill, > > > > > > > > xgene1 was added a few releases ago, better to use one of the new > > > additions from the above list. > > > For example -mtune=cortex-r52. > > > > Than

[PATCH 2/2] GCC 6: ii386: Use reference of struct ix86_frame to avoid copy

2018-01-16 Thread H.J. Lu
From: hjl When there is no need to make a copy of ix86_frame, we can use reference of struct ix86_frame to avoid copy. Backport from mainline 2017-11-06 H.J. Lu * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference of struct ix86_frame. (ix8

Re: [PATCH][WWWDOCS][AArch64][ARM] Update GCC 8 release notes

2018-01-16 Thread Tamar Christina
I seem to have forgotten the patch :) The 01/16/2018 16:56, Tamar Christina wrote: > Th 01/16/2018 16:36, James Greenhalgh wrote: > > On Tue, Jan 16, 2018 at 02:21:30PM +, Tamar Christina wrote: > > > Hi Kyrill, > > > > > > > > > > > xgene1 was added a few releases ago, better to use one of

[PATCH 0/2] GCC 6: i386: Move struct ix86_frame to machine_function

2018-01-16 Thread H.J. Lu
This patch set makes ix86_frame available to i386 code generation. They are needed to backport the patch set of -mindirect-branch= to mitigate variant #2 of the speculative execution vulnerabilities on x86 processors identified by CVE-2017-5715, aka Spectre. Tested on Linux/i686 and Linux/x86-64.

[PATCH 1/2] GCC 6: ii386: Move struct ix86_frame to machine_function

2018-01-16 Thread H.J. Lu
From: hjl Make ix86_frame available to i386 code generation. This is needed to backport the patch set of -mindirect-branch= to mitigate variant #2 of the speculative execution vulnerabilities on x86 processors identified by CVE-2017-5715, aka Spectre. Backport from mainline 2017

GCC 6: i386: Move struct ix86_frame to machine_function

2018-01-16 Thread H.J. Lu
This is needed for GCC 6 backport of Spectre patches: https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01465.html https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01466.html https://gcc.gnu.org/ml/gcc-patches/2018-01/msg01464.html -- H.J.

Re: GCC 8.0.0 Status Report (2018-01-15), Trunk in Regression and Documentation fixes only mode

2018-01-16 Thread Joseph Myers
On Tue, 16 Jan 2018, Segher Boessenkool wrote: > On Mon, Jan 15, 2018 at 09:21:07AM +0100, Richard Biener wrote: > > We're still in pretty bad shape regression-wise. Please also take > > the opportunity to check the state of your favorite host/target > > combination to make sure building and test

Re: [PATCH] PR82964: Fix 128-bit immediate ICEs

2018-01-16 Thread James Greenhalgh
On Mon, Jan 15, 2018 at 11:34:19AM +, Wilco Dijkstra wrote: > This fixes PR82964 which reports ICEs for some CONST_WIDE_INT immediates. > It turns out decimal floating point CONST_DOUBLE get changed into > CONST_WIDE_INT without checking the constraint on the operand, which > results in failur

[PATCH, rs6000] Fix ICE caused by recent patch: Generate lvx and stvx without swaps for aligned vector loads and stores

2018-01-16 Thread Kelvin Nilsen
A patch committed on 2018-01-10 is causing an ICE with existing test program $GCC_SRC/gcc/testsuite/gcc.target/powerpc/pr83399.c, when compiled with the -m32 option. At the time of the commit, it was thought that this was a problem with the recent resolution of PR83399. However, further investiga

Re: [PATCH][WWWDOCS][AArch64][ARM] Update GCC 8 release notes

2018-01-16 Thread Kyrill Tkachov
Hi Tamar, On 16/01/18 16:56, Tamar Christina wrote: Th 01/16/2018 16:36, James Greenhalgh wrote: On Tue, Jan 16, 2018 at 02:21:30PM +, Tamar Christina wrote: Hi Kyrill, xgene1 was added a few releases ago, better to use one of the new additions from the above list. For example -mtune=co

Compilation warning in simple-object-xcoff.c

2018-01-16 Thread Eli Zaretskii
Compiling GDB 8.0.91 with mingw.org's MinGW GCC 6.0.3 produces this warning in libiberty: gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./simple-object-xcoff.c -o simple-

Re: [PATCH, rs6000] Fix ICE caused by recent patch: Generate lvx and stvx without swaps for aligned vector loads and stores

2018-01-16 Thread Segher Boessenkool
Hi Kelvin, On Tue, Jan 16, 2018 at 11:15:12AM -0600, Kelvin Nilsen wrote: > > A patch committed on 2018-01-10 is causing an ICE with existing test > program $GCC_SRC/gcc/testsuite/gcc.target/powerpc/pr83399.c, when > compiled with the -m32 option. At the time of the commit, it was > thought that

Re: VIEW_CONVERT_EXPR slots for strict-align targets (PR 83884)

2018-01-16 Thread Richard Biener
On January 16, 2018 5:14:50 PM GMT+01:00, Richard Sandiford wrote: >This PR is about a case in which we VIEW_CONVERT a variable-sized >unaligned record: > >sizes-gimplified type_7 BLK >size >unit-size >align:8 ...> > >to an aligned 32-bit integer. The strict-alignment handling of >

Re: Compilation warning in simple-object-xcoff.c

2018-01-16 Thread DJ Delorie
I think that warning is valid - the host has a 32-bit limit to file sizes (off_t) but it's trying to read a 64-bit offset (in that clause). It's warning you that you won't be able to handle files as large as the field implies. Can we hide the warning? Probably. Should we? Debatable, as long as

RE: [PATCH][WWWDOCS][AArch64][ARM] Update GCC 8 release notes

2018-01-16 Thread Tamar Christina
Hi Kyrill, > > Hi Tamar, > > On 16/01/18 16:56, Tamar Christina wrote: > > Th 01/16/2018 16:36, James Greenhalgh wrote: > >> On Tue, Jan 16, 2018 at 02:21:30PM +, Tamar Christina wrote: > >>> Hi Kyrill, > >>> > xgene1 was added a few releases ago, better to use one of the new > addition

Re: Compilation warning in simple-object-xcoff.c

2018-01-16 Thread Eli Zaretskii
> From: DJ Delorie > Cc: gcc-patches@gcc.gnu.org, gdb-patc...@sourceware.org > Date: Tue, 16 Jan 2018 13:00:48 -0500 > > > I think that warning is valid - the host has a 32-bit limit to file > sizes (off_t) but it's trying to read a 64-bit offset (in that clause). > It's warning you that you won

Re: Compilation warning in simple-object-xcoff.c

2018-01-16 Thread DJ Delorie
Well, it should all work fine as long as the xcoff64 file is less than 4 Gb. And it's not the host's bit size that counts; there are usually ways to get 64-bit file operations on 32-bit hosts.

[PATCH, rs6000] Implement ABI_AIX indirect call handling for -mno-speculate-indirect-jumps

2018-01-16 Thread Bill Schmidt
Hi, This patch fills in a gap from the previous -mno-speculate-indirect-jumps patch. That patch didn't provide support for indirect calls using ABI_AIX as the default ABI. This fills in that missing support and changes the one related powerpc64le-only test case to be compiled for all subtargets.

[PATCH] avoid assuming known string length is constant (PR 83896)

2018-01-16 Thread Martin Sebor
Recent improvements to the strlen pass introduced the assumption that when the length of a string has been recorded by the pass the length is necessarily constant. Bug 83896 shows that this assumption is not always true, and that GCC fails with an ICE when it doesn't hold. To avoid the ICE the a

Re: [PATCH] avoid assuming known string length is constant (PR 83896)

2018-01-16 Thread Richard Sandiford
Martin Sebor writes: > Recent improvements to the strlen pass introduced the assumption > that when the length of a string has been recorded by the pass > the length is necessarily constant. Bug 83896 shows that this > assumption is not always true, and that GCC fails with an ICE > when it doesn'

[PATCH, rs6000] (v2) Support for gimple folding of mergeh, mergel intrinsics

2018-01-16 Thread Will Schmidt
Hi, Add support for gimple folding of the mergeh, mergel intrinsics. Since the low and high versions are almost identical, a new helper function is added so that code can be shared. The changes introduced here affect the existing target testcases gcc.target/powerpc/builtins-1-be.c and built

Re: [PATCH 0/5] x86: CVE-2017-5715, aka Spectre

2018-01-16 Thread Uros Bizjak
On Sun, Jan 14, 2018 at 5:43 PM, Uros Bizjak wrote: > On Sun, Jan 14, 2018 at 5:35 PM, H.J. Lu wrote: >> On Sun, Jan 14, 2018 at 8:19 AM, Uros Bizjak wrote: >>> On Fri, Jan 12, 2018 at 9:01 AM, Uros Bizjak wrote: On Thu, Jan 11, 2018 at 2:28 PM, H.J. Lu wrote: > Hi Uros, > >>

[PATCH, rs6000] Bug fixes for the Power 9 stxvl and lxvl instructions.

2018-01-16 Thread Carl Love
GCC maintainers: The following patch contains fixes for the stxvl and lxvl instructions and XL_LEN_R builtin that were found while adding additional Power 9 test cases for the various load and store builtins. The new tests in builtins-5-p9-runnable.c and builtins-6-p9-runnable.c are included that

Re: [PATCH] i386: More use reference of struct ix86_frame to avoid copy

2018-01-16 Thread H.J. Lu
On Tue, Jan 16, 2018 at 8:09 AM, H.J. Lu wrote: > On Tue, Jan 16, 2018 at 7:03 AM, Martin Liška wrote: >> On 01/16/2018 01:35 PM, H.J. Lu wrote: >>> On Tue, Jan 16, 2018 at 3:40 AM, H.J. Lu wrote: This patch has been used with my Spectre backport for GCC 7 for many weeks and has been c

Re: VIEW_CONVERT_EXPR slots for strict-align targets (PR 83884)

2018-01-16 Thread Eric Botcazou
> I'd assumed that variable-length types couldn't occur here, since it > seems strange to view-convert a variable-length type to a fixed-length > one. This happens all the time in Ada when you convert an unconstrained type into one of its constrained subtypes (but the run-time sizes must match).

[C++ Patch] PR 81054 ("[7/8 Regression] ICE with volatile variable in constexpr function") [Take 2]

2018-01-16 Thread Paolo Carlini
Hi again, thus I figured out what was badly wrong in my first try: I misread ensure_literal_type_for_constexpr_object and missed that it can return NULL_TREE without emitting an hard error. Thus my first try even caused miscompilations :( Anyway, when DECL_DECLARED_CONSTEXPR_P is true we are

[PATCH] make -Wrestrict for strcat more meaningful (PR 83698)

2018-01-16 Thread Martin Sebor
PR 83698 - bogus offset in -Wrestrict messages for strcat of unknown strings, points out that the offsets printed by -Wrestrict for possibly overlapping strcat calls with unknown strings don't look meaningful in some cases. The root cause of the bogus values is wrapping during the conversion from

[libstdc++] Fix 17_intro/names.cc on SPARC/Linux

2018-01-16 Thread Eric Botcazou
The SPARC-V8 architecture contains a Y register so defines a structure with a 'y' field on Linux. Tested on SPARC64/Linux, applied on the mainline and 7 branch as obvious. 2018-01-16 Eric Botcazou * testsuite/17_intro/names.cc: Undefine 'y' on SPARC/Linux. -- Eric Botcazou Index:

Fix PR testsuite/77734 on SPARC

2018-01-16 Thread Eric Botcazou
We need to enable delayed-branch scheduling to have sibling calls on SPARC. Tested on SPARC64/Linux, applied on the mainline and 7 branch. 2018-01-16 Eric Botcazou PR testsuite/77734 * gcc.dg/plugin/must-tail-call-1.c: Pass -fdelayed-branch on SPARC. -- Eric BotcazouIndex:

[visium] Very minor tweak

2018-01-16 Thread Eric Botcazou
Tested on visium-elf, applied on the mainline. 2018-01-16 Eric Botcazou * config/visium/visium.md (nop): Tweak comment. (hazard_nop): Likewise. -- Eric BotcazouIndex: config/visium/visium.md === --- config/visiu

[testsuite] Skip loop tests on Visium

2018-01-16 Thread Eric Botcazou
They either use too much space in the data segment or on the stack. Tested on visium-elf, applied on the mainline. 2018-01-16 Eric Botcazou * gcc.dg/tree-ssa/ldist-27.c: Skip on Visium. * gcc.dg/tree-ssa/loop-interchange-1.c: Likewise. * gcc.dg/tree-ssa/loop-interchan

[testsuite] Tweak patchable function tests

2018-01-16 Thread Eric Botcazou
On Visium, the compiler sometimes emits a NOP to avoid a pipeline hazard. Tested on visium-elf and x86_64-suse-linux, applied on the mainline. 2018-01-16 Eric Botcazou * c-c++-common/patchable_function_entry-decl.c: Use 3 NOPs on Visium. * c-c++-common/patchable_function_entr

Re: [PATCH] avoid assuming known string length is constant (PR 83896)

2018-01-16 Thread Jakub Jelinek
On Tue, Jan 16, 2018 at 07:37:30PM +, Richard Sandiford wrote: > > -/* Check if RHS is string_cst possibly wrapped by mem_ref. */ > > +/* If RHS, either directly or indirectly, refers to a string of constant > > + length, return it. Otherwise return a negative value. */ > > + > > static i

Re: [PATCH] make -Wrestrict for strcat more meaningful (PR 83698)

2018-01-16 Thread Jakub Jelinek
On Tue, Jan 16, 2018 at 01:36:26PM -0700, Martin Sebor wrote: > --- gcc/gimple-ssa-warn-restrict.c(revision 256752) > +++ gcc/gimple-ssa-warn-restrict.c(working copy) > @@ -384,6 +384,12 @@ builtin_memref::builtin_memref (tree expr, tree si > base = SSA_NAME_VAR (base); >} >

Re: [C++ Patch] PR 81054 ("[7/8 Regression] ICE with volatile variable in constexpr function") [Take 2]

2018-01-16 Thread Jason Merrill
On Tue, Jan 16, 2018 at 3:32 PM, Paolo Carlini wrote: > thus I figured out what was badly wrong in my first try: I misread > ensure_literal_type_for_constexpr_object and missed that it can return > NULL_TREE without emitting an hard error. Thus my first try even caused > miscompilations :( Anyway,

Re: [C++ Patch] PR 81054 ("[7/8 Regression] ICE with volatile variable in constexpr function") [Take 2]

2018-01-16 Thread Paolo Carlini
Hi Jason On 16/01/2018 22:35, Jason Merrill wrote: On Tue, Jan 16, 2018 at 3:32 PM, Paolo Carlini wrote: thus I figured out what was badly wrong in my first try: I misread ensure_literal_type_for_constexpr_object and missed that it can return NULL_TREE without emitting an hard error. Thus my f

One more patch for PR80481

2018-01-16 Thread Vladimir Makarov
The patch changes the test to exclude solaris for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80481 The first patch solved the problem for solaris too but solaris gcc still generates vmovaps in some different part of the code (unrelated to the problem) where linux gcc does not. Committed as

Re: Compilation warning in simple-object-xcoff.c

2018-01-16 Thread Andreas Schwab
On Jan 16 2018, DJ Delorie wrote: > And it's not the host's bit size that counts; there are usually ways to > get 64-bit file operations on 32-bit hosts. If ACX_LARGEFILE doesn't succeed in enabling those 64-bit file operations (thus making off_t a 64-bit type) then you are out of luck (or AC_SY

Re: [PATCH] avoid assuming known string length is constant (PR 83896)

2018-01-16 Thread Martin Sebor
On 01/16/2018 12:37 PM, Richard Sandiford wrote: Martin Sebor writes: Recent improvements to the strlen pass introduced the assumption that when the length of a string has been recorded by the pass the length is necessarily constant. Bug 83896 shows that this assumption is not always true, and

Re: [PATCH] avoid assuming known string length is constant (PR 83896)

2018-01-16 Thread Martin Sebor
On 01/16/2018 02:26 PM, Jakub Jelinek wrote: On Tue, Jan 16, 2018 at 07:37:30PM +, Richard Sandiford wrote: -/* Check if RHS is string_cst possibly wrapped by mem_ref. */ +/* If RHS, either directly or indirectly, refers to a string of constant + length, return it. Otherwise return a neg

Re: [PATCH, rs6000] (v2) Support for gimple folding of mergeh, mergel intrinsics

2018-01-16 Thread Segher Boessenkool
Hi! On Tue, Jan 16, 2018 at 01:39:28PM -0600, Will Schmidt wrote: > Sniff-tests of the target tests on a single system look OK. Full regtests are > currently running across assorted power systems. > OK for trunk, pending successful results? Just a few little things: > 2018-01-16 Will Schmidt

Re: [PATCH] avoid assuming known string length is constant (PR 83896)

2018-01-16 Thread Jakub Jelinek
On Tue, Jan 16, 2018 at 03:20:24PM -0700, Martin Sebor wrote: > Thanks for looking at it! I confess it's not completely clear > to me in what type the pass tracks string lengths. For string > constants, get_stridx() returns an int with the their length > bit-flipped. I tried to maintain that inv

  1   2   >