]> git.ipfire.org Git - thirdparty/gcc.git/log
thirdparty/gcc.git
7 years ago2018-06-25 Richard Biener <rguenther@suse.de>
rguenth [Mon, 25 Jun 2018 11:02:10 +0000 (11:02 +0000)] 
2018-06-25  Richard Biener  <rguenther@suse.de>

* tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
(vect_analyze_data_refs): Remove similar code from here and
simplify accordingly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262008 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-25 Richard Biener <rguenther@suse.de>
rguenth [Mon, 25 Jun 2018 11:01:07 +0000 (11:01 +0000)] 
2018-06-25  Richard Biener  <rguenther@suse.de>
        Eric Botcazou  <ebotcazou@libertysurf.fr>

* tree-vect-data-refs.c (vect_check_gather_scatter): Fail
for reverse storage order accesses rather than asserting
they cannot happen here.

* gnat.dg/sso9.adb: New testcase.
* gnat.dg/sso9_pkg.ads: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262007 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[i386/debug] Fix insn prefix in tls_global_dynamic_64_<mode>
vries [Mon, 25 Jun 2018 10:39:54 +0000 (10:39 +0000)] 
[i386/debug] Fix insn prefix in tls_global_dynamic_64_<mode>

2018-06-25  Tom de Vries  <tdevries@suse.de>

PR debug/86257
* config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
Use data16 instead of .byte for insn prefix.

* gcc.target/i386/pr86257.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262006 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoC++: Fix PR86082
krebbel [Mon, 25 Jun 2018 07:16:59 +0000 (07:16 +0000)] 
C++: Fix PR86082

When turning a user-defined numerical literal into an operator
invocation the literal needs to be translated to the execution
character set.

gcc/cp/ChangeLog:

2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>

PR C++/86082
* parser.c (make_char_string_pack): Pass this literal chars
through cpp_interpret_string.
(cp_parser_userdef_numeric_literal): Check the result of
make_char_string_pack.

gcc/testsuite/ChangeLog:

2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>

PR C++/86082
* g++.dg/pr86082.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262003 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Mon, 25 Jun 2018 00:17:04 +0000 (00:17 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@262002 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * ginclude/stddef.h: Simplify conditions around avoiding
gerald [Sun, 24 Jun 2018 21:32:40 +0000 (21:32 +0000)] 
* ginclude/stddef.h: Simplify conditions around avoiding
re-definition of __size_t.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261998 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * libgomp.texi (Top): Move www.openmp.org to https.
gerald [Sun, 24 Jun 2018 20:38:14 +0000 (20:38 +0000)] 
* libgomp.texi (Top): Move www.openmp.org to https.
(Enabling OpenMP): Ditto.
(omp_get_active_level): Ditto.
(omp_get_ancestor_thread_num): Ditto.
(omp_get_cancellation): Ditto.
(omp_get_default_device): Ditto.
(omp_get_dynamic): Ditto.
(omp_get_level): Ditto.
(omp_get_max_active_levels): Ditto.
(omp_get_max_task_priority): Ditto.
(omp_get_max_threads): Ditto.
(omp_get_nested): Ditto.
(omp_get_num_devices): Ditto.
(omp_get_num_procs): Ditto.
(omp_get_num_teams): Ditto.
(omp_get_num_threads): Ditto.
(omp_get_proc_bind): Ditto.
(omp_get_schedule): Ditto.
(omp_get_team_num): Ditto.
(omp_get_team_size): Ditto.
(omp_get_thread_limit): Ditto.
(omp_get_thread_num): Ditto.
(omp_in_parallel): Ditto.
(omp_in_final): Ditto.
(omp_is_initial_device): Ditto.
(omp_set_default_device): Ditto.
(omp_set_dynamic): Ditto.
(omp_set_max_active_levels): Ditto.
(omp_set_nested): Ditto.
(omp_set_num_threads): Ditto.
(omp_set_schedule): Ditto.
(omp_init_lock): Ditto.
(omp_set_lock): Ditto.
(omp_test_lock): Ditto.
(omp_unset_lock): Ditto.
(omp_destroy_lock): Ditto.
(omp_init_nest_lock): Ditto.
(omp_set_nest_lock): Ditto.
(omp_test_nest_lock): Ditto.
(omp_unset_nest_lock): Ditto.
(omp_destroy_nest_lock): Ditto.
(omp_get_wtick): Ditto.
(omp_get_wtime): Ditto.
(OMP_CANCELLATION): Ditto.
(OMP_DISPLAY_ENV): Ditto.
(OMP_DEFAULT_DEVICE): Ditto.
(OMP_DYNAMIC): Ditto.
(OMP_MAX_ACTIVE_LEVELS): Ditto.
(OMP_MAX_TASK_PRIORITY): Ditto.
(OMP_NESTED): Ditto.
(OMP_NUM_THREADS): Ditto.
(OMP_PROC_BIND): Ditto.
(OMP_PLACES): Ditto.
(OMP_STACKSIZE): Ditto.
(OMP_SCHEDULE): Ditto.
(OMP_THREAD_LIMIT): Ditto.
(OMP_WAIT_POLICY): Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261997 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
hubicka [Sun, 24 Jun 2018 14:11:55 +0000 (14:11 +0000)] 
* lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261995 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-23 Jerry DeLisle <jvdelisle@gcc.gnu.org>
jvdelisle [Sun, 24 Jun 2018 04:09:20 +0000 (04:09 +0000)] 
2018-06-23  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/85983
* interface.c (check_dtio_interface1): Delete assert.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261994 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Sun, 24 Jun 2018 00:16:33 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261992 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite/guality] Fix tcl error on missing gdb
vries [Sat, 23 Jun 2018 23:41:51 +0000 (23:41 +0000)] 
[testsuite/guality] Fix tcl error on missing gdb

2018-06-24  Tom de Vries  <tdevries@suse.de>

* g++.dg/guality/guality.exp: Don't use which on gdb arg to report_gdb.
* gcc.dg/guality/guality.exp: Same.
* gfortran.dg/guality/guality.exp: Same.
* lib/gcc-gdb-test.exp: Do early out if which gdb fails.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261988 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago/cp
paolo [Sat, 23 Jun 2018 07:32:45 +0000 (07:32 +0000)] 
/cp
2018-06-23  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (bad_specifiers): Add const location_t* parameter and
use locations in error messages about 'inline' and 'virtual'.
(mark_inline_variable): Add location_t parameter and use it in
error_at and pedwarn messages.
(grokdeclarator): Use declspecs->locations[ds_constexpr],
declspecs->locations[ds_concept], declspecs->locations[ds_virtual],
declspecs->locations[ds_inline] in many error messages; adjust
bad_specifiers and mark_inline_variable calls.
(grokvardecl): Use declspecs->locations[ds_concept] in error message.

/testsuite
2018-06-23  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/concepts/locations1.C: New.
* g++.dg/cpp0x/locations1.C: Likewise.
* g++.dg/cpp1z/inline-var2.C: Test locations too.
* g++.dg/cpp1z/inline-var3.C: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261982 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * doc/invoke.texi (mno-fancy-math-387): Update for changes
law [Sat, 23 Jun 2018 05:05:58 +0000 (05:05 +0000)] 
    * doc/invoke.texi (mno-fancy-math-387): Update for changes
        made to OpenBSD and NetBSD through the years.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261981 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago runtime: use #ifdef instead of #if for USING_SPLIT_STACK
ian [Sat, 23 Jun 2018 02:44:36 +0000 (02:44 +0000)] 
runtime: use #ifdef instead of #if for USING_SPLIT_STACK

    USING_SPLIT_STACK is configured as defined/undefined, not 0/1.
    Most of the places test USING_SPLIT_STACK with #ifdef, with a
    few exceptions. This CL fixes the exceptions.

    Reviewed-on: https://go-review.googlesource.com/120596

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261980 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Sat, 23 Jun 2018 00:16:56 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261979 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-22 Paul Thomas <pault@gcc.gnu.org>
pault [Fri, 22 Jun 2018 22:31:17 +0000 (22:31 +0000)] 
2018-06-22  Paul Thomas  <pault@gcc.gnu.org>
    Rainer Orth  <ro@gcc.gnu.org>

PR fortran/86281
* resolve.c (resolve_contained_fntype): Check for the charlen
before testing the length.

2018-06-22  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/86281
* gfortran.dg/assumed_charlen_function_7.f90: Add -std=legacy.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261975 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agogcc/ChangeLog:
kelvin [Fri, 22 Jun 2018 22:28:49 +0000 (22:28 +0000)] 
gcc/ChangeLog:

2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_pack (vector double, vector double) to match
behavior of vec_float2 (vector double, vector double).

gcc/testsuite/ChangeLog:

2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/builtins-3-p8.c (test_pack_float): Remove
this test.
* gcc.target/powerpc/builtins-9.c: New test.
* gcc.target/powerpc/fold-vec-pack-double.c: Modify dg directives
to expect different code generation on big-endian vs.
little-endian targets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261974 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR c++/86219 - ICE with erroneous initializer in template.
jason [Fri, 22 Jun 2018 21:57:07 +0000 (21:57 +0000)] 
PR c++/86219 - ICE with erroneous initializer in template.

* constexpr.c (fold_non_dependent_expr): Add complain parm.
* call.c, expr.c, init.c, pt.c, semantics.c, typeck.c, typeck2.c:
Pass it.
* call.c (build_cxx_call): Don't mess with builtins in a template.
* typeck2.c (store_init_value): If fold_non_dependent_expr didn't
produce a constant value, go back to the uninstantiated form.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261972 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago Avoid taking the address of something just because it's in parens.
jason [Fri, 22 Jun 2018 21:57:01 +0000 (21:57 +0000)] 
Avoid taking the address of something just because it's in parens.

* constexpr.c (same_type_ignoring_tlq_and_bounds_p): New.
(cxx_fold_indirect_ref): Use it.
(cxx_eval_constant_expression) [VIEW_CONVERT_EXPR]: Use it.
* cp-tree.h (REF_PARENTHESIZED_P): Allow VIEW_CONVERT_EXPR.
* semantics.c (force_paren_expr): Use VIEW_CONVERT_EXPR instead of
static_cast to reference type.
(maybe_undo_parenthesized_ref): Handle VIEW_CONVERT_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261971 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite/guality] Use buildarea gdb by default in combined build
vries [Fri, 22 Jun 2018 20:56:08 +0000 (20:56 +0000)] 
[testsuite/guality] Use buildarea gdb by default in combined build

2018-06-22  Tom de Vries  <tdevries@suse.de>

* g++.dg/guality/guality.exp (guality_gdb_name): Default to
$rootme/../gdb/gdb, if available.
* gcc.dg/guality/guality.exp (guality_gdb_name): Same.
* gfortran.dg/guality/guality.exp (guality_gdb_name): Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261935 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite/guality] Be verbose about gdb version used
vries [Fri, 22 Jun 2018 19:50:03 +0000 (19:50 +0000)] 
[testsuite/guality] Be verbose about gdb version used

2018-06-22  Tom de Vries  <tdevries@suse.de>

* lib/gcc-gdb-test.exp (report_gdb): New proc.
* g++.dg/guality/guality.exp: Use report_gdb.
* gcc.dg/guality/guality.exp: Same.
* gfortran.dg/guality/guality.exp: Same.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261911 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR c++/85662
jakub [Fri, 22 Jun 2018 17:22:43 +0000 (17:22 +0000)] 
PR c++/85662
* g++.dg/ext/offsetof3.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261909 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoImprove entry/exit instrumentation for nested functions
hainque [Fri, 22 Jun 2018 16:46:22 +0000 (16:46 +0000)] 
Improve entry/exit instrumentation for nested functions

2018-06-22  Olivier Hainque  <hainque@adacore.com>

* gimplify.c (gimplify_function_tree): Prevent creation
of a trampoline for the address of the current function
passed to entry/exit instrumentation hooks.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261908 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoForgot PR target/86222 in ChangeLog
acsawdey [Fri, 22 Jun 2018 15:37:36 +0000 (15:37 +0000)] 
Forgot PR target/86222 in ChangeLog

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261906 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
acsawdey [Fri, 22 Jun 2018 15:36:31 +0000 (15:36 +0000)] 
2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>

* config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
correctly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261905 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agogcc/testsuite/ChangeLog:
carll [Fri, 22 Jun 2018 15:01:34 +0000 (15:01 +0000)] 
gcc/testsuite/ChangeLog:

2018-06-22  Carl Love  <cel@us.ibm.com>

  * gcc.target/powerpc/altivec-7.c: Add qualifiers for counts on AIX
versus Linux.  Change checks for xxlnor, xxland and xxlxor to also look
for the vnor, vand and vxor instructions.
* gcc.target/powerpc/builtins-1.c: Move vec_or tests to a new file.
Remove counts for xxlor. Fix match on bl __divdi3 and bl __udivdi3.
* gcc.target/powerpc/builtins-4.c: Fix matching for vsl instructions.
* gcc.target/powerpc/builtins-5.c: New test file for vec_or test cases.
  * gcc.target/powerpc/vsx-vector-6.p7.c: Fix xxlnor BE expected count.
Add -dp to dg-options, update expected counts.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261904 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago Fix test case failures for pdp11 target.
pkoning [Fri, 22 Jun 2018 14:34:37 +0000 (14:34 +0000)] 
Fix test case failures for pdp11 target.

* gcc.c-torture/execute/builtins/lib/chk.c: Use smaller alignment
if pdp11.
* gcc.c-torture/compile/20010518-2.c: Skip if pdp11 -mint32.
* gcc.c-torture/compile/20040101-1.c: Ditto.
* gcc.c-torture/compile/20050622-1.c: Ditto.
* gcc.c-torture/compile/20080625-1.c: Ditto.
* gcc.c-torture/compile/20090107-1.c: Ditto.
* gcc.c-torture/compile/920501-12.c: Ditto.
* gcc.c-torture/compile/920501-4.c: Ditto.
* gcc.c-torture/compile/961203-1.c: Ditto.
* gcc.c-torture/compile/limits-externdecl.c: Ditto.
* gcc.c-torture/compile/pr25310.c: Ditto.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261897 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago syscall: remove Ustat
ian [Fri, 22 Jun 2018 14:25:52 +0000 (14:25 +0000)] 
syscall: remove Ustat

    glibc 2.28 removes ustat.h and the ustat function entirely, which
    breaks syscall.Ustat.

    Updates golang/go#25990

    Reviewed-on: https://go-review.googlesource.com/120535

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261896 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoFix unexported basic_string symbols for 32-bit targets
redi [Fri, 22 Jun 2018 14:19:12 +0000 (14:19 +0000)] 
Fix unexported basic_string symbols for 32-bit targets

* config/abi/pre/gnu.ver: Fix __cxx11::basic_string patterns for
different size_t mangling on 32-bit targets.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261892 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR libstdc++/86280 fix undefined left shift on 32-bit targets
redi [Fri, 22 Jun 2018 13:05:20 +0000 (13:05 +0000)] 
PR libstdc++/86280 fix undefined left shift on 32-bit targets

PR libstdc++/86280
* include/experimental/memory_resource
(__resource_adaptor_common::_AlignMgr::_M_token_size): Use type large
enough for result of left shift.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261888 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoFix emission of jump tables (PR tree-optimization/86263).
marxin [Fri, 22 Jun 2018 11:32:20 +0000 (11:32 +0000)] 
Fix emission of jump tables (PR tree-optimization/86263).

2018-06-22  Martin Liska  <mliska@suse.cz>

        PR tree-optimization/86263
* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
        Bail out if is_enabled is false.
* tree-switch-conversion.h (jump_table_cluster::is_enabled):
        New declaration.
(jump_table_cluster::is_enabled): New function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261886 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
hubicka [Fri, 22 Jun 2018 10:09:10 +0000 (10:09 +0000)] 
* lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
* tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
(lto_input_ts_binfo_tree_pointers): Likewise.
* tree-streamer-out.c (streamer_write_tree_bitfields,
write_ts_binfo_tree_pointers): Likewise.
* tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261885 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoUpdate OpenACC testcases
tschwinge [Fri, 22 Jun 2018 10:04:14 +0000 (10:04 +0000)] 
Update OpenACC testcases

gcc/testsuite/
* c-c++-common/goacc/deviceptr-4.c: New file.
* c-c++-common/goacc/kernels-counter-var-redundant-load.c:
Likewise.
* c-c++-common/goacc/kernels-loop-data-2.c: Likewise.
* c-c++-common/goacc/kernels-loop-data-enter-exit-2.c: Likewise.
* c-c++-common/goacc/kernels-loop-data-enter-exit.c: Likewise.
* c-c++-common/goacc/kernels-loop-data-update.c: Likewise.
* c-c++-common/goacc/kernels-loop-data.c: Likewise.
* c-c++-common/goacc/kernels-parallel-loop-data-enter-exit.c:
Likewise.
* c-c++-common/goacc/parallel-reduction.c: Likewise.
* c-c++-common/goacc/private-reduction-1.c: Likewise.
* gfortran.dg/goacc/kernels-parallel-loop-data-enter-exit.f95:
Likewise.
* gfortran.dg/goacc/modules.f95: Likewise.
* gfortran.dg/goacc/routine-8.f90: Likewise.
* gfortran.dg/goacc/routine-level-of-parallelism-1.f90: Likewise.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/loop-red-wv-1.c: Don't force "-O2".
* testsuite/libgomp.oacc-c-c++-common/data-2.c: Update.
* testsuite/libgomp.oacc-c-c++-common/host_data-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: Likewise.
* testsuite/libgomp.oacc-fortran/data-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/data-2.f90: Likewise.
* testsuite/libgomp.oacc-c++/non-scalar-data.C: New file.
* testsuite/libgomp.oacc-c-c++-common/declare-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/enter-data.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-enter-exit.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-data-update.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-data.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-parallel-loop-data-enter-exit.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-1.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-3.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-4.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-local-worker-5.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-1.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-3.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-4.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-5.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-gang-6.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-1.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-vector-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-1.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-2.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-3.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-4.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-5.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-6.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-private-vars-loop-worker-7.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-reduction-1.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/parallel-loop-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/parallel-loop-1.h: Likewise.
* testsuite/libgomp.oacc-c-c++-common/parallel-loop-2.h: Likewise.
* testsuite/libgomp.oacc-fortran/cublas-fixed.h: Likewise.
* testsuite/libgomp.oacc-fortran/dummy-array.f90: Likewise.
* testsuite/libgomp.oacc-fortran/host_data-2.f90: Likewise.
* testsuite/libgomp.oacc-fortran/host_data-3.f: Likewise.
* testsuite/libgomp.oacc-fortran/host_data-4.f90: Likewise.
* testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction-2.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-acc-loop-reduction.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-collapse-3.f90: Likewise.
* testsuite/libgomp.oacc-fortran/kernels-collapse-4.f90: Likewise.
* testsuite/libgomp.oacc-fortran/kernels-independent.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-loop-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/kernels-map-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/kernels-parallel-loop-data-enter-exit.f95:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-1.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-2.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-3.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-gang-6.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-1.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-vector-2.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-1.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-2.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-3.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-4.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-5.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-6.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-private-vars-loop-worker-7.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/kernels-reduction-1.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/lib-12.f90: Likewise.
* testsuite/libgomp.oacc-fortran/lib-13.f90: Likewise.
* testsuite/libgomp.oacc-fortran/lib-14.f90: Likewise.
* testsuite/libgomp.oacc-fortran/lib-15.f90: Likewise.
* testsuite/libgomp.oacc-fortran/parallel-loop-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/reference-reductions.f90: Likewise.
* testsuite/libgomp.oacc-fortran/vector-routine.f90: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261884 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
hubicka [Fri, 22 Jun 2018 09:45:54 +0000 (09:45 +0000)] 
* tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261883 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoMake symbol_summary::get and call_summary::get pure.
marxin [Fri, 22 Jun 2018 08:56:18 +0000 (08:56 +0000)] 
Make symbol_summary::get and call_summary::get pure.

2018-06-22  Martin Liska  <mliska@suse.cz>

* symbol-summary.h (get): Make it pure and inline move
        functionality from ::get function.
        (get): Remove and inline into ::get and ::get_create.
        (get_create): Move code from ::get function.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261882 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDon't preprocess .S files with -P on Solaris/x86 (PR target/85994)
ro [Fri, 22 Jun 2018 06:19:14 +0000 (06:19 +0000)] 
Don't preprocess .S files with -P on Solaris/x86 (PR target/85994)

PR target/85994
* config/i386/sol2.h (CPP_SPEC): Don't pass -P for
-x assembler-with-cpp.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261880 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoHave g++ define _FILE_OFFSET_BITS=64 on Solaris
ro [Fri, 22 Jun 2018 06:16:00 +0000 (06:16 +0000)] 
Have g++ define _FILE_OFFSET_BITS=64 on Solaris

* config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
_FILE_OFFSET_BITS=64 for C++.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261879 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 François Dumont <fdumont@gcc.gnu.org>
fdumont [Fri, 22 Jun 2018 05:23:47 +0000 (05:23 +0000)] 
2018-06-21  François Dumont  <fdumont@gcc.gnu.org>
Fix this ChangeLog entry.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261878 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Fri, 22 Jun 2018 00:16:44 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261877 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR libstdc++/86138 prevent implicit instantiation of COW empty rep
redi [Thu, 21 Jun 2018 23:29:01 +0000 (23:29 +0000)] 
PR libstdc++/86138 prevent implicit instantiation of COW empty rep

The explicit instantiation declarations for std::basic_string are
disabled for C++17 (and later) so that basic_string symbols get
implicitly instantiated in every translation unit that needs them.  On
targets that don't support STB_GNU_UNIQUE this leads to multiple copies
of the empty rep symbol for COW strings. In order to detect whether a
COW string needs to deallocate its storage it compares the address with
the empty rep.  When there are multiple copies of the empty rep object
the address is not unique, and so string destructors try to delete the
empty rep, which crashes.

In order to guarantee uniqueness of the _S_empty_rep_storage symbol this
patch adds an explicit instantiation declaration for just that symbol.
This means the other symbols are still implicitly instantiated in C++17
code, but for the empty rep the definition in the library gets used.

Separately, there is no need for C++17 code to implicitly instantiate
the I/O functions for strings, so this also restores the explicit
instantiation declarations for those functions.

PR libstdc++/86138
* include/bits/basic_string.tcc:
[__cplusplus > 201402 && !_GLIBCXX_USE_CXX11_ABI]
(basic_string<char>::_Rep::_S_empty_rep_storage)
(basic_string<wchar_t>::_Rep::_S_empty_rep_storage): Add explicit
instantiation declarations.
[__cplusplus > 201402] (operator>>, operator<<, getline): Re-enable
explicit instantiation declarations.
* testsuite/21_strings/basic_string/cons/char/86138.cc: New.
* testsuite/21_strings/basic_string/cons/wchar_t/86138.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261873 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 Michael Meissner <meissner@linux.ibm.com>
meissner [Thu, 21 Jun 2018 23:13:25 +0000 (23:13 +0000)] 
2018-06-21  Michael Meissner  <meissner@linux.ibm.com>

* gcc.target/powerpc/pack02.c: Use __ibm128 instead of long double
if the long double format is IEEE 128-bit for tests that are
explicitly testing IBM extended double support.  Use the
appropriate pack and unpack built-in functions.  Change calls from
__builtin_isinfl to __builtin_isinf since the later supports all
floating point types.
* gcc.target/powerpc/pr57150.c: Likewise.
* gcc.target/powerpc/pr60203.c: Likewise.
* gcc.target/powerpc/pr67808.c: Likewise.
* gcc.target/powerpc/pr70117.c: Likewise.
* gcc.target/powerpc/tfmode_off.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261872 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago cmd/go: re-enable a couple of tests of gccgo
ian [Thu, 21 Jun 2018 23:02:25 +0000 (23:02 +0000)] 
cmd/go: re-enable a couple of tests of gccgo

    Port https://golang.org/cl/120375 over to the gofrontend repo so that
    it gets more reliable testing.

    Updates golang/go#22472

    Reviewed-on: https://go-review.googlesource.com/120395

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261871 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-23 Michael Meissner <meissner@linux.ibm.com>
meissner [Thu, 21 Jun 2018 22:55:50 +0000 (22:55 +0000)] 
2018-06-23  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
multiply and divide external functions from being created more
than once.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261870 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 Michael Meissner <meissner@linux.ibm.com>
meissner [Thu, 21 Jun 2018 22:49:37 +0000 (22:49 +0000)] 
2018-06-21  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000.md (neg<mode>2_internal): Use the correct
mode to check whether the mode is IBM extended.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261869 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 Paul Thomas <pault@gcc.gnu.org>
pault [Thu, 21 Jun 2018 22:38:55 +0000 (22:38 +0000)] 
2018-06-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/49630
* resolve.c (resolve_contained_fntype): Change standard ref.
from F95 to F2003: C418. Correct a spelling error in a comment.
It is an error for an abstract interface to have an assumed
character length result.
* trans-expr.c (gfc_conv_procedure_call): Likewise change the
standard reference.

2018-06-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/49630
* gfortran.dg/assumed_charlen_function_7.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261868 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 Michael Meissner <meissner@linux.ibm.com>
meissner [Thu, 21 Jun 2018 22:16:20 +0000 (22:16 +0000)] 
2018-06-21  Michael Meissner  <meissner@linux.ibm.com>

* config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
conversion insn that shows up when pr85657-3.c is compiled using
IEEE 128-bit long double.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261867 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR libstdc++/83328 add correct basic_string::insert for initializer_list
redi [Thu, 21 Jun 2018 22:01:25 +0000 (22:01 +0000)] 
PR libstdc++/83328 add correct basic_string::insert for initializer_list

The SSO basic_string has a non-standard insert(iterator, initializer_list)
overload, from a C++0x draft. This adds the correct overload, while also
preserving the old one so that the old symbol is still exported from the
library.

The COW basic_string doesn't have any of the C++11 changes to the insert
overloads (they all still have non-const iterator parameters and the
ones that should return an iterator still return void). This doesn't
make any change to the COW string.

PR libstdc++/83328
* acinclude.m4 (libtool_VERSION): Bump to 6:26:0.
* config/abi/pre/gnu.ver: Add GLIBCXX_3.4.26 and export new symbol.
* configure: Regenerate.
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
(basic_string::insert(const_iterator, initializer_list<C>)): Add.
[_GLIBCXX_USE_CXX11_ABI && !_GLIBCXX_DEFINING_STRING_INSTANTIATIONS]
(basic_string::insert(iterator, initializer_list<C>)): Suppress
definition.
* include/debug/string (basic_string::insert(iterator, C)): Change
first parameter to const_iterator.
(basic_string::insert(iterator, size_type, C)): Likewise. Change
return type to iterator.
(basic_string::insert(iterator, InputIterator, InputIterator)):
Likewise.
(basic_string::insert(iterator, initializer_list<C>)): Change first
parameter to const_iterator and return type to iterator.
* src/c++11/string-inst.cc: Extend comment.
* testsuite/21_strings/basic_string/modifiers/insert/char/83328.cc:
New.
* testsuite/21_strings/basic_string/modifiers/insert/wchar_t/83328.cc:
New.
* testsuite/util/testsuite_abi.cc: Add new symbol version.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261866 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
redi [Thu, 21 Jun 2018 20:57:07 +0000 (20:57 +0000)] 
* config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261865 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Use TEMPLATE_PARM_DESCENDANTS.
jason [Thu, 21 Jun 2018 18:19:38 +0000 (18:19 +0000)] 
 * pt.c (tsubst) [TEMPLATE_TYPE_PARM]: Use TEMPLATE_PARM_DESCENDANTS.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261861 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoReduce garbage from push_to_top_level.
jason [Thu, 21 Jun 2018 18:19:34 +0000 (18:19 +0000)] 
Reduce garbage from push_to_top_level.

* name-lookup.c (do_push_to_top_level): Don't allocate
current_lang_base.
(do_pop_from_top_level): Release current_lang_base.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261860 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago Let -fmem-report see callers of cxx_make_type.
jason [Thu, 21 Jun 2018 18:19:29 +0000 (18:19 +0000)] 
Let -fmem-report see callers of cxx_make_type.

* lex.c (cxx_make_type): Add MEM_STAT_DECL.
(make_class_type): Likewise.
(cxx_make_type_hook): New.
* cp-objcp-common.h (LANG_HOOKS_MAKE_TYPE): Use cxx_make_type_hook.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261859 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR c++/86182 - fix wrong PR tag in earlier commit
jason [Thu, 21 Jun 2018 18:19:23 +0000 (18:19 +0000)] 
PR c++/86182 - fix wrong PR tag in earlier commit

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261858 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 Paul Thomas <pault@gcc.gnu.org>
pault [Thu, 21 Jun 2018 17:34:31 +0000 (17:34 +0000)] 
2018-06-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/83118
* resolve.c (resolve_ordinary_assign): Force the creation of a
vtable for assignment of non-polymorphic expressions to an
unlimited polymorphic object.
* trans-array.c (gfc_alloc_allocatable_for_assignment): Use the
size of the rhs type for such assignments. Set the dtype, _len
and vptrs appropriately.
* trans-expr.c (gfc_trans_assignment): Force the use of the
_copy function for these assignments.

2018-06-21  Paul Thomas  <pault@gcc.gnu.org>

PR fortran/83118
* gfortran.dg/unlimited_polymorphic_30.f03: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261857 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
ebotcazou [Thu, 21 Jun 2018 17:03:58 +0000 (17:03 +0000)] 
* cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
functions.
(rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
the edge can be forwarded.
(cfg_layout_merge_blocks): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261856 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * except.c (finish_eh_generation): Commit edge insertions only after
ebotcazou [Thu, 21 Jun 2018 17:02:13 +0000 (17:02 +0000)] 
* except.c (finish_eh_generation): Commit edge insertions only after
the EH edges have been redirected from post-landing to landing pads.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261855 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
ebotcazou [Thu, 21 Jun 2018 17:01:12 +0000 (17:01 +0000)] 
* tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
create_tmp_var_for to create the FRAME decl.
(finalize_nesting_tree_1): Do not unchain the FRAME decl.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261854 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * tree-inline.c (copy_edges_for_bb): Minor tweak.
ebotcazou [Thu, 21 Jun 2018 16:59:28 +0000 (16:59 +0000)] 
* tree-inline.c (copy_edges_for_bb): Minor tweak.
(maybe_move_debug_stmts_to_successors): Also reset the locus of the
debug statement when resetting its value.
(expand_call_inline): Copy the locus of the call onto the assignment
of the return value, if any.  Use local variable in more cases.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261853 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR libstdc++/70940 make pmr::resource_adaptor return aligned memory
redi [Thu, 21 Jun 2018 16:24:00 +0000 (16:24 +0000)] 
PR libstdc++/70940 make pmr::resource_adaptor return aligned memory

PR libstdc++/70940
* include/experimental/memory_resource
(__resource_adaptor_imp::do_deallocate): Add missing return.
* testsuite/experimental/memory_resource/new_delete_resource.cc: New.
* testsuite/experimental/memory_resource/resource_adaptor.cc: Test
resource_adaptor with std::allocator, __gnu_cxx::new_allocator and
__gnu_cxx::malloc_allocator.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261851 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR libstdc++/70940 make pmr::resource_adaptor return aligned memory
redi [Thu, 21 Jun 2018 14:01:11 +0000 (14:01 +0000)] 
PR libstdc++/70940 make pmr::resource_adaptor return aligned memory

PR libstdc++/70940
* include/experimental/memory_resource (__resource_adaptor_common):
New base class.
(__resource_adaptor_common::_AlignMgr): Helper for obtaining aligned
pointer from unaligned, and vice versa.
(__resource_adaptor_imp::do_allocate): Use _AlignMgr to adjust
allocated pointer to meet alignment request.
(__resource_adaptor_imp::do_deallocate): Use _AlignMgr to retrieve
original pointer for deallocation.
(__resource_adaptor_imp::do_is_equal): Reformat.
(__resource_adaptor_imp::_S_aligned_size): Remove.
(__resource_adaptor_imp::_S_supported): Remove.
(new_delete_resource): Use __gnu_cxx::new_allocator.
* testsuite/experimental/memory_resource/resource_adaptor.cc: Test
extended alignments and use debug_allocator to check for matching
allocate/deallocate pairs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261849 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoIPA summaries use ::get in ipa-pure-const.c.
marxin [Thu, 21 Jun 2018 13:53:30 +0000 (13:53 +0000)] 
IPA summaries use ::get in ipa-pure-const.c.

2018-06-21  Martin Liska  <mliska@suse.cz>

* ipa-pure-const.c (propagate_nothrow): Use
        funct_state_summaries->get.
(dump_malloc_lattice): Likewise.
(propagate_malloc): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261848 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 Richard Biener <rguenther@suse.de>
rguenth [Thu, 21 Jun 2018 13:47:48 +0000 (13:47 +0000)] 
2018-06-21  Richard Biener  <rguenther@suse.de>

* lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
* tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
comment.
* tree-streamer-out.c (write_ts_block_tree_pointers): Stream
BLOCK_ABSTRACT_ORIGIN unconditionally.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261847 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoFix IPA crash in libgccjit
dmalcolm [Thu, 21 Jun 2018 13:44:38 +0000 (13:44 +0000)] 
Fix IPA crash in libgccjit

gcc/ChangeLog:
* ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
deleting it.
* ipa-reference.c (ipa_reference_c_finalize): Delete
ipa_ref_opt_sum_summaries and set it to NULL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261846 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[testsuite] Fix guality/pr45882.c for flto
vries [Thu, 21 Jun 2018 13:37:59 +0000 (13:37 +0000)] 
[testsuite] Fix guality/pr45882.c for flto

Atm this test in pr45882.c fails:
...
  int d = a[i];  /* { dg-final { gdb-test 16 "d" "112" } } */
...
as follows:
...
FAIL: gcc.dg/guality/pr45882.c   -O2 -flto -fuse-linker-plugin \
      -fno-fat-lto-objects  line 16 d == 112
...

In more detail, gdb fails to print the value of d:
...
Breakpoint 1, foo (i=i@entry=7, j=j@entry=7) at pr45882.c:16
16        ++v;
$1 = <optimized out>
$2 = 112
<optimized out> != 112
...

Variable d is a local variable in function foo, initialized from global array a.
When compiling, first cddce1 removes the initialization of d in foo, given
that d is not used afterwards.  Then ipa marks array a as write-only, and
removes the stores to array a in main.  This invalidates the location
expression for d, which points to a[i], so it is removed, which is why gdb
ends up printing <optimized out> for d.

This patches fixes the fail by adding attribute used to array a, preventing
array a from being marked as write-only.

Tested on x86_64.

2018-06-21  Tom de Vries  <tdevries@suse.de>

* gcc.dg/guality/pr45882.c (a): Add used attribute.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261845 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[tail-merge] Fix side-effect test in stmt_local_def
vries [Thu, 21 Jun 2018 12:44:38 +0000 (12:44 +0000)] 
[tail-merge] Fix side-effect test in stmt_local_def

2018-06-21  Tom de Vries  <tdevries@suse.de>

PR tree-optimization/85859
* tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
test with comment from bb_no_side_effects_p.

* gcc.dg/pr85859.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261844 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 Richard Biener <rguenther@suse.de>
rguenth [Thu, 21 Jun 2018 11:22:12 +0000 (11:22 +0000)] 
2018-06-21  Richard Biener  <rguenther@suse.de>

PR tree-optimization/86232
* tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
max for constant niter.

* gcc.dg/torture/pr86232.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261843 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[ARM] Use __ARM_ARCH and __ARM_FEATURE_LDREX instead of __ARM_ARCH__
clyon [Thu, 21 Jun 2018 11:05:36 +0000 (11:05 +0000)] 
[ARM] Use __ARM_ARCH and __ARM_FEATURE_LDREX instead of __ARM_ARCH__

2018-06-21  Christophe Lyon  <christophe.lyon@linaro.org>

libatomic/
* config/arm/arm-config.h (__ARM_ARCH__): Remove definitions, use
__ARM_ARCH instead. Use __ARM_FEATURE_LDREX to define HAVE_STREX
and HAVE_STREXBHD

libgcc/
* config/arm/lib1funcs.S (__ARM_ARCH__): Remove definitions, use
__ARM_ARCH and __ARM_FEATURE_CLZ instead.
(HAVE_ARM_CLZ): Remove definition, use __ARM_FEATURE_CLZ instead.
* config/arm/ieee754-df.S: Use __ARM_FEATURE_CLZ instead of
__ARM_ARCH__.
* config/arm/ieee754-sf.S: Likewise.
* config/arm/libunwind.S: Use __ARM_ARCH instead of __ARM_ARCH__.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261841 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[ARM] libgcc: Remove unsupported code for __ARM_ARCH__ < 4
clyon [Thu, 21 Jun 2018 11:01:05 +0000 (11:01 +0000)] 
[ARM] libgcc: Remove unsupported code for __ARM_ARCH__ < 4

2018-06-21  Christophe Lyon  <christophe.lyon@linaro.org>

libgcc/
* config/arm/ieee754-df.S: Remove code for __ARM_ARCH__ < 4, no
longer supported.
* config/arm/ieee754-sf.S: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261840 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[AArch64][PATCH 2/2] Combine AES instructions with xor and zero operands
avieira [Thu, 21 Jun 2018 09:08:43 +0000 (09:08 +0000)] 
[AArch64][PATCH 2/2] Combine AES instructions with xor and zero operands

gcc
2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* config/aarch64/aarch64-simd.md
(*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.

gcc/testsuite
2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc/gcc.target/aarch64/aes_xor_combine.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261836 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[AArch64][PATCH 1/2] Make AES unspecs commutative
avieira [Thu, 21 Jun 2018 09:01:21 +0000 (09:01 +0000)] 
[AArch64][PATCH 1/2] Make AES unspecs commutative

gcc
2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
Make opernads of the unspec commutative.

gcc/testsuite
2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>

* gcc/gcc.target/aarch64/aes_2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261835 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 Richard Biener <rguenther@suse.de>
rguenth [Thu, 21 Jun 2018 07:46:43 +0000 (07:46 +0000)] 
2018-06-21  Richard Biener  <rguenther@suse.de>

* tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
* tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
(vect_analyze_data_ref_dependence): Re-order checks to deal with
NULL DR_STEP.
(vect_record_base_alignments): Do not record base alignment
for gathers or scatters.
(vect_compute_data_ref_alignment): Drop return value that is always
true.  Bail out early for gathers or scatters.
(vect_enhance_data_refs_alignment): Bail out early for gathers
or scatters.
(vect_find_same_alignment_drs): Likewise.
(vect_analyze_data_refs_alignment): Remove dead code.
(vect_slp_analyze_and_verify_node_alignment): Likewise.
(vect_analyze_data_refs): For possible gathers or scatters do
not create an alternate DR, just check their possible validity
and mark them.  Adjust DECL_NONALIASED handling to not rely
on DR_BASE_ADDRESS.
* tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
update inits of gathers or scatters.
* tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
Also copy gather/scatter flag to pattern vinfo.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261834 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agolibbacktrace/
chefmax [Thu, 21 Jun 2018 05:42:53 +0000 (05:42 +0000)] 
libbacktrace/

2018-06-21 Denis Khalikov <d.khalikov@partner.samsung.com>

PR other/86198
* elf.c (elf_add): Increase ".note.gnu.build-id" section size
checking up to 36 bytes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261832 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago2018-06-21 François Dumont <fdumont@gcc.gnu.org>
fdumont [Thu, 21 Jun 2018 05:36:48 +0000 (05:36 +0000)] 
2018-06-21  François Dumont  <fdumont@gcc.gnu.org>

* include/debug/debug.h
(_Safe_iterator<>(const _Safe_iterator<_MutableIterator,>& __x)):
Compare __x base iterator with a default initialized iterator of the
same type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261831 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoDaily bump.
gccadmin [Thu, 21 Jun 2018 00:16:46 +0000 (00:16 +0000)] 
Daily bump.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261830 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agolibgcc/:
ian [Wed, 20 Jun 2018 21:11:23 +0000 (21:11 +0000)] 
libgcc/:
PR libgcc/86213
* generic-morestack.c (allocate_segment): Move calls to getenv and
getpagesize to __morestack_load_mmap.
(__morestack_load_mmap) Initialize static_pagesize and
use_guard_page here so as to avoid clobbering SSE regs during a
__morestack call.
gcc/testsuite/:
* gcc.dg/split-8.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261823 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agogcc/ChangeLog:
kelvin [Wed, 20 Jun 2018 20:06:51 +0000 (20:06 +0000)] 
gcc/ChangeLog:

2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
behavior of vec_packsu (vector unsigned long long, vector unsigned
long long) to match behavior of vec_packs with same signature.

gcc/testsuite/ChangeLog:

2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>

* gcc.target/powerpc/builtins-1.c: Adjust dg directives to scan
for vpkudus in place of vpksdus.
* gcc.target/powerpc/builtins-3-p8.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261819 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoPR libstdc++/70966 make pmr::new_delete_resource() immortal
redi [Wed, 20 Jun 2018 19:34:53 +0000 (19:34 +0000)] 
PR libstdc++/70966 make pmr::new_delete_resource() immortal

Construct the program-wide resource objects using placement new. This
means they have dynamic storage duration and won't be destroyed during
termination.

PR libstdc++/70966
* include/experimental/memory_resource (__resource_adaptor_imp): Add
static assertions to enforce requirements on pointer types.
(__resource_adaptor_imp::get_allocator()): Add noexcept.
(new_delete_resource, null_memory_resource): Return address of an
object with dynamic storage duration.
(__null_memory_resource): Remove.
* testsuite/experimental/memory_resource/70966.cc: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261818 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[PR c++/85634] Fix tsubst ICE
nathan [Wed, 20 Jun 2018 19:22:53 +0000 (19:22 +0000)] 
[PR c++/85634] Fix tsubst ICE

https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01274.html
PR c++/85634
* friend.c (add_friend): Keep lookup sets of tempate sets.

PR c++/85634
* g++.dg/lookup/pr85634-2.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261817 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago/cp
paolo [Wed, 20 Jun 2018 19:07:37 +0000 (19:07 +0000)] 
/cp
2018-06-20  Paolo Carlini  <paolo.carlini@oracle.com>

* decl.c (grokfndecl): Add const cp_decl_specifier_seq* parameter;
tidy handling of a null location_t argument; use proper location
information in a few additional error messages.
(grokdeclarator): Update calls.

/testsuite
2018-06-20  Paolo Carlini  <paolo.carlini@oracle.com>

* g++.dg/template/friend65.C: New.
* g++.dg/cpp0x/main1.C: Likewise.
* g++.dg/other/main2.C: Likewise.
* g++.dg/other/main3.C: Likewise.
* g++.dg/template/friend42.C: Test location too.
* g++.dg/concepts/decl-diagnose.C: Likewise.
* g++.dg/warn/main-2.C: Update.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261816 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoUpdate OpenACC data clause semantics to the 2.5 behavior
cesar [Wed, 20 Jun 2018 16:35:15 +0000 (16:35 +0000)] 
Update OpenACC data clause semantics to the 2.5 behavior

gcc/c-family/
* c-pragma.h (enum pragma_omp_clause): Add
PRAGMA_OACC_CLAUSE_{FINALIZE,IF_PRESENT}. Remove
PRAGMA_OACC_CLAUSE_PRESENT_OR_{COPY,COPYIN,COPYOUT,CREATE}.

gcc/c/
* c-parser.c (c_parser_omp_clause_name): Add support for finalize
and if_present. Make present_or_{copy,copyin,copyout,create} aliases
to their non-present_or_* counterparts. Make 'self' an alias to
PRAGMA_OACC_CLAUSE_HOST.
(c_parser_oacc_data_clause): Update GOMP mappings for
PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
(c_parser_oacc_all_clauses): Handle finalize and if_present clauses.
Remove support for present_or_* clauses.
(OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
(OACC_PARALLEL_CLAUSE_MASK): Likewise.
(OACC_DECLARE_CLAUSE_MASK): Likewise.
(OACC_DATA_CLAUSE_MASK): Likewise.
(OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
(OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
(OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
(c_parser_oacc_declare): Remove PRESENT_OR_* clauses.
* c-typeck.c (c_finish_omp_clauses): Handle IF_PRESENT and FINALIZE.

gcc/cp/
* parser.c (cp_parser_omp_clause_name): Add support for finalize
and if_present. Make present_or_{copy,copyin,copyout,create} aliases
to their non-present_or_* counterparts. Make 'self' an alias to
PRAGMA_OACC_CLAUSE_HOST.
(cp_parser_oacc_data_clause): Update GOMP mappings for
PRAGMA_OACC_CLAUSE_{COPY,COPYIN,COPYOUT,CREATE,DELETE}. Remove
PRAGMA_OACC_CLAUSE_{SELF,PRESENT_OR_*}.
(cp_parser_oacc_all_clauses): Handle finalize and if_present clauses.
Remove support for present_or_* clauses.
(OACC_KERNELS_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
(OACC_PARALLEL_CLAUSE_MASK): Likewise.
(OACC_DECLARE_CLAUSE_MASK): Likewise.
(OACC_DATA_CLAUSE_MASK): Likewise.
(OACC_ENTER_DATA_CLAUSE_MASK): Remove PRESENT_OR_* clauses.
(OACC_EXIT_DATA_CLAUSE_MASK): Add FINALIZE clause.
(OACC_UPDATE_CLAUSE_MASK): Remove SELF, add IF_PRESENT.
(cp_parser_oacc_declare): Remove PRESENT_OR_* clauses.
* pt.c (tsubst_omp_clauses): Handle IF_PRESENT and FINALIZE.
* semantics.c (finish_omp_clauses): Handle IF_PRESENT and FINALIZE.

gcc/fortran/
* gfortran.h (gfc_omp_clauses): Add unsigned if_present, finalize
bitfields.
* openmp.c (enum omp_mask2): Remove OMP_CLAUSE_PRESENT_OR_*. Add
OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
(gfc_match_omp_clauses): Update handling of copy, copyin, copyout,
create, deviceptr, present_of_*. Add support for finalize and
if_present.
(OACC_PARALLEL_CLAUSES): Remove PRESENT_OR_* clauses.
(OACC_KERNELS_CLAUSES): Likewise.
(OACC_DATA_CLAUSES): Likewise.
(OACC_DECLARE_CLAUSES): Likewise.
(OACC_UPDATE_CLAUSES): Add IF_PRESENT clause.
(OACC_ENTER_DATA_CLAUSES): Remove PRESENT_OR_* clauses.
(OACC_EXIT_DATA_CLAUSES): Add FINALIZE clause.
(gfc_match_oacc_declare): Update to OpenACC 2.5 semantics.
* trans-openmp.c (gfc_trans_omp_clauses): Add support for IF_PRESENT
and FINALIZE.

gcc/
* gimplify.c (gimplify_scan_omp_clauses): Add support for
OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
(gimplify_adjust_omp_clauses): Likewise.
(gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
(gimplify_omp_target_update): Update handling of acc update and
enter/exit data.
* omp-low.c (install_var_field): Remove unused parameter
base_pointers_restrict.
(scan_sharing_clauses): Remove base_pointers_restrict parameter.
Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
FINALIZE}
(omp_target_base_pointers_restrict_p): Delete.
(scan_omp_target): Update call to scan_sharing_clauses.
* tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
FINALIZE}.
* tree-nested.c (convert_nonlocal_omp_clauses): Handle
OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
(convert_local_omp_clauses): Likewise.
* tree-pretty-print.c (dump_omp_clause): Likewise.
* tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
FINALIZE}.
(omp_clause_code_name): Likewise.

gcc/testsuite/
* c-c++-common/goacc/declare-1.c: Update test case to utilize OpenACC
2.5 data clause semantics.
* c-c++-common/goacc/declare-2.c: Likewise.
* c-c++-common/goacc/default-4.c: Likewise.
* c-c++-common/goacc/finalize-1.c: New test.
* c-c++-common/goacc/kernels-alias-2.c: Update test case to utilize
OpenACC 2.5 data clause semantics.
* c-c++-common/goacc/kernels-alias.c: Likewise.
* c-c++-common/goacc/routine-5.c: Likewise.
* c-c++-common/goacc/update-if_present-1.c: New test.
* c-c++-common/goacc/update-if_present-2.c: New test.
* g++.dg/goacc/template.C: Update test case to utilize OpenACC
2.5 data clause semantics.
* gfortran.dg/goacc/combined-directives.f90: Likewise.
* gfortran.dg/goacc/data-tree.f95: Likewise.
* gfortran.dg/goacc/declare-2.f95: Likewise.
* gfortran.dg/goacc/default-4.f: Likewise.
* gfortran.dg/goacc/enter-exit-data.f95: Likewise.
* gfortran.dg/goacc/finalize-1.f: New test.
* gfortran.dg/goacc/kernels-alias-2.f95: Update test case to utilize
OpenACC 2.5 data clause semantics.
* gfortran.dg/goacc/kernels-alias.f95: Likewise.
* gfortran.dg/goacc/kernels-tree.f95: Likewise.
* gfortran.dg/goacc/nested-function-1.f90: Likewise.
* gfortran.dg/goacc/parallel-tree.f95: Likewise.
* gfortran.dg/goacc/reduction-promotions.f90: Likewise.
* gfortran.dg/goacc/update-if_present-1.f90: New test.
* gfortran.dg/goacc/update-if_present-2.f90: New test.

libgomp/
* libgomp.h (struct splay_tree_key_s): Add dynamic_refcount member.
(gomp_acc_remove_pointer): Update declaration.
(gomp_acc_declare_allocate): Declare.
(gomp_remove_var): Declare.
* libgomp.map (OACC_2.5): Define.
* oacc-mem.c (acc_map_data): Update refcount.
(acc_unmap_data): Likewise.
(present_create_copy): Likewise.
(acc_create): Add FLAG_PRESENT when calling present_create_copy.
(acc_copyin): Likewise.
(FLAG_FINALIZE): Define.
(delete_copyout): Update dynamic refcounts, add support for FINALIZE.
(acc_delete_finalize): New function.
(acc_delete_finalize_async): New function.
(acc_copyout_finalize): New function.
(acc_copyout_finalize_async): New function.
(gomp_acc_insert_pointer): Update refcounts.
(gomp_acc_remove_pointer): Return if data is not present on the
accelerator.
* oacc-parallel.c (find_pset): Rename to find_pointer.
(find_pointer): Add support for GOMP_MAP_POINTER.
(handle_ftn_pointers): New function.
(GOACC_parallel_keyed): Update refcounts of variables.
(GOACC_enter_exit_data): Add support for finalized data mappings.
Add support for GOMP_MAP_{TO,ALLOC,RELESE,FROM}. Update handling
of fortran arrays.
(GOACC_update): Add support for GOMP_MAP_{ALWAYS_POINTER,TO,FROM}.
(GOACC_declare): Add support for GOMP_MAP_RELEASE, remove support
for GOMP_MAP_FORCE_FROM.
* openacc.f90 (module openacc_internal): Add
acc_copyout_finalize_{32_h,64_h,array_h,_l}, and
acc_delete_finalize_{32_h,64_h,array_h,_l}. Add interfaces for
acc_copyout_finalize and acc_delete_finalize.
(acc_copyout_finalize_32_h): New subroutine.
(acc_copyout_finalize_64_h): New subroutine.
(acc_copyout_finalize_array_h): New subroutine.
(acc_delete_finalize_32_h): New subroutine.
(acc_delete_finalize_64_h): New subroutine.
(acc_delete_finalize_array_h): New subroutine.
* openacc.h (acc_copyout_finalize): Declare.
(acc_copyout_finalize_async): Declare.
(acc_delete_finalize): Declare.
(acc_delete_finalize_async): Declare.
* openacc_lib.h (acc_copyout_finalize): New interface.
(acc_delete_finalize): New interface.
* target.c (gomp_map_vars): Update dynamic_refcount.
(gomp_remove_var): New function.
(gomp_unmap_vars): Use it.
(gomp_unload_image_from_device): Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-1.c: Update test
case to utilize OpenACC 2.5 data clause semantics.
* testsuite/libgomp.oacc-c-c++-common/data-already-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-3.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-4.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-5.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-6.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-7.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/data-already-8.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-16.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-25.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-32.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/lib-83.c: Likewise.
* testsuite/libgomp.oacc-fortran/data-5.f90: New test.
* testsuite/libgomp.oacc-fortran/data-already-1.f: Update test case to
utilize OpenACC 2.5 data clause semantics.
* testsuite/libgomp.oacc-fortran/data-already-2.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-3.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-4.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-5.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-6.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-7.f: Likewise.
* testsuite/libgomp.oacc-fortran/data-already-8.f: Likewise.
* testsuite/libgomp.oacc-fortran/lib-32-1.f: Likewise.
* testsuite/libgomp.oacc-fortran/lib-32-2.f: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261813 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR c++/86210
jakub [Wed, 20 Jun 2018 16:07:21 +0000 (16:07 +0000)] 
PR c++/86210
* c-common.c (check_nonnull_arg): Use fold_for_warn.  Adjust obsolete
comment.

* g++.dg/warn/Wnonnull4.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261811 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoAdd testcase accidentally not committed earlier
redi [Wed, 20 Jun 2018 15:54:57 +0000 (15:54 +0000)] 
Add testcase accidentally not committed earlier

* testsuite/20_util/duration/arithmetic/dr3050.cc: Add new test
missed from recent commit.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261810 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR c++/86240
mpolacek [Wed, 20 Jun 2018 15:46:02 +0000 (15:46 +0000)] 
PR c++/86240
* constexpr.c (cxx_eval_constant_expression): Handle ABSU_EXPR.
(fold_simple_1): Likewise.
* error.c (dump_expr): Likewise.

* g++.dg/pr86240.C: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261809 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR debug/86194
jakub [Wed, 20 Jun 2018 14:51:04 +0000 (14:51 +0000)] 
PR debug/86194
* var-tracking.c (use_narrower_mode_test): Check if shift amount can
be narrowed.

* gcc.target/i386/pr86194.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261807 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago PR tree-optimization/86231
jakub [Wed, 20 Jun 2018 14:47:28 +0000 (14:47 +0000)] 
PR tree-optimization/86231
* tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
anti-range don't overwrite *vr0min before using it to compute *vr0max.

* gcc.dg/tree-ssa/vrp119.c: New test.
* gcc.c-torture/execute/pr86231.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261805 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoGenerate correctly typed compare in canonicalize_loop_ivs
vries [Wed, 20 Jun 2018 14:44:45 +0000 (14:44 +0000)] 
Generate correctly typed compare in canonicalize_loop_ivs

2018-06-20  Tom de Vries  <tdevries@suse.de>

PR tree-optimization/86097
* tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
iv type if signedness of iv type is not the same as that of *nit.

* gcc.dg/autopar/pr86097.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261804 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
jakub [Wed, 20 Jun 2018 14:42:19 +0000 (14:42 +0000)] 
* cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
EDGE_EH edges, verify they are all EDGE_EH.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261803 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[PR c++/85634] Fix tsubst ICE
nathan [Wed, 20 Jun 2018 14:34:06 +0000 (14:34 +0000)] 
[PR c++/85634] Fix tsubst ICE

https://gcc.gnu.org/ml/gcc-patches/2018-06/msg01237.html
PR c++/85634
* cp-tree.h (lookup_keep): Drop KEEP parm.
(lookup_list_keep): Delete.
(maybe_get_fns): Declare.
* parser.c (cp_parser_primary_expression): Call lookup_keep here.
(cp_parser_template_id): Not here ...
* decl.c (cp_finish_decl): ... nor here ...
* init.c (build_raw_new_expr): ... nor here ...
* pt.c (process_template_parm): ... nor here ...
* semantics.c (perform_koenig_lookup): Call lookup_keep.
(finish_call_expr): Not here.
* tree.c (ovl_cache): Delete.
(ovl_make, ovl_copy): No cache.
(lookup_keep): Always keep.
(lookup_list_keep): Delete.
(maybe_get_fns): New, broken out of ...
(get_fns): ... here.  Call it.
(built_min_nt_loc, build_min, build_min_non_dep): Drop lookup_keep.
(build_min_nt_call_vec): Likewise.

PR c++/85634
* g++.dg/lookup/pr85634.C: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261802 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoRemove not longer valid FIXME comment.
marxin [Wed, 20 Jun 2018 10:01:18 +0000 (10:01 +0000)] 
Remove not longer valid FIXME comment.

2018-06-20  Martin Liska  <mliska@suse.cz>

* lto-symtab.c (lto_symtab_merge_p): Remove not valid
        FIXME comment.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261798 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
gerald [Wed, 20 Jun 2018 09:54:35 +0000 (09:54 +0000)] 
* ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261797 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[AArch64] Support for LDP/STP of Q-registers
ktkachov [Wed, 20 Jun 2018 08:57:17 +0000 (08:57 +0000)] 
[AArch64] Support for LDP/STP of Q-registers

This patch adds support for generating LDPs and STPs of Q-registers.
This allows for more compact code generation and makes better use of the ISA.

It's implemented in a straightforward way by allowing 16-byte modes in the
sched-fusion machinery and adding appropriate peepholes in aarch64-ldpstp.md
as well as the patterns themselves in aarch64-simd.md.

It adds a new no_ldp_stp_qregs tuning flag.
I use it to restrict the peepholes in aarch64-ldpstp.md from merging the
operations together into PARALLELs. I also use it to restrict the sched fusion
check that brings such loads and stores together. This is enough to avoid
forming the pairs when the tuning flag is set.

I didn't see any non-noise performance effect on SPEC2017 on Cortex-A72 and Cortex-A53.

        * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
        * config/aarch64/aarch64.c (xgene1_tunings): Add
        AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
        (aarch64_mode_valid_for_sched_fusion_p):
        Allow 16-byte modes.
        (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
        * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
        128-bit modes.
        * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
        New pattern.
        (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
        * config/aarch64/iterators.md (VQ2): New mode iterator.

        * gcc.target/aarch64/ldp_stp_q.c: New test.
        * gcc.target/aarch64/stp_vec_128_1.c: Likewise.
        * gcc.target/aarch64/ldp_stp_q_disable.c: Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261796 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoChange default for jump_table expansion ratio to 8.
marxin [Wed, 20 Jun 2018 08:52:55 +0000 (08:52 +0000)] 
Change default for jump_table expansion ratio to 8.

2018-06-20  Martin Liska  <mliska@suse.cz>

* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
        Change default ratio from 10 to 8.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261795 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoEnable clustering for switch statements.
marxin [Wed, 20 Jun 2018 08:52:35 +0000 (08:52 +0000)] 
Enable clustering for switch statements.

2018-06-20  Martin Liska  <mliska@suse.cz>

* tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
        New.
(bit_test_cluster::find_bit_tests): Likewise.
(switch_decision_tree::analyze_switch_statement): Find clusters.
* tree-switch-conversion.h (struct jump_table_cluster): Document
        hierarchy.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261794 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoSwitch other switch expansion methods into classes.
marxin [Wed, 20 Jun 2018 08:52:12 +0000 (08:52 +0000)] 
Switch other switch expansion methods into classes.

2018-06-20  Martin Liska  <mliska@suse.cz>

* tree-switch-conversion.c (switch_conversion::collect):
        Record m_uniq property.
(switch_conversion::expand): Bail out for special conditions.
(group_cluster::~group_cluster): New.
(group_cluster::group_cluster): Likewise.
(group_cluster::dump): Likewise.
(jump_table_cluster::emit): New.
(switch_decision_tree::fix_phi_operands_for_edges): New.
(struct case_node): Remove struct.
(jump_table_cluster::can_be_handled): New.
(case_values_threshold): Moved to header.
(reset_out_edges_aux): Likewise.
(jump_table_cluster::is_beneficial): New.
(bit_test_cluster::can_be_handled): Likewise.
(add_case_node): Remove.
(bit_test_cluster::is_beneficial): New.
(case_bit_test::cmp): New.
(bit_test_cluster::emit): New.
(expand_switch_as_decision_tree_p): Remove.
(bit_test_cluster::hoist_edge_and_branch_if_true): New.
(fix_phi_operands_for_edge): Likewise.
(switch_decision_tree::analyze_switch_statement): New.
(compute_cases_per_edge): Move ...
(switch_decision_tree::compute_cases_per_edge): ... here.
(try_switch_expansion): Likewise.
(switch_decision_tree::try_switch_expansion): Likewise.
(record_phi_operand_mapping): Likewise.
(switch_decision_tree::record_phi_operand_mapping): Likewise.
(emit_case_decision_tree): Likewise.
(switch_decision_tree::emit): Likewise.
(balance_case_nodes): Likewise.
(switch_decision_tree::balance_case_nodes): Likewise.
(dump_case_nodes): Likewise.
(switch_decision_tree::dump_case_nodes): Likewise.
(emit_jump): Likewise.
(switch_decision_tree::emit_jump): Likewise.
(emit_cmp_and_jump_insns): Likewise.
(switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
(emit_case_nodes): Likewise.
(switch_decision_tree::emit_case_nodes): Likewise.
(conditional_probability): Remove.
* tree-switch-conversion.h (enum cluster_type): New.
(PRINT_CASE): New.
(struct cluster): Likewise.
(cluster::cluster): Likewise.
(struct simple_cluster): Likewise.
(simple_cluster::simple_cluster): Likewise.
(struct group_cluster): Likewise.
(struct jump_table_cluster): Likewise.
(struct bit_test_cluster): Likewise.
(struct min_cluster_item): Likewise.
(struct case_tree_node): Likewise.
(case_tree_node::case_tree_node): Likewise.
(jump_table_cluster::case_values_threshold): Likewise.
(struct case_bit_test): Likewise.
(struct switch_decision_tree): Likewise.
(struct switch_conversion): Likewise.
(switch_decision_tree::reset_out_edges_aux): Likewise.
2018-06-20  Martin Liska  <mliska@suse.cz>

* gcc.dg/tree-ssa/vrp104.c: Grep just for GIMPLE IL.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261793 138bc75d-0d04-0410-961f-82ee72b054a4

7 years agoTransform switch_conversion into a class.
marxin [Wed, 20 Jun 2018 08:51:45 +0000 (08:51 +0000)] 
Transform switch_conversion into a class.

2018-06-20  Martin Liska  <mliska@suse.cz>

* tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
(hoist_edge_and_branch_if_true): Likewise.
(expand_switch_using_bit_tests_p): Likewise.
(struct case_bit_test): Likewise.
(case_bit_test_cmp): Likewise.
(emit_case_bit_tests): Likewise.
(switch_conversion::switch_conversion): New class.
(struct switch_conv_info): Remove old struct.
(collect_switch_conv_info): More to ...
(switch_conversion::collect): ... this.
(check_range): Likewise.
(switch_conversion::check_range): Likewise.
(check_all_empty_except_final): Likewise.
(switch_conversion::check_all_empty_except_final): Likewise.
(check_final_bb): Likewise.
(switch_conversion::check_final_bb): Likewise.
(create_temp_arrays): Likewise.
(switch_conversion::create_temp_arrays): Likewise.
(free_temp_arrays): Likewise.
(gather_default_values): Likewise.
(switch_conversion::gather_default_values): Likewise.
(build_constructors): Likewise.
(switch_conversion::build_constructors): Likewise.
(constructor_contains_same_values_p): Likewise.
(switch_conversion::contains_same_values_p): Likewise.
(array_value_type): Likewise.
(switch_conversion::array_value_type): Likewise.
(build_one_array): Likewise.
(switch_conversion::build_one_array): Likewise.
(build_arrays): Likewise.
(switch_conversion::build_arrays): Likewise.
(gen_def_assigns): Likewise.
(switch_conversion::gen_def_assigns): Likewise.
(prune_bbs): Likewise.
(switch_conversion::prune_bbs): Likewise.
(fix_phi_nodes): Likewise.
(switch_conversion::fix_phi_nodes): Likewise.
(gen_inbound_check): Likewise.
(switch_conversion::gen_inbound_check): Likewise.
(process_switch): Use the newly created class.
(switch_conversion::expand): New.
(switch_conversion::~switch_conversion): New.
* tree-switch-conversion.h: New file.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261792 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[8/n] PR85694: Make patterns check for target support
rsandifo [Wed, 20 Jun 2018 08:16:08 +0000 (08:16 +0000)] 
[8/n] PR85694: Make patterns check for target support

This patch makes pattern recognisers do their own checking for vector
types and target support.  Previously some recognisers did this
themselves and some left it to vect_pattern_recog_1.

Doing this means we can get rid of the type_in argument, which was
ignored if the recogniser did its own checking.  It also means
we create fewer junk statements.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
tree-vect-patterns.c.
* tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
(vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
(vect_recog_sad_pattern): Likewise.
(vect_recog_widen_sum_pattern): Likewise.
(vect_recog_pow_pattern): Likewise.  Check for a null vectype.
(vect_recog_widen_shift_pattern): Remove the type_in argument.
(vect_recog_rotate_pattern): Likewise.
(vect_recog_mult_pattern): Likewise.
(vect_recog_vector_vector_shift_pattern): Likewise.
(vect_recog_divmod_pattern): Likewise.
(vect_recog_mixed_size_cond_pattern): Likewise.
(vect_recog_bool_pattern): Likewise.
(vect_recog_mask_conversion_pattern): Likewise.
(vect_try_gather_scatter_pattern): Likewise.
(vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
(vect_recog_over_widening_pattern): Likewise.
(vect_recog_gather_scatter_pattern): Likewise.
(vect_recog_func_ptr): Move from tree-vectorizer.h
(vect_vect_recog_func_ptrs): Move further down the file.
(vect_recog_func): Likewise.  Remove the third argument.
(NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
(vect_pattern_recog_1): Expect the pattern function to do any
necessary target tests.  Also expect it to provide a vector type.
Remove the type_in handling.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261791 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[7/n] PR85694: Add a vect_pattern_detected helper
rsandifo [Wed, 20 Jun 2018 08:11:46 +0000 (08:11 +0000)] 
[7/n] PR85694: Add a vect_pattern_detected helper

This message is a long write-up for a patch that simply adds a common
routine for printing the "vector_foo_pattern: detected:" messages.

The reason for doing this is that some routines check for target support
themselves and some leave it to vect_pattern_recog_1.  Those that leave
it to vect_pattern_recog_1 currently print these "detected:" messages if
the statements have the right form, even if the pattern is eventually
discarded.  IMO that's useful, and a lot of existing scan tests rely on it.

However, a later patch makes patterns do their own testing, and stops
them creating pattern statements until the tests have passed.  This means
(a) they need to print the "detected:" message earlier and (b) the pattern
statement won't be around to print.

The patch therefore makes all routines print the original statement
rather than the pattern one.  That information isn't obvious otherwise,
whereas vect_pattern_recog_1 already prints the pattern statement
in the case of a successful match.  This also avoids the previous
situation in which a routine could print "detected:" and then
silently bail out before saying what had been detected.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-patterns.c (vect_pattern_detected): New function.
(vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
(vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
(vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
(vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
(vect_recog_mult_pattern, vect_recog_divmod_pattern)
(vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
(vect_recog_mask_conversion_pattern)
(vect_try_gather_scatter_pattern): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261790 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[6/n] PR85694: Add a vect_get_internal_def helper
rsandifo [Wed, 20 Jun 2018 08:09:48 +0000 (08:09 +0000)] 
[6/n] PR85694: Add a vect_get_internal_def helper

This patch adds a helper for pattern code that wants to find an
internal (vectorisable) definition of an SSA name.

A later patch will make more use of this, and alter the definition.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-patterns.c (vect_get_internal_def): New function.
(vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
(vect_recog_vector_vector_shift_pattern, check_bool_pattern)
(search_type_for_mask_1): Use it.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261789 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[5/n] PR85694: Remove dead WIDEN_SUM handling
rsandifo [Wed, 20 Jun 2018 08:08:21 +0000 (08:08 +0000)] 
[5/n] PR85694: Remove dead WIDEN_SUM handling

vect_recog_dot_prod_pattern and vect_recog_sad_pattern both checked
whether the statement passed in had already been recognised as a
WIDEN_SUM_EXPR pattern.  That isn't possible (any more?), since the
first recognised pattern wins, and since vect_recog_widen_sum_pattern
never matches a later statement than the one it's given.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
redundant WIDEN_SUM_EXPR handling.
(vect_recog_sad_pattern): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261788 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[4/n] PR85694: Remove redundant calls to types_compatible_p
rsandifo [Wed, 20 Jun 2018 08:07:37 +0000 (08:07 +0000)] 
[4/n] PR85694: Remove redundant calls to types_compatible_p

tree-vect-patterns.c checked that operands to primitive arithmetic ops
are compatible with each other and with the result.  The checks date
back years and have long been redundant with verify_gimple_stmt.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
(vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
(vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
(vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261787 138bc75d-0d04-0410-961f-82ee72b054a4

7 years ago[3/n] PR85694: Fix dummy assignment handling in vectorizable_call
rsandifo [Wed, 20 Jun 2018 08:06:33 +0000 (08:06 +0000)] 
[3/n] PR85694: Fix dummy assignment handling in vectorizable_call

vectorizable_call stubs out the original scalar statement with
a dummy assignment to the same lhs, so that we don't leave any bogus
scalar calls around.  If the call is actually a pattern statement,
the code rightly took the lhs of the original bb statement:

  if (is_pattern_stmt_p (stmt_info))
    lhs = gimple_call_lhs (STMT_VINFO_RELATED_STMT (stmt_info));
  else
    lhs = gimple_call_lhs (stmt);

But it then associated the new statement with the stmt_vec_info of the
pattern statement rather than the bb statement, which meant we had two
stmt_vec_infos assigning to the same lhs.  This seems to be latent at
the moment but caused problems further into the series.

2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* tree-vect-stmts.c (vectorizable_call): Make sure that we
use the stmt_vec_info of the original bb statement for the
new zero assignment, even if the call is part of a pattern.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@261786 138bc75d-0d04-0410-961f-82ee72b054a4