[PR89528] reset debug uses of return value when dropping dead RTL call

2019-04-05 Thread Alexandre Oliva
When we remove an RTL call, we wouldn't clean up references to the return value of the call in debug insns. Make it so that we do. Regstrapped on x86_64- and i686-linux-gnu. Ok to install? for gcc/ChangeLog PR debug/89528 * valtrack.c (dead_debug_insert_temp): Reset debug ref

Re: [PATCH] Fix PR71598, aliasing between enums and compatible types

2019-04-05 Thread Richard Biener
On Wed, 3 Apr 2019, Christophe Lyon wrote: > On Wed, 3 Apr 2019 at 15:19, Christophe Lyon > wrote: > > > > On Wed, 3 Apr 2019 at 10:24, Richard Biener wrote: > > > > > > On Wed, 3 Apr 2019, Christophe Lyon wrote: > > > > > > > Hi! > > > > > > > > On Fri, 29 Mar 2019 at 20:02, Jeff Law wrote: >

Re: [PATCH] Fix PR71598, aliasing between enums and compatible types

2019-04-05 Thread Christophe Lyon
On Fri, 5 Apr 2019 at 09:38, Richard Biener wrote: > > On Wed, 3 Apr 2019, Christophe Lyon wrote: > > > On Wed, 3 Apr 2019 at 15:19, Christophe Lyon > > wrote: > > > > > > On Wed, 3 Apr 2019 at 10:24, Richard Biener wrote: > > > > > > > > On Wed, 3 Apr 2019, Christophe Lyon wrote: > > > > > > >

Re: [PATCH] Fix PR71598, aliasing between enums and compatible types

2019-04-05 Thread Richard Biener
On Fri, 5 Apr 2019, Christophe Lyon wrote: > On Fri, 5 Apr 2019 at 09:38, Richard Biener wrote: > > > > On Wed, 3 Apr 2019, Christophe Lyon wrote: > > > > > On Wed, 3 Apr 2019 at 15:19, Christophe Lyon > > > wrote: > > > > > > > > On Wed, 3 Apr 2019 at 10:24, Richard Biener wrote: > > > > > >

Re: RFA: Fix uninitialized memory use in sched_macro_fuse_insns

2019-04-05 Thread Richard Sandiford
Joern Rennecke writes: > sched_macro_fuse_insns uses the value in condreg1 without > checking the return value of targetm.fixed_condition_code_regs. As > this variables > is not initialized anywhere, this leads to constructing cc_reg_1 with > an undefined value, > and then using that in reg_refer

Re: [PR89528] reset debug uses of return value when dropping dead RTL call

2019-04-05 Thread Richard Biener
On Fri, Apr 5, 2019 at 9:05 AM Alexandre Oliva wrote: > > When we remove an RTL call, we wouldn't clean up references to the > return value of the call in debug insns. Make it so that we do. > > Regstrapped on x86_64- and i686-linux-gnu. Ok to install? Looks OK but can you adjust the testcase t

Re: [PR89528] reset debug uses of return value when dropping dead RTL call

2019-04-05 Thread Richard Sandiford
Alexandre Oliva writes: > When we remove an RTL call, we wouldn't clean up references to the > return value of the call in debug insns. Make it so that we do. > > Regstrapped on x86_64- and i686-linux-gnu. Ok to install? > > > for gcc/ChangeLog > > PR debug/89528 > * valtrack.c (dea

[PATCH] Come up with bootstrap-lto-lean config.

2019-04-05 Thread Martin Liška
Hi. The patch adds a new config that makes LTO+PGO bootstrap faster by using LTO only in stage4. In stage3, generators are build with LTO in order to collect a reasonable profile for LTO FE. Ready for trunk? Thanks, Martin ChangeLog: 2019-04-05 Martin Liska * Makefile.in: Regenerate

Re: [PATCH][RFC] Fix PRs 88882, 89905, 89892 (and more?)

2019-04-05 Thread Alexandre Oliva
On Apr 4, 2019, Richard Biener wrote: >> If there's any instruction or view that would be reached by the earlier >> bind (the one that precedes the one we'd drop or reset), it would get >> wrong debug information if we were to drop the bind rather than reset >> it. If there isn't, whatever happ

Re: [PATCH] Fix a missed case in predicate analysis of the late uninit pass

2019-04-05 Thread Richard Biener
On Thu, Apr 4, 2019 at 4:05 PM Vladislav Ivanishin wrote: > > Richard Biener writes: > > > On Mon, Apr 1, 2019 at 5:36 PM Vladislav Ivanishin wrote: > >> > >> Hi! > >> > >> This is a fairly trivial change fixing a false negative in > >> -Wmaybe-uninitialized. I am pretty sure this is simply an

[Patch] [arm] Ensure *neon_mov constraint uses correct mode.

2019-04-05 Thread Matthew Malcomson
Hi there, The "*neon_mov" patterns for 128 bit sized quantities uses the "Dn" constraint to match vmov.f32 and vmov.i patterns. This constraint boils down to using the `neon_immediate_valid` function. Once the constraint has matched, the output C statement asserts that function passes. The output

[C++ Patch] PR 89914 ("[9 Regression] ICE in nothrow_spec_p, at cp/except.c:1238")

2019-04-05 Thread Paolo Carlini
Hi, this error-recovery regressions is mostly another case - similar to c++/89488 - where we want to check that maybe_instantiate_noexcept actually succeeds before calling a function that asserts !DEFERRED_NOEXCEPT_SPEC_P, nothrow_spec_p this time. I think we want to do that consistently in b

Re: [PATCH][RFC] Fix PRs 88882, 89905, 89892 (and more?)

2019-04-05 Thread Richard Biener
On Fri, 5 Apr 2019, Alexandre Oliva wrote: > On Apr 4, 2019, Richard Biener wrote: > > >> If there's any instruction or view that would be reached by the earlier > >> bind (the one that precedes the one we'd drop or reset), it would get > >> wrong debug information if we were to drop the bind r

Re: [PATCH] Fix a missed case in predicate analysis of the late uninit pass

2019-04-05 Thread Vladislav Ivanishin
Richard Biener writes: > On Thu, Apr 4, 2019 at 4:05 PM Vladislav Ivanishin wrote: >> >> Richard Biener writes: >> >> > On Mon, Apr 1, 2019 at 5:36 PM Vladislav Ivanishin wrote: >> >> >> >> Hi! >> >> >> >> This is a fairly trivial change fixing a false negative in >> >> -Wmaybe-uninitialized.

[PATCH][stage1] Support profile (BB counts and edge probabilities) in GIMPLE FE.

2019-04-05 Thread Martin Liška
Hi. The patch adds support for profile for GIMPLE FE. That can be useful in the future. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed after stage1 opens? Thanks, Martin gcc/ChangeLog: 2019-04-05 Martin Liska * gimple-pretty-print.c (du

Re: RFA: Fix uninitialized memory use in sched_macro_fuse_insns

2019-04-05 Thread Joern Rennecke
On Fri, 5 Apr 2019 at 11:07, Richard Sandiford wrote: > > 2019-04-04 Joern Rennecke > > > > * sched-deps.c (sched_macro_fuse_insns): Check return value of > > targetm.fixed_condition_code_regs. > > OK, thanks. Thanks for the review. Is that OK restricted to delayed applying once

Re: RFA: Fix uninitialized memory use in sched_macro_fuse_insns

2019-04-05 Thread Richard Sandiford
Joern Rennecke writes: > On Fri, 5 Apr 2019 at 11:07, Richard Sandiford > wrote: > > >> > 2019-04-04 Joern Rennecke >> > >> > * sched-deps.c (sched_macro_fuse_insns): Check return value of >> > targetm.fixed_condition_code_regs. >> >> OK, thanks. > > Thanks for the review. > > Is t

[committed] Guard notes for -Waddress-of-packed-member on warning emission (PR c/89985)

2019-04-05 Thread David Malcolm
This patch fixes stray notes emitted by -Waddress-of-packed-member when disabled via -w. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Committed to trunk as r270169. gcc/c-family/ChangeLog: PR c/89985 * c-warn.c (check_address_or_pointer_of_packed_member): Add

[PATCH, AIX] Fix private_read_only_data_section definition

2019-04-05 Thread David Edelsohn
When not using -fdata-sections or when there is no containing name, GCC falls back to a default section name. Because AIX uses XCOFF, it always has generated it's own section (CSECT) names (based on the filename) and not using the GCC defaults. unicode.org icu code has elicited behavior from the

Re: [PATCH] Fix PR83033

2019-04-05 Thread Andrea Corallo
Richard Earnshaw (lists) writes: > On 29/03/2019 11:01, Andrea Corallo wrote: >> Hi all, >> simple patch addressing minor style issue into >> gcc/config/aarch64/cortex-a57-fma-steering.c. >> >> make BOOT_CFLAGS='-mcpu=cortex-a57' bootstrap >> >> Okay for trunk? >> >> Bests >> Andrea >> >> >> 2

[PATCH] don't treat as zero empty string initializers of pointer array elements (PR 89980)

2019-04-05 Thread Martin Sebor
The change committed yesterday to handle the C++ 2a string literals as non-type template arguments treats empty string initializers for trailing pointer array elements as zero. That's of course wrong because addresses of literals are non-zero. The attached tweak constrains the trimming of traili

[PATCH] Make filesystem::path safe for self assignment

2019-04-05 Thread Jonathan Wakely
The standard says "If *this and p are the same object, has no effect." Previously we ended up clearing the path. * include/bits/fs_path.h (path::operator=(path&&)): Check for self assignment. * src/c++17/fs_path.cc (path::operator=(const path&)): Likewise. * testsu

[PATCH] Fix directory_iterator handling of DT_UNKNOWN

2019-04-05 Thread Jonathan Wakely
We need to handle DT_UNKNOWN earlier, not only during directory recursion, so that the cached file_type value in the directory_entry won't be used. * src/c++17/fs_dir.cc (_Dir::advance(bool, error_code&)): Handle d_type == DT_UNKNOWN immediately. (_Dir::should_recurse(bool

[PATCH] Share all recursive_directory_iterator state [LWG 2708]

2019-04-05 Thread Jonathan Wakely
Implement the proposed resolution of LWG 2708 by moving the _M_options and _M_pending members out of the recursive_directory_iterator into the shared _Dir_stack object. Because _Dir_stack is an opaque type, the member functions that access the _M_options and _M_pending variables cannot be inline.

[PATCH] Use hidden friends for directory iterator comparisons

2019-04-05 Thread Jonathan Wakely
The equality operators for directory iterators are not explicitly specified in the standard, they're only required to meet the iterator requirements. This means we don't need to declare them at namespace scope and can implement them as hidden friends. Also add 'noexcept' to directory_iterator's d

[PATCH] PR libstdc++/89986 export directory_iterator::increment

2019-04-05 Thread Jonathan Wakely
PR libstdc++/89986 * config/abi/pre/gnu.ver: Add missing exports. * testsuite/27_io/filesystem/iterators/directory_iterator.cc: Test increment member. Tested powerpc64le-linux, committed to trunk. commit 0043393da0a00cfd04867ec63873ed42d0db23a7 Author: Jonathan Wa

Re: [PATCH] PR libstdc++/87431 re-adjust never-valueless optimizations

2019-04-05 Thread Jonathan Wakely
On 03/04/19 17:25 +0100, Jonathan Wakely wrote: Avoid creating arbitrarily large objects on the stack when creating temporaries in order to provide the strong exception-safety guarantee. Also implement Antony Polukhin's suggestion to whitelist specific types that can be efficiently move-assigned

[PATCH] Implement std::visit for C++2a (P0655R1)

2019-04-05 Thread Jonathan Wakely
* doc/xml/manual/status_cxx2020.xml: Update status. * include/std/variant (visit): Define for C++2a (P0655R1). * testsuite/20_util/variant/visit_r.cc: New test. Tested powerpc64le-linux, committed to trunk. commit 60c01065cfdda4f93bd140b0ea37be16f537877c Author: Jonathan

[wwwdocs] Document PSTL and std::visit support

2019-04-05 Thread Jonathan Wakely
We still need to document PSTL in the libstdc++ manual, but this adds it to the release notes. Committed to CVS. Index: htdocs/gcc-9/changes.html === RCS file: /cvs/gcc/wwwdocs/htdocs/gcc-9/changes.html,v retrieving revision 1.57 di

Re: [PATCH] don't treat as zero empty string initializers of pointer array elements (PR 89980)

2019-04-05 Thread Marek Polacek
On Fri, Apr 05, 2019 at 10:45:59AM -0600, Martin Sebor wrote: > The change committed yesterday to handle the C++ 2a string literals > as non-type template arguments treats empty string initializers for > trailing pointer array elements as zero. That's of course wrong > because addresses of literal

Re: [PATCH] don't treat as zero empty string initializers of pointer array elements (PR 89980)

2019-04-05 Thread Martin Sebor
On 4/5/19 10:45 AM, Martin Sebor wrote: The change committed yesterday to handle the C++ 2a string literals as non-type template arguments treats empty string initializers for trailing pointer array elements as zero.  That's of course wrong because addresses of literals are non-zero. The attache

Re: [PATCH] don't treat as zero empty string initializers of pointer array elements (PR 89980)

2019-04-05 Thread Jason Merrill
On 4/5/19 2:25 PM, Martin Sebor wrote: On 4/5/19 10:45 AM, Martin Sebor wrote: The change committed yesterday to handle the C++ 2a string literals as non-type template arguments treats empty string initializers for trailing pointer array elements as zero.  That's of course wrong because addresse

Re: [C++ Patch] PR 89914 ("[9 Regression] ICE in nothrow_spec_p, at cp/except.c:1238")

2019-04-05 Thread Jason Merrill
On 4/5/19 7:11 AM, Paolo Carlini wrote: Hi, this error-recovery regressions is mostly another case - similar to c++/89488 - where we want to check that maybe_instantiate_noexcept actually succeeds before calling a function that asserts !DEFERRED_NOEXCEPT_SPEC_P, nothrow_spec_p this time. I th

Re: [PATCH] Implement std::visit for C++2a (P0655R1)

2019-04-05 Thread Jonathan Wakely
On 05/04/19 19:06 +0100, Jonathan Wakely wrote: * doc/xml/manual/status_cxx2020.xml: Update status. * include/std/variant (visit): Define for C++2a (P0655R1). * testsuite/20_util/variant/visit_r.cc: New test. This implementation is wrong, the conversions to R need to hap

Re: C++ PATCH for c++/87145 - bogus error converting class type in template argument list

2019-04-05 Thread Marek Polacek
On Fri, Apr 05, 2019 at 12:12:11AM -0400, Jason Merrill wrote: > On 4/4/19 5:18 PM, Marek Polacek wrote: > > On Thu, Mar 28, 2019 at 03:54:30PM -0400, Jason Merrill wrote: > > > On 3/20/19 4:12 PM, Marek Polacek wrote: > > > > The fix for 77656 caused us to call convert_nontype_argument even for >

Re: C++ PATCH for c++/87145 - bogus error converting class type in template argument list

2019-04-05 Thread Jason Merrill
On 4/5/19 4:50 PM, Marek Polacek wrote: On Fri, Apr 05, 2019 at 12:12:11AM -0400, Jason Merrill wrote: On 4/4/19 5:18 PM, Marek Polacek wrote: On Thu, Mar 28, 2019 at 03:54:30PM -0400, Jason Merrill wrote: On 3/20/19 4:12 PM, Marek Polacek wrote: The fix for 77656 caused us to call convert_no

Re: [PATCH] Add PSTL internal namespace qualifications

2019-04-05 Thread Thomas Rodgers
>From d95934a0f325e0934ada829378c3c0dfd6b3628c Mon Sep 17 00:00:00 2001 From: Thomas Rodgers Date: Fri, 5 Apr 2019 15:27:35 -0700 Subject: [PATCH] Replace direct PSTL uses of assert() with a macro This also replaces calls to __TBB_ASSERT so that there are two macro definitions provided by c++conf

Re: [PATCH] Implement std::visit for C++2a (P0655R1)

2019-04-05 Thread Ville Voutilainen
On Fri, 5 Apr 2019 at 23:29, Jonathan Wakely wrote: > > On 05/04/19 19:06 +0100, Jonathan Wakely wrote: > > * doc/xml/manual/status_cxx2020.xml: Update status. > > * include/std/variant (visit): Define for C++2a (P0655R1). > > * testsuite/20_util/variant/visit_r.cc: New test. > >

Re: [PATCH] Fix PR83033

2019-04-05 Thread Richard Earnshaw (lists)
On 05/04/2019 16:53, Andrea Corallo wrote: > > Richard Earnshaw (lists) writes: > >> On 29/03/2019 11:01, Andrea Corallo wrote: >>> Hi all, >>> simple patch addressing minor style issue into >>> gcc/config/aarch64/cortex-a57-fma-steering.c. >>> >>> make BOOT_CFLAGS='-mcpu=cortex-a57' bootstrap >

Re: [PATCH] Implement std::visit for C++2a (P0655R1)

2019-04-05 Thread Ville Voutilainen
On Sat, 6 Apr 2019 at 01:55, Ville Voutilainen wrote: > > On Fri, 5 Apr 2019 at 23:29, Jonathan Wakely wrote: > > > > On 05/04/19 19:06 +0100, Jonathan Wakely wrote: > > > * doc/xml/manual/status_cxx2020.xml: Update status. > > > * include/std/variant (visit): Define for C++2a (P0655R

Re: [PATCH] don't treat as zero empty string initializers of pointer array elements (PR 89980)

2019-04-05 Thread Martin Sebor
On 4/5/19 12:21 PM, Marek Polacek wrote: On Fri, Apr 05, 2019 at 10:45:59AM -0600, Martin Sebor wrote: The change committed yesterday to handle the C++ 2a string literals as non-type template arguments treats empty string initializers for trailing pointer array elements as zero. That's of cours

Re: [PATCH] Implement std::visit for C++2a (P0655R1)

2019-04-05 Thread Ville Voutilainen
On Sat, 6 Apr 2019 at 02:19, Ville Voutilainen wrote: > And this patch fixes the existing visitation so that we don't > over-eagerly cast to void. The main gist of it is > > -else if constexpr (is_same_v<_Result_type, void>) > +else if constexpr (!__same_return_types && > +

Re: [PATCH] Implement std::visit for C++2a (P0655R1)

2019-04-05 Thread Ville Voutilainen
On Sat, 6 Apr 2019 at 02:48, Ville Voutilainen wrote: > and > > - return __do_visit(std::forward<_Visitor>(__visitor), > - std::forward<_Variants>(__variants)...); > + return (_Res) > +__do_visit(std::forward<_Visitor>(__visitor), > + std::forward

Re: [PATCH] Implement std::visit for C++2a (P0655R1)

2019-04-05 Thread Ville Voutilainen
On Sat, 6 Apr 2019 at 02:55, Ville Voutilainen wrote: > Just in case that cast looks scary: the implicit conversion is also > deep down in __visit_invoke, so > we do actually require implicit convertibility as we are supposed to. > If that's still too scary, > we can just do > > - return (_R