gcc.git
8 years agoFix C++ side of PR c/70436 (missing -Wparentheses warnings)
Patrick Palka [Wed, 6 Apr 2016 23:10:14 +0000 (23:10 +0000)]
Fix C++ side of PR c/70436 (missing -Wparentheses warnings)

gcc/cp/ChangeLog:

PR c/70436
* parser.c (cp_parser_iteration_statement): New parameter IF_P.
Pass it through to cp_parser_already_scoped_statement.
(cp_parser_already_scoped_statement): New parameter IF_P.  Pass
it through to cp_parser_statement.
(cp_parser_statement): Pass IF_P through to
cp_parser_iteration_statement.
(cp_parser_pragma): Adjust call to
cp_parser_iteration_statement.

gcc/testsuite/ChangeLog:

PR c/70436
* g++.dg/warn/Wparentheses-29.C: New test.

From-SVN: r234802

8 years agoFix new -Wparentheses warnings encountered during bootstrap
Patrick Palka [Wed, 6 Apr 2016 23:07:21 +0000 (23:07 +0000)]
Fix new -Wparentheses warnings encountered during bootstrap

gcc/ChangeLog:

PR c/70436
* gimplify.c (gimplify_omp_ordered): Add explicit braces to
resolve a future -Wparentheses warning.
* omp-low.c (scan_sharing_clauses): Likewise.
* tree-parloops.c (eliminate_local_variables): Likewise.

gcc/cp/ChangeLog:

PR c/70436
* cp-tree.h (FOR_EACH_CLONE): Restructure macro to avoid
potentially generating a future -Wparentheses warning in its
callers.

gcc/fortran/ChangeLog:

PR c/70436
* openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
future -Wparentheses warning.

gcc/testsuite/ChangeLog:

PR c/70436
* g++.dg/plugin/pragma_plugin.c (handle_pragma_sayhello): Add
explicit braces to resolve a future -Wparentheses warning.

From-SVN: r234801

8 years agore PR preprocessor/61817 (Inconsistent location of tokens in the expansion list of...
Richard Henderson [Wed, 6 Apr 2016 18:35:16 +0000 (11:35 -0700)]
re PR preprocessor/61817 (Inconsistent location of tokens in the expansion list of a built-in macro)

PR preprocessor/61817
PR preprocessor/69391

  * internal.h (_cpp_builtin_macro_text): Update decl.
  * macro.c (_cpp_builtin_macro_text): Accept location for __LINE__.
  (builtin_macro): Accept a second location for __LINE__.
  (enter_macro_context): Compute both virtual and real expansion
  locations for the macro.

  * gcc.dg/pr61817-1.c: New test.
  * gcc.dg/pr61817-2.c: New test.
  * gcc.dg/pr69391-1.c: New test.
  * gcc.dg/pr69391-2.c: New test.

From-SVN: r234794

8 years agore PR rtl-optimization/70398 (gcc.dg/vect/slp-multitypes-9.c FAILs with -fno-tree...
Vladimir Makarov [Wed, 6 Apr 2016 16:48:36 +0000 (16:48 +0000)]
re PR rtl-optimization/70398 (gcc.dg/vect/slp-multitypes-9.c FAILs with -fno-tree-loop-optimize -fno-tree-ter)

2016-04-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/70398
* lra-constraints.c (process_address_1): Check zero scale and code
for reloading with zero scale.

2016-04-06  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/70398
* testsuite/gcc.target/aarch64/pr70398.c: New.

From-SVN: r234792

8 years ago* class.c (check_abi_tags): Fix function template handling.
Jason Merrill [Wed, 6 Apr 2016 16:22:45 +0000 (12:22 -0400)]
* class.c (check_abi_tags): Fix function template handling.

From-SVN: r234790

8 years ago* gcc.c-torture/execute/20101011-1.c (__VISIUM__): Set DO_TEST to 0.
Eric Botcazou [Wed, 6 Apr 2016 15:28:18 +0000 (15:28 +0000)]
* gcc.c-torture/execute/20101011-1.c (__VISIUM__): Set DO_TEST to 0.

From-SVN: r234787

8 years agosse.md (shuffletype): Add V32HI and V4TI modes.
Uros Bizjak [Wed, 6 Apr 2016 15:09:37 +0000 (17:09 +0200)]
sse.md (shuffletype): Add V32HI and V4TI modes.

* config/i386/sse.md (shuffletype): Add V32HI and V4TI modes.
(ssescalarsize): Add V8SF, V4SF, V4DF and V2DF modes.

From-SVN: r234784

8 years agoMakefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
Eric Botcazou [Wed, 6 Apr 2016 15:07:49 +0000 (15:07 +0000)]
Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.

* src/Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
* src/Makefile.in: Regenerate.

From-SVN: r234782

8 years agoguality.h (main): Avoid GDB being blocked on signals.
Yvan Roux [Wed, 6 Apr 2016 15:07:10 +0000 (15:07 +0000)]
guality.h (main): Avoid GDB being blocked on signals.

2016-04-06  Yvan Roux  <yvan.roux@linaro.org>
    Pedro Alves  <palves@redhat.com>

* gcc.dg/guality/guality.h (main): Avoid GDB being blocked on signals.

Co-Authored-By: Pedro Alves <palves@redhat.com>
From-SVN: r234781

8 years agoi386.c (ix86_simd_clone_compute_vecsize_and_simdlen): Add support for AVX512F clones...
Jakub Jelinek [Wed, 6 Apr 2016 12:47:19 +0000 (14:47 +0200)]
i386.c (ix86_simd_clone_compute_vecsize_and_simdlen): Add support for AVX512F clones...

* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
Add support for AVX512F clones, include them by default for
exported OpenMP declare simd functions.  For AVX2 allow simdlen 32
and use it if charasteric type is 8-bit, for AVX512F allow simdlen
up to 128.

* lib/target-supports.exp (check_effective_target_vect_simd_clones):
Check for avx512f effective targets instead of avx2.
* gcc.dg/gomp/declare-simd-1.c: Add scan-assembler-times directives
for AVX512F clones.
* gcc.dg/gomp/declare-simd-3.c: Likewise.
* g++.dg/gomp/declare-simd-1.C: Likewise.
* g++.dg/gomp/declare-simd-3.C: Likewise.
* g++.dg/gomp/declare-simd-4.C: Likewise.

From-SVN: r234780

8 years agore PR middle-end/70550 (-Wuninitialized false positives in OpenMP code)
Jakub Jelinek [Wed, 6 Apr 2016 12:42:24 +0000 (14:42 +0200)]
re PR middle-end/70550 (-Wuninitialized false positives in OpenMP code)

PR middle-end/70550
* tree.h (OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT): Define.
* gimplify.c (gimplify_adjust_omp_clauses_1): Set it for implicit
firstprivate clauses.
* omp-low.c (lower_send_clauses): Set TREE_NO_WARNING for
OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT !by_ref vars in task contexts.
(lower_omp_target): Set TREE_NO_WARNING for
non-addressable possibly uninitialized vars which are copied into
addressable temporaries or copied for GOMP_MAP_FIRSTPRIVATE_INT.

* c-c++-common/gomp/pr70550-1.c: New test.
* c-c++-common/gomp/pr70550-2.c: New test.

From-SVN: r234779

8 years agoDaily bump.
GCC Administrator [Wed, 6 Apr 2016 00:16:14 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234771

8 years agore PR c++/70512 (ICE on valid code on x86_64-linux-gnu: canonical types differ for...
Nathan Sidwell [Tue, 5 Apr 2016 23:47:21 +0000 (23:47 +0000)]
re PR c++/70512 (ICE on valid code on x86_64-linux-gnu: canonical types differ for identical types)

PR c++/70512
* class.c (fixup_may_alias): New.
(fixup_attribute_variants): Call it.

* g++.dg/ext/attribute-may-alias-5.C: New.

From-SVN: r234768

8 years agopredicates.md (integer_store_memory_operand): Accept REG+D operands with a large...
John David Anglin [Tue, 5 Apr 2016 23:42:36 +0000 (23:42 +0000)]
predicates.md (integer_store_memory_operand): Accept REG+D operands with a large offset when reload_in_progress is true.

* config/pa/predicates.md (integer_store_memory_operand): Accept
REG+D operands with a large offset when reload_in_progress is true.
(floating_point_store_memory_operand): Likewise.

From-SVN: r234765

8 years agore PR c++/70336 (Incorrect Wconversion warning)
Jakub Jelinek [Tue, 5 Apr 2016 21:33:37 +0000 (23:33 +0200)]
re PR c++/70336 (Incorrect Wconversion warning)

PR c++/70336
* match.pd (nested int casts): Limit to GIMPLE.

* c-c++-common/pr70336.c: New test.
* gcc.dg/torture/builtin-isinf_sign-1.c (foo): Guard tests
no longer optimized away at -O0 with #ifndef __OPTIMIZE__.

From-SVN: r234764

8 years agore PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pur...
Jan Hubicka [Tue, 5 Apr 2016 20:58:56 +0000 (22:58 +0200)]
re PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pure_virtual)

PR ipa/66223
* ipa-devirt.c (maybe_record_node): Fix comment; use
SANITIZE_UNREACHABLE instead of SANITIZE_UNDEFINED.

* g++.dg/ipa/devirt-51.C: Use -fsanitize=unreachable.

From-SVN: r234762

8 years agoRestore atomic builtins usage in libstdc++-v3
Jonathan Wakely [Tue, 5 Apr 2016 19:03:46 +0000 (20:03 +0100)]
Restore atomic builtins usage in libstdc++-v3

PR libstdc++/70554
* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Don't test
__atomic_fetch_add for bool.
* configure: Regenerate.

From-SVN: r234761

8 years ago* testsuite/30_threads/thread/70503.cc: Require -static to work.
Jonathan Wakely [Tue, 5 Apr 2016 17:21:48 +0000 (18:21 +0100)]
* testsuite/30_threads/thread/70503.cc: Require -static to work.

From-SVN: r234757

8 years agore PR rtl-optimization/70542 (Wrong code with -O3 -mavx2.)
Jakub Jelinek [Tue, 5 Apr 2016 17:05:23 +0000 (19:05 +0200)]
re PR rtl-optimization/70542 (Wrong code with -O3 -mavx2.)

PR rtl-optimization/70542
* ree.c (add_removable_extension): For VECTOR_MODE_P punt
if there are any uses other than insn or debug insns.

* gcc.dg/torture/pr70542.c: New test.
* gcc.target/i386/avx2-pr70542.c: New test.

From-SVN: r234756

8 years agore PR tree-optimization/70509 (wrong code with extract from a v64qi)
Marc Glisse [Tue, 5 Apr 2016 17:01:52 +0000 (19:01 +0200)]
re PR tree-optimization/70509 (wrong code with extract from a v64qi)

PR tree-optimization/70509
* simplify-rtx.c (simplify_binary_operation_1) <case VEC_SELECT>:
Shift HOST_WIDE_INT_1U instead of 1.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r234755

8 years agore PR tree-optimization/70509 (wrong code with extract from a v64qi)
Zdenek Sojka [Tue, 5 Apr 2016 16:58:50 +0000 (18:58 +0200)]
re PR tree-optimization/70509 (wrong code with extract from a v64qi)

PR tree-optimization/70509
* tree-ssa-forwprop.c (simplify_bitfield_ref): Use bitsize_int instead
of the vector base type for index.

* gcc.target/i386/avx512bw-pr70509.c: New test.

From-SVN: r234754

8 years agoFix PR c++/70452 (regression in C++ parsing performance)
Patrick Palka [Tue, 5 Apr 2016 16:40:00 +0000 (16:40 +0000)]
Fix PR c++/70452 (regression in C++ parsing performance)

gcc/cp/ChangeLog:

PR c++/70452
* constexpr.c (struct fundef_copy): New struct.
(struct fundef_copies_table_t): New struct.
(fundef_copies_table): New static variable.
(maybe_initialize_fundef_copies_table): New static function.
(get_fundef_copy): New static function.
(save_fundef_copy): New static function.
(cxx_eval_call_expression): Use get_fundef_copy, and
save_fundef_copy.
(constexpr_call_table): Add "deletable" GTY marker.

gcc/testsuite/ChangeLog:

PR c++/70452
* g++.dg/ext/constexpr-vla4.C: New test.

From-SVN: r234753

8 years agore PR target/70510 (ICE: output_operand: invalid %-code with -mavx512bw -masm=intel...
Uros Bizjak [Tue, 5 Apr 2016 16:26:40 +0000 (18:26 +0200)]
re PR target/70510 (ICE: output_operand: invalid %-code with -mavx512bw -masm=intel when emitting vpbroatcast)

PR target/70510
* config/i386/sse.md (iptr): Add V64QI, V32HI, V16SI and V8DI modes.

testsuite/ChangeLog:

PR target/70510
* gcc.target/i386/pr70510.c: New test.

From-SVN: r234752

8 years agore PR middle-end/70526 (GCC 6 miscompiles Firefox JIT compiler)
Richard Biener [Tue, 5 Apr 2016 14:26:59 +0000 (14:26 +0000)]
re PR middle-end/70526 (GCC 6 miscompiles Firefox JIT compiler)

2016-04-05  Richard Biener  <rguenther@suse.de>

PR tree-optimization/70526
* tree-sra.c (build_ref_for_offset): Use prev_base to
extract the alias pointer type.

* g++.dg/torture/pr70526.C: New testcase.

From-SVN: r234749

8 years agodse.c (struct store_info): Remove alias_set member.
Richard Biener [Tue, 5 Apr 2016 14:25:35 +0000 (14:25 +0000)]
dse.c (struct store_info): Remove alias_set member.

2016-04-05  Richard Biener  <rguenther@suse.de>

* dse.c (struct store_info): Remove alias_set member.
(struct read_info_type): Likewise.
(clear_alias_group, clear_alias_mode_table, clear_alias_mode_holder,
spill_deleted, clear_alias_set_lookup): Remove.
(get_group_info): Remove dead base == NULL_RTX case.
(dse_step0): Remove initialization of removed variables.
(delete_dead_store_insn): Reomve alias set dumping.
(free_read_records): Remove alias_set handling.
(canon_address): Remove alias_set_out parameter.
(record_store): Remove spill_alias_set, it's always zero.
(check_mem_read_rtx): Likewise.
(dse_step2): Rename from ...
(dse_step2_nospill): ... this.  Adjust.
(scan_stores): Rename from ...
(scan_stores_nospill): ... this.
(scan_reads): Rename from ...
(scan_reads_nospill): ... this.
(scan_stores_spill, scan_reads_spill): Remove.
(dse_step3_scan): Remove for_spills argument which is always false.
(dse_step3): Likewise.
(dse_step5): Rename from ...
(dse_step5_nospill): ... this.  Remove alias_set handling.
(rest_of_handle_dse): Adjust.

From-SVN: r234748

8 years agoEnsure std::thread helpers have internal linkage
Jonathan Wakely [Tue, 5 Apr 2016 13:35:32 +0000 (14:35 +0100)]
Ensure std::thread helpers have internal linkage

PR libstdc++/70503
* src/c++11/thread.cc (execute_native_thread_routine,
execute_native_thread_routine_compat): Give internal linkage.
* testsuite/30_threads/thread/70503.cc: New test.

From-SVN: r234746

8 years agore PR libstdc++/70437 (Instantiation loop with pair and is_constructible)
Ville Voutilainen [Tue, 5 Apr 2016 11:31:30 +0000 (14:31 +0300)]
re PR libstdc++/70437 (Instantiation loop with pair and is_constructible)

  PR libstdc++/70437
  * include/bits/stl_pair.h (_ConstructiblePair,
_ImplicitlyConvertiblePair, _MoveConstructiblePair,
_ImplicitlyMoveConvertiblePair): Add shortcut conditions
for same-type cases.
* testsuite/20_util/pair/70437.cc: New.

From-SVN: r234743

8 years agore PR target/70525 (generating 'vpandn' without the mode suffix, gnu as fails to...
Jakub Jelinek [Tue, 5 Apr 2016 08:15:09 +0000 (10:15 +0200)]
re PR target/70525 (generating 'vpandn' without the mode suffix, gnu as fails to assemble (-mavx512bw))

PR target/70525
* config/i386/sse.md (*andnot<mode>3): Simplify assertions.
Use vpandn<ssemodesuffix> for V16SI/V8DImode, vpandnq for
V32HI/V64QImode, don't use <mask_operand3_1>, fix up formatting.
(*andnot<mode>3_mask): Remove insn with VI12_AVX512VL iterator.

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

From-SVN: r234739

8 years agore PR middle-end/70499 (internal compiler error: in make_ssa_name_fn, at tree-ssaname...
Richard Biener [Tue, 5 Apr 2016 08:05:06 +0000 (08:05 +0000)]
re PR middle-end/70499 (internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:266)

2016-04-05  Richard Biener  <rguenther@suse.de>

PR middle-end/70499
* gimplify-me.c (gimple_regimplify_operands): Do not rewrite
non-register type temporaries into SSA.

* g++.dg/torture/pr70499.C: New testcase.

From-SVN: r234738

8 years ago20030814-6.c: Fix testcase, disable FRE, remove XFAIL.
Richard Biener [Tue, 5 Apr 2016 07:23:49 +0000 (07:23 +0000)]
20030814-6.c: Fix testcase, disable FRE, remove XFAIL.

2016-04-05  Richard Biener  <rguenther@suse.de>

* gcc.dg/tree-ssa/20030814-6.c: Fix testcase, disable FRE,
remove XFAIL.

From-SVN: r234737

8 years agoRemove class cache_map and use ggc hash_maps instead (PR c++/70452)
Patrick Palka [Tue, 5 Apr 2016 01:20:00 +0000 (01:20 +0000)]
Remove class cache_map and use ggc hash_maps instead (PR c++/70452)

gcc/cp/ChangeLog:

PR c++/70452
* cp-tree.h (class cache_map): Remove.
* constexpr.c (cv_cache): Change type to
GTY((deletable)) hash_map<tree, tree> *.
(maybe_constant_value): Adjust following the change to cv_cache.
(clear_cv_cache): New static function.
(clear_cv_and_fold_caches): Use it.
* cp-gimplify.c (fold_cache): Change type to
GTY((deletable)) hash_map<tree, tree> *.
(clear_fold_cache): Adjust following the change to fold_cache.
(cp_fold): Likewise.

From-SVN: r234732

8 years agoDaily bump.
GCC Administrator [Tue, 5 Apr 2016 00:16:15 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234731

8 years agore PR target/67172 (i686-w64-mingw32 dwarf2 bootstrap fails with undefined reference...
Eric Botcazou [Mon, 4 Apr 2016 22:29:02 +0000 (22:29 +0000)]
re PR target/67172 (i686-w64-mingw32 dwarf2 bootstrap fails with undefined reference to __EH_FRAME_BEGIN__)

PR target/67172
* libgcc2.c (L__main): Undefine __LIBGCC_EH_FRAME_SECTION_NAME__ if
__MINGW32__ is defined.

From-SVN: r234727

8 years agoMAINTAINERS (Write After Approval): Add myself.
Bill Seurer [Mon, 4 Apr 2016 18:46:05 +0000 (18:46 +0000)]
MAINTAINERS (Write After Approval): Add myself.

2016-04-04  Bill Seurer  <seurer@linux.vnet.ibm.com>

* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r234724

8 years agore PR middle-end/70307 (ICE: in gimplify_expr, at gimplify.c:10915 on valid code)
Jakub Jelinek [Mon, 4 Apr 2016 17:20:53 +0000 (19:20 +0200)]
re PR middle-end/70307 (ICE: in gimplify_expr, at gimplify.c:10915 on valid code)

PR middle-end/70307
* gcc.dg/torture/pr70307.c: Add -Wno-psabi to dg-options.  Prune
rs6000 ABI warnings.

From-SVN: r234723

8 years agognattools: Clean config.cache (PR70173)
Segher Boessenkool [Mon, 4 Apr 2016 16:37:58 +0000 (18:37 +0200)]
gnattools: Clean config.cache (PR70173)

The config.cache file should be deleted by "make distclean", just like
config.log and config.status .  The directory itself is still not deleted
(just like the gotools and libcc1 directories).

gnattools/
PR bootstrap/70173
* Makefile.in (distclean): Also delete config.cache .

From-SVN: r234721

8 years agore PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pur...
Jan Hubicka [Mon, 4 Apr 2016 15:54:39 +0000 (17:54 +0200)]
re PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pure_virtual)

PR ipa/66223
* ipa-devirt.c (maybe_record_node): Do not optimize cxa_pure_virtual
calls when sanitizing.
(possible_polymorphic_call_target_p)" FIx formating.
* g++.dg/ipa/devirt-51.C: New testcase.

From-SVN: r234719

8 years agore PR middle-end/70457 (ICE (segfault) in gimple_expand_builtin_pow on powerpc64le...
Bill Schmidt [Mon, 4 Apr 2016 15:42:19 +0000 (15:42 +0000)]
re PR middle-end/70457 (ICE (segfault) in gimple_expand_builtin_pow on powerpc64le-linux-gnu)

[gcc]

2016-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
    Jakub Jelinek <jakub@redhat.com>

PR middle-end/70457
* tree-inline.c (estimate_num_insn): Use gimple_call_builtin_p
to ensure a call statement is compatible with a built-in's
prototype.
* tree-ssa-math-opts.c (pass_optimize_windening_mul::execute):
Likewise.

[gcc/testsuite]

2016-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
    Jakub Jelinek <jakub@redhat.com>

PR middle-end/70457
* gcc.dg/torture/pr70457.c: New.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r234716

8 years agore PR fortran/67538 (ICE with invalid source allocation)
Andre Vehreschild [Mon, 4 Apr 2016 10:32:32 +0000 (12:32 +0200)]
re PR fortran/67538 (ICE with invalid source allocation)

gcc/fortran/ChangeLog:

2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/67538
* resolve.c (resolve_allocate_expr): Emit error message when no
array spec and no array valued source= expression is given in an
F2008 allocate() for an array to allocate.

gcc/testsuite/ChangeLog:

2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/67538
* gfortran.dg/allocate_with_source_19.f08: New test.

From-SVN: r234714

8 years agore PR fortran/65795 (Segfault (invalid write) for ALLOCATE statement involving COARRAYS)
Andre Vehreschild [Mon, 4 Apr 2016 09:32:28 +0000 (11:32 +0200)]
re PR fortran/65795 (Segfault (invalid write) for ALLOCATE statement involving COARRAYS)

gcc/fortran/ChangeLog:

2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/65795
* trans-array.c (gfc_array_allocate): When the array is a coarray,
do not nullyfing its allocatable components in array_allocate, because
the nullify missed the array ref and nullifies the wrong component.
Cosmetics.

gcc/testsuite/ChangeLog:

2016-04-04  Andre Vehreschild  <vehre@gcc.gnu.org>

PR fortran/65795
* gfortran.dg/coarray_allocate_6.f08: New test.

From-SVN: r234710

8 years agore PR rtl-optimization/70484 (Wrong optimization with aliasing and access via char)
Richard Biener [Mon, 4 Apr 2016 09:30:16 +0000 (09:30 +0000)]
re PR rtl-optimization/70484 (Wrong optimization with aliasing and access via char)

2016-04-04  Richard Biener  <rguenther@suse.de>

PR rtl-optimization/70484
* rtl.h (canon_output_dependence): Declare.
* alias.c (canon_output_dependence): New function.
* dse.c (record_store): Use canon_output_dependence rather
than canon_true_dependence.

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

From-SVN: r234709

8 years agore PR lto/68881 (UNRESOLVED/FAIL: gcc.dg/lto/attr-weakref-1 -O2 -flto)
Jan Hubicka [Mon, 4 Apr 2016 09:26:29 +0000 (11:26 +0200)]
re PR lto/68881 (UNRESOLVED/FAIL: gcc.dg/lto/attr-weakref-1 -O2 -flto)

PR ipa/68881
* cgraph.h (symtab_node::copy_visibility_from): New function.
* symtab.c (symtab_node::copy_visibility_from): New function.
* ipa-visibility.c (optimize_weakref): New function.
(function_and_variable_visibility): Use it.

From-SVN: r234708

8 years agore PR hsa/70402 (HSA: SBR instruction can be undefined)
Martin Liska [Mon, 4 Apr 2016 08:46:51 +0000 (10:46 +0200)]
re PR hsa/70402 (HSA: SBR instruction can be undefined)

Fix PR hsa/70402

PR hsa/70402
* hsa-gen.c (gen_hsa_insns_for_switch_stmt): Guard index
value that is really in range handled by SBR instruction.
* hsa-brig.c (emit_switch_insn): Do not emit unconditional
jump.
* hsa-dump.c (dump_hsa_insn_1): Do not dump default BB.
* hsa.h (hsa_insn_sbr::m_default_bb): Remove field.

From-SVN: r234707

8 years agore PR middle-end/70307 (ICE: in gimplify_expr, at gimplify.c:10915 on valid code)
Marek Polacek [Mon, 4 Apr 2016 08:11:46 +0000 (08:11 +0000)]
re PR middle-end/70307 (ICE: in gimplify_expr, at gimplify.c:10915 on valid code)

PR c/70307
* c-fold.c (c_fully_fold_internal): Handle VEC_COND_EXPR.

* gcc.dg/torture/pr70307.c: New test.

From-SVN: r234706

8 years agoDaily bump.
GCC Administrator [Mon, 4 Apr 2016 00:16:16 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234705

8 years agore PR target/70416 ([SH]: error: 'asm' operand requires impossible reload when buildi...
Oleg Endo [Sun, 3 Apr 2016 12:50:54 +0000 (12:50 +0000)]
re PR target/70416 ([SH]: error: 'asm' operand requires impossible reload when building ruby2.3)

gcc/
PR target/70416
PR target/67391
* config/sh/sh.md (*addsi3): Allow pattern when reload_in_progress is
set, but not for SP_REG operands.

gcc/testsuite/
PR target/70416
PR target/67391
* gcc.target/sh/torture/pr70416.c: New.

From-SVN: r234702

8 years agoDaily bump.
GCC Administrator [Sun, 3 Apr 2016 00:16:17 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234701

8 years agoPR c++/67376 - [5/6 regression] Comparison with pointer to past-the-end
Martin Sebor [Sat, 2 Apr 2016 17:14:48 +0000 (17:14 +0000)]
PR c++/67376 - [5/6 regression] Comparison with pointer to past-the-end

PR c++/67376 - [5/6 regression] Comparison with pointer to past-the-end
        of array fails inside constant expression
PR c++/70170 - [6 regression] bogus not a constant expression error comparing
        pointer to array to null
PR c++/70172 - incorrect reinterpret_cast from integer to pointer error
        on invalid constexpr initialization
PR c++/70228 - insufficient detail in diagnostics for a constexpr out of bounds
        array subscript

gcc/testsuite/ChangeLog:
2016-04-02  Martin Sebor  <msebor@redhat.com>

        PR c++/67376
        PR c++/70170
        PR c++/70172
        PR c++/70228
        * g++.dg/cpp0x/constexpr-array-ptr10.C: New test.
        * g++.dg/cpp0x/constexpr-array-ptr9.C: New test.
        * g++.dg/cpp0x/constexpr-nullptr-1.C: New test.
        * g++.dg/cpp0x/constexpr-array5.C: Adjust text of expected diagnostic.
        * g++.dg/cpp0x/constexpr-string.C: Same.
        * g++.dg/cpp0x/constexpr-wstring2.C: Same.
        * g++.dg/cpp0x/pr65398.C: Same.
        * g++.dg/ext/constexpr-vla1.C: Same.
        * g++.dg/ext/constexpr-vla2.C: Same.
        * g++.dg/ext/constexpr-vla3.C: Same.
        * g++.dg/ubsan/pr63956.C: Same.

gcc/cp/ChangeLog:
2016-04-02  Martin Sebor  <msebor@redhat.com>

        PR c++/67376
        PR c++/70170
        PR c++/70172
        PR c++/70228
        * constexpr.c (diag_array_subscript): New function.
        (cxx_eval_array_reference): Detect out of bounds array indices.

gcc/ChangeLog:
2016-04-02  Martin Sebor  <msebor@redhat.com>

        PR c++/67376
        * fold-const.c (maybe_nonzero_address): New function.
        (fold_comparison): Call it.  Fold equality and relational
        expressions involving null pointers.
        (tree_single_nonzero_warnv_p): Call maybe_nonzero_address.

From-SVN: r234698

8 years agodecl.c (components_to_record): Restrict the previous change to fields with variable...
Eric Botcazou [Sat, 2 Apr 2016 08:56:19 +0000 (08:56 +0000)]
decl.c (components_to_record): Restrict the previous change to fields with variable size.

* gcc-interface/decl.c (components_to_record): Restrict the previous
change to fields with variable size.

From-SVN: r234696

8 years agore PR c++/70449 (ICE with -Wall on valid code on x86_64-linux-gnu in pp_string, at...
Jason Merrill [Sat, 2 Apr 2016 01:35:45 +0000 (21:35 -0400)]
re PR c++/70449 (ICE with -Wall on valid code on x86_64-linux-gnu in pp_string, at pretty-print.c:928)

PR c++/70449

PR c++/70344
* pt.c (instantiate_decl): A function isn't fully defined if
DECL_INITIAL is error_mark_node.
* constexpr.c (cxx_eval_call_expression): Likewise.

From-SVN: r234695

8 years agoruntime: Use atomic load for in entersyscall.
Ian Lance Taylor [Sat, 2 Apr 2016 00:47:53 +0000 (00:47 +0000)]
runtime: Use atomic load for in entersyscall.

    Reportedly fixes PPC64 deadlock.

    From a comment by Gabriel Russell.

    Fixes golang/go#15051.

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

From-SVN: r234694

8 years agoAdd missing ChangeLog entry for PR target/70439
H.J. Lu [Sat, 2 Apr 2016 00:24:44 +0000 (17:24 -0700)]
Add missing ChangeLog entry for PR target/70439

From-SVN: r234693

8 years agoAdd missing ChangeLog entry for PR testsuite/70364
H.J. Lu [Sat, 2 Apr 2016 00:18:41 +0000 (17:18 -0700)]
Add missing ChangeLog entry for PR testsuite/70364

From-SVN: r234692

8 years agoDaily bump.
GCC Administrator [Sat, 2 Apr 2016 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234691

8 years ago[AArch64] Fix SIMD predicate
Evandro Menezes [Fri, 1 Apr 2016 19:55:52 +0000 (19:55 +0000)]
[AArch64] Fix SIMD predicate

Fix the predicate "aarch64_simd_reg_or_zero" to correctly validate the
"Y" constraint (scalar FP 0.0 immediate).

* gcc/config/aarch64/predicates.md (aarch64_simd_reg_or_zero):
Add the "const_double" to the list of operand constraints.

From-SVN: r234685

8 years agore PR rtl-optimization/70467 (Useless "and [esp],-1" emitted on AND with uint64_t...
Jakub Jelinek [Fri, 1 Apr 2016 16:08:21 +0000 (18:08 +0200)]
re PR rtl-optimization/70467 (Useless "and [esp],-1" emitted on AND with uint64_t variable)

PR rtl-optimization/70467
* config/i386/i386.md (*add<dwi>3_doubleword, *sub<dwi>3_doubleword):
If low word of the last operand is 0, just emit addition/subtraction
for the high word.

* gcc.target/i386/pr70467-2.c: New test.

From-SVN: r234679

8 years agoPR70404 S/390: Fix insv expansion.
Andreas Krebbel [Fri, 1 Apr 2016 15:35:54 +0000 (15:35 +0000)]
PR70404 S/390: Fix insv expansion.

While the expander accepts general_operand as src operand the risbg
pattern only immediate_operand.  Unfortunately the expander called
force_reg only for VOIDmode constants missing things like
e.g. symbol_refs.  Fixed with the attached patch.

gcc/ChangeLog:

2016-04-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

PR target/70404
* config/s390/s390.c (s390_expand_insv): Check for everything
constant instead of just VOIDmode stuff.

From-SVN: r234678

8 years agore PR c++/70488 (ICE in tree.c:7345 triggered by warning of placement new too small...
Jakub Jelinek [Fri, 1 Apr 2016 15:27:11 +0000 (17:27 +0200)]
re PR c++/70488 (ICE in tree.c:7345 triggered by warning of placement new too small on VLA)

PR c++/70488
* init.c (warn_placement_new_too_small): Test whether
DECL_SIZE_UNIT or TYPE_SIZE_UNIT are integers that fit into uhwi.

* g++.dg/init/new47.C: New test.

Co-Authored-By: Marek Polacek <polacek@redhat.com>
From-SVN: r234676

8 years agore PR target/70496 (inadvertent change to ASM_APP_OFF for .arm / .thumb directives.)
Ramana Radhakrishnan [Fri, 1 Apr 2016 14:58:53 +0000 (14:58 +0000)]
re PR target/70496 (inadvertent change to ASM_APP_OFF for .arm / .thumb directives.)

Fix PR target/70496

While doing the unified asm rewrite - I inadvertently changed the
meaning of ASM_APP_OFF which causes failures when folks who know what
they are doing switch between arm and thumb states within a
function. The intent of the unified asm rewrite was not to affect any
inline assembler code in that it would remain in divided syntax by
default and switching back to unified asm in normal compiled code
after the inline assembler block. Thanks to Jim Wilson for pointing it
out on the linaro list.

Fixed thusly and a test is added. Tested arm-none-eabi cross and
applied.

Ramana

2016-04-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

PR target/70496
* config/arm/arm.h (ASM_APP_OFF): Handle TARGET_ARM
and TARGET_THUMB.

2016-04-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>

PR target/70496
* gcc.target/arm/pr70496.c: New test.

From-SVN: r234675

8 years ago* tree.def (TRY_CATCH_EXPR): Correct documentation.
Nathan Sidwell [Fri, 1 Apr 2016 12:57:52 +0000 (12:57 +0000)]
* tree.def (TRY_CATCH_EXPR): Correct documentation.

From-SVN: r234671

8 years agofix flubbed changelog
Nathan Sidwell [Fri, 1 Apr 2016 12:12:27 +0000 (12:12 +0000)]
fix flubbed changelog

From-SVN: r234668

8 years agore PR c++/68475 (ICE: in merge_exception_specifiers, at cp/typeck2.c:2115 with -fno...
Nathan Sidwell [Fri, 1 Apr 2016 12:10:17 +0000 (12:10 +0000)]
re PR c++/68475 (ICE: in merge_exception_specifiers, at cp/typeck2.c:2115 with -fno-exceptions on invalid code)

PR c++/68475
* decl.c (check_redeclaration_exception_specification): Check
regardless of -fno-exceptions.
* typeck2.c (merge_exception_specifiers): Relax assert by checking
flag_exceptions too.

* g++.dg/g++.dg/cpp0x/noexcept29.C: New.

From-SVN: r234667

8 years agore PR target/69890 (FAIL: gcc.target/i386/chkp-* on x86_64-apple-darwin15)
Ilya Enkovich [Fri, 1 Apr 2016 10:40:51 +0000 (10:40 +0000)]
re PR target/69890 (FAIL: gcc.target/i386/chkp-* on x86_64-apple-darwin15)

gcc/testsuite/

PR target/69890
* gcc.dg/strlenopt.h (memmove): New.
* gcc.target/i386/chkp-strlen-1.c: Include "../../gcc.dg/strlenopt.h"
instead of "string.h".
* gcc.target/i386/chkp-strlen-2.c: Likewise.
* gcc.target/i386/chkp-strlen-3.c: Likewise.
* gcc.target/i386/chkp-strlen-4.c: Likewise.
* gcc.target/i386/chkp-strlen-5.c: Likewise.
* gcc.target/i386/chkp-stropt-1.c: Likewise.
* gcc.target/i386/chkp-stropt-10.c: Likewise.
* gcc.target/i386/chkp-stropt-11.c: Likewise.
* gcc.target/i386/chkp-stropt-12.c: Likewise.
* gcc.target/i386/chkp-stropt-13.c: Likewise.
* gcc.target/i386/chkp-stropt-14.c: Likewise.
* gcc.target/i386/chkp-stropt-15.c: Likewise.
* gcc.target/i386/chkp-stropt-16.c: Likewise.
* gcc.target/i386/chkp-stropt-2.c: Likewise.
* gcc.target/i386/chkp-stropt-3.c: Likewise.
* gcc.target/i386/chkp-stropt-4.c: Likewise.
* gcc.target/i386/chkp-stropt-5.c: Likewise.
* gcc.target/i386/chkp-stropt-6.c: Likewise.
* gcc.target/i386/chkp-stropt-7.c: Likewise.
* gcc.target/i386/chkp-stropt-8.c: Likewise.
* gcc.target/i386/chkp-stropt-9.c: Likewise.

From-SVN: r234666

8 years agoDaily bump.
GCC Administrator [Fri, 1 Apr 2016 00:16:13 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234661

8 years agoFix g++.dg/template/ptrmem30.C with Solaris ld
Rainer Orth [Thu, 31 Mar 2016 20:06:38 +0000 (20:06 +0000)]
Fix g++.dg/template/ptrmem30.C with Solaris ld

* g++.dg/template/ptrmem30.C (read): Rename to data_read.
(Holder::foo): Reflect this.

From-SVN: r234652

8 years agore PR rtl-optimization/70461 (Performance regression after r234527)
Vladimir Makarov [Thu, 31 Mar 2016 17:51:13 +0000 (17:51 +0000)]
re PR rtl-optimization/70461 (Performance regression after r234527)

2016-03-31  Vladimir Makarov  <vmakarov@redhat.com>

PR rtl-optimization/70461
* ira-color.c (allocno_copy_cost_saving): Use allocno class if it
is necessary.

From-SVN: r234649

8 years agore PR hsa/70399 (HSA: Wrong emission of st_align(4)_u8 HSAIL insn)
Martin Liska [Thu, 31 Mar 2016 17:28:29 +0000 (19:28 +0200)]
re PR hsa/70399 (HSA:  Wrong emission of st_align(4)_u8 HSAIL insn)

Fix PR hsa/70399

PR hsa/70399
* hsa-brig.c (hsa_op_immed::emit_to_buffer): Emit either
a tree value or an immediate integer value to a buffer
that is eventually copied to a BRIG section.
(emit_immediate_operand): Call the function here.
* hsa-dump.c (dump_hsa_immed): Remove checking assert.
* hsa-gen.c (hsa_op_immed::hsa_op_immed): Remove initialization
of class' fields that are removed.
(hsa_op_immed::~hsa_op_immed): Remove deinitialization.
* hsa.h (class hsa_op_immed): Remove m_brig_repr and
m_brig_repr_size fields.

From-SVN: r234647

8 years agoAdd BZ markers to last commit
Jeff Law [Thu, 31 Mar 2016 17:23:21 +0000 (11:23 -0600)]
Add BZ markers to last commit

From-SVN: r234646

8 years agocplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing btypevec/ktypevec.
Mikhail Maltsev [Thu, 31 Mar 2016 17:20:53 +0000 (17:20 +0000)]
cplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing btypevec/ktypevec.

* cplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing
btypevec/ktypevec.
* testsuite/demangle-expected: Add coverage tests.

From-SVN: r234645

8 years agoHSA: handle alignment of string builtins (PR hsa/70391)
Martin Liska [Thu, 31 Mar 2016 17:10:48 +0000 (19:10 +0200)]
HSA: handle alignment of string builtins (PR hsa/70391)

PR hsa/70391
* hsa-gen.c (hsa_function_representation::update_dominance): New
function.
(convert_addr_to_flat_segment): Likewise.
(gen_hsa_memory_set): New alignment argument.
(gen_hsa_ctor_assignment): Likewise.
(gen_hsa_insns_for_single_assignment): Provide alignment
to gen_hsa_ctor_assignment.
(gen_hsa_insns_for_direct_call): Add new argument.
(expand_lhs_of_string_op): New function.
(expand_string_operation_builtin): Likewise.
(expand_memory_copy): New function.
(expand_memory_set): New function.
(gen_hsa_insns_for_call): Use HOST_WIDE_INT.
(convert_switch_statements): Change signature.
(generate_hsa): Use a return value of the function.
(pass_gen_hsail::execute): Do not call
convert_switch_statements here.
* hsa-regalloc.c (hsa_regalloc): Call update_dominance.
* hsa.h (hsa_function_representation::m_modified_cfg):
New flag.
(hsa_function_representation::update_dominance): New function.

From-SVN: r234644

8 years agoHSA: support alignment for hsa_symbols (PR hsa/70391)
Martin Liska [Thu, 31 Mar 2016 17:10:15 +0000 (19:10 +0200)]
HSA: support alignment for hsa_symbols (PR hsa/70391)

PR hsa/70391
* hsa-brig.c (emit_directive_variable): Emit alignment
according to hsa_symbol::m_align.
* hsa-dump.c (hsa_byte_alignment): Move the function to
another file.
(dump_hsa_symbol): Dump alignment of HSA symbols.
* hsa-gen.c (get_symbol_for_decl): Set-up alignment
of a symbol.
(gen_hsa_addr_with_align): New function.
(hsa_bitmemref_alignment): Use newly added function.
(gen_hsa_insns_for_load): Likewise.
(gen_hsa_insns_for_store): Likewise.
(gen_hsa_memory_copy): New argument added.
(gen_hsa_insns_for_single_assignment): Respect
alignment for assignments processed via
gen_hsa_memory_copy.
(gen_hsa_insns_for_direct_call): Likewise.
(gen_hsa_insns_for_return): Likewise.
(gen_function_def_parameters): Set default
alignment.
* hsa.c (hsa_object_alignment): New function.
(hsa_byte_alignment): Pasted function.
* hsa.h (hsa_symbol::m_align): New field.

From-SVN: r234643

8 years agodecl.c (start_preparsed_function): Remove unnecessary bracing.
Nathan Sidwell [Thu, 31 Mar 2016 16:18:27 +0000 (16:18 +0000)]
decl.c (start_preparsed_function): Remove unnecessary bracing.

* decl.c (start_preparsed_function): Remove unnecessary bracing.
(finish_destructor_body): Don't emit operator delete here.

From-SVN: r234640

8 years agotree-ssa-loop-ivopts.c (get_computation_cost_at): Initialize scratch field for goto...
Bin Cheng [Thu, 31 Mar 2016 16:17:44 +0000 (16:17 +0000)]
tree-ssa-loop-ivopts.c (get_computation_cost_at): Initialize scratch field for goto case.

* tree-ssa-loop-ivopts.c (get_computation_cost_at): Initialize
scratch field for goto case.

From-SVN: r234639

8 years ago[Patch ARM] Delete ASM_OUTPUT_DEF and fall back to default .set directive
James Greenhalgh [Thu, 31 Mar 2016 15:48:47 +0000 (15:48 +0000)]
[Patch ARM] Delete ASM_OUTPUT_DEF and fall back to default .set directive

gcc/

* config/arm/linux-elf.h (ASM_OUTPUT_DEF): Delete.

From-SVN: r234638

8 years agore PR target/70442 (gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in...
Ilya Enkovich [Thu, 31 Mar 2016 15:37:12 +0000 (15:37 +0000)]
re PR target/70442 (gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "extract_insn")

gcc/

PR target/70442
* config/i386/i386.c (scalar_chain::convert_op): Fix
description.
(scalar_chain::convert_insn): Call convert_op for reg
moves to handle undefined registers.

gcc/testsuite/

PR target/70442
* gcc.dg/pr70442.c: New test.

From-SVN: r234637

8 years agore PR c++/70393 (Miscompilation: missing constructor call for static object)
Nathan Sidwell [Thu, 31 Mar 2016 15:30:33 +0000 (15:30 +0000)]
re PR c++/70393 (Miscompilation: missing constructor call for static object)

PR c++/70393
* varasm.c (output_constructor_regular_field): Flush bitfield
earlier.  Assert we don't want to move backwards.

cp/
* constexpr.c (cxx_eval_store_expression): Keep CONSTRUCTOR
elements in field order.

testsuite/
* g++.dg/cpp0x/constexpr-virtual6.C: New.

From-SVN: r234636

8 years agore PR target/70453 (gcc generates invalid instruction vextractu64x4 (should be: vextr...
Kirill Yukhin [Thu, 31 Mar 2016 15:23:29 +0000 (15:23 +0000)]
re PR target/70453 (gcc generates invalid instruction vextractu64x4 (should be: vextracti64x4))

Fix PR target/70453.

gcc/
* config/i386/sse.md (define_mode_attr shuffletype): Fix typo.

gcc/testsuite/
* gcc.target/i386/pr70453.c: New test.

From-SVN: r234634

8 years agore PR target/70292 (ICE in verify_target_availability, at sel-sched.c:1584 with ...
Andrey Belevantsev [Thu, 31 Mar 2016 14:37:08 +0000 (17:37 +0300)]
re PR target/70292 (ICE in verify_target_availability, at sel-sched.c:1584 with -fno-inline -fno-dce -fschedule-insns -fselective-scheduling -fno-tree-dce -O1)

        PR target/70292
        * gcc.c-torture/pr70292.c: New test.

From-SVN: r234627

8 years agore PR c/70297 (GCC Segfaults when using -g3)
Marek Polacek [Thu, 31 Mar 2016 14:29:15 +0000 (14:29 +0000)]
re PR c/70297 (GCC Segfaults when using -g3)

PR c/70297
* c-decl.c (merge_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.

* decl.c (duplicate_decls): Also set TYPE_ALIGN and TYPE_USER_ALIGN.

* c-c++-common/pr70297.c: New test.
* g++.dg/cpp0x/typedef-redecl.C: New test.
* gcc.dg/typedef-redecl2.c: New test.

From-SVN: r234626

8 years agore PR rtl-optimization/70460 (Miscompilation of glibc on i686-linux starting with...
Jakub Jelinek [Thu, 31 Mar 2016 13:00:52 +0000 (15:00 +0200)]
re PR rtl-optimization/70460 (Miscompilation of glibc on i686-linux starting with r234101)

PR rtl-optimization/70460
* ira.c (indirect_jump_optimize): Don't substitute LABEL_REF
with operand from REG_LABEL_OPERAND, instead substitute
SET_SRC or REG_EQUAL note content if it is a LABEL_REF.
Don't do anything for REG_NON_LOCAL_GOTO jumps.

* gcc.c-torture/execute/pr70460.c: New test.

From-SVN: r234614

8 years agoDo not call todo_after for a discarded function
Martin Liska [Thu, 31 Mar 2016 10:42:55 +0000 (12:42 +0200)]
Do not call todo_after for a discarded function

* passes.c (execute_one_pass): Do not call
todo_after for a discarded function.

From-SVN: r234613

8 years agotree-ssa-loop-ivopts.c (struct comp_cost): New scrach field.
Bin Cheng [Thu, 31 Mar 2016 08:57:13 +0000 (08:57 +0000)]
tree-ssa-loop-ivopts.c (struct comp_cost): New scrach field.

* tree-ssa-loop-ivopts.c (struct comp_cost): New scrach field.
(no_cost, infinite_cost): Initialize the new field.
(get_computation_cost_at): Record setup cost.
(determine_use_iv_cost_address): Skip cost computation for sub
uses if we can estimate it without losing accuracy.

From-SVN: r234612

8 years agore PR c++/70430 (Incorrect result for logical "and" operation with mixed vector and...
Richard Biener [Thu, 31 Mar 2016 08:49:09 +0000 (08:49 +0000)]
re PR c++/70430 (Incorrect result for logical "and" operation with mixed vector and scalar)

2016-03-31  Richard Biener  <rguenther@suse.de>

PR c++/70430
* typeck.c (cp_build_binary_op): Fix operand order of vector
conditional in truth op handling.

* g++.dg/ext/vector30.C: New testcase.

From-SVN: r234611

8 years agoDaily bump.
GCC Administrator [Thu, 31 Mar 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234607

8 years ago[multiple changes]
Dominique d'Humieres [Wed, 30 Mar 2016 20:47:45 +0000 (22:47 +0200)]
[multiple changes]

2016-03-30  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
    Dominique d'Humieres  <dominiq@lps.ens.fr>

PR libgfortran/70235
* io/write_float.def: Fix PF format for negative values of the scale
factor.

2016-03-30  Dominique d'Humieres  <dominiq@lps.ens.fr>
    Jerry DeLisle  <jvdelisle@gcc.gnu.org>

* gfortran.dg/fmt_pf.f90: New test.

From-SVN: r234600

8 years ago* da.po: Update.
Joseph Myers [Wed, 30 Mar 2016 17:52:59 +0000 (18:52 +0100)]
* da.po: Update.

From-SVN: r234588

8 years agoForward-port gcc.target/i386/avx-vextractf128-256-5.c from 5 branch (PR testsuite...
Rainer Orth [Wed, 30 Mar 2016 17:08:08 +0000 (17:08 +0000)]
Forward-port gcc.target/i386/avx-vextractf128-256-5.c from 5 branch (PR testsuite/70356)

Forward-port from 5 branch
2016-03-30  Jakub Jelinek  <jakub@redhat.com>

PR testsuite/70356
* gcc.target/i386/avx-vextractf128-256-5.c: Move
dg-require-effective-target after dg-do.

2015-12-30  Kirill Yukhin  <kirill.yukhin@intel.com>

* gcc.target/i386/avx-vextractf128-256-5.c: New test.

From-SVN: r234580

8 years agoUpdate OpenACC test cases
Thomas Schwinge [Wed, 30 Mar 2016 15:08:47 +0000 (17:08 +0200)]
Update OpenACC test cases

gcc/testsuite/
* c-c++-common/goacc/combined-directives.c: Clean up dg-*
directives.
* c-c++-common/goacc/loop-clauses.c: Likewise.
* g++.dg/goacc/template.C: Likewise.
* gfortran.dg/goacc/combined-directives.f90: Likewise.
* gfortran.dg/goacc/loop-1.f95: Likewise.
* gfortran.dg/goacc/loop-5.f95: Likewise.
* gfortran.dg/goacc/loop-6.f95: Likewise.
* gfortran.dg/goacc/loop-tree-1.f90: Likewise.
* c-c++-common/goacc-gomp/nesting-1.c: Update.
* c-c++-common/goacc-gomp/nesting-fail-1.c: Likewise.
* c-c++-common/goacc/clauses-fail.c: Likewise.
* c-c++-common/goacc/parallel-1.c: Likewise.
* c-c++-common/goacc/reduction-1.c: Likewise.
* c-c++-common/goacc/reduction-2.c: Likewise.
* c-c++-common/goacc/reduction-3.c: Likewise.
* c-c++-common/goacc/reduction-4.c: Likewise.
* c-c++-common/goacc/routine-3.c: Likewise.
* c-c++-common/goacc/routine-4.c: Likewise.
* c-c++-common/goacc/routine-5.c: Likewise.
* c-c++-common/goacc/tile.c: Likewise.
* g++.dg/goacc/template.C: Likewise.
* gfortran.dg/goacc/combined-directives.f90: Likewise.
* c-c++-common/goacc/nesting-1.c: Move dg-error test cases into...
* c-c++-common/goacc/nesting-fail-1.c: ... this file.  Update.
* c-c++-common/goacc/kernels-1.c: Update.  Incorporate...
* c-c++-common/goacc/kernels-empty.c: ... this file, and...
* c-c++-common/goacc/kernels-eternal.c: ... this file, and...
* c-c++-common/goacc/kernels-noreturn.c: ... this file.
* c-c++-common/goacc/host_data-1.c: New file.  Incorporate...
* c-c++-common/goacc/use_device-1.c: ... this file.
* c-c++-common/goacc/host_data-2.c: New file.  Incorporate...
* c-c++-common/goacc/host_data-5.c: ... this file, and...
* c-c++-common/goacc/host_data-6.c: ... this file.
* c-c++-common/goacc/loop-2-kernels.c: New file.
* c-c++-common/goacc/loop-2-parallel.c: Likewise.
* c-c++-common/goacc/loop-3.c: Likewise.
* g++.dg/goacc/reference.C: Likewise.
* g++.dg/goacc/routine-1.C: Likewise.
* g++.dg/goacc/routine-2.C: Likewise.
libgomp/
* testsuite/libgomp.oacc-c-c++-common/clauses-1.c: Update.
* testsuite/libgomp.oacc-c-c++-common/deviceptr-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/if-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/vector-loop.c: Likewise.
* testsuite/libgomp.oacc-fortran/asyncwait-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/asyncwait-2.f90: Likewise.
* testsuite/libgomp.oacc-fortran/asyncwait-3.f90: Likewise.
* testsuite/libgomp.oacc-fortran/declare-1.f90: Likewise.
* testsuite/libgomp.oacc-c-c++-common/asyncwait-1.c: Likewise.
XFAIL.
* testsuite/libgomp.oacc-c-c++-common/firstprivate-1.c: Update.
Incorporate...
* testsuite/libgomp.oacc-c-c++-common/firstprivate-2.c: ... this
file.
* testsuite/libgomp.oacc-c++/template-reduction.C: New file.
* testsuite/libgomp.oacc-c-c++-common/gang-static-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/gang-static-2.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-loop-clauses.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/private-variables.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/reduction-7.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/routine-1.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/routine-4.c: Likewise.
* testsuite/libgomp.oacc-c-c++-common/routine-wv-2.c: Likewise.
* testsuite/libgomp.oacc-fortran/clauses-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/default-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/firstprivate-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/gang-static-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/if-1.f90: Likewise.
* testsuite/libgomp.oacc-fortran/implicit-firstprivate-ref.f90:
Likewise.
* testsuite/libgomp.oacc-fortran/pr68813.f90: Likewise.
* testsuite/libgomp.oacc-fortran/private-variables.f90: Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-1.c: Merge this
file...
* testsuite/libgomp.oacc-c-c++-common/parallel-1.c: ..., and this
file into...
* testsuite/libgomp.oacc-c-c++-common/data-clauses.h: ... this new
file.  Update.
* testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels.c: New
file.
* testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel.c:
Likewise.
* testsuite/libgomp.oacc-c-c++-common/kernels-2.c: Rename to...
* testsuite/libgomp.oacc-c-c++-common/data-clauses-kernels-ipa-pta.c:
... this new file.  Update.
* testsuite/libgomp.oacc-c-c++-common/parallel-2.c: Rename to...
* testsuite/libgomp.oacc-c-c++-common/data-clauses-parallel-ipa-pta.c:
... this new file.  Update.
* testsuite/libgomp.oacc-c-c++-common/mode-transitions.c: New
file.  Incorporate...
* testsuite/libgomp.oacc-c-c++-common/worker-single-1a.c: ... this
file, and...
* testsuite/libgomp.oacc-c-c++-common/worker-single-4.c: ... this
file, and...
* testsuite/libgomp.oacc-c-c++-common/worker-single-6.c: ... this
file.
* testsuite/libgomp.oacc-c-c++-common/update-1-2.c: Remove file.

Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com>
Co-Authored-By: James Norris <jnorris@codesourcery.com>
Co-Authored-By: Julian Brown <julian@codesourcery.com>
Co-Authored-By: Nathan Sidwell <nathan@codesourcery.com>
Co-Authored-By: Tom de Vries <tom@codesourcery.com>
From-SVN: r234575

8 years agotree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic estimates here.
Jan Hubicka [Wed, 30 Mar 2016 14:30:57 +0000 (16:30 +0200)]
tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic estimates here.

* tree-ssa-loop-niter.c (idx_infer_loop_bounds): We can't get realistic
estimates here.
* tree-ssa-loop-unswitch.c (tree_unswitch_single_loop): Use also
max_loop_iterations_int.
(tree_unswitch_outer_loop): Likewise.
* tree-ssa-loop-ivopts.c (avg_loop_niter): Likewise.
* tree-vect-loop.c (vect_analyze_loop_2): Likewise.

From-SVN: r234572

8 years agore PR target/70450 (Wrong code with -O0 and -O1.)
Richard Biener [Wed, 30 Mar 2016 14:18:28 +0000 (14:18 +0000)]
re PR target/70450 (Wrong code with -O0 and -O1.)

2016-03-30  Richard Biener  <rguenther@suse.de>

PR middle-end/70450
* fold-const.c (extract_muldiv_1): Fix thinko in wide_int::from
usage.

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

From-SVN: r234571

8 years agore PR target/70421 (wrong code with v16si vector and useless cast at -O -mavx512f)
Jakub Jelinek [Wed, 30 Mar 2016 14:06:51 +0000 (16:06 +0200)]
re PR target/70421 (wrong code with v16si vector and useless cast at -O -mavx512f)

PR target/70421
* config/i386/i386.c (ix86_expand_vector_set): Fix up argument order
in gen_blendm expander.

* gcc.dg/torture/pr70421.c: New test.
* gcc.target/i386/avx512f-pr70421.c: New test.

From-SVN: r234569

8 years agore PR target/62254 (gcc-4.9 ICEs on linux kernel zlib for armv3)
Nick Clifton [Wed, 30 Mar 2016 12:48:42 +0000 (12:48 +0000)]
re PR target/62254 (gcc-4.9 ICEs on linux kernel zlib for armv3)

PR target/62254
* config/arm/arm.c (arm_reload_out_hi): Add code to handle the
case where we are already provided with an SImode SUBREG.

From-SVN: r234568

8 years agoProperly check conflict between DRAP register and __builtin_eh_return
H.J. Lu [Wed, 30 Mar 2016 12:38:36 +0000 (05:38 -0700)]
Properly check conflict between DRAP register and __builtin_eh_return

Since %ecx can't be used for both DRAP register and __builtin_eh_return,
we need to check if crtl->drap_reg uses %ecx before using %ecx for
__builtin_eh_return.

PR target/70439
* config/i386/i386.c (ix86_expand_epilogue): Properly check
conflict between DRAP register and __builtin_eh_return.

From-SVN: r234559

8 years agoProperly align stack in gcc.target/i386/cleanup-[12].c
H.J. Lu [Wed, 30 Mar 2016 12:37:37 +0000 (05:37 -0700)]
Properly align stack in gcc.target/i386/cleanup-[12].c

PR testsuite/70364
* gcc.target/i386/cleanup-1.c: Include <stddef.h>.
(check): New function.
(bar): Call check.
(foo): Align stack to 16 bytes when calling bar.
* gcc.target/i386/cleanup-2.c: Likewise.

From-SVN: r234557

8 years agore PR middle-end/12392 (very long optimized compile)
Michael Matz [Wed, 30 Mar 2016 07:47:40 +0000 (07:47 +0000)]
re PR middle-end/12392 (very long optimized compile)

2016-03-30  Michael Matz  <matz@suse.de>
Richard Biener  <rguenther@suse.de>

PR ipa/12392
* ipa-polymorphic-call.c (struct type_change_info): Change
speculative to an unsigned allowing to limit the work we do.
(csftc_abort_walking_p): New inline function..
(check_stmt_for_type_change): Limit the number of may-defs
skipped for speculative devirtualization to
max-speculative-devirt-maydefs.
* params.def (max-speculative-devirt-maydefs): New param.
* doc/invoke.texi (--param max-speculative-devirt-maydefs): Document.

Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r234546

8 years agore PR target/63890 (Compiling trivial program with -O -p leads to misaligned stack)
Mike Stump [Wed, 30 Mar 2016 03:57:30 +0000 (03:57 +0000)]
re PR target/63890 (Compiling trivial program with -O -p leads to misaligned stack)

PR target/63890
* config/i386/i386.h (ACCUMULATE_OUTGOING_ARGS): Use when profiling
and TARGET_MACHO.

* tree-vrp.c (register_edge_assert_for_2): For NAME != CST1

From-SVN: r234545

8 years agoPR tree-optimization/59124 (bogus -Warray-bounds warning)
Patrick Palka [Wed, 30 Mar 2016 00:55:00 +0000 (00:55 +0000)]
PR tree-optimization/59124 (bogus -Warray-bounds warning)

gcc/ChangeLog:

PR tree-optimization/59124
* tree-vrp.c (register_edge_assert_for_2): For NAME != CST1
where NAME = A +- CST2 add the assertion A != (CST1 -+ CST2).

gcc/testsuite/ChangeLog:

PR tree-optimization/59124
* gcc.dg/Warray-bounds-19.c: New test.

From-SVN: r234544

8 years agoDaily bump.
GCC Administrator [Wed, 30 Mar 2016 00:16:20 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r234542

8 years agotree-ssa-coalesce.c (struct ssa_conflicts): Fix typo in comment.
Jeff Law [Tue, 29 Mar 2016 22:26:28 +0000 (16:26 -0600)]
tree-ssa-coalesce.c (struct ssa_conflicts): Fix typo in comment.

* tree-ssa-coalesce.c (struct ssa_conflicts): Fix typo in
comment.

From-SVN: r234538

8 years agotree-ssa-loop-ivcanon.c (try_peel_loop): Change type of peel to HOST_WIDE_INT.
Jan Hubicka [Tue, 29 Mar 2016 22:03:00 +0000 (00:03 +0200)]
tree-ssa-loop-ivcanon.c (try_peel_loop): Change type of peel to HOST_WIDE_INT.

* tree-ssa-loop-ivcanon.c (try_peel_loop): Change type of peel
to HOST_WIDE_INT.

From-SVN: r234537