[PATCH] Simplify ((A & N) ==/!= CST1) &/| ((A & M) ==/!= CST2)

2020-01-03 Thread Andrew Pinski
Hi, This adds the following two simplifcations to match.pd: ((A & N) == CST1) & ((A & M) == CST2) if (N) == (N), then (A&(N|M)) == (CST1|CST2) else false And ((A & N) != CST1) | ((A & M) != CST2) if (N) == (N), then (A&(N|M)) != (CST1|CST2) else true NOTE it adds a check to make

[PATCH 3/3] Check array contiguity for OpenACC/Fortran

2020-01-03 Thread Julian Brown
Hi, This patch tightens up error checking for array references used in OpenACC clauses such that they must now be contiguous. I believe this matches up to the spec (as of 2.6). I've tried to make it so an error only triggers if the compiler is sure that a given array expression must be

[PATCH 1/3] Add OpenACC test for sub-references being pointer or allocatable variables

2020-01-03 Thread Julian Brown
Hi, This test (by Tobias Burnus, mildly edited) adds a test to check whether the final component of a derived-type access has pointer or allocatable type for manual deep copy attach/detach operations. This is just checking existing behaviour. This arose from discussion of the manual deep copy

[PATCH 2/3] Don't allow mixed component and non-component accesses for OpenACC/Fortran

2020-01-03 Thread Julian Brown
Hi, This patch arose from discussion of the manual deep copy patch here: https://gcc.gnu.org/ml/gcc-patches/2019-12/msg01439.html In C/C++, it's not permitted to mix full struct-type accesses and "attach/detach" accesses to the same struct's members within a single directive. This patch adds

[PATCH] Improve __builtin_add_overflow on x86 for double-word types (PR target/93141)

2020-01-03 Thread Jakub Jelinek
Hi! As the following testcase shows, we generate quite bad code for double-word __builtin_add_overflow on x86, we have add[dt]i3_doubleword pattern and emit add[ql]; adc[ql];, but then we could just use setc/seto or adc etc., but we instead perform a double-word comparison to set compute the

[C++ PATCH] Fix up cp-gimplify.c ICE (PR c++/93046)

2020-01-03 Thread Jakub Jelinek
Hi! On the following testcase since the split_nonconstant_init move on the COND_EXPR with omitted middle-end operand we end up with the operator bool called on a TARGET_EXPR in the first operand and the same TARGET_EXPR appearing in INIT_EXPR in the second operand. cp_gimplify_init_expr ICEs,

[C++ PATCH] Avoid bogus errors due to -Wredundant-tags (PR c++/93138)

2020-01-03 Thread Jakub Jelinek
Hi! For -Wredundant-tags or -Wmismatched-tags, cp_parser_maybe_warn_enum_key and cp_parser_check_class_key perform an extra name lookup to check if the enum/struct/class/union keyword is redundant, but as the testcase shows, if it is not redundant, but there is e.g. a hidden member with the same

[C++ PATCH] PR c++/93033 - incorrect tree node sharing with array init.

2020-01-03 Thread Jason Merrill
The split_nonconstant_init piece is the only one necessary to fix the testcase, but it occurred to me that we might as well not split when -fno-exceptions. Tested x86_64-pc-linux-gnu, applying to trunk. * typeck2.c (split_nonconstant_init): Unshare non-decl. * cp-gimplify.c

[C++ PATCH] Reject class template placeholder as non-type template parm type in C++17.

2020-01-03 Thread Jason Merrill
Jakub noticed that we were improperly allowing this in C++17 mode. Tested x86_64-pc-linux-gnu, applying to trunk. * pt.c (invalid_nontype_parm_type_p): Reject class placeholder in C++17. --- gcc/cp/pt.c| 11 ++-

[PATCH] analyzer: fix global-sm-state issue affecting sm-signal

2020-01-03 Thread David Malcolm
sm-signal.cc was failing to warn about the use of an fprintf call in a signal handler when the signal handler function was non-static. The root cause was a failure to copy global sm-state within sm_state_map::clone_with_remapping as called by program_state::can_merge_with_p, which led to the

[testsuite, X86, committed] Require effective target masm_intel for two tests.

2020-01-03 Thread Iain Sandoe
Hi and Happy New Year, The vx512??-pr92686-vpcmp-intelasm-1.c tests currently fail on targets that do not support intel asm syntax. Fixed by adding the effective target requires. tested on x86_64-darwin16, applied to mainline as obvious, thanks Iain gcc/testsuite/ChangeLog: 2020-01-03 Iain

[PATCH] libstdc++/92124 for associative containers

2020-01-03 Thread François Dumont
This is the patch to extend PR 92124 to the associative containers. As it is pretty simple I thought it could maybe go in now. I also think that the existing 92124 tests are not really testing what they should with the move assignment operators noexcept qualified, no ?     PR libstdc++/92124

Re: [Patch, Fortran] PR91640 – Fix call to contiguous dummy

2020-01-03 Thread Thomas König
Hi Tobias, As a variant, I now use the latter (via the else branch). Either variant produces the same original tree. One can argue which variant is clearer; I think both are fine – pick one. I think the second one (the one you just attached) looks better. So, OK for trunk. Thanks for the

Re: [Patch, Fortran] PR91640 – Fix call to contiguous dummy

2020-01-03 Thread Tobias Burnus
Hi Thomas, On 1/3/20 7:18 PM, Thomas König wrote: Build on x86-64-gnu-linux. OK for the trunk – and for GCC 9? [It's a 9/10 regression] Is is now okay? If you add this, it would be good to add a test (for example counting while statements in the *.original dump) that the copyback does not

[PATCH 2/2] analyzer: cleanups to checker_path

2020-01-03 Thread David Malcolm
This patch adds DISABLE_COPY_AND_ASSIGN to checker_path, and makes its fields private. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to dmalcolm/analyzer on the GCC git mirror. gcc/analyzer/ChangeLog: * checker-path.h (checker_path::get_checker_event): New

[PATCH 1/2] analyzer: delete checker_event::clone

2020-01-03 Thread David Malcolm
checker_event has a clone vfunc implemented by all the concrete subclasses, but this is never used (a holdover from a very early implementation). This patch deletes it. Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu. Pushed to dmalcolm/analyzer on the GCC git mirror.

Fortran patches to be reviewed (was: [Patch, Fortran] PR91640 – Fix call to contiguous dummy)

2020-01-03 Thread Thomas Koenig
Hi Tobias, PS: I lost a bit the overview. Is there any patch pending review or otherwise pending? From my side, there is the patch for PR 65428, https://gcc.gnu.org/ml/gcc-patches/2020-01/msg00040.html Apart from that, I don't see any outstanding patches. Regards Thomas

Re: [Patch, Fortran] PR91640 – Fix call to contiguous dummy

2020-01-03 Thread Thomas König
Hi Tobias, If one passes something which is not a variable as an argument, there is no point to do the copy-out – the copy-in is sufficient. Note that a the result of a pointer-returning function is regarded as variable. As cleanup, I also fixed the indentation (twice) and the pointless

Connect and Network with Regulators and Canna Operators

2020-01-03 Thread CannaWest Summit
CannaWest    http://links.infocastevents.mkt8115.com/ctt?kn=13=NDE0MTM4MzgS1=NjkyMTk1NzM3MTk0S0=2=MTY4MDI1MTIxMQS2=1=0 The

[Patch, Fortran] PR91640 – Fix call to contiguous dummy

2020-01-03 Thread Tobias Burnus
If one passes something which is not a variable as an argument, there is no point to do the copy-out – the copy-in is sufficient. Note that a the result of a pointer-returning function is regarded as variable. As cleanup, I also fixed the indentation (twice) and the pointless 'fsym ?' check

Re: [PATCH] Mark param_max_combine_insns with Optimization keyword.

2020-01-03 Thread Segher Boessenkool
Hi! On Thu, Jan 02, 2020 at 12:07:27PM +0100, Martin Liška wrote: > The param is changed here: > > /* Restrict the amount of work combine does at -Og while retaining > most of its useful transforms. */ > if (opts->x_optimize_debug) > SET_OPTION_IF_UNSET (opts, opts_set,

[PATCH] Fix a bug that propagation in recursive function uses wrong aggregate lattice (PR ipa/93084)

2020-01-03 Thread Feng Xue OS
When checking a self-recursively generated value for aggregate jump function, wrong aggregate lattice was used, which will cause infinite constant propagation. This patch is composed to fix this issue. 2020-01-03 Feng Xue PR ipa/93084 * ipa-cp.c

Re: Define HAVE_ for math long double functions declared in vxworks headers

2020-01-03 Thread Jonathan Wakely
On 25/12/19 03:40 -0300, Alexandre Oliva wrote: When cross-building for vxworks, test for declarations of long double functions in math.h. We don't normally test for these functions when cross compiling, because link tests don't work, or ever really, but not defining them as available causes

Re: [PATCH] [RFC] ipa: duplicate ipa_size_summary for cloned nodes

2020-01-03 Thread Martin Jambor
Hi, On Thu, Dec 19 2019, Jan Hubicka wrote: >> On 2019/12/18 23:48, Jan Hubicka wrote: >> >> The size_info of ipa_size_summary are created by r277424. It should be >> >> duplicated for cloned nodes, otherwise self_size and >> >> estimated_self_stack_size >> >> would be 0, causing param

[PATCH] Add Optimization for various IPA parameters.

2020-01-03 Thread Martin Liška
Hi. This is similar transformation for IPA passes. This time, one needs to use opt_for_fn in order to get the right parameter values. @Martin, Honza: There are last few remaining parameters which should use opt_for_fn: param_ipa_max_agg_items param_ipa_cp_unit_growth

[PATCH] Add Optimization keyword for TREE/RTL optimization passes.

2020-01-03 Thread Martin Liška
Hello. The patch introduces Optimization keyword for various parameters that influence an optimization that operates on function level (TREE/RTL). I manually grepped for each occurrence and verified that it's really used within a function context. Patch can bootstrap on x86_64-linux-gnu and

Re: [ PATCH ] [ C++ ] [ libstdc++ ] P0674r1 - Extend support for arrays in make/allocate_shared

2020-01-03 Thread Jonathan Wakely
On 02/01/20 17:16 -0500, JeanHeyd Meneide wrote: This implementation does not update the internal __allocate_shared and __make_shared functions (I don't know why there seems to be a duplicate front-end for those functions: it seems a little weird to use both? Maybe it's for legacy reasons,

Re: [PATCH] libstdc++: Define std::lexicographical_compare_three_way for C++20

2020-01-03 Thread Jonathan Wakely
On 03/01/20 14:54 +, Jonathan Wakely wrote: On 29/12/19 12:07 +0100, Stephan Bergmann wrote: FYI, the above fails with -std=c++2a and recent Clang trunk after "Mark the major papers for C++20 consistent

Re: [PATCH] libstdc++: Define std::lexicographical_compare_three_way for C++20

2020-01-03 Thread Jonathan Wakely
On 29/12/19 12:07 +0100, Stephan Bergmann wrote: On 05/12/2019 13:46, Jonathan Wakely wrote: commit 5012548fd62526fdf5e04aeacee2b127efbac0e0 Author: Jonathan Wakely Date: Thu Dec 5 12:23:53 2019 + libstdc++: Define std::lexicographical_compare_three_way for C++20 *

[PATCH] Avoid segfault when dumping IPA-CP lattices for unoptimized functions (PR 92917)

2020-01-03 Thread Martin Jambor
Hi, PR 92917 found yet another place - dumping - where we can no longer rely on the fact that each function with gimple body has its ipa_node_params summary because un-optimized ones don't. Fixed with the following obvious patch that has passed a bootstrap and testing on an x86_64 and which I am

[PATCH] Mark param_max_fields_for_field_sensitive with Optimization keyword.

2020-01-03 Thread Martin Liška
Hi. One another fix where -Ox sets a parameter that is not marked with Optimize keyword. Fixed by adding the keyword. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: 2020-01-03 Martin Liska PR

Re: [PATCH 07/13] OpenACC 2.6 deep copy: libgomp parts

2020-01-03 Thread Julian Brown
Hi, On Sun, 22 Dec 2019 00:01:10 +0100 Thomas Schwinge wrote: > I had intentionally left out this assignment in my "In > 'libgomp/target.c', 'struct splay_tree_key_s', use 'struct > splay_tree_aux' for infrequently-used or API-specific data" patch, >

Re: [PING^4][PATCH 0/4] Fix library testsuite compilation for build sysroot

2020-01-03 Thread Julian Brown
Hi Maciej, On Sun, 22 Dec 2019 00:43:54 + (GMT) "Maciej W. Rozycki" wrote: > On Fri, 20 Dec 2019, Mike Stump wrote: > > > >> This patch series addresses a problem with the testsuite > > >> compiler being set up across libatomic, libffi, libgo, libgomp > > >> with no correlation whatsoever

Re: [Patch, Fortran] OpenMP/OpenACC – fix more issues with OPTIONAL

2020-01-03 Thread Jakub Jelinek
On Tue, Dec 10, 2019 at 06:54:19PM +0100, Tobias Burnus wrote: > 2019-12-10 Tobias Burnus > > gcc/fortran/ > * trans-openmp.c (gfc_omp_check_optional_argument): Always return a > Boolean expression; handle unallocated/disassociated actual arguments > as absent if passed

[PATCH] Do not set -fomit-frame-pointer if TARGET_OMIT_LEAF_FRAME_POINTER_P.

2020-01-03 Thread Martin Liška
Hi. I'm not fully sure about the change, but -momit-leaf-frame-pointer probably should not globally omit frame pointers? Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/ChangeLog: 2020-01-03 Martin Liska PR

Re: [PATCH] Allow prefer-vector-width= in target attribute (PR target/93089)

2020-01-03 Thread Uros Bizjak
On Fri, Jan 3, 2020 at 9:31 AM Jakub Jelinek wrote: > > Hi! > > For a patch I'm going to post next I need to be able to tweak > prefer_vector_width= for simd clones (the thing is, in the declare simd > clones it makes no sense to restrict to a subset of vector sizes the > selected ISA is capable

Re: [PATCH] Fix x86 abs2 expander for ia32 (PR target/93110)

2020-01-03 Thread Uros Bizjak
On Fri, Jan 3, 2020 at 9:23 AM Jakub Jelinek wrote: > > Hi! > > The newly added absdi2 expander doesn't work well on ia32, because it > requires a xordi3 pattern, which is available even for !TARGET_64BIT, > but only if TARGET_STV && TARGET_SSE2. > > The following patch just uses

Re: [PATCH] Fix endless loop in find_single_def_src (PR rtl-optimization/93088)

2020-01-03 Thread Eric Botcazou
> While we could add some hash_table/bitmap or whatever other data structure > to track registers we've already looked at, having unbounded look through > register copies looks dangerous to me for compile time complexity in > pathological cases, and while on certain architectures I could

[PATCH] Fix endless loop in find_single_def_src (PR rtl-optimization/93088)

2020-01-03 Thread Jakub Jelinek
Hi! The testcase uses two uninitialized variables in a loop, the iterator as well as the upper bound in the condition, and due to that and bad luck we end up with: (insn 6 70 71 14 (set (reg/v:DI 90 [ pend ]) (reg/v:DI 89 [ p ])) "pr56348.c":29:5 66 {*movdi_internal} (nil)) and (insn

[PATCH] Override prefer-vector-width= in x86 simd clones (PR target/93089)

2020-01-03 Thread Jakub Jelinek
Hi! As mentioned in the previous mail, this is what I intend to commit if/when the prefer-vector-width= in target attribute patch makes it in. Bootstrapped/regtested on x86_64-linux and i686-linux. 2020-01-03 Jakub Jelinek PR target/93089 * config/i386/i386-options.c

[PATCH] Allow prefer-vector-width= in target attribute (PR target/93089)

2020-01-03 Thread Jakub Jelinek
Hi! For a patch I'm going to post next I need to be able to tweak prefer_vector_width= for simd clones (the thing is, in the declare simd clones it makes no sense to restrict to a subset of vector sizes the selected ISA is capable of handling, the choice what vectorization factor and ABI for it

[PATCH] Fix x86 abs2 expander for ia32 (PR target/93110)

2020-01-03 Thread Jakub Jelinek
Hi! The newly added absdi2 expander doesn't work well on ia32, because it requires a xordi3 pattern, which is available even for !TARGET_64BIT, but only if TARGET_STV && TARGET_SSE2. The following patch just uses expand_simple_binop which is able to handle the splitting of it into two xorsi3

[PATCH] Improve (x >> c) << c match.pd optimization (PR tree-optimization/93118)

2020-01-03 Thread Jakub Jelinek
Hi! As can be seen in the testcase, for the (x >> c) << c optimization into x & (-1<> 32))<<32 for unsigned long long x - we figure out that after the logical right shift the upper 32 bits are already zero and optimize away those two casts - we don't handle that for arithmetic shift or e.g. for

Re: [Patch, committed, Fortran] PR68020 – Fix implied-shape handling for rank > 2

2020-01-03 Thread Tobias Burnus
Sorry – I had fixed it locally before the commit, but forgot the "git add" for that change :-( Thanks for the fix. Tobias On 1/3/20 12:59 AM, Jakub Jelinek wrote: On Thu, Jan 02, 2020 at 04:43:29PM +0100, Tobias Burnus wrote: Committed as Rev. 279835 after building an regtesting the