[PATCH,Fortran] Allow pointer initialization in DATA

2018-05-24 Thread Steve Kargl
The attach patch allows for pointer initialization in a DATA statement per F2018. Yes, it's weird that a data-constant-object is not a named parameter. The 'data-constant-object' is required to have the SAVE and TARGET attribute. Built and regression tested on x86_64-*-freebsd. OK to commit?

[Committed] PR fortran/85543 -- Avoid NULL pointer

2018-05-24 Thread Steve Kargl
Committed as obvious. 2018-05-24 Steven G. Kargl PR fortran/85543 * resolve.c (update_current_proc_array_outer_dependency): Avoid NULL pointer dereference. 2018-05-24 Steven G. Kargl PR fortran/85543 *

[C++ PATCH] Do not warn about zero-as-null when NULL is used.

2018-05-24 Thread Ville Voutilainen
I smacked my head against conversion_null_warnings for a while, and then I realized that we could just stop convert_like_real from changing the node type for null_node. Tested manually on Linux-x64, running full suite on Linux-PPC64, ok for trunk? 2018-05-25 Ville Voutilainen

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-24 Thread Martin Sebor
On 05/24/2018 03:40 PM, Marc Glisse wrote: On Wed, 23 May 2018, Martin Sebor wrote: On 05/23/2018 08:57 AM, Jeff Law wrote: On 05/10/2018 04:05 PM, Marc Glisse wrote: On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to Jeff's question below and confirm whether my

[Committed] PR fortran/85780 -- Avoid NULL pointer dereference

2018-05-24 Thread Steve Kargl
Committed as obvious. 2018-05-24 Steven G. Kargl PR fortran/85780 * resolve.c (resolve_fl_procedure): Avoid NULL dereference. 2018-05-24 Steven G. Kargl PR fortran/85780 * gfortran.dg/pr85780.f90: New test. -- Steve

Unreviewed patch

2018-05-24 Thread Rainer Orth
The following patch has remained unreviewed for two weeks: [build] Support SHF_EXCLUDE on non-x86 and with Solaris as https://gcc.gnu.org/ml/gcc-patches/2018-05/msg00465.html Most of it falls under my Solaris maintainership, I believe, but running the SHF_EXCLUDE

Re: [PATCH GCC][1/6]Compute type mode and register class mapping

2018-05-24 Thread Jeff Law
On 05/18/2018 02:40 AM, Bin.Cheng wrote: > On Fri, May 4, 2018 at 5:21 PM, Bin Cheng wrote: >> Hi, >> This is the updated version patch set computing register pressure on TREE SSA >> and use that information to direct other loop optimizers (predcom only for >> now). >> This

Re: Try harder to preserve operand ties in maybe_legitimize_operands

2018-05-24 Thread Jeff Law
On 05/23/2018 12:47 AM, Richard Sandiford wrote: > maybe_legitimize_operands normally goes through each operand in turn > and legitimises it in isolation. For example, if two operands to > an instruction initially have constant value C, and the instruction > requires both operands to be

Re: [PATCH, alpha] PR target/85095

2018-05-24 Thread coypu
On Thu, May 24, 2018 at 01:32:17PM -0600, Jeff Law wrote: > On 05/24/2018 01:17 PM, co...@sdf.org wrote: > > On Thu, May 24, 2018 at 12:48:22PM -0600, Jeff Law wrote: > >> On 05/24/2018 07:54 AM, Maya Rashish wrote: > >>> Move linux-specific specfile definitions to linux.h > >>>

Re: [PATCH] gcc/configure.ac: add --disable-systemtap switch

2018-05-24 Thread Jeff Law
On 05/12/2018 08:00 AM, Sergei Trofimovich via gcc-patches wrote: > From: Sergei Trofimovich > > Before the change systemtap probes were enabled > if target headers had sys/sdt.h at ./configure time. > > After the change explicitly ask to enable or disable > for probe support

Re: [PATCH] Define DW_FORM_strx* and DW_FORM_addrx*.

2018-05-24 Thread Jeff Law
On 05/09/2018 11:19 AM, Thomas Rix wrote: > This patch defines the dwarf 5 forms. > DW_FORM_strx1, DW_FORM_strx2, DW_FORM_strx3, DW_FORM_strx4 > And similar for addrx. > > Tom > > > > > 0001-Define-DW_FORM_strx-and-DW_FORM_addrx.patch > > > From b995ecdf67d1cff0fcda622a5272a75e9fdde77c Mon

Re: [PATCH] Optimize AVX512 vpcmpeq* against 0 into vptestm* (PR target/85832)

2018-05-24 Thread Jeff Law
On 05/23/2018 12:45 AM, Jakub Jelinek wrote: > Hi! > > As mentioned in the PR, vptestm* instructions with the same input operand used > twice perform the same comparison as vpcmpeq* against zero vector, with the > advantage that a register holding CONST0_RTX (mode) is not needed. > >

Re: [PATCH] issue nonstring warning for strcpy even on s360 (PR 85369)

2018-05-24 Thread Jeff Law
On 04/12/2018 06:00 PM, Martin Sebor wrote: > PR 85369 notes that the c-c++-common/attr-nonstring-3.c fails > on IBM Z (and other similar targets) whose back-end provides > the movstr expander.  The failure is cause by an expected > warning failing to trigger because the strcpy call is expanded >

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-24 Thread Marc Glisse
On Wed, 23 May 2018, Martin Sebor wrote: On 05/23/2018 08:57 AM, Jeff Law wrote: On 05/10/2018 04:05 PM, Marc Glisse wrote: On Thu, 10 May 2018, Martin Sebor wrote: Can you please comment/respond to Jeff's question below and confirm whether my understanding of the restriction (below) is

Re: Remove support for FreeBSD 4.x (and earlier)

2018-05-24 Thread Jeff Law
On 05/24/2018 03:36 PM, Gerald Pfeifer wrote: > FreeBSD 5.0 was released in January of 2003, and FreeBSD 4.11, the last > on that branch in January of 2005, so it appears time to remove support > for anything older than FreeBSD 5.x, if for no other reason to simplify > things a bit. > > This

Remove support for FreeBSD 4.x (and earlier)

2018-05-24 Thread Gerald Pfeifer
FreeBSD 5.0 was released in January of 2003, and FreeBSD 4.11, the last on that branch in January of 2005, so it appears time to remove support for anything older than FreeBSD 5.x, if for no other reason to simplify things a bit. This simplifies the spec file a fair bit, and I would not be

Re: RFA (symtab): PATCH to symtab_node::nonzero_address DECL_COMDAT handling for c++/80485

2018-05-24 Thread Jeff Law
On 05/19/2018 07:07 AM, Jason Merrill wrote: > A comment earlier in in nonzero_address says, "Important case of WEAK > we want to do well are comdats. Those are handled by later check for > definition." But in this case we aren't handling this comdat function > well, we return false because it is

Re: [PATCH] consider MIN_EXPR in get_size_range() (PR 85888)

2018-05-24 Thread Martin Sebor
On 05/24/2018 11:15 AM, Richard Biener wrote: On May 24, 2018 7:02:17 PM GMT+02:00, Martin Sebor wrote: On 05/24/2018 03:39 AM, Richard Biener wrote: On Thu, May 24, 2018 at 12:50 AM Martin Sebor wrote: The attached patch enhances the get_size_range()

Re: [PATCH] handle local aggregate initialization in strlen (PR 83821)

2018-05-24 Thread Jeff Law
On 05/23/2018 01:28 PM, Martin Sebor wrote: > On 05/23/2018 08:57 AM, Jeff Law wrote: >> On 05/10/2018 04:05 PM, Marc Glisse wrote: >>> On Thu, 10 May 2018, Martin Sebor wrote: >>> Can you please comment/respond to Jeff's question below and confirm whether my understanding of the

Re: [PATCH, AVX512]: Fix cvtusi264 insn mnemonic

2018-05-24 Thread Jeff Law
On 05/23/2018 04:08 AM, Uros Bizjak wrote: > Hello! > > With current insn mnemonic and ATT assembler dialect, there is no way > for the assembler to distinguish between DImode and SImode instruction > when memory input operand is used. The dump for 32bit memory reads as: > >0: 62 f1 7e 08

Re: [PATCH] POPCOUNT folding optimizations

2018-05-24 Thread Marc Glisse
On Thu, 24 May 2018, Jeff Law wrote: +    case LSHIFT_EXPR: +  if (TREE_CODE (TREE_OPERAND (t, 1)) == INTEGER_CST) Maybe check INTEGRAL_TYPE_P as well, like you did for PLUS_EXPR? Or was that also unnecessary for PLUS_EXPR? While there may be cases where allowing an INTEGRAL_TYPE_P

Re: [Patch, Fortran] PR 85849: [F2018] warn for obsolescent features

2018-05-24 Thread Steve Kargl
On Thu, May 24, 2018 at 09:57:16PM +0200, Janus Weil wrote: > > just because 2018 seems like a good time to do that, I continue > plucking some of the low-hanging Fortran 2018 fruit. The attached > patch adds obsolescence warnings for all major F18 obsolescences > (COMMON, BLOCK DATA,

Re: [PATCH] MSP430: Don't warn if naked function does not return

2018-05-24 Thread Jeff Law
On 05/23/2018 04:44 PM, Jozef Lawrynowicz wrote: > 2018-05-23 Jozef Lawrynowicz > > gcc/config/msp430/msp430.c (msp430_warn_func_return): New. > Thanks. Installed on the trunk. Jeff

Re: PING^2: [PATCH] Don't mark IFUNC resolver as only called directly

2018-05-24 Thread H.J. Lu
On Wed, May 23, 2018 at 8:35 AM, H.J. Lu wrote: > On Wed, May 23, 2018 at 8:11 AM, Jan Hubicka wrote: >>> On Wed, May 23, 2018 at 2:01 AM, Jan Hubicka wrote: >>> >> On Tue, May 22, 2018 at 9:21 AM, Jan Hubicka wrote: >>> >>

Re: [PATCH] POPCOUNT folding optimizations

2018-05-24 Thread Jeff Law
On 05/01/2018 02:42 AM, Marc Glisse wrote: > (I am not a reviewer, just commenting) But your comments are definitely appreciated! > > On Fri, 9 Feb 2018, Roger Sayle wrote: > >> The following patch implements a number of __builtin_popcount related >> optimizations. >> (i) popcount(x) == 0 can

Re: [PATCH] PR fortan/85779 -- Fix NULL pointer dereference

2018-05-24 Thread Janus Weil
2018-05-24 2:24 GMT+02:00 Steve Kargl : > Subject says it all. OK to commit? Ok with me. Thanks, Janus > 2018-05-23 Steven G. Kargl > > PR fortran/85779 > *decl.c (gfc_match_derived_decl): Fix NULL point dereference. >

Re: [PATCH] PR fortran/85895 -- Check for valid errmsg entity

2018-05-24 Thread Janus Weil
2018-05-24 1:45 GMT+02:00 Steve Kargl : > The attach patch fixes PR fortran/85895 and also addresses > a nearby issue by resolving the expressions associated with > the STAT= and ERRMSG= tags in SYNC statements. OK to commit? Looks good to me. Thanks for the

C++ PATCH for c++/85883, class tmpl args deduction fail with new

2018-05-24 Thread Marek Polacek
Here we were failing to deduce template arguments for a class, because the code in build_new only handled the case when INIT had 1 element. That works for e.g. new auto (foo) or new Foo{1, 2}, but not new Foo(1, 2). I noticed that it works without "new" because we simply create a tree list of

Re: [PATCH][RFC] Radically simplify emission of balanced tree for switch statements.

2018-05-24 Thread Martin Liška
On 05/24/2018 02:28 PM, Rainer Orth wrote: Hi Martin, On 05/21/2018 01:18 PM, Rainer Orth wrote: Hi Martin, On 05/18/2018 03:55 PM, Rainer Orth wrote: Hi Martin, So the patch looks fine, only very very slightly binary is produced. I'm going to install the patch so that I can carry on

Re: [PATCH][RFC] Radically simplify emission of balanced tree for switch statements.

2018-05-24 Thread Martin Liška
On 05/21/2018 04:42 PM, Sudakshina Das wrote: On 21/05/18 15:00, Rainer Orth wrote: Hi Martin, Thanks for opened eyes, following patch will fix that. It's quite obvious, I'll install it right after tests will finish. unfortunately, it didn't fix either issue: * The switchlower ->

Re: [PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux

2018-05-24 Thread Jakub Jelinek
On Thu, May 24, 2018 at 12:56:23PM -0700, H.J. Lu wrote: > >> This patch uses pre-computed size of struct ustat for Linux. > >> > >> PR sanitizer/85835 > >> * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't > >> include for Linux. > >> (SIZEOF_STRUCT_USTAT):

C++ PATCH for c++/85842, -Wreturn-type, constexpr if, and generic lambda

2018-05-24 Thread Jason Merrill
In this testcase, the only returns are inside a constexpr if, and when we're partially instantiating a generic lambda we don't mess with a constexpr if with a dependent condition, so we don't see the returns. Fixed by copying the relevant flags from the uninstantiated lambda. Tested

[Patch, Fortran] PR 85849: [F2018] warn for obsolescent features

2018-05-24 Thread Janus Weil
Hi all, just because 2018 seems like a good time to do that, I continue plucking some of the low-hanging Fortran 2018 fruit. The attached patch adds obsolescence warnings for all major F18 obsolescences (COMMON, BLOCK DATA, EQUIVALENCE, FORALL, labeled DO). Those warnings appear only with

Re: [PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux

2018-05-24 Thread H.J. Lu
On Thu, May 24, 2018 at 11:32 AM, Jakub Jelinek wrote: > On Thu, May 24, 2018 at 11:20:02AM -0700, H.J. Lu wrote: >> Here is the patch cherry-picked from compiler-rt revision 333213. >> OK for trunk? >> >> Thanks. >> >> >> -- >> H.J. > >> From

Re: [PATCH, alpha] PR target/85095

2018-05-24 Thread Jeff Law
On 05/24/2018 01:17 PM, co...@sdf.org wrote: > On Thu, May 24, 2018 at 12:48:22PM -0600, Jeff Law wrote: >> On 05/24/2018 07:54 AM, Maya Rashish wrote: >>> Move linux-specific specfile definitions to linux.h >>> gcc/config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC) move from >>> alpha/elf.h >>>

Re: [PATCH, alpha] PR target/85095

2018-05-24 Thread coypu
On Thu, May 24, 2018 at 12:48:22PM -0600, Jeff Law wrote: > On 05/24/2018 07:54 AM, Maya Rashish wrote: > > Move linux-specific specfile definitions to linux.h > > gcc/config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC) move from > > alpha/elf.h > > --- > > gcc/config/alpha/elf.h | 26

Re: [PATCH, alpha] PR target/85095

2018-05-24 Thread Jeff Law
On 05/24/2018 07:54 AM, Maya Rashish wrote: > Move linux-specific specfile definitions to linux.h > gcc/config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC) move from alpha/elf.h > --- > gcc/config/alpha/elf.h | 26 -- > gcc/config/alpha/linux.h | 26

Re: [PATCH] PR target/85904: Fix configure when cross compiling for netbsd

2018-05-24 Thread coypu
On Thu, May 24, 2018 at 06:31:25PM +0100, Jonathan Wakely wrote: > On 24/05/18 16:14 +0100, Jonathan Wakely wrote: > > On 24/05/18 13:14 +, co...@sdf.org wrote: > > > In the past I was asked to post bugzilla patches here. I am doing this. > > > It fixes a build failure. > > > > > > PR

Re: [PATCH] Check ifunc_resolver only on FUNCTION_DECL

2018-05-24 Thread Jeff Law
On 05/24/2018 05:43 AM, H.J. Lu wrote: > Since ifunc_resolver is only valid on FUNCTION_DECL, check ifunc_resolver > only on FUNCTION_DECL. > > Please test it on Darwin. > > > H.J. > --- > PR target/85900 > PR target/85345 > * varasm.c (assemble_alias): Check ifunc_resolver

Re: [C++ PATCH] Pedwarn on a non-standard position of a C++ attribute.

2018-05-24 Thread Jason Merrill
OK. On Thu, May 24, 2018 at 1:03 PM, Ville Voutilainen wrote: > On 24 May 2018 at 19:57, Nathan Sidwell wrote: >> On 05/24/2018 10:48 AM, Ville Voutilainen wrote: >>> >>> Tested manually on Linux-x64, finishing testing with the full suite >>> on

Re: [PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux

2018-05-24 Thread Jakub Jelinek
On Thu, May 24, 2018 at 11:20:02AM -0700, H.J. Lu wrote: > Here is the patch cherry-picked from compiler-rt revision 333213. > OK for trunk? > > Thanks. > > > -- > H.J. > From 9569b61168b963a6cea7b782fd350dee489ad42c Mon Sep 17 00:00:00 2001 > From: "H.J. Lu" > Date:

[PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux

2018-05-24 Thread H.J. Lu
On Tue, May 22, 2018 at 6:00 AM, Jakub Jelinek wrote: > On Tue, May 22, 2018 at 05:37:03AM -0700, H.J. Lu wrote: >> has been removed from glibc 2.28 by: >> >> commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7 >> Author: Adhemerval Zanella >> Date:

[PATCH, i386]: FIx PR85903]: FAIL: gcc.target/i386/avx512dq-vcvtuqq2pd-2.c

2018-05-24 Thread Uros Bizjak
Hello! my recent patch exposed a problem in movdi_to_sse pattern, where post-reload splitter tries to generate a pseudo, which is in fact not needed. 2018-05-24 Uros Bizjak PR target/85903 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo when memory

Re: [PATCH] PR target/85904: Fix configure when cross compiling for netbsd

2018-05-24 Thread Jonathan Wakely
On 24/05/18 16:14 +0100, Jonathan Wakely wrote: On 24/05/18 13:14 +, co...@sdf.org wrote: In the past I was asked to post bugzilla patches here. I am doing this. It fixes a build failure. PR target/85904 libstdc++-v3/crossconfig.m4: test for aligned_alloc on netbsd libstdc++-v3/configure:

Re: [PATCH] testsuite: Introduce be/le selectors

2018-05-24 Thread Segher Boessenkool
On Wed, May 23, 2018 at 10:07:18AM +0100, Richard Earnshaw (lists) wrote: > On 22/05/18 22:21, Jeff Law wrote: > > On 05/21/2018 03:46 PM, Segher Boessenkool wrote: > >> This patch creates "be" and "le" selectors, which can be used by all > >> architectures, similar to ilp32 and lp64. > >>

Re: [PATCH] consider MIN_EXPR in get_size_range() (PR 85888)

2018-05-24 Thread Richard Biener
On May 24, 2018 7:02:17 PM GMT+02:00, Martin Sebor wrote: >On 05/24/2018 03:39 AM, Richard Biener wrote: >> On Thu, May 24, 2018 at 12:50 AM Martin Sebor >wrote: >> >>> The attached patch enhances the get_size_range() function to >>> extract more accurate

Re: [C++ PATCH] Pedwarn on a non-standard position of a C++ attribute.

2018-05-24 Thread Ville Voutilainen
On 24 May 2018 at 19:57, Nathan Sidwell wrote: > On 05/24/2018 10:48 AM, Ville Voutilainen wrote: >> >> Tested manually on Linux-x64, finishing testing with the full suite >> on Linux-PPC64. Ok for trunk? >> >> 2018-05-24 Ville Voutilainen >> >>

Re: [PATCH] consider MIN_EXPR in get_size_range() (PR 85888)

2018-05-24 Thread Martin Sebor
On 05/24/2018 03:39 AM, Richard Biener wrote: On Thu, May 24, 2018 at 12:50 AM Martin Sebor wrote: The attached patch enhances the get_size_range() function to extract more accurate ranges out of MIN_EXPR and MAX_EXPR nodes with SSA_NAME operand(s). This helps

Re: [C++ PATCH] Pedwarn on a non-standard position of a C++ attribute.

2018-05-24 Thread Nathan Sidwell
On 05/24/2018 10:48 AM, Ville Voutilainen wrote: Tested manually on Linux-x64, finishing testing with the full suite on Linux-PPC64. Ok for trunk? 2018-05-24 Ville Voutilainen gcc/cp/ Pedwarn on a non-standard position of a C++ attribute. *

[PATCH] Implement P0558R2 changes to std::atomic

2018-05-24 Thread Jonathan Wakely
The restrictions forbidding arithmetic on atomic pointer types are only enabled for C++17 and later, retaining the GNU extension for older standards. The new nested typedefs and changes to prevent scalar parameters participating in template argument deduction are enabled unconditionally.

Re: [PATCH] PR target/85904: Fix configure when cross compiling for netbsd

2018-05-24 Thread Jonathan Wakely
On 24/05/18 13:14 +, co...@sdf.org wrote: In the past I was asked to post bugzilla patches here. I am doing this. It fixes a build failure. PR target/85904 libstdc++-v3/crossconfig.m4: test for aligned_alloc on netbsd libstdc++-v3/configure: Regenerate Attached is patch. Thanks for the

Re: [PATCH] [AArch64, Falkor] Falkor address costs tuning

2018-05-24 Thread Luis Machado
On 05/23/2018 12:17 PM, James Greenhalgh wrote: On Tue, May 22, 2018 at 12:04:38PM -0500, Luis Machado wrote: Switch from using generic address costs to using Falkor-specific ones, which give Falkor better results overall. OK for trunk? Given this is a Falkor-specific adjustment, would this

[C++ PATCH] Pedwarn on a non-standard position of a C++ attribute.

2018-05-24 Thread Ville Voutilainen
Tested manually on Linux-x64, finishing testing with the full suite on Linux-PPC64. Ok for trunk? 2018-05-24 Ville Voutilainen gcc/cp/ Pedwarn on a non-standard position of a C++ attribute. * parser.c (cp_parser_namespace_definition): Pedwarn about

C++ PATCH for c++/85864, literal template and default template arg

2018-05-24 Thread Jason Merrill
Another adjustment needed for my having removed the type from NONTYPE_ARGUMENT_PACK: instantiation_dependent_r needs to ignore that like it does for TREE_LIST. Tested x86_64-pc-linux-gnu, applying to trunk and 8. commit 9ebcb2b5403980ec25429c3f43bf951fae5772f8 Author: Jason Merrill

[PATCH, alpha] PR target/85095

2018-05-24 Thread Maya Rashish
Move linux-specific specfile definitions to linux.h gcc/config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC) move from alpha/elf.h --- gcc/config/alpha/elf.h | 26 -- gcc/config/alpha/linux.h | 26 ++ 2 files changed, 26 insertions(+), 26

Re: [C++ Patch] Add INDIRECT_TYPE_P

2018-05-24 Thread Jason Merrill
OK. On Tue, May 22, 2018 at 7:42 AM, Paolo Carlini wrote: > Hi, > > so this is the patch only adding INDIRECT_TYPE_P to the C++ front-end and > using it instead of the misleading POINTER_TYPE_P. It also replaces a couple > of existing TYPE_PTR_P || TYPE_REF_P. Poisoning

Re: libcpp PATCH to avoid deprecated copy assignment

2018-05-24 Thread Gerald Pfeifer
On Wed, 23 May 2018, Jason Merrill wrote: > Great, applied. Thank you! Gerald

Re: C++ PATCH for c++/85847, ICE with template_id_expr in new()

2018-05-24 Thread Jason Merrill
OK. On Wed, May 23, 2018 at 4:27 PM, Marek Polacek wrote: > On Wed, May 23, 2018 at 03:24:20PM -0400, Jason Merrill wrote: >> On Wed, May 23, 2018 at 2:50 PM, Marek Polacek wrote: >> > On Wed, May 23, 2018 at 12:45:11PM -0400, Jason Merrill wrote: >> >>

[PATCH] PR target/85904: Fix configure when cross compiling for netbsd

2018-05-24 Thread coypu
In the past I was asked to post bugzilla patches here. I am doing this. It fixes a build failure. PR target/85904 libstdc++-v3/crossconfig.m4: test for aligned_alloc on netbsd libstdc++-v3/configure: Regenerate Attached is patch. >From ac7a1f364b0ca5e3a6a5a68a16266d1cb78ee5da Mon Sep 17 00:00:00

[Ada] Fix irregular output with -gnatR3

2018-05-24 Thread Pierre-Marie de Rodat
This fixes a long-standing quirk present in the layout information for record types displayed by the -gnatR3 switch: when a component has a variable (starting) position, its corresponding line in the output has an irregular and awkward format. After this change, the format is the same as in all

[Ada] Simplify routines with a local Result variable

2018-05-24 Thread Pierre-Marie de Rodat
Local variable Result that is modified inside IF statements makes a seemingly trivial code slightly hard to understand. This patch rewrites such a pattern. Semantics unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-24 Piotr Trojanek gcc/ada/

[Ada] Wrong renaming of variant record equality

2018-05-24 Thread Pierre-Marie de Rodat
For a renaming of the equality operator of a variant record the compiler erroneously generates code that compares all the record component (thus computing wrong results). After this patch the following test provides the correct results. package Types is type Data (Bool : Boolean := False) is

[Ada] Improve GNATprove messages on unproved checks

2018-05-24 Thread Pierre-Marie de Rodat
GNATprove messages may point out to part of an assertion as not being proved, and in such a case it displays the sub-expression. This code relies on Pprint.Expression_Image, which is improved here to display better some kinds of expressions. There is no impact on compilation. Tested on

[Ada] Quadratic compile time with tagged types

2018-05-24 Thread Pierre-Marie de Rodat
This patch is an incremental commit which focuses on the optimization of entity chain navigation by adding an additional field (Prev_Entity) to all nodes in order to greaty speed up compilation of sources making heavy use of tagged derivations by effectly making the entity chain from a

[Ada] Infinite loop in the compiler when warning on redundant constructs

2018-05-24 Thread Pierre-Marie de Rodat
This patch fixes an infinite loop in the compiler when warnings on redundant constructs are enabled (-gnatwr) and the constructs are use_type clauses that appear (redundantly) in a parent unit and a child unit. The following command: gcc -c -gnatwr root-child.ads must yield:

[Ada] Missing error on illegal access to discriminant

2018-05-24 Thread Pierre-Marie de Rodat
The compiler does not report an error on the illegal access to a renamed discriminant when the actual object is a parameter of a subprogram. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-24 Javier Miranda gcc/ada/ * sem_ch3.adb

[Ada] Crash on return of raise expression

2018-05-24 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby the compiler regarded assignments to limited that consisted of raise expressions to be a compile-time error during expansion. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-24 Justin Squirek gcc/ada/ * exp_ch3.adb

[Ada] Spurious error due to lingering limited view

2018-05-24 Thread Pierre-Marie de Rodat
This patch modifies the mechanism which manages [private] with clauses to uninstall a limited with clause if a non-limited with clause is given for the same package. The management of with clauses already prevents the installation of a limited with clause if the related package is already withed

[Ada] Add warning on redundant others_clause in array aggregate

2018-05-24 Thread Pierre-Marie de Rodat
This patch adds a warning on a redundant others_clause in an array aggregate when all index positions are already specified in previous positional or named associations. The warning is emitted when Warn_On_Redundant_Constructs is enabled. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Ineffective use warning is suppressed when performing verification

2018-05-24 Thread Pierre-Marie de Rodat
This patch fixes an issue whereby the compiler incorrectly marked use clauses as effective due to code generated for verification referencing certain types leading to missing use clause warnings. No reasonably small testcase available. Tested on x86_64-pc-linux-gnu, committed on trunk

[Ada] Crash on function in Ghost subunit

2018-05-24 Thread Pierre-Marie de Rodat
This patch modifies the creation of class-wide subtypes to preserve vital attributes related to Ghost code. The subtype is created by copying the contents of a class-wide type into a newly created itype. When the itype is created within a Ghost region, the act of copying destroys Ghost code

[Ada] Memory leak mixing limited and nonlimited functions

2018-05-24 Thread Pierre-Marie de Rodat
This patch fixes a memory leak. If a build-in-place function with a result whose size is not known at the call site is called, and that function calls a non-build-in-place function that allocates on the secondary stack, the secondary stack was not necessarily cleaned up, which caused a memory

[Ada] Fix crash on formal containers

2018-05-24 Thread Pierre-Marie de Rodat
This patch modifies several mechanisms in the compiler: 1) The handling of Ghost regions now records the start of the outermost ignored Ghost region which is currently in effect. 2) Generation of freeze actions for an arbitrary entity now inserts the actions prior to the start of the

[Ada] Spurious error on pragma Independent_Components

2018-05-24 Thread Pierre-Marie de Rodat
This patch modifies the analysis of pragma Independent_Components to account for a side effect from handling of self-referential records which render the pragma illegal. -- Source -- -- pack.ads package Pack is type OK is record Comp_1 : Integer; Comp_2

[Ada] Fix inconsistent documentation for the Contract_Cases pragma

2018-05-24 Thread Pierre-Marie de Rodat
This patch propagates the renaming from "condition" to "case guard" in the contract grammar to the paragraphs that describe the pragma semantics. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-24 Piotr Trojanek gcc/ada/ *

[Ada] Expansion of discrete choices

2018-05-24 Thread Pierre-Marie de Rodat
This patch does some minor bookkeeping to avoid a potential double expansion of discrete choices where at least one of them is a subtype with predicates. No change in behavior, no need for a test. Tested on x86_64-pc-linux-gnu, committed on trunk 2018-05-24 Hristian Kirtchev

[Ada] Crash on compilation unit instance

2018-05-24 Thread Pierre-Marie de Rodat
Do not generate a variable marker for a reference which appears within the formal part of an instantiation which acts as a compilation unit because there is no suitable insertion context. -- Source -- -- gnat.adc pragma SPARK_Mode (On); -- gen.ads generic Val_1

[Ada] Fix references to Backend_Layout configuration parameter

2018-05-24 Thread Pierre-Marie de Rodat
Apparently the Backend_Layout target configuration parameter was renamed to Frontend_Layout a long time ago (and their meanings are opposite). However, some comments were still referencing the no longer existing Backend_Layout. This patch fixes such references. No test provided, because only

[Ada] Spurious error on private task derivation

2018-05-24 Thread Pierre-Marie de Rodat
The compiler reports a spurious error notifying a missing constraint in the declaration of a private type with discriminants whose full view is a derivation of a task type. After this patch the following test compiles without errors. package Types1 is type Parent (Discr1 : Boolean) is limited

[Ada] Spurious error on imported subprogram with precondition

2018-05-24 Thread Pierre-Marie de Rodat
This patch modifies the generation of wrappers for imported subprograms which are subject to contracts. In the case of an imported function, the original function is relocated within the wrapper, and the wrapper simply invokes the imported subprogram, returning its value. When the result type of

Re: [PATCH v2] Don't mark IFUNC resolver as only called directly

2018-05-24 Thread Rainer Orth
Hi H.J., > This is the patch I am checking in. Tested on x86-64. > > Thanks. > > -- > H.J. > > From 91d0b4bc0222ce85bd529a7b3ae9e11904802c26 Mon Sep 17 00:00:00 2001 > From: "H.J. Lu" > Date: Wed, 11 Apr 2018 12:31:21 -0700 > Subject: [PATCH] Don't mark IFUNC resolver as

Re: Prefer open-coding vector integer division

2018-05-24 Thread Richard Sandiford
Richard Biener writes: > On Thu, May 24, 2018 at 10:31 AM Jakub Jelinek wrote: >> On Thu, May 24, 2018 at 09:21:35AM +0100, Richard Sandiford wrote: >> > vect_recog_divmod_pattern currently bails out if the target has >> > native support for integer

Re: [PATCH][RFC] Radically simplify emission of balanced tree for switch statements.

2018-05-24 Thread Rainer Orth
Hi Martin, > On 05/21/2018 01:18 PM, Rainer Orth wrote: >> Hi Martin, >> >>> On 05/18/2018 03:55 PM, Rainer Orth wrote: Hi Martin, > So the patch looks fine, only very very slightly binary is produced. I'm > going to install the patch so that > I can carry on more complex

Re: Fold VEC_COND_EXPRs to IFN_COND_* where possible

2018-05-24 Thread Richard Sandiford
Richard Biener writes: >> 2018-05-24 Richard Sandiford > >> gcc/ >> * doc/sourcebuild.texi (vect_double_cond_arith: Document. >> * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4. >>

Re: [PATCH 1/2] Introduce prefetch-minimum stride option

2018-05-24 Thread Luis Machado
On 05/23/2018 10:57 PM, Jeff Law wrote: On 05/23/2018 04:50 PM, Luis Machado wrote: On 05/23/2018 07:42 PM, H.J. Lu wrote: On Wed, May 23, 2018 at 3:41 PM, H.J. Lu wrote: On Wed, May 23, 2018 at 3:35 PM, H.J. Lu wrote: Sorry. Does the following

Re: Support fused multiply-adds in fully-masked reductions

2018-05-24 Thread Richard Sandiford
Richard Biener writes: > On Wed, May 16, 2018 at 11:26 AM Richard Sandiford < > richard.sandif...@linaro.org> wrote: > >> This patch adds support for fusing a conditional add or subtract >> with a multiplication, so that we can use fused multiply-add and >>

Re: [RFT PATCH, AVX512]: Implement scalar unsigned int->float conversions with AVX512F

2018-05-24 Thread H.J. Lu
On Wed, May 23, 2018 at 8:15 AM, Uros Bizjak wrote: > On Wed, May 23, 2018 at 11:39 AM, Peryt, Sebastian > wrote: >>> From: Uros Bizjak [mailto:ubiz...@gmail.com] >>> Sent: Tuesday, May 22, 2018 8:43 PM >>> To: gcc-patches@gcc.gnu.org >>> Cc: Peryt,

Add IFN_COND_FMA functions

2018-05-24 Thread Richard Sandiford
This patch adds conditional equivalents of the IFN_FMA built-in functions. Most of it is just a mechanical extension of the binary stuff. Tested on aarch64-linux-gnu (with and without SVE), aarch64_be-elf and x86_64-linux-gnu. OK for the non-AArch64 bits? Richard 2018-05-24 Richard Sandiford

[PATCH] Check ifunc_resolver only on FUNCTION_DECL

2018-05-24 Thread H.J. Lu
Since ifunc_resolver is only valid on FUNCTION_DECL, check ifunc_resolver only on FUNCTION_DECL. Please test it on Darwin. H.J. --- PR target/85900 PR target/85345 * varasm.c (assemble_alias): Check ifunc_resolver only on FUNCTION_DECL. --- gcc/varasm.c | 3 ++-

Re: Support fused multiply-adds in fully-masked reductions

2018-05-24 Thread Richard Biener
On Wed, May 16, 2018 at 11:26 AM Richard Sandiford < richard.sandif...@linaro.org> wrote: > This patch adds support for fusing a conditional add or subtract > with a multiplication, so that we can use fused multiply-add and > multiply-subtract operations for fully-masked reductions. E.g. > for

Re: Add IFN_COND_{MUL,DIV,MOD,RDIV}

2018-05-24 Thread Richard Biener
On Thu, May 24, 2018 at 11:34 AM Richard Sandiford < richard.sandif...@linaro.org> wrote: > This patch adds support for conditional multiplication and division. > It's mostly mechanical, but a few notes: > * The *_optab name and the .md names are the same as the unconditional >forms, just

Re: Fold VEC_COND_EXPRs to IFN_COND_* where possible

2018-05-24 Thread Richard Biener
On Thu, May 24, 2018 at 11:28 AM Richard Sandiford < richard.sandif...@linaro.org> wrote: > This patch adds the folds: >(vec_cond COND (foo A B) C) -> (IFN_COND_FOO COND A B C) >(vec_cond COND C (foo A B)) -> (IFN_COND_FOO (!COND) A B C) > with the usual implicit restriction that the

Re: Add an "else" argument to IFN_COND_* functions

2018-05-24 Thread Richard Biener
On Thu, May 24, 2018 at 10:37 AM Richard Sandiford < richard.sandif...@linaro.org> wrote: > As suggested by Richard B, this patch changes the IFN_COND_* > functions so that they take the else value of the ?: operation > as a final argument, rather than always using argument 1. > All current

Re: Prefer open-coding vector integer division

2018-05-24 Thread Richard Biener
On Thu, May 24, 2018 at 10:31 AM Jakub Jelinek wrote: > On Thu, May 24, 2018 at 09:21:35AM +0100, Richard Sandiford wrote: > > vect_recog_divmod_pattern currently bails out if the target has > > native support for integer division, but I think in practice > > it's always going

Re: Use canonicalize_math_after_vectorization_p for FMA folds

2018-05-24 Thread Richard Biener
On Thu, May 24, 2018 at 10:07 AM Richard Sandiford < richard.sandif...@linaro.org> wrote: > The folds in r260348 kicked in before vectorisation, which hurts > for two reasons: > (1) the current suboptimal handling of nothrow meant that we could > drop the flag early and so prevent

Re: [PATCH][arm][2/2] Remove support for -march=armv3 and older

2018-05-24 Thread Richard Earnshaw (lists)
On 23/05/18 16:26, Kyrill Tkachov wrote: > > On 21/05/18 12:29, Kyrill Tkachov wrote: >> >> On 18/05/18 11:33, Richard Earnshaw (lists) wrote: >>> On 17/05/18 11:26, Kyrill Tkachov wrote: Hi all, We deprecated architecture versions earlier than Armv4T in GCC 6 [1]. This patch

Re: [PATCH] consider MIN_EXPR in get_size_range() (PR 85888)

2018-05-24 Thread Richard Biener
On Thu, May 24, 2018 at 12:50 AM Martin Sebor wrote: > The attached patch enhances the get_size_range() function to > extract more accurate ranges out of MIN_EXPR and MAX_EXPR nodes > with SSA_NAME operand(s). This helps -Wstringop-overflow avoid > false positives on some

Extend tree code folds to IFN_COND_*

2018-05-24 Thread Richard Sandiford
This patch adds match.pd support for applying normal folds to their IFN_COND_* forms. E.g. the rule: (plus @0 (negate @1)) -> (minus @0 @1) also allows the fold: (IFN_COND_ADD @0 @1 (negate @2) @3) -> (IFN_COND_SUB @0 @1 @2 @3) Actually doing this by direct matches in gimple-match.c would

Add IFN_COND_{MUL,DIV,MOD,RDIV}

2018-05-24 Thread Richard Sandiford
This patch adds support for conditional multiplication and division. It's mostly mechanical, but a few notes: * The *_optab name and the .md names are the same as the unconditional forms, just with "cond_" added to the front. This means we still have the awkward difference between sdiv and

Fold VEC_COND_EXPRs to IFN_COND_* where possible

2018-05-24 Thread Richard Sandiford
This patch adds the folds: (vec_cond COND (foo A B) C) -> (IFN_COND_FOO COND A B C) (vec_cond COND C (foo A B)) -> (IFN_COND_FOO (!COND) A B C) with the usual implicit restriction that the target must support the produced IFN_COND_FOO. The results of these folds don't have identical

  1   2   >