Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Carlos O'Donell
On 10/11/2016 04:04 PM, John David Anglin wrote: > On 2016-10-11 2:50 PM, Jason Merrill wrote: >> /* Alignment, in bits, a C conformant malloc implementation has to >> provide. >> The HP-UX malloc implementation provides a default alignment of 8 >> bytes. >> This can be increased with mallo

Re: [RFC][VRP] Improve intersect_ranges

2016-10-12 Thread Richard Biener
On Wed, Oct 12, 2016 at 8:35 AM, kugan wrote: > Hi Richard, > > > On 12/10/16 00:14, Richard Biener wrote: >> >> On Tue, Oct 11, 2016 at 2:57 AM, kugan >> wrote: >>> >>> Hi Richard, >>> Hi Richard, >>> >>> On 10/10/16 20:13, Richard Biener wrote: On Sat, Oct 8, 2016 at 9:38 PM, kug

[PATCH] Fix PR77920

2016-10-12 Thread Richard Biener
VRP needs to make sure to update the iterator it gets to it stmt folding callback. Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-10-12 Richard Biener PR tree-optimization/77920 * tree-vrp.c (simplify_div_or_mod_using_ranges): Simplify. (

Re: [PATCH][2/2] Enable SSA propagator "DCE" for VRP

2016-10-12 Thread Richard Biener
On Fri, 7 Oct 2016, Richard Biener wrote: > > This turns the switch (which also requires propagating into ASSERT_EXPRs, > otherwise those will end up with released SSA names eventually). > > A [3/2] would be to let ASSERT_EXPRs be removed by the propagator > which would a) require VRP to fix up

[PATCH] Remove constraint on (X /[ex] A) * A -> X

2016-10-12 Thread Richard Biener
Bootstrapped and tested on x86_64-unknown-linux-gnu, applied. Richard. 2016-10-12 Richard Biener * match.pd ((X /[ex] A) * A -> X): Remove unnecessary constraint on the conversion. Index: gcc/match.pd === --- gc

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 03:01:51AM -0400, Carlos O'Donell wrote: > On 10/11/2016 04:04 PM, John David Anglin wrote: > > On 2016-10-11 2:50 PM, Jason Merrill wrote: > >> /* Alignment, in bits, a C conformant malloc implementation has to > >> provide. > >> The HP-UX malloc implementation provides

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Florian Weimer
On 10/12/2016 09:25 AM, Jakub Jelinek wrote: No, you can just drop the aligned attributes for HPUX 32-bit, basically introduce a new ABI. If needed, you could add new symbol versions for pthread_mutex_* etc. (though, if the current code doesn't care about the alignment, perhaps you could get aw

Re: [PATCH v2] aarch64: Add split-stack initial support

2016-10-12 Thread Kyrill Tkachov
On 11/10/16 20:39, Adhemerval Zanella wrote: diff --git a/gcc/testsuite/gcc.dg/split-3.c b/gcc/testsuite/gcc.dg/split-3.c index 64bbb8c..5ba7616 100644 --- a/gcc/testsuite/gcc.dg/split-3.c +++ b/gcc/testsuite/gcc.dg/split-3.c @@ -40,6 +40,7 @@ down (int i, ...) || va_arg (ap, in

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 09:52:04AM +0200, Florian Weimer wrote: > dropping the alignment means that the padding before the lock member > vanishes. Consequently, we have just created a silent ABI change in > application code, which is a big no-no. Sure, it would be an ABI change, but how many user

Re: [PATCH GCC]New vectorization pattern turning cond_expr into max/min and plus/minus

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 5:03 PM, Bin Cheng wrote: > Hi, > Given below test case, > int foo (unsigned short a[], unsigned int x) > { > unsigned int i; > for (i = 0; i < 1000; i++) > { > x = a[i]; > a[i] = (unsigned short)(x >= 32768 ? x - 32768 : 0); > } > return x; > } >

Re: [PATCH, PING] DWARF: space-optimize loc. descr. for integer literals on 32-bit targets

2016-10-12 Thread Richard Biener
On Wed, Aug 31, 2016 at 1:41 PM, Pierre-Marie de Rodat wrote: > Hello, > > Ping for the patch submitted at > . Also, here’s the > update that Trevor suggested. Ok. Thanks, Richard. > Thanks! > > -- > Pierre-Marie de Rodat

Re: [PATCH, PING] DWARF: process all TYPE_DECL nodes when iterating on scopes

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 4:39 PM, Pierre-Marie de Rodat wrote: > On 09/28/2016 09:48 AM, Richard Biener wrote: >> >> Hmm, interesting approach. It might work reliably at this point of >> the compilation >> but we do actually recycle cgraph nodes. > > > Arf, what a pity. ;-) > >> So I wonder if giv

Re: [PATCH] Fold __builtin_str{n}{case}cmp functions (version 3)

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 11:33 AM, Martin Liška wrote: > Changes from the previous version: > > 1) Handle BUILT_IN_STRNCMP with length == -1. > 2) Direct gimple stmts creation and usage gsi_replace_with_seq_vops. > (hope using of replace_call_with_value is fine if replacing with a cst?) yes > 3)

Re: [PATCH GCC]New vectorization pattern turning cond_expr into max/min and plus/minus

2016-10-12 Thread Bin.Cheng
On Wed, Oct 12, 2016 at 9:12 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 5:03 PM, Bin Cheng wrote: >> Hi, >> Given below test case, >> int foo (unsigned short a[], unsigned int x) >> { >> unsigned int i; >> for (i = 0; i < 1000; i++) >> { >> x = a[i]; >> a[i] = (unsign

Re: [PATCH] Fold __builtin_memchr (version 3)

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: > On 10/07/2016 01:01 PM, Richard Biener wrote: >> On Fri, Oct 7, 2016 at 10:41 AM, Martin Liška wrote: >>> Resending the patch, where I implemented folding in gimple-fold.c >>> >>> Patch can bootstrap on ppc64le-redhat-linux and survives regr

Re: [PATCH] Test folding of str{n}{case}cmp and memchr (version 3)

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: > Third iteration of tests, where I added both GENERIC and GIMPLE folding > tests. They should work already with -O1? Otherwise ok. Richard. > Martin

Re: [PATCH] Fold __builtin_memchr (version 3)

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: > One question that comes to my mind is whether there's a possibility > to fully test gimple folding of all cases if some of them are already > eaten by generic folding? The only way is to make GENERIC folding not trigger by pushing constants

Re: [PATCH, PING] DWARF: process all TYPE_DECL nodes when iterating on scopes

2016-10-12 Thread Pierre-Marie de Rodat
On 10/12/2016 10:15 AM, Richard Biener wrote: Ok. Thanks, Committed. Thank you! -- Pierre-Marie de Rodat

Re: [PATCH, PING] DWARF: space-optimize loc. descr. for integer literals on 32-bit targets

2016-10-12 Thread Pierre-Marie de Rodat
On 10/12/2016 10:13 AM, Richard Biener wrote: Ok. Thanks, Committed. Thank you! -- Pierre-Marie de Rodat

Re: [Patch 3/11] Implement TARGET_C_EXCESS_PRECISION for s390

2016-10-12 Thread Andreas Krebbel
On 10/07/2016 03:11 PM, Joseph Myers wrote: > On Fri, 7 Oct 2016, Andreas Krebbel wrote: > >> wrt (c): float_t appears to be more widely used than I expected. But the >> only hits which might indicate potential ABI problems where in clucene >> and libassa. (I've scanned the header files of about

gcc-patches@gcc.gnu.org

2016-10-12 Thread Richard Biener
On Tue, Oct 11, 2016 at 11:34 PM, Marc Glisse wrote: > On Tue, 11 Oct 2016, Bin Cheng wrote: > >> We missed folding (convert)(X op const) -> (convert)X op (convert)const >> for unsigned narrowing because of reason reported at >> https://gcc.gnu.org/ml/gcc/2016-07/msg00126.html >> This patch fixes

Re: [PATCH GCC]New vectorization pattern turning cond_expr into max/min and plus/minus

2016-10-12 Thread Richard Biener
On Wed, Oct 12, 2016 at 10:29 AM, Bin.Cheng wrote: > On Wed, Oct 12, 2016 at 9:12 AM, Richard Biener > wrote: >> On Tue, Oct 11, 2016 at 5:03 PM, Bin Cheng wrote: >>> Hi, >>> Given below test case, >>> int foo (unsigned short a[], unsigned int x) >>> { >>> unsigned int i; >>> for (i = 0; i <

Re: [ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated

2016-10-12 Thread Christophe Lyon
Hi Kyrill, On 7 October 2016 at 17:00, Kyrill Tkachov wrote: > Hi Christophe, > > > On 07/09/16 21:05, Christophe Lyon wrote: >> >> Hi, >> >> The attached patch is a first part to solve PR 67591: it removes >> several occurrences of "IT blocks containing 32-bit Thumb >> instructions are deprecate

Re: [ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated

2016-10-12 Thread Kyrill Tkachov
On 12/10/16 09:59, Christophe Lyon wrote: Hi Kyrill, On 7 October 2016 at 17:00, Kyrill Tkachov wrote: Hi Christophe, On 07/09/16 21:05, Christophe Lyon wrote: Hi, The attached patch is a first part to solve PR 67591: it removes several occurrences of "IT blocks containing 32-bit Thumb in

Re: [ARM] PR 67591 ARM v8 Thumb IT blocks are deprecated

2016-10-12 Thread Christophe Lyon
On 12 October 2016 at 11:14, Kyrill Tkachov wrote: > > On 12/10/16 09:59, Christophe Lyon wrote: >> >> Hi Kyrill, >> >> On 7 October 2016 at 17:00, Kyrill Tkachov >> wrote: >>> >>> Hi Christophe, >>> >>> >>> On 07/09/16 21:05, Christophe Lyon wrote: Hi, The attached patch is a

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Markus Trippelsdorf
On 2016.10.12 at 00:34 +0200, Bernd Schmidt wrote: > On 10/11/2016 11:52 PM, Jakub Jelinek wrote: > > The following patch introduces difference warning levels for > > -Wimplicit-fallthrough warning, so projects can choose if they want to > > honor only attributes (-Wimplicit-fallthrough=5), or what

PING! [Fortran, Patch, PR72832, v1] [6/7 Regression] [OOP] ALLOCATE with SOURCE fails to allocate requested dimensions

2016-10-12 Thread Andre Vehreschild
Ping! Updated patch with the comments gotten so far. Ok for trunk? - Andre On Fri, 2 Sep 2016 09:59:19 +0200 Andre Vehreschild wrote: > Hi all, > > attached patch fixes the issue raised by PR72832. The issue was that > the array descriptor of the SOURCE= in an ALLOCATE () was used to > alloc

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 11:31 AM, Markus Trippelsdorf wrote: On 2016.10.12 at 00:34 +0200, Bernd Schmidt wrote: It's a discussion we should have, but I agree it should be done incrementally. I would argue for =1 as the default. Here are some numbers for an allmodconfig Linux kernel on pcc64le: -Wimplic

Re: [PATCH][check_GNU_style.sh] More aggressively ignore dg-xxx directives

2016-10-12 Thread Kyrill Tkachov
On 11/10/16 20:19, Jakub Jelinek wrote: On Tue, Oct 11, 2016 at 01:11:04PM -0600, Martin Sebor wrote: Also, the pattern that starts with "/\+\+\+" looks like it's missing the ^ anchor. Presumably it should be "/^\+\+\+ \/testsuite\//". No, it will be almost never +++ /testsuite/ There needs t

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Markus Trippelsdorf
On 2016.10.12 at 11:52 +0200, Bernd Schmidt wrote: > On 10/12/2016 11:31 AM, Markus Trippelsdorf wrote: > > On 2016.10.12 at 00:34 +0200, Bernd Schmidt wrote: > > > It's a discussion we should have, but I agree it should be done > > > incrementally. I would argue for =1 as the default. > > > > Here

Re: [Patch 3/11] Implement TARGET_C_EXCESS_PRECISION for s390

2016-10-12 Thread Joseph Myers
On Wed, 12 Oct 2016, Andreas Krebbel wrote: > Regarding (c) imagemagick is also affected (it wasn't really clear from > my last email). Since it is a widely used lib I think this counts as a > blocker. The ABI relevant MagickRealType depends on the size of float_t: I think distributions manage

Re: [PATCH][check_GNU_style.sh] More aggressively ignore dg-xxx directives

2016-10-12 Thread Kyrill Tkachov
On 12/10/16 10:57, Kyrill Tkachov wrote: On 11/10/16 20:19, Jakub Jelinek wrote: On Tue, Oct 11, 2016 at 01:11:04PM -0600, Martin Sebor wrote: Also, the pattern that starts with "/\+\+\+" looks like it's missing the ^ anchor. Presumably it should be "/^\+\+\+ \/testsuite\//". No, it will be

[PATCH][AArch64] Add function comments to some prologue/epilogue helpers

2016-10-12 Thread Kyrill Tkachov
Hi all, I'm looking at the aarch64 prologue and epilogue generation code and I noticed many of the helper functions don't have function comments so it makes it harder than it has to to understand what's going on. This patch adds function comments to some of them. I hope I understood the functi

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 12:08 PM, Markus Trippelsdorf wrote: Actually looking more closely it appears that all of the 136 additional warnings for level 2 are bogus, too. Here is an example: switch (class) { case ATA_DEV_SEMB: class = ATA_DEV_ATA;/* some hard drives

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 11:52:02AM +0200, Bernd Schmidt wrote: > On 10/12/2016 11:31 AM, Markus Trippelsdorf wrote: > >On 2016.10.12 at 00:34 +0200, Bernd Schmidt wrote: > >>It's a discussion we should have, but I agree it should be done > >>incrementally. I would argue for =1 as the default. > > >

[Ada] Call memmove instead of memcpy in more cases

2016-10-12 Thread Arnaud Charlet
This changes the logic of Is_Non_Local_Array to return true for anything that is not a component or a slice of a local entity, for example a dereference, so as to generate a call to memmove instead of memcpy in more cases, e.g.: package P is type String_Access is access all String; type Rec1

[Ada] Spurious errors on instances of formal packages with defaults.

2016-10-12 Thread Arnaud Charlet
This patch fixes spurious errors on instantiations of formal packages that have defaulted formals that include tagged private types and array types. The following must compile quietly: gcc -c lis3dsh_spi.ads --- with SPI_Bus_Driver; with LIS3DSH; package LIS3DSH_SPI is new LIS3DSH (IO => SPI

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 12:08:40PM +0200, Markus Trippelsdorf wrote: > On 2016.10.12 at 11:52 +0200, Bernd Schmidt wrote: > > On 10/12/2016 11:31 AM, Markus Trippelsdorf wrote: > > > On 2016.10.12 at 00:34 +0200, Bernd Schmidt wrote: > > > > It's a discussion we should have, but I agree it should b

[Ada] Create a new internal profile

2016-10-12 Thread Arnaud Charlet
This new profile is not user visible and is the base to switch to the restricted tasking runtime. It replaces the Restricted profile for that purpose and is weaker than it. The Restricted profile remains unchanged. The purpose of that change is to lift some restrictions of the GNAT_Extended_Ravens

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 12:26 PM, Jakub Jelinek wrote: What do you mean at most? level 0 is the warning disabled, that is the default except for -Wextra. I think level 0 has to be on the table for -Wextra as well, depending on the signal-to-noise ratio of level 1. Collapsing 3-5 levels is a bad idea

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Markus Trippelsdorf
On 2016.10.12 at 12:26 +0200, Jakub Jelinek wrote: > On Wed, Oct 12, 2016 at 11:52:02AM +0200, Bernd Schmidt wrote: > > On 10/12/2016 11:31 AM, Markus Trippelsdorf wrote: > > >On 2016.10.12 at 00:34 +0200, Bernd Schmidt wrote: > > >>It's a discussion we should have, but I agree it should be done >

[diagnostic] fix formatting

2016-10-12 Thread Nathan Sidwell
I noticed some extraneous braces and extra long lines. Applied as obvious. nathan 2016-10-12 Nathan Sidwell * diagnostic.c (diagnostc_report_diagnostic): Fix formatting. Index: diagnostic.c === --- diagnostic.c (revision 24102

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 12:36 PM, Markus Trippelsdorf wrote: Here are some examples: /* Don't break */ /* drop through */ //very popular /* fall though */ /* pass through... */ /* break intentionally omitted */ /* fallthough */ /* Don't break, this is a failed frame! */ /* leave break out int

[PATCH] print_rtx_function: integrate dumping of the CFG into the insn chain

2016-10-12 Thread David Malcolm
On Fri, 2016-10-07 at 15:58 +0200, Bernd Schmidt wrote: > On 10/07/2016 03:26 PM, David Malcolm wrote: > > > > We could simply print the INSN_UID for CODE_LABELs; something like > > this > > (see the "(code_label 16" below): > > I think that should work. > > > You appear to have trimmed the idea

Re: [PATCH] print_rtx_function: integrate dumping of the CFG into the insn chain

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 01:15 PM, David Malcolm wrote: +/* Determine if INSN is of a kind that can have a basic block. */ + +static bool +can_have_basic_block_p (const rtx_insn *insn) +{ + return GET_RTX_FORMAT (GET_CODE (insn))[2] == 'B'; +} Oof. I suppose they're all at least that long, but still - w

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 12:33:58PM +0200, Bernd Schmidt wrote: > On 10/12/2016 12:26 PM, Jakub Jelinek wrote: > >What do you mean at most? level 0 is the warning disabled, that is the > >default except for -Wextra. > > I think level 0 has to be on the table for -Wextra as well, depending on the >

Re: [PATCH] Add a helper function: create_tmp

2016-10-12 Thread Martin Liška
On 10/11/2016 12:31 PM, Richard Biener wrote: > Hrm. Too easy to confuse with create_tmp_reg ... so maybe > create_tmp_reg_or_ssa_name? Yep, renamed function patch installed as r241030. Thanks, Martin

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 12:36:29PM +0200, Markus Trippelsdorf wrote: > Here are some examples: > > /* Don't break */ > /* drop through */ //very popular > /* fall though */ > /* pass through... */ > /* break intentionally omitted */ > /* fallthough */ > /* Don't break, this is a fail

Re: [PATCH] Introduce -Wimplicit-fallthrough={0,1,2,3,4,5}

2016-10-12 Thread Markus Trippelsdorf
On 2016.10.12 at 12:54 +0200, Jakub Jelinek wrote: > On Wed, Oct 12, 2016 at 12:36:29PM +0200, Markus Trippelsdorf wrote: > > Here are some examples: > > > > /* Don't break */ > > /* drop through */ //very popular > > /* fall though */ > > /* pass through... */ > > /* break intentionall

Re: [ipa-vrp] Use get/set_ptr_nonnull in ipa-vrp

2016-10-12 Thread Jan Hubicka
> Hi, > > This patch uses the get/set_ptr_nonnull so that ipa-vrp also > propagates nonnull ranges for pinter. > > Bootstrapped and regression tested this with other patched without > any new regressions on x86_64-linux-gnu. > > Is this OK for trunk? > > Thanks, > Kugan > > > > > gcc/Change

[PATCH] Do not copy std:call_once arguments (LWG 2442)

2016-10-12 Thread Jonathan Wakely
This replaces the use of std::__bind_simple by direct calls to std::__invoke so that the arguments are not decay-copied. * doc/xml/manual/intro.xml: Document LWG 2442 status. * include/std/mutex [_GLIBCXX_HAVE_TLS] (__once_call_impl): Remove. [_GLIBCXX_HAVE_TLS] (_Once_cal

[PATCH] Remove 'return' from noreturn function

2016-10-12 Thread Jonathan Wakely
This just fixes a -Wsystem-headers warning, because this function is [[noreturn]]. * libsupc++/nested_exception.h (throw_with_nested): Remove return. Tested powerpc64le-linux, committed to trunk. commit 9720fce68641461a1d17bc42bc04d77f5cf18e0e Author: redi Date: Wed Oct 12 11:20:29 2

[PATCH] Add missing return to uninitialized_default_construct_n

2016-10-12 Thread Jonathan Wakely
This non-void function was missing a return statement. * include/bits/stl_uninitialized.h (__uninitialized_default_novalue_n_1): Add missing return. * testsuite/20_util/specialized_algorithms/memory_management_tools/ 1.cc: Check return values of uninitialized_xxx_n

[patch,avr] Introduce absdata attribute to allow LDS /STS on Tiny

2016-10-12 Thread Georg-Johann Lay
This patch introduces a new variable attribute "absdata". Reduced Tiny cores have only a limited range of addresses 0x40..0xbf which can be handled by LDS / STS directly. The attribute allows the user to assert that it is legitimate to use absolute addressing for such addresses and that there

Re: [PATCH] Fix PR77826

2016-10-12 Thread Richard Biener
On Tue, 11 Oct 2016, Marc Glisse wrote: > On Tue, 11 Oct 2016, Richard Biener wrote: > > > > An example that regressed at -O (looking at the .optimized dump) > > > > > > int f(int a, unsigned b){ > > > a &= 1; > > > b &= 1; > > > return a&b; > > > } > > > > Yeah, but it usually also shows

[patch] Comment in rtl.h how rtx flags are dumped in rtl dumps.

2016-10-12 Thread Georg-Johann Lay
This is a no-op change that just adds comments how the various RTX flags will appear in RTL dumps. Ok for trunk? Johann * rtl.h (struct rtx_def): Comment how RTX_FLAGS will be dumped in RTL dumps. Index: rtl.h ===

Re: [patch] Comment in rtl.h how rtx flags are dumped in rtl dumps.

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 01:59 PM, Georg-Johann Lay wrote: This is a no-op change that just adds comments how the various RTX flags will appear in RTL dumps. Ok. Bernd

Questionable code in gcov-io.c

2016-10-12 Thread Marek Polacek
While implementing a warning I noticed this in gcov-io.c: 187 else if (mode == 0) 188 { 189 struct stat st; 190 191 if (fstat (fd, &st) < 0) 192 { 193 fclose (gcov_var.file); 194 gcov_var.file = 0; 195 return 0; 196 } 197

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread John David Anglin
On 2016-10-12, at 4:02 AM, Jakub Jelinek wrote: >> Since this is PA-RISC, which is essentially dead (neither HPE nor Debian >> ship it anymore), I stand by my suggestion to bump the fundamental alignment > > Or just drop support for a dead arch? Hardware is still available on the second hand mar

Re: Questionable code in gcov-io.c

2016-10-12 Thread Nathan Sidwell
On 10/12/16 08:10, Marek Polacek wrote: While implementing a warning I noticed this in gcov-io.c: 187 else if (mode == 0) 188 { 189 struct stat st; 190 191 if (fstat (fd, &st) < 0) 192 { 193 fclose (gcov_var.file); 194 gcov_var.file = 0; 195

Re: [PATCH] Do not copy std:call_once arguments (LWG 2442)

2016-10-12 Thread Jonathan Wakely
On 12/10/16 12:22 +0100, Jonathan Wakely wrote: This replaces the use of std::__bind_simple by direct calls to std::__invoke so that the arguments are not decay-copied. * doc/xml/manual/intro.xml: Document LWG 2442 status. * include/std/mutex [_GLIBCXX_HAVE_TLS] (__once_call_impl

Re: [SPARC] Tidy up Condition Code support and more

2016-10-12 Thread Jose E. Marchesi
> Note that the ADDXC, ADDXCCC, SUBXC and SUBXCCC instructions do not > support immediate operands. Hence the patch breaks vis3-enabling arches > and niagara-7. Egad. I totally overlooked this (yet the -mcpu=niagara7 -m64 testsuite is rather explicit) and this is a bit

Re: Set nonnull attribute to ptr_info_def based on VRP

2016-10-12 Thread Richard Biener
On Wed, Oct 12, 2016 at 8:46 AM, kugan wrote: > Hi Richard, > > > > On 07/10/16 21:03, Richard Biener wrote: >> >> On Fri, Oct 7, 2016 at 2:53 AM, kugan >> wrote: >>> >>> Hi Richard, >>> >>> Thanks for the review. >>> >>> >>> On 09/08/16 18:58, Richard Biener wrote: On Tue, Aug 9,

Re: Questionable code in gcov-io.c

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 02:10 PM, Marek Polacek wrote: While implementing a warning I noticed this in gcov-io.c: 187 else if (mode == 0) 188 { 189 struct stat st; 190 191 if (fstat (fd, &st) < 0) 192 { 193 fclose (gcov_var.file); 194 gcov_var.file = 0;

Re: [vrp] use get_ptr_nonnull in tree-vrp

2016-10-12 Thread Richard Biener
On Wed, Oct 12, 2016 at 8:56 AM, kugan wrote: > Hi, > > This patch uses get_ptr_nonnull in tree-vrp. > > Bootstrapped and regression tested this with other patched without any > new regressions on x86_64-linux-gnu. > > Is this OK for trunk? Um. Doesn't make much sense given nothing provides this

[Ada] Preliminary work to support relative delays on extended ravenscar

2016-10-12 Thread Arnaud Charlet
Tested on x86_64-pc-linux-gnu, committed on trunk 2016-10-12 Tristan Gingold * exp_ch9.adb (Expand_N_Delay_Relative_Statement): Add support for a secondary procedure in case of missing Ada.Calendar.Delays * rtsfind.ads (RTU_Id): Add System_Relative_Delays. (RE_I

[Ada] Renaming of functions to check file's readability/writability

2016-10-12 Thread Arnaud Charlet
Old functions to check readability/writability of file based on file's attributes had been replaced by new more precise functions. Old functions are provided under new names. Tested on x86_64-pc-linux-gnu, committed on trunk 2016-10-12 Vadim Godunko * s-os_lib.ads (Is_Owner_Readable_F

[PATCH, Fortran] Four small DEC extensions

2016-10-12 Thread Fritz Reese
Here I submit for review four small extensions to the GNU Fortran frontend for compatibility with legacy code. I figure it might be a nice change of pace from my larger patches. Never fear, for I have more large patches to come, which I will continue to submit one-at-a-time. Each extension is enab

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 02:12 PM, John David Anglin wrote: On 2016-10-12, at 4:02 AM, Jakub Jelinek wrote: Since this is PA-RISC, which is essentially dead (neither HPE nor Debian ship it anymore), I stand by my suggestion to bump the fundamental alignment Or just drop support for a dead arch? Hardwa

[Ada] Crash on overloaded function call with limited view

2016-10-12 Thread Arnaud Charlet
This patch fixes a compiler abort on a call that is initially overloaded, when the resolved function returns the limited view of a type. The folllowing must compile quietly: gcc -c p.adb --- with R; package body P is function Get (A : Q.Ptr) return Integer is begin return R.Conv

[Ada] Illegal overriding indicators not flagged for procedure named Initialize

2016-10-12 Thread Arnaud Charlet
In cases of dispatching operations with names Initialize, Adjust, and Finalize that will override an inherited procedure at the point of the full type but not at their point of declaration, the compiler was not properly flagging an overriding_indicator on such a procedure as illegal, because proced

Re: [PATCH][check_GNU_style.sh] More aggressively ignore dg-xxx directives

2016-10-12 Thread Kyrill Tkachov
On 12/10/16 11:18, Kyrill Tkachov wrote: On 12/10/16 10:57, Kyrill Tkachov wrote: On 11/10/16 20:19, Jakub Jelinek wrote: On Tue, Oct 11, 2016 at 01:11:04PM -0600, Martin Sebor wrote: Also, the pattern that starts with "/\+\+\+" looks like it's missing the ^ anchor. Presumably it should be

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Richard Biener
On Wed, Oct 12, 2016 at 2:33 PM, Bernd Schmidt wrote: > On 10/12/2016 02:12 PM, John David Anglin wrote: >> >> On 2016-10-12, at 4:02 AM, Jakub Jelinek wrote: >> Since this is PA-RISC, which is essentially dead (neither HPE nor Debian ship it anymore), I stand by my suggestion to bump th

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Bernd Schmidt
On 10/12/2016 02:43 PM, Richard Biener wrote: I'd say what applies to PA should apply equally well to the pdp11 and the alpha port ... But usually the question is just whether the port has a maintainer and/or whether it is a maintainance burden to keep it (say, last user of obsolete feature X).

Re: [PATCH] Fix PR77826

2016-10-12 Thread Marc Glisse
On Wed, 12 Oct 2016, Richard Biener wrote: So with doing the same on GENERIC I hit FAIL: g++.dg/cpp1y/constexpr-array4.C -std=c++14 (test for excess errors) with the pattern /* (T)(P + A) - (T)P -> (T) A */ (for add (plus pointer_plus) (simplify (minus (convert (add @0 @1)) (conve

Re: Questionable code in gcov-io.c

2016-10-12 Thread Jakub Jelinek
On Wed, Oct 12, 2016 at 02:23:36PM +0200, Bernd Schmidt wrote: > >It seems that lines 198 and 200 do the same thing, at line 200 we know that > >mode == 0, so we just assign 1. Should we just remove the condition on line > >197? > > The intention seems to be that a negative gcov_var.mode means w

[Ada] Spurious use visibility with limited with and child packages

2016-10-12 Thread Arnaud Charlet
This patch corrects a minor issue whereby declarations that occur immediately within package P are erroneously treated as potentially use-visible when a parent package has a limited with clause on P, a child package has a with clause on P, and the child package is a client of another unit. --

Re: [PATCH] More trivial bits from early LTO debug merge

2016-10-12 Thread Thomas Schwinge
Hi! On Mon, 19 Sep 2016 09:53:13 +0200 (CEST), Richard Biener wrote: > * debug.h (gcc_debug_hooks): Add filename parameter to early_finish > hook. > [...] With contrib/config-list.mk testing, I noticed another one that needed to be updated; log/alpha-dec-vms-make.out, log/alph

Re: [BUILDROBOT] Selftest failed for i686-wrs-vxworks

2016-10-12 Thread Thomas Schwinge
Hi! On Wed, 5 Oct 2016 16:36:01 +0200, Bernd Schmidt wrote: > On 10/05/2016 04:14 PM, David Malcolm wrote: > > Thanks. I'm not able to formally approve these changes, but FWIW these > > patches look good to me (assuming usual testing). > > LGTM too, so OK. Without changes, committed to trunk i

Re: [PATCH] Check \0-termination of string in c_getstr

2016-10-12 Thread Martin Liška
On 10/11/2016 12:28 PM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:27 AM, Martin Liška wrote: >> As mentioned in the email that I reply to, c_getstr should check >> null termination of string constants. >> >> Tests of the whole series have been running. > > Looks ok to me (if testing pass

Re: [PATCH] Fold __builtin_str{n}{case}cmp functions (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:30 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:33 AM, Martin Liška wrote: >> Changes from the previous version: >> >> 1) Handle BUILT_IN_STRNCMP with length == -1. >> 2) Direct gimple stmts creation and usage gsi_replace_with_seq_vops. >> (hope using of replace_call_wit

Re: [PATCH] Fold __builtin_memchr (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:35 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: >> One question that comes to my mind is whether there's a possibility >> to fully test gimple folding of all cases if some of them are already >> eaten by generic folding? > > The only way is to

Re: [PATCH] Test folding of str{n}{case}cmp and memchr (version 3)

2016-10-12 Thread Martin Liška
On 10/12/2016 10:34 AM, Richard Biener wrote: > On Tue, Oct 11, 2016 at 11:38 AM, Martin Liška wrote: >> Third iteration of tests, where I added both GENERIC and GIMPLE folding >> tests. > > They should work already with -O1? Yes, they work. Sending new version where I also added few situations

Re: Un-break dwarf2out for DWARF2_LINENO_DEBUGGING_INFO configurations (was: [PATCH] Refactor section/label init for early LTO debug)

2016-10-12 Thread Thomas Schwinge
Hi! On Wed, 28 Sep 2016 11:28:16 +0200 (CEST), Richard Biener wrote: > On Wed, 28 Sep 2016, Thomas Schwinge wrote: > > ([...] got committed in r240545.) For DWARF2_LINENO_DEBUGGING_INFO > > configurations (that is, nvptx; Bernd CCed, who originally authored the > > DWARF2_LINENO_DEBUGGING_INFO

Re: [PATCH] Fix PR77826

2016-10-12 Thread Richard Biener
On Wed, 12 Oct 2016, Marc Glisse wrote: > On Wed, 12 Oct 2016, Richard Biener wrote: > > > So with doing the same on GENERIC I hit > > > > FAIL: g++.dg/cpp1y/constexpr-array4.C -std=c++14 (test for excess errors) > > > > with the pattern > > > > /* (T)(P + A) - (T)P -> (T) A */ > > (for add

[PATCH] Make test helper work with non-copyable types

2016-10-12 Thread Jonathan Wakely
This test utility does: "T t = T();" to guarantee value-init, and then some std::atomic tests have dg-error directives to handle the errors that happen because atomics are non-copyable. In C++17 there is no error, because of guaranteed elision, so the dg-errors FAIL. For C++11 we can us "T t{};"

Re: Compile-time improvement for if conversion.

2016-10-12 Thread Yuri Rumyantsev
Richard, Here is updated patch . I avoided creation of new entry/exit blocks but instead add check to border cases - do not consider also blocks which are out of region. Any comments will be appreciated. 2016-10-11 16:48 GMT+03:00 Richard Biener : > On Tue, Oct 11, 2016 at 3:23 PM, Yuri Rumyants

Re: Fix LTO_STREAMER_DEBUG build

2016-10-12 Thread Thomas Schwinge
Hi! On Thu, 29 Sep 2016 17:29:29 +0200, Richard Biener wrote: > On September 29, 2016 4:54:36 PM GMT+02:00, Thomas Schwinge > wrote: > >While working on something else, I found LTO_STREAMER_DEBUG broken. > >Enabling (#define) gcc/lto-stream.h:LTO_STREAMER_DEBUG, some further > >checking is don

Re: Questionable code in gcov-io.c

2016-10-12 Thread Marek Polacek
On Wed, Oct 12, 2016 at 08:14:58AM -0400, Nathan Sidwell wrote: > On 10/12/16 08:10, Marek Polacek wrote: > > While implementing a warning I noticed this in gcov-io.c: > > > > 187 else if (mode == 0) > > 188 { > > 189 struct stat st; > > 190 > > 191 if (fstat (fd, &st) < 0)

Re: PING [PATCH] accept flexible arrays in struct in unions (c++/71912 - [6/7 regression])

2016-10-12 Thread Jason Merrill
On Tue, Oct 11, 2016 at 9:45 PM, Martin Sebor wrote: > Are there any other changes you want me to make to the patch? > I leave this weekend for the WG14 meeting and would like to > get this change finalized and hopefully committed before then. > > https://gcc.gnu.org/ml/gcc-patches/2016-10/msg00

Re: Questionable code in gcov-io.c

2016-10-12 Thread Nathan Sidwell
On 10/12/16 09:43, Marek Polacek wrote: ITYM lines 197 -> 203. I.e. remove the entire if that;s inside the 'mode == 0' branch and make line 203 unconditional. Yes, sorry for sloppy wording. I'm testing a patch. heh, so am I :) nathan

[RFC] Possible folding opportunities for string built-ins

2016-10-12 Thread Martin Liška
Hi. As you probably mentioned, simple folding improvement has grown to multiple patches and multiple iterations. Apart from that, I also noticed that we do not do the best for couple of cases and I would like to have a feedback if it worth to improve or not? $ cat /tmp/string-folding-missing.c

Re: [PATCH] Implement new hook for max_align_t_align

2016-10-12 Thread Jason Merrill
On Wed, Oct 12, 2016 at 4:02 AM, Jakub Jelinek wrote: > On Wed, Oct 12, 2016 at 09:52:04AM +0200, Florian Weimer wrote: >> dropping the alignment means that the padding before the lock member >> vanishes. Consequently, we have just created a silent ABI change in >> application code, which is a bi

[Ada] Allow Refined_Global/Depends contracts with partial refinement

2016-10-12 Thread Arnaud Charlet
Pragmas/aspects Refined_Global and Refined_Depends may be applied in a scope where only partial refinement of abstract states is visible, as defined in SPARK RM 7.2.4. In such a case, the partial refinement should be used instead of the full refinement for checking the refined contracts. Tested on

[Ada] Spurious error on renaming of type conversion with invariant.

2016-10-12 Thread Arnaud Charlet
This patch fixes a spurious error on a renaming of a conversion of the designated object of a pointer to class-wide type when the target type has an invariant aspect. The following must execute quietly: gnatmake -gnata -q main main --- with System.Assertions; use System.Assertions; with Gd

[Ada] Premature finalization of controlled array component

2016-10-12 Thread Arnaud Charlet
This patch modifies the processing of transient array components to properly handle the finalization of the temporary controlled function result when the call initializes a component choice list or an "others" choice. -- Source -- -- aggregates.adb with Ada.Strings.Unb

[Ada] Missing predicate check with explicit policy pragma

2016-10-12 Thread Arnaud Charlet
This patch fixes an omission in the generation of predicate checks, when there is a configuration pragma that sets Assertion_Policy to Ignore and a subsequent configuration pragma that enables predicate checking. Executing: gnatmake -q main main must yield raised SYSTEM.ASSERTIONS.ASSERT_

Re: [RFC] Speed-up -fprofile-update=atomic

2016-10-12 Thread Martin Liška
On 10/04/2016 11:45 AM, Richard Biener wrote: > On Thu, Sep 15, 2016 at 12:00 PM, Martin Liška wrote: >> On 09/07/2016 02:09 PM, Richard Biener wrote: >>> On Wed, Sep 7, 2016 at 1:37 PM, Martin Liška wrote: On 08/18/2016 06:06 PM, Richard Biener wrote: > On August 18, 2016 5:54:49 PM GMT

Re: Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h

2016-10-12 Thread Bernd Schmidt
On 10/10/2016 09:32 PM, Pedro Alves wrote: From: Pedro Alves Date: 2016-10-10 19:25:47 +0100 Move OVERRIDE/FINAL from gcc/coretypes.h to include/ansidecl.h So that GDB and other projects that share the top level can use them. Seems reasonable. OK unless someone objects by the end of the week

Re: [PATCH 1/2] [ARC] Update INSN_LENGTH_ALIGNMENT.

2016-10-12 Thread Andrew Burgess
* Claudiu Zissulescu [2016-06-30 12:24:11 +0200]: > Update the INSN_LENGTH_ALIGNMENT macro to handle jump tables placed in > program memory. > > Ok to apply? > Claudiu This looks good to me. Thanks, Andrew > > > gcc/ > 2016-06-20 Claudiu Zissulescu > > * config/arc/arc.h (INSN_

  1   2   >