gcc.git
8 years agomips.exp (mips-dg-options): Upgrade to MIPS IV if using (HAS_MOVN) with MIPS III.
Toma Tabacu [Wed, 9 Nov 2016 20:34:21 +0000 (20:34 +0000)]
mips.exp (mips-dg-options): Upgrade to MIPS IV if using (HAS_MOVN) with MIPS III.

2016-11-09  Toma Tabacu  <toma.tabacu@imgtec.com>

        * gcc.target/mips/mips.exp (mips-dg-options): Upgrade to MIPS IV if
        using (HAS_MOVN) with MIPS III.

From-SVN: r242021

8 years ago[multiple changes]
Janus Weil [Wed, 9 Nov 2016 20:33:24 +0000 (21:33 +0100)]
[multiple changes]

2016-11-09  Mikael Morin  <mikael@gcc.gnu.org>
    Janus Weil  <janus@gcc.gnu.org>

PR fortran/46459
* interface.c (compare_actual_formal): Add safety checks to avoid ICE.

2016-11-09  Janus Weil  <janus@gcc.gnu.org>

PR fortran/46459
* gfortran.dg/volatile14.f90: New test.

From-SVN: r242020

8 years agoFix C++17 template placeholder for template template parm.
Jason Merrill [Wed, 9 Nov 2016 20:02:56 +0000 (15:02 -0500)]
Fix C++17 template placeholder for template template parm.

* parser.c (cp_parser_simple_type_specifier): Allow placeholder
for template template parameter.
(cp_parser_type_id_1): Improve diagnostic.
* decl.c (grokdeclarator): Handle class deduction diagnostics here.
* pt.c (splice_late_return_type): Not here.
(tsubst) [TEMPLATE_TYPE_PARM]: Substitute into placeholder template.
(do_class_deduction): Handle non-class templates.

From-SVN: r242018

8 years agoImplement P0127R2, Declaring non-type parameters with auto.
Jason Merrill [Wed, 9 Nov 2016 20:02:50 +0000 (15:02 -0500)]
Implement P0127R2, Declaring non-type parameters with auto.

gcc/cp/
* cp-tree.h (enum auto_deduction_context): Add adc_unify.
* decl.c (grokdeclarator): Allow 'auto' in C++17 template non-type
parameter types.
* pt.c (do_auto_deduction): Add outer_targs parameter.
(convert_template_argument): Call do_auto_deduction.  If adc_unify,
don't give up on dependent init.
(unify): Likewise.  In C++17, walk into the type of a
TEMPLATE_PARM_INDEX.
(for_each_template_parm): Add any_fn parameter.
(struct pair_fn_data): Likewise.
(for_each_template_parm_r): Call it for any tree.  In C++17, walk
into the type of a TEMPLATE_PARM_INDEX.
(zero_r, array_deduction_r, try_array_deduction): New.
(type_unification_real): Call try_array_deduction.
(get_partial_spec_bindings): Likewise.
gcc/c-family/
* c-cppbuiltin.c (c_cpp_builtins): Define __cpp_template_auto.

From-SVN: r242017

8 years agore PR target/78262 (wrong code with -fschedule-insns)
Uros Bizjak [Wed, 9 Nov 2016 19:21:11 +0000 (20:21 +0100)]
re PR target/78262 (wrong code with -fschedule-insns)

PR target/78262
* config/i386/i386.md (*<shift_insn><mode>3_doubleword): Mark
operand 0 as earlyclobber.

testsuite/ChangeLog:

PR target/78262
* gcc.target/i386/pr78262.c: New test.

From-SVN: r242013

8 years ago* fold-const-call.c (fold_const_call): Fix up type of s0 and s1.
Martin Liska [Wed, 9 Nov 2016 17:55:12 +0000 (18:55 +0100)]
* fold-const-call.c (fold_const_call): Fix up type of s0 and s1.

From-SVN: r242011

8 years agoFix ICE in gfc_trans_subcomponent_assign due to NULL components.
Fritz O. Reese [Wed, 9 Nov 2016 17:31:27 +0000 (17:31 +0000)]
Fix ICE in gfc_trans_subcomponent_assign due to NULL components.

PR fortran/78259
* gcc/fortran/trans-expr.c (gfc_trans_subcomponent_assign): Guard
against NULL values.

PR fortran/78259
* gcc/testsuite/gfortran.dg/pr78259.f90: New test.

From-SVN: r242010

8 years ago[multiple changes]
Janus Weil [Wed, 9 Nov 2016 17:22:02 +0000 (18:22 +0100)]
[multiple changes]

2016-11-09  Steve Kargl <kargl@gcc.gnu.org>
    Janus Weil  <janus@gcc.gnu.org>

PR fortran/60777
* expr.c (external_spec_function): Allow recursive specification
functions in F03.

2016-11-09  Janus Weil  <janus@gcc.gnu.org>

PR fortran/60777
* gfortran.dg/spec_expr_7.f90: New test.

From-SVN: r242009

8 years agore PR middle-end/77718 (expand_builtin_memcmp swaps args)
Jakub Jelinek [Wed, 9 Nov 2016 16:21:45 +0000 (17:21 +0100)]
re PR middle-end/77718 (expand_builtin_memcmp swaps args)

PR target/77718
* builtins.c (expand_builtin_memcmp): Formatting fix.

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

From-SVN: r242007

8 years agoflag-types.h (enum sanitize_code): Add SANITIZE_SHIFT_BASE and SANITIZE_SHIFT_EXPONENT...
Jakub Jelinek [Wed, 9 Nov 2016 15:37:28 +0000 (16:37 +0100)]
flag-types.h (enum sanitize_code): Add SANITIZE_SHIFT_BASE and SANITIZE_SHIFT_EXPONENT...

* flag-types.h (enum sanitize_code): Add SANITIZE_SHIFT_BASE
and SANITIZE_SHIFT_EXPONENT, change SANITIZE_SHIFT to bitwise
or of them, renumber other enumerators.
* opts.c (sanitizer_opts): Add shift-base and shift-exponent.
* doc/invoke.texi: Document -fsanitize=shift-base and
-fsanitize-shift-exponent, document -fsanitize=shift as
having those 2 suboptions.
c-family/
* c-ubsan.c (ubsan_instrument_shift): Handle split
-fsanitize=shift-base and -fsanitize=shift-exponent.
testsuite/
* gcc.dg/ubsan/c99-shift-3.c: New test.
* gcc.dg/ubsan/c99-shift-4.c: New test.
* gcc.dg/ubsan/c99-shift-5.c: New test.
* gcc.dg/ubsan/c99-shift-6.c: New test.

From-SVN: r242005

8 years agofold-const.c (tree_swap_operands_p): Remove unused arg.
Richard Biener [Wed, 9 Nov 2016 15:15:28 +0000 (15:15 +0000)]
fold-const.c (tree_swap_operands_p): Remove unused arg.

2016-11-09  Richard Biener  <rguenther@suse.de>

* fold-const.c (tree_swap_operands_p): Remove unused arg.
* fold-const.c (tree_swap_operands_p): Likewise.
(fold_binary_loc): Adjust.
(fold_ternary_loc): Likewise.
* genmatch.c (dt_operand::gen_gimple_exp): Likewise.
* gimple-fold.c (fold_stmt_1): Likewise.
* gimple-match-head.c (gimple_resimplify2): Likewise.
(gimple_resimplify3): Likewise.
(gimple_simplify): Likewise.
* tree-ssa-dom.c (record_equality): Likewise.
* tree-ssa-reassoc.c (optimize_range_tests_var_bound): Likewise.
* tree-ssa-sccvn.c (vn_nary_op_compute_hash): Likewise.
* tree-ssa-threadedge.c (simplify_control_stmt_condition_1): Likewise.

From-SVN: r242004

8 years agotree-ssa-dom.c (canonicalize_comparison): Remove.
Richard Biener [Wed, 9 Nov 2016 15:09:12 +0000 (15:09 +0000)]
tree-ssa-dom.c (canonicalize_comparison): Remove.

2016-11-09  Richard Biener  <rguenther@suse.de>

* tree-ssa-dom.c (canonicalize_comparison): Remove.
(optimize_stmt): Remove redundant pre-propagation canonicalization
of comparison operand order.

From-SVN: r242003

8 years agoFix folding of memcmp("a", "a", 2) (PR
Martin Liska [Wed, 9 Nov 2016 14:07:32 +0000 (15:07 +0100)]
Fix folding of memcmp("a", "a", 2) (PR

* fold-const-call.c (fold_const_call): Fix the folding.
* gcc.dg/tree-ssa/builtins-folding-generic.c (main): Add new
test-case for memcmp.
* gcc.dg/tree-ssa/builtins-folding-gimple.c: Likewise.

From-SVN: r242000

8 years agocommon.opt (flag_evaluation_order): Remove.
Richard Biener [Wed, 9 Nov 2016 12:37:10 +0000 (12:37 +0000)]
common.opt (flag_evaluation_order): Remove.

2016-11-09  Richard Biener  <rguenther@suse.de>

* common.opt (flag_evaluation_order): Remove.
* expr.c (expand_operands): Remove code guarded by
flag_evaluation_order.
* fold-const.c (reorder_operands_p): Remove, it always returns
true.
(negate_expr_p): Remove calls to reorder_operands_p.
(fold_negate_expr): Likewise.
(tree_swap_operands_p): Likewise.
(fold_binary_loc): Likewise.

From-SVN: r241998

8 years agore PR c++/78269 (FAIL: FAIL: g++.dg/cpp1z/noexcept-type11.C and FAIL: g++.dg/cpp1z...
Thomas Preud'homme [Wed, 9 Nov 2016 10:50:21 +0000 (10:50 +0000)]
re PR c++/78269 (FAIL: FAIL: g++.dg/cpp1z/noexcept-type11.C and FAIL: g++.dg/cpp1z/noexcept-type9.C)

2016-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/testsuite/
    PR testsuite/78269
    * g++.dg/cpp1z/noexcept-type9.C: Make it a compile test.

From-SVN: r241997

8 years agore PR target/78254 (FAIL: g++.dg/torture/pr77822.C -O3 -g (internal compiler error))
Andreas Schwab [Wed, 9 Nov 2016 10:40:00 +0000 (10:40 +0000)]
re PR target/78254 (FAIL: g++.dg/torture/pr77822.C   -O3 -g  (internal compiler error))

PR target/78254
* config/m68k/m68k.md: Reject out-of-range bit pos in bit-fields
insns operating on a register.

From-SVN: r241996

8 years agocheck.c (gfc_check_move_alloc): Prevent error that avoids aliasing between to and...
Paul Thomas [Wed, 9 Nov 2016 10:10:41 +0000 (10:10 +0000)]
check.c (gfc_check_move_alloc): Prevent error that avoids aliasing between to and from arguments from rejecting...

2016-11-09  Paul Thomas  <pault@gcc.gnu.org>

* check.c (gfc_check_move_alloc): Prevent error that avoids
aliasing between to and from arguments from rejecting valid
code.

2016-11-09  Paul Thomas  <pault@gcc.gnu.org>

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

From-SVN: r241995

8 years agore PR testsuite/78256 (test case gcc.dg/pr35691-1.c fails starting with its introduct...
Prathamesh Kulkarni [Wed, 9 Nov 2016 09:46:13 +0000 (09:46 +0000)]
re PR testsuite/78256 (test case gcc.dg/pr35691-1.c fails starting with its introduction in r241915)

2016-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR middle-end/78256
testsuite/
* gcc.dg/pr35691-1.c (foo): Use & instead of &&.
* gcc.dg/pr35691-2.c (foo): Use | instead of ||.

From-SVN: r241994

8 years agore PR fortran/71894 ([OOP] ICE in gfc_add_component_ref, at fortran/class.c:227)
Janus Weil [Wed, 9 Nov 2016 09:22:52 +0000 (10:22 +0100)]
re PR fortran/71894 ([OOP] ICE in gfc_add_component_ref, at fortran/class.c:227)

2016-11-09  Janus Weil  <janus@gcc.gnu.org>

PR fortran/71894
* class.c (gfc_add_component_ref): Add safety checks to avoid ICE.

2016-11-09  Janus Weil  <janus@gcc.gnu.org>

PR fortran/71894
* gfortran.dg/class_59.f90: New test.

From-SVN: r241993

8 years agore PR target/78007 (Important loop from 482.sphinx3 is not vectorized)
Richard Biener [Wed, 9 Nov 2016 08:19:05 +0000 (08:19 +0000)]
re PR target/78007 (Important loop from 482.sphinx3  is not vectorized)

2016-11-09  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78007
* tree-vect-stmts.c (vectorizable_bswap): New function.
(vectorizable_call): Call vectorizable_bswap for
BUILT_IN_BSWAP{16,32,64} if arguments are not promoted.

* gcc.dg/vect/vect-bswap32.c: Adjust.
* gcc.dg/vect/vect-bswap64.c: Likewise.

From-SVN: r241992

8 years agotree-vect-data-refs.c (vect_compute_data_ref_alignment): Look at the DR_BASE_ADDRESS...
Richard Biener [Wed, 9 Nov 2016 08:08:58 +0000 (08:08 +0000)]
tree-vect-data-refs.c (vect_compute_data_ref_alignment): Look at the DR_BASE_ADDRESS object for forcing alignment.

2016-11-09  Richard Biener  <rguenther@suse.de>

* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
Look at the DR_BASE_ADDRESS object for forcing alignment.

From-SVN: r241991

8 years agoHandle unary pass-through jump functions for ipa-vrp
Kugan Vivekanandarajah [Wed, 9 Nov 2016 01:44:04 +0000 (01:44 +0000)]
Handle unary pass-through jump functions for ipa-vrp

Handle unary pass-through jump functions for ipa-vrp
gcc/testsuite/ChangeLog:

2016-11-09  Kugan Vivekanandarajah  <kuganv@linaro.org>

* gcc.dg/ipa/vrp7.c: New test.

gcc/ChangeLog:

2016-11-09  Kugan Vivekanandarajah  <kuganv@linaro.org>

* ipa-cp.c (ipa_get_jf_pass_through_result): Handle unary expressions.
(propagate_vr_accross_jump_function): Likewise.
* ipa-prop.c (ipa_set_jf_unary_pass_through): New.
(load_from_param_1): New.
(load_from_unmodified_param): Factor common part into load_from_param_1.
(load_from_param): New.
(compute_complex_assign_jump_func): Handle unary expressions.
(ipa_write_jump_function): Likewise.
(ipa_read_jump_function): Likewise.

From-SVN: r241990

8 years agoFix ice in set_value_range
Kugan Vivekanandarajah [Wed, 9 Nov 2016 01:41:26 +0000 (01:41 +0000)]
Fix ice in set_value_range

Fix ice in set_value_range
gcc/ChangeLog:

2016-11-09  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR ipa/78121
* ipa-cp.c (propagate_vr_accross_jump_function): Pass param type.
Also fold constant passed as argument while computing value range.
(propagate_constants_accross_call): Pass param type.
* ipa-prop.c: export ipa_get_callee_param_type.
* ipa-prop.h: export ipa_get_callee_param_type.

gcc/testsuite/ChangeLog:

2016-11-09  Kugan Vivekanandarajah  <kuganv@linaro.org>

PR ipa/78121
* gcc.dg/ipa/pr78121.c: New test.

From-SVN: r241989

8 years agoDaily bump.
GCC Administrator [Wed, 9 Nov 2016 00:16:18 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241987

8 years agoasan.h (asan_intercepted_p): Handle BUILT_IN_STRCSPN, BUILT_IN_STRPBRK, BUILT_IN_STRS...
Maxim Ostapenko [Tue, 8 Nov 2016 22:16:58 +0000 (22:16 +0000)]
asan.h (asan_intercepted_p): Handle BUILT_IN_STRCSPN, BUILT_IN_STRPBRK, BUILT_IN_STRSPN and BUILT_IN_STRSTR.

gcc/

* asan.h (asan_intercepted_p): Handle BUILT_IN_STRCSPN,
BUILT_IN_STRPBRK, BUILT_IN_STRSPN and BUILT_IN_STRSTR.

gcc/testsuite/

* c-c++-common/asan/default_options.h: New file.
* c-c++-common/asan/strcasestr-1.c: New test.
* c-c++-common/asan/strcasestr-2.c: Likewise.
* c-c++-common/asan/strcspn-1.c: Likewise.
* c-c++-common/asan/strcspn-2.c: Likewise.
* c-c++-common/asan/strpbrk-1.c: Likewise.
* c-c++-common/asan/strpbrk-2.c: Likewise.
* c-c++-common/asan/strspn-1.c: Likewise.
* c-c++-common/asan/strspn-2.c: Likewise.
* c-c++-common/asan/strstr-1.c: Likewise.
* c-c++-common/asan/strstr-2.c: Likewise.
* c-c++-common/asan/halt_on_error_suppress_equal_pcs-1.c: Likewise.

From-SVN: r241984

8 years agoasan.h (ASAN_STACK_MAGIC_PARTIAL): Remove.
Maxim Ostapenko [Tue, 8 Nov 2016 22:15:35 +0000 (22:15 +0000)]
asan.h (ASAN_STACK_MAGIC_PARTIAL): Remove.

gcc/

* asan.h (ASAN_STACK_MAGIC_PARTIAL): Remove.
* asan.c (ASAN_STACK_MAGIC_PARTIAL): Replace with
ASAN_STACK_MAGIC_MIDDLE.
(asan_global_struct): Increase the size of fields.
(asan_add_global): Add new field constructor.
* sanitizer.def (__asan_version_mismatch_check_v6): Replace with
__asan_version_mismatch_check_v8.

gcc/testsuite/

* c-c++-common/asan/null-deref-1.c: Adjust testcase.

From-SVN: r241983

8 years agoasan_globals.cc (RegisterGlobal): Do not call CheckODRViolationViaPoisoning.
Maxim Ostapenko [Tue, 8 Nov 2016 22:09:33 +0000 (22:09 +0000)]
asan_globals.cc (RegisterGlobal): Do not call CheckODRViolationViaPoisoning.

libsanitizer/

* asan/asan_globals.cc (RegisterGlobal): Do not call
CheckODRViolationViaPoisoning.
(CheckODRViolationViaPoisoning): Remove.

From-SVN: r241981

8 years agosanitizer_stacktrace.cc (GetCanonicFrame): Assume we compiled code with GCC when...
Maxim Ostapenko [Tue, 8 Nov 2016 22:07:50 +0000 (22:07 +0000)]
sanitizer_stacktrace.cc (GetCanonicFrame): Assume we compiled code with GCC when extracting the caller PC for ARM if...

libsanitizer/

* sanitizer_common/sanitizer_stacktrace.cc (GetCanonicFrame): Assume we
compiled code with GCC when extracting the caller PC for ARM if no
valid frame pointer is available.

From-SVN: r241980

8 years agore PR fortran/68440 ([OOP] ICE on declaring class variable with wrong attribute)
Janus Weil [Tue, 8 Nov 2016 22:07:21 +0000 (23:07 +0100)]
re PR fortran/68440 ([OOP] ICE on declaring class variable with wrong attribute)

2016-11-08  Janus Weil  <janus@gcc.gnu.org>

PR fortran/68440
* expr.c (check_alloc_comp_init): Loosen an assert.
* resolve.c (resolve_fl_parameter): Reject class parameters.

2016-11-08  Janus Weil  <janus@gcc.gnu.org>

PR fortran/68440
* gfortran.dg/class_58.f90: New test.

From-SVN: r241979

8 years agore PR sanitizer/63958 (bootstrap failure in the sanitizer libs on sparc-linux-gnu)
Maxim Ostapenko [Tue, 8 Nov 2016 22:06:02 +0000 (22:06 +0000)]
re PR sanitizer/63958 (bootstrap failure in the sanitizer libs on sparc-linux-gnu)

PR sanitizer/63958
Reapply:
2014-10-14  David S. Miller  <davem@davemloft.net>

* sanitizer_common/sanitizer_platform_limits_linux.cc (time_t):
Define at __kernel_time_t, as needed for sparc.
(struct __old_kernel_stat): Don't check if __sparc__ is defined.
* libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
(__sanitizer): Define struct___old_kernel_stat_sz,
struct_kernel_stat_sz, and struct_kernel_stat64_sz for sparc.
(__sanitizer_ipc_perm): Adjust for sparc targets.
(__sanitizer_shmid_ds): Likewsie.
(__sanitizer_sigaction): Likewise.
(IOC_SIZE): Likewsie.

From-SVN: r241978

8 years agoAll source files: Merge from upstream 285547.
Maxim Ostapenko [Tue, 8 Nov 2016 22:04:09 +0000 (22:04 +0000)]
All source files: Merge from upstream 285547.

libsanitizer/

* All source files: Merge from upstream 285547.
* configure.tgt (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): New
variable.
* configure.ac (SANITIZER_COMMON_TARGET_DEPENDENT_OBJECTS): Handle it.
* asan/Makefile.am (asan_files): Add new files.
* asan/Makefile.in: Regenerate.
* ubsan/Makefile.in: Likewise.
* lsan/Makefile.in: Likewise.
* tsan/Makefile.am (tsan_files): Add new files.
* tsan/Makefile.in: Regenerate.
* sanitizer_common/Makefile.am (sanitizer_common_files): Add new files.
(EXTRA_libsanitizer_common_la_SOURCES): Define.
(libsanitizer_common_la_LIBADD): Likewise.
(libsanitizer_common_la_DEPENDENCIES): Likewise.
* sanitizer_common/Makefile.in: Regenerate.
* interception/Makefile.in: Likewise.
* libbacktace/Makefile.in: Likewise.
* Makefile.in: Likewise.
* configure: Likewise.
* merge.sh: Handle builtins/assembly.h merging.
* builtins/assembly.h: New file.
* asan/libtool-version: Bump the libasan SONAME.

From-SVN: r241977

8 years agodwarf2asm.c (USE_LINKONCE_INDIRECT): Test XCOFF_DEBUGGING_INFO at runtime.
David Edelsohn [Tue, 8 Nov 2016 19:40:54 +0000 (19:40 +0000)]
dwarf2asm.c (USE_LINKONCE_INDIRECT): Test XCOFF_DEBUGGING_INFO at runtime.

        * dwarf2asm.c (USE_LINKONCE_INDIRECT): Test XCOFF_DEBUGGING_INFO
        at runtime.

From-SVN: r241975

8 years agore PR target/70799 (STV pass does not convert DImode shifts)
Uros Bizjak [Tue, 8 Nov 2016 19:06:54 +0000 (20:06 +0100)]
re PR target/70799 (STV pass does not convert DImode shifts)

PR target/70799
* config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
Handle ASHIFT and LSHIFTRT.
(dimode_scalar_chain::compute_convert_gain): Ditto.
(dimode_scalar_chain::convert_insn): Ditto.

testsuite/ChangeLog:

PR target/70799
* gcc.target/i386/pr70799-2.c: New test.

From-SVN: r241974

8 years agore PR fortran/77596 ([F03] procedure pointer component with implicit interface can...
Janus Weil [Tue, 8 Nov 2016 16:10:56 +0000 (17:10 +0100)]
re PR fortran/77596 ([F03] procedure pointer component with implicit interface can point to a function)

2016-11-08  Janus Weil  <janus@gcc.gnu.org>

PR fortran/77596
* expr.c (gfc_check_pointer_assign): Add special check for procedure-
pointer component with absent interface.

2016-11-08  Janus Weil  <janus@gcc.gnu.org>

PR fortran/77596
* gfortran.dg/proc_ptr_comp_46.f90: New test.

From-SVN: r241972

8 years ago[2/2] Add store merging unit tests
Kyrylo Tkachov [Tue, 8 Nov 2016 16:04:20 +0000 (16:04 +0000)]
[2/2] Add store merging unit tests

* gimple-ssa-store-merging.c: Include selftest.h
(verify_array_eq): New function.
(verify_shift_bytes_in_array): Likewise.
(verify_shift_bytes_in_array_right): Likewise.
(verify_clear_bit_region): Likewise.
(verify_clear_bit_region_be): Likewise.
(store_merging_c_tests): Likewise.
* selftest.h (store_merging_c_tests): Declare prototype.
* selftest-run-tests.c (selftest::run_tests): Run
store_merging_c_tests.

From-SVN: r241971

8 years agopr56541.c: Xfail on !vect_cond_mixed targets.
Bin Cheng [Tue, 8 Nov 2016 14:11:36 +0000 (14:11 +0000)]
pr56541.c: Xfail on !vect_cond_mixed targets.

gcc/testsuite
* gcc.dg/vect/pr56541.c: Xfail on !vect_cond_mixed targets.

From-SVN: r241969

8 years agopr71347.c: Drop xfail.
Bin Cheng [Tue, 8 Nov 2016 14:09:21 +0000 (14:09 +0000)]
pr71347.c: Drop xfail.

gcc/testsuite
* gcc.dg/tree-ssa/pr71347.c: Drop xfail.

From-SVN: r241968

8 years agovect-cond-2.c: Drop xfail.
Bin Cheng [Tue, 8 Nov 2016 14:08:06 +0000 (14:08 +0000)]
vect-cond-2.c: Drop xfail.

gcc/testsuite
* gcc.dg/vect/vect-cond-2.c: Drop xfail.

From-SVN: r241967

8 years ago[ARM][2/2] Remove old rtx costs
Kyrylo Tkachov [Tue, 8 Nov 2016 13:47:23 +0000 (13:47 +0000)]
[ARM][2/2] Remove old rtx costs

* config/arm/arm.opt (mold-rtx-costs): Delete.
(mnew-generic-costs): Delete.
* config/arm/arm-protos.h (struct tune_params): Delete rtx_costs field.
* config/arm/arm.c (arm_rtx_costs_1): Delete.
(arm_size_rtx_costs): Likewise.
(arm_slowmul_rtx_costs): Likewise.
(arm_fastmul_rtx_costs): Likewise.
(arm_xscale_rtx_costs): Likewise.
(arm_9e_rtx_costs): Likewise.
(arm_slowmul_tune, arm_fastmul_tune, arm_strongarm_tune,
arm_xscale_tune, arm_9e_tune, arm_v6t2_tune, arm_cortex_tune,
arm_cortex_a8_tune, arm_cortex_a7_tune, arm_cortex_a15_tune,
arm_cortex_a53_tune, arm_cortex_a57_tune, arm_cortex_a9_tune,
arm_cortex_a12_tune, arm_v7m_tune, arm_v6m_tune, arm_fa726te_tune
arm_cortex_a5_tune, arm_xgene1_tune, arm_marvell_pj4_tune,
arm_cortex_a35_tune, arm_exynosm1_tune, arm_cortex_a73_tune,
arm_cortex_m7_tune):
Delete rtx_costs field.
(arm_new_rtx_costs): Rename to...
(arm_rtx_costs_internal): ... This.
(arm_rtx_costs): Remove old way of doing rtx costs.

From-SVN: r241966

8 years ago[ARM][1/2] Use generic_extra_costs in all remaining tuning structs
Kyrylo Tkachov [Tue, 8 Nov 2016 13:45:52 +0000 (13:45 +0000)]
[ARM][1/2] Use generic_extra_costs in all remaining tuning structs

* config/arm/arm.c (arm_slowmul_tune): Use generic_extra_costs.
(arm_fastmul_tune): Likewise.
(arm_strongarm_tune): Likewise.
(arm_xscale_tune): Likewise.
(arm_9e_tune): Likewise.
(arm_marvell_pj4_tune): Likewise.
(arm_v6t2_tune): Likewise.
(arm_v6m_tune): Likewise.
(arm_fa726te_tune): Likewise.

From-SVN: r241965

8 years ago[AArch64] Optimized implementation of search_line_fast for the CPP lexer
Richard Earnshaw [Tue, 8 Nov 2016 13:29:32 +0000 (13:29 +0000)]
[AArch64] Optimized implementation of search_line_fast for the CPP lexer

  * lex.c (search_line_fast): New implementation for AArch64.

From-SVN: r241964

8 years ago[1/2] Fix off-by-one error in clear_bit_region in store merging (PR tree-optimization...
Kyrylo Tkachov [Tue, 8 Nov 2016 12:31:31 +0000 (12:31 +0000)]
[1/2] Fix off-by-one error in clear_bit_region in store merging (PR tree-optimization/78234 ?)

PR tree-optimization/78234
* gimple-ssa-store-merging.c (clear_bit_region): Fix off-by-one error
in start != 0 case.

From-SVN: r241962

8 years agouse-after-scope fallout
Martin Liska [Tue, 8 Nov 2016 12:28:33 +0000 (13:28 +0100)]
use-after-scope fallout

PR testsuite/78242
* g++.dg/asan/use-after-scope-4.C: New test.
* g++.dg/asan/use-after-scope-types-4.C: Update scanned pattern.
* gcc.dg/asan/use-after-scope-8.c: Remove.
PR testsuite/78242
* dbgcnt.def: Add new debug counter asan_use_after_scope.
* gimplify.c (gimplify_decl_expr): Do not sanitize vars
with a value expr.  Do not add artificial variables to
live_switch_vars.  Use the debug counter.
(gimplify_target_expr): Use the debug counter.
* internal-fn.def: Remove ECF_TM_PURE from ASAN_MARK builtin.
* sanitizer.def: Set ATTR_NOTHROW_LEAF_LIST to
BUILT_IN_ASAN_CLOBBER_N and BUILT_IN_ASAN_UNCLOBBER_N.

From-SVN: r241961

8 years agotree-vect-stmts.c (get_group_load_store_type): If the access is aligned do not trigge...
Richard Biener [Tue, 8 Nov 2016 10:23:57 +0000 (10:23 +0000)]
tree-vect-stmts.c (get_group_load_store_type): If the access is aligned do not trigger peeling for gaps.

2016-11-08  Richard Biener  <rguenther@suse.de>

* tree-vect-stmts.c (get_group_load_store_type): If the
access is aligned do not trigger peeling for gaps.
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Do not
force alignment of vars with DECL_USER_ALIGN.

* gcc.dg/vect/vect-nb-iter-ub-2.c: Adjust.

From-SVN: r241959

8 years ago[Patch AArch64] aarch64-c.o should depend on TARGET_H
James Greenhalgh [Tue, 8 Nov 2016 09:53:07 +0000 (09:53 +0000)]
[Patch AArch64] aarch64-c.o should depend on TARGET_H

gcc/

* config/aarch64/t-aarch64 (aarch64-c.o): Depend on TARGET_H.

From-SVN: r241958

8 years agoFix traditional cpp test failure
Tamar Christina [Tue, 8 Nov 2016 09:41:11 +0000 (09:41 +0000)]
Fix traditional cpp test failure

* gcc.dg/cpp/trad/trad.exp
(dg-runtest): Added $srcdir/$subdir/ to Include dirs.
* gcc.dg/cpp/trad/include.c: Use local header file.

From-SVN: r241957

8 years agore PR tree-optimization/78205 (BB vectorization confused by too large load groups)
Richard Biener [Tue, 8 Nov 2016 08:06:42 +0000 (08:06 +0000)]
re PR tree-optimization/78205 (BB vectorization confused by too large load groups)

2016-11-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78205
* tree-vect-stmts.c (vectorizable_load): Move check whether
we may run into gaps when BB vectorizing SLP permutations ...
* tree-vect-slp.c (vect_supported_load_permutation_p): ...
here where we can do a more precise check.

* gcc.dg/vect/bb-slp-pr78205.c: New testcase.

From-SVN: r241956

8 years agore PR tree-optimization/78224 (g++ ICE at -O2(-O1 on gcc6) and above in verify_loop_s...
Richard Biener [Tue, 8 Nov 2016 08:03:54 +0000 (08:03 +0000)]
re PR tree-optimization/78224 (g++ ICE at -O2(-O1 on gcc6) and above in verify_loop_structure, at cfgloop.c:1646)

2016-11-08  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78224
* tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
Split the fallthru edge in case its successor may have PHIs.
Do not free dominance info.

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

From-SVN: r241955

8 years agoFix bogus store_merging_x.c failures for avr.
Senthil Kumar Selvaraj [Tue, 8 Nov 2016 06:30:31 +0000 (06:30 +0000)]
Fix bogus store_merging_x.c failures for avr.

Store merging isn't profitable for the avr. Add a new
effective target keyword "store_merge", and turn it on
only if non_strict_align *and* int32plus, as targets with
smallish word sizes are unlikely to profit from this optimization.

gcc/testsuite/ChangeLog

2016-11-03  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

* gcc.dg/store_merging_1.c: Require store_merge.
* gcc.dg/store_merging_2.c: Likewise.
* gcc.dg/store_merging_4.c: Likewise.
* gcc.dg/store_merging_5.c: Likewise.
* gcc.dg/store_merging_6.c: Likewise.
* gcc.dg/store_merging_7.c: Likewise.
* gcc.dg/store_merging_8.c: Likewise.
* lib/target-supports.exp (check_effective_target_store_merge): New.

From-SVN: r241953

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

From-SVN: r241949

8 years agofold-vec-add-1.c: Add dg-options -maltivec.
David Edelsohn [Mon, 7 Nov 2016 23:09:44 +0000 (23:09 +0000)]
fold-vec-add-1.c: Add dg-options -maltivec.

        * gcc.target/powerpc/fold-vec-add-1.c: Add dg-options -maltivec.
        * gcc.target/powerpc/fold-vec-add-2.c: Add dg-options -maltivec.
        * gcc.target/powerpc/fold-vec-add-3.c: Add dg-options -maltivec.
        * gcc.target/powerpc/fold-vec-add-4.c: Add dg-options -maltivec
        -mvsx -mpower8-vector.
        * gcc.target/powerpc/fold-vec-add-5.c: Add dg-options -maltivec -mno-vs\
x.
        * gcc.target/powerpc/fold-vec-add-6.c: Add dg-options -maltivec -mvsx.
        * gcc.target/powerpc/fold-vec-add-7.c: Add dg-options -maltivec
        -mvsx -mpower8-vector.

From-SVN: r241945

8 years agoImplement P0012R1, Make exception specifications part of the type system.
Jason Merrill [Mon, 7 Nov 2016 23:09:29 +0000 (18:09 -0500)]
Implement P0012R1, Make exception specifications part of the type system.

gcc/cp/
* cp-tree.h (enum tsubst_flags): Add tf_fndecl_type.
(flag_noexcept_type, ce_type): New.
* call.c (build_conv): Add ck_fnptr.
(enum conversion_kind): Change ck_tsafe to ck_fnptr.
(convert_like_real): Likewise.
(standard_conversion): Likewise.  Allow function pointer
conversions for pointers to member functions.
(reference_compatible_p): Allow function pointer conversions.
(direct_reference_binding): Likewise.
(reference_binding): Reference-compatible is no longer a subset of
reference-related.
(is_subseq): Also strip ck_lvalue after next_conversion.
* class.c (instantiate_type): Check fnptr_conv_p.
(resolve_address_of_overloaded_function): Likewise.
* cvt.c (can_convert_tx_safety): Now static.
(noexcept_conv_p, fnptr_conv_p, strip_fnptr_conv): New.
* decl.c (flag_noexcept_type): Define.
(cxx_init_decl_processing): Set it.
(bad_specifiers): Check it.
(grokdeclarator) [cdk_function]: Add exception-spec to type here.
* lambda.c (maybe_add_lambda_conv_op): Add exception-spec to
returned pointer.
* mangle.c (struct globals): Add need_cxx1z_warning.
(mangle_decl): Check it.
(write_exception_spec): New.
(write_function_type): Call it.
(canonicalize_for_substitution): Handle exception spec.
(write_type): Likewise.
(write_encoding): Set processing_template_decl across mangling of
partially-instantiated type.
* pt.c (determine_specialization): Pass tf_fndecl_type.
(tsubst_decl, fn_type_unification): Likewise.
(tsubst): Strip tf_fndecl_type, pass it to
tsubst_exception_specification.
(convert_nontype_argument_function): Handle function pointer
conversion.
(convert_nontype_argument): Likewise.
(unify, for_each_template_parm_r): Walk into noexcept-specifier.
* rtti.c (ptr_initializer): Encode noexcept.
* tree.c (canonical_eh_spec): New.
(build_exception_variant): Use it.
* typeck.c (composite_pointer_type): Handle fnptr conversion.
(comp_except_specs): Compare canonical EH specs.
(structural_comptypes): Call it.
gcc/c-family/
* c.opt (Wc++1z-compat): New.
* c-cppbuiltin.c (c_cpp_builtins): Add __cpp_noexcept_function_type.
libstdc++-v3/
* include/bits/c++config (_GLIBCXX_NOEXCEPT_PARM)
(_GLIBCXX_NOEXCEPT_QUAL): New.
* include/std/type_traits (is_function): Use them.
* libsubc++/new (launder): Likewise.
* libsupc++/cxxabi.h (__pbase_type_info::__masks): Add
__noexcept_mask.
* libsupc++/pbase_type_info.cc (__do_catch): Handle function
pointer conversion.
libiberty/
* cp-demangle.c (is_fnqual_component_type): New.
(d_encoding, d_print_comp_inner, d_print_mod_list): Use it.
(FNQUAL_COMPONENT_CASE): New.
(d_make_comp, has_return_type, d_print_comp_inner)
(d_print_function_type): Use it.
(next_is_type_qual): New.
(d_cv_qualifiers, d_print_mod): Handle noexcept and throw-spec.
include/
* demangle.h (enum demangle_component_type): Add
DEMANGLE_COMPONENT_NOEXCEPT, DEMANGLE_COMPONENT_THROW_SPEC.

From-SVN: r241944

8 years agoC++ cleanups before C++17 noexcept in types.
Jason Merrill [Mon, 7 Nov 2016 23:09:21 +0000 (18:09 -0500)]
C++ cleanups before C++17 noexcept in types.

* call.c (standard_conversion): Reorganize pointer conversions.
* pt.c (convert_nontype_argument_function): Convert to ref here.
(convert_nontype_argument): Not here.
(convert_template_argument): Add original type to error message.
(RECUR_AND_CHECK_FAILURE): Remove trailing semicolon.
(unify): Compare function-qualifiers.
* typeck.c (same_type_ignoring_top_level_qualifiers_p): Use
cp_build_qualified_type rather than TYPE_MAIN_VARIANT.

From-SVN: r241943

8 years agore PR target/78229 (ICE in redirect_eh_edge_1, at tree-eh.c:2305)
Jakub Jelinek [Mon, 7 Nov 2016 22:35:43 +0000 (23:35 +0100)]
re PR target/78229 (ICE in redirect_eh_edge_1, at tree-eh.c:2305)

PR target/78229
* config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust
EH info even for bzhi and pdep/pext.

From-SVN: r241942

8 years agoFix dates.
David Edelsohn [Mon, 7 Nov 2016 22:33:10 +0000 (17:33 -0500)]
Fix dates.

From-SVN: r241941

8 years agoAdd missing ChangeLog entry.
Peter Bergner [Mon, 7 Nov 2016 21:39:30 +0000 (15:39 -0600)]
Add missing ChangeLog entry.

* config.gcc (powerpc*-*-*, rs6000*-*-*): Remove setting of
INCLUDE_EXTRA_SPEC for Advance Toolchain builds.

From-SVN: r241939

8 years agoconfig.gcc (powerpc*-*-*, [...]): Remove setting of INCLUDE_EXTRA_SPEC for Advance...
Peter Bergner [Mon, 7 Nov 2016 21:22:02 +0000 (15:22 -0600)]
config.gcc (powerpc*-*-*, [...]): Remove setting of INCLUDE_EXTRA_SPEC for Advance Toolchain builds.

* config.gcc (powerpc*-*-*, rs6000*-*-*): Remove setting of
INCLUDE_EXTRA_SPEC for Advance Toolchain builds.

From-SVN: r241937

8 years agognu-versioned-namespace.ver: Export C++17 new of over-aligned types symbols.
François Dumont [Mon, 7 Nov 2016 21:12:36 +0000 (21:12 +0000)]
gnu-versioned-namespace.ver: Export C++17 new of over-aligned types symbols.

2016-11-07  François Dumont  <fdumont@gcc.gnu.org>

* config/abi/pre/gnu-versioned-namespace.ver: Export C++17 new of
over-aligned types symbols.

From-SVN: r241936

8 years agors6000: Do swdiv at expand time
Segher Boessenkool [Mon, 7 Nov 2016 20:54:42 +0000 (21:54 +0100)]
rs6000: Do swdiv at expand time

We transform floating point divide instructions to a faster series of
simple instructions, "swdiv".  Currently we do not do that until the
first splitter pass, which is much too late for most optimisations
that can happen on those new instructions, e.g. the constant loads
are not CSEd inside an unrolled loop.  This patch changes things so
those divide instructions are expanded during expand already.

* config/rs6000/rs6000.md (div<mode>3): Expand using rs6000_emit_swdiv
if appropriate.
* config/rs6000/vector.md (div<mode>3): Ditto.

From-SVN: r241935

8 years agoscanasm.exp (hidden-scan-for): Add XCOFF support.
David Edelsohn [Mon, 7 Nov 2016 20:33:30 +0000 (20:33 +0000)]
scanasm.exp (hidden-scan-for): Add XCOFF support.

        * lib/scanasm.exp (hidden-scan-for): Add XCOFF support.

        * gfortran.dg/implicit_class_1.f90: Skip on AIX.
        * gcc.dg/visibility-14.c: XFAIL AIX.
        * gcc.dg/visibility-15.c: XFAIL AIX.
        * gcc.dg/visibility-16.c: XFAIL AIX.
        * gcc.dg/visibility-17.c: XFAIL AIX.
        * gcc.dg/visibility-18.c: XFAIL AIX.
        * gcc.dg/visibility-19.c: XFAIL AIX.
        * g++.dg/ext/visibility/anon1.C: XFAIL AIX.
        * g++.dg/ext/visibility/anon2.C: XFAIL AIX.
        * g++.dg/ext/visibility/pragma-override1.C: XFAIL AIX.
        * g++.dg/ext/visibility/pragma-override2.C: XFAIL AIX.

From-SVN: r241934

8 years agoFix typo.
David Edelsohn [Mon, 7 Nov 2016 20:30:30 +0000 (15:30 -0500)]
Fix typo.

From-SVN: r241932

8 years agoconfigure.ac (.hidden): Change to conftest_s string.
David Edelsohn [Mon, 7 Nov 2016 20:16:13 +0000 (20:16 +0000)]
configure.ac (.hidden): Change to conftest_s string.

* configure.ac (.hidden): Change to conftest_s string. Provide string
for AIX assembler.
(gcc_cv_ld_hidden): Yes for AIX.
* configure: Regenerate.

* dwarf2asm.c (USE_LINKONCE_INDIRECT): Don't set for AIX (XCOFF).

* config/rs6000/rs6000-protos.h (rs6000_asm_weaken_decl): Declare
(rs6000_xcoff_asm_output_aligned_decl_common): Declare.
* config/rs6000/xcoff.h (TARGET_ASM_GLOBALIZE_DECL_NAME): Define.
(ASM_OUTPUT_ALIGNED_DECL_COMMON): Define.
(ASM_OUTPUT_ALIGNED_COMMON): Delete.
* config/rs6000/rs6000.c (rs6000_init_builtins): Change clog rename
from #if to if.
(rs6000_xcoff_visibility): New.
(rs6000_xcoff_declare_function_name): Add visibility support.
(rs6000_xcoff_asm_globalize_decl_name): New.
(rs6000_xcoff_asm_output_aligned_decl_common): New.
(rs6000_asm_weaken_decl): New.
(rs6000_code_end): Disable HIDDEN_LINKONCE on XCOFF.
config/rs6000/rs6000.h (ASM_WEAKEN_DECL): Change definition to
reference function.

From-SVN: r241930

8 years agoAdd template instantiations to the announce_function stream.
Jason Merrill [Mon, 7 Nov 2016 19:35:13 +0000 (14:35 -0500)]
Add template instantiations to the announce_function stream.

* pt.c (push_tinst_level_loc): Add template instantiations to the
announce_function stream.

From-SVN: r241928

8 years agore PR fortran/78226 (Fill out location information everywhere)
Thomas Koenig [Mon, 7 Nov 2016 19:33:27 +0000 (19:33 +0000)]
re PR fortran/78226 (Fill out location information everywhere)

2016-11-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/78226
* expr.c (gfc_generate_initializer):  Add where to EXPR_NULL
statement.
* iresolve.c (gfc_resolve_extends_type_of):  Add where to
both arguments of the function.
* resolve.c (resolve_select_type):  Add where to the
second argument of the new statement.

From-SVN: r241927

8 years ago* es.po: Update.
Joseph Myers [Mon, 7 Nov 2016 18:37:01 +0000 (18:37 +0000)]
* es.po: Update.

From-SVN: r241922

8 years agore PR driver/78206 (bootstrap failure under Apple sandbox that blacklists reads in...
Jack Howarth [Mon, 7 Nov 2016 18:33:49 +0000 (18:33 +0000)]
re PR driver/78206 (bootstrap failure under Apple sandbox that blacklists reads in /usr/local)

2016-11-06  Jack Howarth  <howarth.at.gcc@gmail.com>

PR driver/78206
* incpath.c: (remove_dup(): Also silently ignore EPERM.

From-SVN: r241919

8 years agoRemove a TODO from verify_type_variant
Martin Jambor [Mon, 7 Nov 2016 18:30:26 +0000 (19:30 +0100)]
Remove a TODO from verify_type_variant

2016-11-07  Martin Jambor  <mjambor@suse.cz>

* tree.c (verify_type_variant): Use pointer comparison to check that
TYPE_SIZE_UNIT match.

From-SVN: r241918

8 years agore PR target/77834 (ICE: in make_decl_rtl, at varasm.c:1311 with -O -ftree-pre -mstri...
Jakub Jelinek [Mon, 7 Nov 2016 17:35:16 +0000 (18:35 +0100)]
re PR target/77834 (ICE: in make_decl_rtl, at varasm.c:1311 with -O -ftree-pre -mstringop-strategy=libcall)

PR target/77834
* dse.c (dse_step5): Call scan_reads even if just
insn_info->frame_read.  Improve and fix dump file messages.

From-SVN: r241917

8 years agore PR target/78227 (ICE: unrecognizable insn: in extract_insn, at recog.c:2311 with...
Jakub Jelinek [Mon, 7 Nov 2016 17:33:27 +0000 (18:33 +0100)]
re PR target/78227 (ICE: unrecognizable insn: in extract_insn, at recog.c:2311 with -mavx512bw and vector comare)

PR target/78227
* config/i386/i386.c (ix86_expand_sse_cmp): Force dest into
cmp_mode argument even for -O0 if cmp_mode != mode and maskcmp.

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

From-SVN: r241916

8 years agore PR middle-end/35691 (Missed (a == 0) && (b == 0) into (a|(typeof(a)(b)) == 0 when...
Prathamesh Kulkarni [Mon, 7 Nov 2016 17:32:17 +0000 (17:32 +0000)]
re PR middle-end/35691 (Missed (a == 0) && (b == 0) into (a|(typeof(a)(b)) == 0 when the types don't match)

2016-11-07  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

PR middle-end/35691
* match.pd: Add following two patterns:
(x == 0 & y == 0) -> (x | typeof(x)(y)) == 0.
(x != 0 | y != 0) -> (x | typeof(x)(y)) != 0.

testsuite/
* gcc.dg/pr35691-1.c: New test-case.
* gcc.dg/pr35691-4.c: Likewise.

From-SVN: r241915

8 years agoemit-rtl.c (emit_copy_of_insn_after): Duplicate notes in order.
Bernd Schmidt [Mon, 7 Nov 2016 17:03:55 +0000 (17:03 +0000)]
emit-rtl.c (emit_copy_of_insn_after): Duplicate notes in order.

* emit-rtl.c (emit_copy_of_insn_after): Duplicate notes in order.
* sel-sched-ir.c (create_copy_of_insn_rtx): Likewise.
* rtl.h (duplicate_reg_notes): Declare.
* rtlanal.c (duplicate_reg_note): New function.

From-SVN: r241913

8 years agore PR tree-optimization/77309 (wrong code at -Os and above on x86_64-linux-gnu (in...
Bernd Schmidt [Mon, 7 Nov 2016 16:59:11 +0000 (16:59 +0000)]
re PR tree-optimization/77309 (wrong code at -Os and above on x86_64-linux-gnu (in the 64-bit mode))

PR rtl-optimization/77309
* combine.c (make_compound_operation): Allow EQ for IN_CODE, and
don't assume an equality comparison for plain COMPARE.
(simplify_comparison): Pass a more accurate code to
make_compound_operation.

testsuite/
PR rtl-optimization/77309
* gcc.dg/torture/pr77309.c: New test.

From-SVN: r241912

8 years agotarget.def (compute_pressure_classes): New target hook.
Pat Haugen [Mon, 7 Nov 2016 15:37:51 +0000 (15:37 +0000)]
target.def (compute_pressure_classes): New target hook.

* target.def (compute_pressure_classes): New target hook.
* doc/tm.texi.in: Document it.
* doc/tm.texi: Regenerate.
* ira.c (setup_pressure_classes): Call target hook if defined.

From-SVN: r241911

8 years agoFixed PR in ChangeLog entry.
Thomas Koenig [Mon, 7 Nov 2016 15:29:20 +0000 (15:29 +0000)]
Fixed PR in ChangeLog entry.

From-SVN: r241910

8 years agore PR fortran/78226 (Fill out location information everywhere)
Thomas Koenig [Mon, 7 Nov 2016 15:25:21 +0000 (15:25 +0000)]
re PR fortran/78226 (Fill out location information everywhere)

2016-11-07  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/78826
* match.c (gfc_match_select_type):  Add where for expr1.
* resolve.c (resolev_select_type): Add where for expr1 of new
statement.

From-SVN: r241909

8 years agortx_writer: avoid printing trailing default values
David Malcolm [Mon, 7 Nov 2016 15:19:17 +0000 (15:19 +0000)]
rtx_writer: avoid printing trailing default values

gcc/ChangeLog:
* print-rtl.c (rtx_writer::operand_has_default_value_p): New
method.
(rtx_writer::print_rtx): In compact mode, omit trailing operands
that have the default values.
* print-rtl.h (rtx_writer::operand_has_default_value_p): New
method.
* rtl-tests.c (selftest::test_dumping_insns): Remove empty
label string from expected dump.
(seltest::test_uncond_jump): Remove trailing "(nil)" for REG_NOTES
from expected dump.

From-SVN: r241908

8 years agoFix native windows build by adding signal.h back into the include list.
Tamar Christina [Mon, 7 Nov 2016 14:14:13 +0000 (14:14 +0000)]
Fix native windows build by adding signal.h back into the include list.

  * gcc/ada/adaint.c: Added signal.h for Windows.

From-SVN: r241907

8 years agore PR target/77834 (ICE: in make_decl_rtl, at varasm.c:1311 with -O -ftree-pre -mstri...
Jakub Jelinek [Mon, 7 Nov 2016 13:33:37 +0000 (14:33 +0100)]
re PR target/77834 (ICE: in make_decl_rtl, at varasm.c:1311 with -O -ftree-pre -mstringop-strategy=libcall)

PR target/77834
* alias.c (nonoverlapping_memrefs_p): If one decl is
FUNCTION_DECL or LABEL_DECL and the other is not, return 1.

From-SVN: r241905

8 years agore PR middle-end/71529 ([CHKP] ICE in expand_expr_real_1)
Jakub Jelinek [Mon, 7 Nov 2016 13:07:32 +0000 (14:07 +0100)]
re PR middle-end/71529 ([CHKP] ICE in expand_expr_real_1)

PR middle-end/71529
* gcc.target/i386/pr71529.C: Moved to ...
* g++.dg/opt/pr71529.C: ... here.  New test.  Guard for i?86/x86_64.

PR target/64411
* gcc.target/i386/pr64411.C: Moved to ...
* g++.dg/opt/pr64411.C: ... here.  New test.  Guard for i?86/x86_64
lp64.

PR target/65105
* gcc.target/i386/pr65105-4.C: Moved to ...
* g++.dg/opt/pr65105-4.C: ... here.  New test.  Guard for i?86/x86_64.
Run into compile test rather than execute test.

From-SVN: r241903

8 years agore PR target/78229 (ICE in redirect_eh_edge_1, at tree-eh.c:2305)
Richard Biener [Mon, 7 Nov 2016 12:26:48 +0000 (12:26 +0000)]
re PR target/78229 (ICE in redirect_eh_edge_1, at tree-eh.c:2305)

2016-11-07  Richard Biener  <rguenther@suse.de>

PR target/78229
* config/i386/i386.c (ix86_gimple_fold_builtin): Do not adjust
EH info.

* g++.dg/pr78229.C: New testcase.

From-SVN: r241901

8 years agore PR tree-optimization/78218 (wrong code at -Os and above on x86_64-linux-gnu (in...
Richard Biener [Mon, 7 Nov 2016 12:26:00 +0000 (12:26 +0000)]
re PR tree-optimization/78218 (wrong code at -Os and above on x86_64-linux-gnu (in both 32-bit and 64-bit modes))

2016-11-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78218
* gimple-ssa-store-merging.c
(pass_store_merging::terminate_all_aliasing_chains):
Drop unused argument, fix alias check to also consider uses.
(pass_store_merging::execute): Adjust.

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

From-SVN: r241900

8 years agore PR middle-end/78228 (fstrict-overflow breaks code without overflow?)
Richard Biener [Mon, 7 Nov 2016 12:25:09 +0000 (12:25 +0000)]
re PR middle-end/78228 (fstrict-overflow breaks code without overflow?)

2016-11-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78228
* tree-ssa-phiopt.c (abs_replacement): Avoid introducing
undefined behavior.

* gcc.dg/tree-ssa/phi-opt-15.c: New testcase.

From-SVN: r241899

8 years ago[AArch64] Fix PR target/77822: Use tighter predicates for zero_extract patterns
Kyrylo Tkachov [Mon, 7 Nov 2016 11:43:57 +0000 (11:43 +0000)]
[AArch64] Fix PR target/77822: Use tighter predicates for zero_extract patterns

PR target/77822
* config/aarch64/aarch64.md (*tb<optab><mode>1): Use
aarch64_simd_shift_imm_<mode> predicate for operand 1.
(<optab>, ANY_EXTRACT): Use tighter predicates on operands 2 and 3
to restrict them to an appropriate range and add FAIL check if the
region they specify is out of range.  Delete useless constraint
strings.
(*<optab><mode>, ANY_EXTRACT): Add appropriate predicates on operands
2 and 3 to restrict their range and add pattern predicate.

* g++.dg/torture/pr77822.C: New test.

From-SVN: r241898

8 years agoIntroduce tests for -fsanitize-address-use-after-scope
Martin Liska [Mon, 7 Nov 2016 10:25:18 +0000 (11:25 +0100)]
Introduce tests for -fsanitize-address-use-after-scope

* c-c++-common/asan/force-inline-opt0-1.c: Disable
-f-sanitize-address-use-after-scope.
* c-c++-common/asan/inc.c: Change number of expected ASAN_CHECK
internal fn calls.
* g++.dg/asan/use-after-scope-1.C: New test.
* g++.dg/asan/use-after-scope-2.C: Likewise.
* g++.dg/asan/use-after-scope-3.C: Likewise.
* g++.dg/asan/use-after-scope-types-1.C: Likewise.
* g++.dg/asan/use-after-scope-types-2.C: Likewise.
* g++.dg/asan/use-after-scope-types-3.C: Likewise.
* g++.dg/asan/use-after-scope-types-4.C: Likewise.
* g++.dg/asan/use-after-scope-types-5.C: Likewise.
* g++.dg/asan/use-after-scope-types.h: Likewise.
* gcc.dg/asan/use-after-scope-1.c: Likewise.
* gcc.dg/asan/use-after-scope-2.c: Likewise.
* gcc.dg/asan/use-after-scope-3.c: Likewise.
* gcc.dg/asan/use-after-scope-4.c: Likewise.
* gcc.dg/asan/use-after-scope-5.c: Likewise.
* gcc.dg/asan/use-after-scope-6.c: Likewise.
* gcc.dg/asan/use-after-scope-7.c: Likewise.
* gcc.dg/asan/use-after-scope-8.c: Likewise.
* gcc.dg/asan/use-after-scope-9.c: Likewise.
* gcc.dg/asan/use-after-scope-switch-1.c: Likewise.
* gcc.dg/asan/use-after-scope-switch-2.c: Likewise.
* gcc.dg/asan/use-after-scope-switch-3.c: Likewise.
* gcc.dg/asan/use-after-scope-goto-1.c: Likewise.
* gcc.dg/asan/use-after-scope-goto-2.c: Likewise.

From-SVN: r241897

8 years agoIntroduce -fsanitize-address-use-after-scope
Martin Liska [Mon, 7 Nov 2016 10:23:38 +0000 (11:23 +0100)]
Introduce -fsanitize-address-use-after-scope

* c-warn.c (warn_for_unused_label): Save all labels used
in goto or in &label.
* asan.c (enum asan_check_flags): Move the enum to header file.
(asan_init_shadow_ptr_types): Make type creation more generic.
(shadow_mem_size): New function.
(asan_emit_stack_protection): Use newly added ASAN_SHADOW_GRANULARITY.
Rewritten stack unpoisoning code.
(build_shadow_mem_access): Add new argument return_address.
(instrument_derefs): Instrument local variables if use after scope
sanitization is enabled.
(asan_store_shadow_bytes): New function.
(asan_expand_mark_ifn): Likewise.
(asan_sanitize_stack_p): Moved from asan_sanitize_stack_p.
* asan.h (enum asan_mark_flags): Moved here from asan.c
(asan_protect_stack_decl): Protect all declaration that need
to live in memory.
(asan_sanitize_use_after_scope): New function.
(asan_no_sanitize_address_p): Likewise.
* cfgexpand.c (partition_stack_vars): Consider
asan_sanitize_use_after_scope in condition.
(expand_stack_vars): Likewise.
* common.opt (-fsanitize-address-use-after-scope): New option.
* doc/invoke.texi (use-after-scope-direct-emission-threshold):
Explain the parameter.
* flag-types.h (enum sanitize_code): Define SANITIZE_USE_AFTER_SCOPE.
* gimplify.c (build_asan_poison_call_expr): New function.
(asan_poison_variable): Likewise.
(gimplify_bind_expr): Generate poisoning/unpoisoning for local
variables that have address taken.
(gimplify_decl_expr): Likewise.
(gimplify_target_expr): Likewise for C++ temporaries.
(sort_by_decl_uid): New function.
(gimplify_expr): Unpoison all variables for a label we can jump
from outside of a scope.
(gimplify_switch_expr): Unpoison variables defined in the switch
context.
(gimplify_function_tree): Clear asan_poisoned_variables.
(asan_poison_variables): New function.
(warn_switch_unreachable_r): Handle IFN_ASAN_MARK.
* internal-fn.c (expand_ASAN_MARK): New function.
* internal-fn.def (ASAN_MARK): Declare.
* opts.c (finish_options): Handle -fstack-reuse if
-fsanitize-address-use-after-scope is enabled.
(common_handle_option): Enable address sanitization if
-fsanitize-address-use-after-scope is enabled.
* params.def (PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD):
New parameter.
* params.h: Likewise.
* sancov.c (pass_sanopt::execute): Handle IFN_ASAN_MARK.
* sanitizer.def: Define __asan_poison_stack_memory and
__asan_unpoison_stack_memory functions.
* asan.c (asan_mark_poison_p): New function.
(transform_statements): Handle asan_mark_poison_p calls.
* gimple.c (nonfreeing_call_p): Handle IFN_ASAN_MARK.

From-SVN: r241896

8 years agoFix the Windows native x86-64 build.
Tamar Christina [Mon, 7 Nov 2016 09:17:55 +0000 (09:17 +0000)]
Fix the Windows native x86-64 build.

PR driver/78196
* Makefile.in (SELFTEST_FLAGS): Added -o /dev/null.

From-SVN: r241895

8 years agotime_profiler: Set proper type to time_profiler_counter_ptr.
Martin Liska [Mon, 7 Nov 2016 08:57:44 +0000 (09:57 +0100)]
time_profiler: Set proper type to time_profiler_counter_ptr.

* tree-profile.c (gimple_gen_time_profiler): Set proper type
to time_profiler_counter_ptr.

From-SVN: r241894

8 years agore PR middle-end/37150 (basic-block vectorization misses some unrolled loops)
Richard Biener [Mon, 7 Nov 2016 08:06:08 +0000 (08:06 +0000)]
re PR middle-end/37150 (basic-block vectorization misses some unrolled loops)

2016-11-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/37150
* tree-vectorizer.h (vect_transform_slp_perm_load): Add n_perms
parameter.
* tree-vect-slp.c (vect_supported_load_permutation_p): Adjust.
(vect_analyze_slp_cost_1): Account for the real number of
permutations emitted and for dead loads.
(vect_transform_slp_perm_load): Add n_perms parameter counting
the number of emitted permutations.
* tree-vect-stmts.c (vectorizable_load): Adjust.

From-SVN: r241893

8 years agore PR tree-optimization/78189 (movaps generated for unaligned store in aligned struct...
Richard Biener [Mon, 7 Nov 2016 08:05:08 +0000 (08:05 +0000)]
re PR tree-optimization/78189 (movaps generated for unaligned store in aligned struct, when struct is referenced via unaligned member.)

2016-11-07  Richard Biener  <rguenther@suse.de>

PR tree-optimization/78189
* tree-vect-data-refs.c (vect_compute_data_ref_alignment): Fix
alignment computation.

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

From-SVN: r241892

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

From-SVN: r241891

8 years ago* gcc.dg/Wtrampolines.c: XFAIL AIX.
David Edelsohn [Sun, 6 Nov 2016 22:29:38 +0000 (22:29 +0000)]
* gcc.dg/Wtrampolines.c: XFAIL AIX.

From-SVN: r241888

8 years agore PR fortran/78226 (Fill out location information everywhere)
Thomas Koenig [Sun, 6 Nov 2016 21:27:32 +0000 (21:27 +0000)]
re PR fortran/78226 (Fill out location information everywhere)

2016-11-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/78226
resolve.c (build_loc_call): Add location to return value.

From-SVN: r241887

8 years agoallocate_with_source_14.f03: Fixed number mallocs occuring.
Andre Vehreschild [Sun, 6 Nov 2016 16:10:22 +0000 (17:10 +0100)]
allocate_with_source_14.f03: Fixed number mallocs occuring.

gcc/testsuite/ChangeLog:

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

* gfortran.dg/allocate_with_source_14.f03: Fixed number mallocs
occuring.

gcc/fortran/ChangeLog:

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

* expr.c (is_non_empty_structure_constructor): New function to detect
non-empty structure constructor.
(gfc_has_default_initializer): Analyse initializers.
* resolve.c (cond_init): Removed.
(resolve_allocate_expr): Removed dead code.  Moved invariant code out
of the loop over all objects to allocate.
(resolve_allocate_deallocate): Added the invariant code remove from
resolve_allocate_expr.
* trans-array.c (gfc_array_allocate): Removed nullify of structure
components in favour of doing this in gfc_trans_allocate for both
scalars and arrays in the same place.
* trans-expr.c (gfc_trans_init_assign): Always using _vptr->copy for
class objects.
* trans-stmt.c (allocate_get_initializer): Get the initializer
expression for object allocated.
(gfc_trans_allocate): Nullify a derived type only, when no SOURCE=
or MOLD= is present preventing duplicate work.  Moved the creation
of the init-expression here to prevent code for conditions that
can not occur on freshly allocated object, like checking for the need
to free allocatable components.

From-SVN: r241885

8 years agore PR fortran/78221 (bogus warning: Non-zero imaginary part discarded in conversion...
Thomas Koenig [Sun, 6 Nov 2016 12:27:51 +0000 (12:27 +0000)]
re PR fortran/78221 (bogus warning: Non-zero imaginary part discarded in conversion [-Wconversion])

2016-11-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/78221
        * arith.c (gfc_complex2real):  Change gfc_warning_now to
        gfc_warning.

2016-11-06  Thomas Koenig  <tkoenig@gcc.gnu.org>

        PR fortran/78221
        * gfortran.dg/warn_conversion_9.f90:  New test.

From-SVN: r241884

8 years agoipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code.
Kugan Vivekanandarajah [Sun, 6 Nov 2016 08:25:36 +0000 (08:25 +0000)]
ipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code.

2016-11-06  Kugan Vivekanandarajah  <kuganv@linaro.org>

* ipa-cp.c (ipcp_bits_lattice::meet_with): Remove unreachable code.

From-SVN: r241883

8 years agoDaily bump.
GCC Administrator [Sun, 6 Nov 2016 00:16:15 +0000 (00:16 +0000)]
Daily bump.

From-SVN: r241882

8 years agoinvoke.texi (Warning Options): Correct typos in -Walloca documentation.
Martin Sebor [Sat, 5 Nov 2016 19:54:17 +0000 (19:54 +0000)]
invoke.texi (Warning Options): Correct typos in -Walloca documentation.

gcc/ChangeLog:
* doc/invoke.texi (Warning Options): Correct typos in -Walloca
documentation.

From-SVN: r241875

8 years ago* es.po: Update.
Joseph Myers [Sat, 5 Nov 2016 19:34:21 +0000 (19:34 +0000)]
* es.po: Update.

From-SVN: r241873

8 years agocheck.c (gfc_check_move_alloc): Introduce error to prevent aliasing between to and...
Paul Thomas [Sat, 5 Nov 2016 14:25:25 +0000 (14:25 +0000)]
check.c (gfc_check_move_alloc): Introduce error to prevent aliasing between to and from arguments.

2016-11-05  Paul Thomas  <pault@gcc.gnu.org>

* check.c (gfc_check_move_alloc): Introduce error to prevent
aliasing between to and from arguments.

2016-11-05  Paul Thomas  <pault@gcc.gnu.org>

* gfortran.dg/move_alloc_17.f03: New test.

From-SVN: r241872

8 years agore PR ipa/78188 (AIX Bootstrap broken by tree-vrp.c change)
Richard Biener [Sat, 5 Nov 2016 13:06:08 +0000 (13:06 +0000)]
re PR ipa/78188 (AIX Bootstrap broken by tree-vrp.c change)

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

        PR bootstrap/78188
        * g++.dg/ipa/pr78188.C: New test.

From-SVN: r241871