- 10 Nov, 2016 13 commits
-
-
2016-11-10 Vladimir Makarov <vmakarov@redhat.com> * target.def (additional_allocno_class_p): New. * hooks.h (hook_bool_reg_class_t_false): New prototype. * hooks.c (hook_bool_reg_class_t_false): New. * ira.c (setup_allocno_and_important_classes): Use the new hook. * doc/tm.texi.in (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Add it. * doc/tm.texi: Update. From-SVN: r242043
Vladimir Makarov committed -
* mangle.c (mangle_decl): Only emit -Wc++1z-compat warnings for public or external symbols. * g++.dg/cpp1z/noexcept-type14.C: New test. * g++.dg/asan/asan_test.C: Remove -Wno-c++1z-compat from dg-options. From-SVN: r242042
Jakub Jelinek committed -
gcc/ChangeLog 2016-11-10 James Greenhalgh <james.greenhalgh@arm.com> * gcc.dg/torture/fp-int-convert.h (M_OK2): New, use it in WVAL0S tests added in r241817. From-SVN: r242041
James Greenhalgh committed -
* gengtype.c (new_structure): Append to structures list. (find_structure): Likewise. From-SVN: r242040
Jason Merrill committed -
gcc/ * tree-loop-distribution.c (pg_add_dependence_edges): Return 2 if this_dir is 2. Check for this_dir non-zero before dir != this_dir check. From-SVN: r242038
Jim Wilson committed -
gcc/ * omp-low.c (lower_omp_target): Fix up argument to is_reference. (expand_omp_ordered_sink): Handle TREE_PURPOSE of deps being TRUNC_DIV_EXPR. * gimplify.c (gimplify_scan_omp_clauses): Likewise. Set ctx->target_map_scalars_firstprivate on OMP_TARGET even for Fortran. Remove omp_no_lastprivate callers. Propagate lastprivate on combined teams distribute parallel for simd even to distribute and teams construct. For OMP_CLAUSE_DEPEND add missing break at the end of OMP_CLAUSE_DEPEND_SINK case. (omp_notice_variable): Use lang_hooks.decls.omp_scalar_p. (omp_no_lastprivate): Removed. (gimplify_adjust_omp_clauses): Remove omp_no_lastprivate callers. (gimplify_omp_for): Likewise. (computable_teams_clause): Fail for automatic vars from current function not yet seen in bind expr. * langhooks.c (lhd_omp_scalar_p): New function. * langhooks.h (struct lang_hooks_for_decls): Add omp_scalar_p. * varpool.c (varpool_node::get_create): Set node->offloading even for DECL_EXTERNAL decls. * langhooks-def.h (lhd_omp_scalar_p): New prototype. (LANG_HOOKS_OMP_SCALAR_P): Define. (LANG_HOOKS_DECLS): Use it. gcc/fortran/ * openmp.c (gfc_free_omp_clauses): Free critical_name, grainsize, hint, num_tasks, priority and if_exprs. (gfc_match_omp_to_link, gfc_match_omp_depend_sink): New functions. (enum omp_mask1, enum omp_mask2): New enums. Change all OMP_CLAUSE_* defines into enum values, and change their values from ((uint64_t) 1 << bit) to just bit. (omp_mask, omp_inv_mask): New classes. Add ctors and operators. (gfc_match_omp_clauses): Change mask argument from uint64_t to const omp_mask. Assert OMP_MASK1_LAST and OMP_MASK2_LAST are at most 64. Move delete clause handling to where it alphabetically belongs. Parse defaultmap, grainsize, hint, is_device_ptr, nogroup, nowait, num_tasks, priority, simd, threads and use_device_ptr clauses. Parse if clause modifier. Parse map clause always modifier, and release and delete kinds. Parse ordered clause with argument. Parse schedule clause modifiers. Differentiate device clause parsing based on openacc flag. Guard link clause parsing with openacc flag. Add support for parsing linear clause modifiers. Parse depend(source) and depend(sink: ...). Use gfc_match_omp_to_link for to and link clauses in declare target construct. (match_acc): Change mask type from uint64_t to const omp_mask. (OMP_SINGLE_CLAUSES, OMP_ORDERED_CLAUSES, OMP_DECLARE_TARGET_CLAUSES, OMP_TASKLOOP_CLAUSES, OMP_TARGET_ENTER_DATA_CLAUSES, OMP_TARGET_EXIT_DATA_CLAUSES): Define. (OACC_PARALLEL_CLAUSES, OACC_KERNELS_CLAUSES, OACC_DATA_CLAUSES, OACC_LOOP_CLAUSES, OACC_HOST_DATA_CLAUSES, OACC_DECLARE_CLAUSES, OACC_ENTER_DATA_CLAUSES, OACC_EXIT_DATA_CLAUSES, OACC_WAIT_CLAUSES, OACC_ROUTINE_CLAUSES, OMP_PARALLEL_CLAUSES, OMP_DECLARE_SIMD_CLAUSES, OMP_SECTIONS_CLAUSES, OMP_TEAMS_CLAUSES, OMP_DISTRIBUTE_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). (OMP_DO_CLAUSES): Likewise. Add OMP_CLAUSE_LINEAR. (OMP_SIMD_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_SIMDLEN. (OACC_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Replace OMP_CLAUSE_OACC_DEVICE with OMP_CLAUSE_DEVICE. (OMP_TASK_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_PRIORITY. (OMP_TARGET_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND, OMP_CLAUSE_NOWAIT, OMP_CLAUSE_PRIVATE, OMP_CLAUSE_FIRSTPRIVATE, OMP_CLAUSE_DEFAULTMAP and OMP_CLAUSE_IS_DEVICE_PTR. (OMP_TARGET_DATA_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_USE_DEVICE_PTR. (OMP_TARGET_UPDATE_CLAUSES): Replace first or only OMP_CLAUSE_* value in bitset with omp_mask (OMP_CLAUSE_*). Add OMP_CLAUSE_DEPEND and OMP_CLAUSE_NOWAIT. (match_omp): Change mask argument from unsigned int to const omp_mask. (gfc_match_omp_critical): Parse optional clauses and use omp_clauses union member instead of omp_name. (gfc_match_omp_end_critical): New function. (gfc_match_omp_distribute_parallel_do): Remove ordered and linear clauses from the mask. (gfc_match_omp_distribute_parallel_do_simd): Use & ~(omp_mask (OMP_CLAUSE_*)) instead of & ~OMP_CLAUSE_*. (gfc_match_omp_target_teams_distribute_parallel_do_simd): Likewise. (gfc_match_omp_teams_distribute_parallel_do_simd): Likewise. (gfc_match_omp_do_simd): Likewise. Don't remove ordered clause from the mask. (gfc_match_omp_parallel_do_simd): Likewise. (gfc_match_omp_target_teams_distribute_parallel_do): Likewise. (gfc_match_omp_teams_distribute_parallel_do): Likewise. (gfc_match_omp_declare_simd): If not using the form with (proc-name), require space before first clause. Make (proc-name) optional. If not present, set proc_name to NULL. (gfc_match_omp_declare_target): Rewritten for OpenMP 4.5. (gfc_match_omp_single): Use OMP_SINGLE_CLAUSES. (gfc_match_omp_task, gfc_match_omp_taskwait, gfc_match_omp_taskyield): Move around to where they belong alphabetically. (gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do, gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd, gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd): New functions. (gfc_match_omp_ordered): Parse clauses. (gfc_match_omp_ordered_depend): New function. (gfc_match_omp_cancel, gfc_match_omp_end_single): Use omp_mask (OMP_CLAUSE_*) instead of OMP_CLAUSE_*. (resolve_oacc_scalar_int_expr): Renamed to ... (resolve_scalar_int_expr): ... this. Fix up formatting. (resolve_oacc_positive_int_expr): Renamed to ... (resolve_positive_int_expr): ... this. Fix up formatting. (resolve_nonnegative_int_expr): New function. (resolve_omp_clauses): Adjust callers, use the above functions even for OpenMP clauses, add handling of new OpenMP 4.5 clauses. Require orderedc >= collapse if specified. Handle depend(sink:) and depend(source) restrictions. Disallow linear clause when orderedc is non-zero. Diagnose linear clause modifiers when not in declare simd. Only check for integer type if ref modifier is not used. Remove diagnostics for required VALUE attribute. Diagnose VALUE attribute with ref or uval modifiers. Allow non-constant linear-step, if it is a dummy argument alone and is mentioned in uniform clause. Diagnose map kinds not allowed for various constructs. Diagnose target {enter ,exit ,}data without any map clauses. Add dummy OMP_LIST_IS_DEVICE_PTR and OMP_LIST_USE_DEVICE_PTR cases. (gfc_resolve_omp_do_blocks): Set omp_current_do_collapse to orderedc if non-zero. (gfc_resolve_omp_parallel_blocks): Handle new OpenMP 4.5 constructs, replace underscores with spaces in a few construct names. (resolve_omp_do): Set collapse to orderedc if non-zero. Handle new OpenMP 4.5 constructs. (resolve_oacc_loop_blocks): Call resolve_positive_int_expr instead of resolve_oacc_positive_int_expr. (gfc_resolve_omp_directive): Handle new OpenMP 4.5 constructs. (gfc_resolve_omp_declare_simd): Allow ods->proc_name to be NULL. * trans-openmp.c (gfc_omp_scalar_p): New function. (doacross_steps): New variable. (gfc_trans_omp_clauses): Handle new OpenMP 4.5 clauses and new clause modifiers. (gfc_trans_omp_critical): Adjust EXEC_OMP_CRITICAL handling. (gfc_trans_omp_do): Handle doacross loops. Clear sched_simd flag. Handle EXEC_OMP_TASKLOOP. (gfc_trans_omp_ordered): Translate omp clauses, allow NULL code->block. (GFC_OMP_SPLIT_TASKLOOP, GFC_OMP_MASK_TASKLOOP): New enum constants. (gfc_split_omp_clauses): Copy orderedc together with ordered. Change firstprivate and lastprivate handling for OpenMP 4.5. Handle EXEC_OMP_TARGET_SIMD, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and EXEC_OMP_TASKLOOP{,_SIMD}. Add handling for new OpenMP 4.5 clauses and clause modifiers and handle if clause without/with modifiers. (gfc_trans_omp_teams): Add omp_clauses argument, add it to other teams clauses. Don't wrap into OMP_TEAMS if -fopenmp-simd. (gfc_trans_omp_target): For -fopenmp, translate num_teams and thread_limit clauses on combined target teams early and pass to gfc_trans_omp_teams. Set OMP_TARGET_COMBINED if needed. Handle EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and EXEC_OMP_TARGET_SIMD. (gfc_trans_omp_taskloop, gfc_trans_omp_target_enter_data, gfc_trans_omp_target_exit_data): New functions. (gfc_trans_omp_directive): Handle EXEC_OMP_TARGET_{ENTER,EXIT}_DATA EXEC_OMP_TASKLOOP{,_SIMD}, EXEC_OMP_TARGET_PARALLEL{,_DO,_DO_SIMD} and EXEC_OMP_TARGET_SIMD. Adjust gfc_trans_omp_teams caller. * symbol.c (check_conflict): Handle omp_declare_target_link. (gfc_add_omp_declare_target_link): New function. (gfc_copy_attr): Copy omp_declare_target_link. * dump-parse-tree.c (show_omp_namelist): Handle OMP_DEPEND_SINK_FIRST depend_op. Print linear clause modifiers. (show_omp_clauses): Adjust for OpenMP 4.5 clause changes. (show_omp_node): Print clauses for EXEC_OMP_ORDERED. Allow NULL c->block for EXEC_OMP_ORDERED. Formatting fixes. Adjust handling of EXEC_OMP_CRITICAL, handle new OpenMP 4.5 constructs and some forgotten OpenMP 4.0 constructs. (show_code_node): Handle new OpenMP 4.5 constructs and some forgotten OpenMP 4.0 constructs. * gfortran.h (symbol_attribute): Add omp_declare_target_link bitfield. (struct gfc_omp_namelist): Add u.common and u.linear_op fields. (struct gfc_common_head): Change omp_declare_target into bitfield. Add omp_declare_target_link bitfield. (gfc_add_omp_declare_target_link): New prototype. (enum gfc_statement): Add ST_OMP_TARGET_PARALLEL, ST_OMP_END_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO, ST_OMP_END_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_END_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_ENTER_DATA, ST_OMP_TARGET_EXIT_DATA, ST_OMP_TARGET_SIMD, ST_OMP_END_TARGET_SIMD, ST_OMP_TASKLOOP, ST_OMP_END_TASKLOOP, ST_OMP_TASKLOOP_SIMD, ST_OMP_END_TASKLOOP_SIMD and ST_OMP_ORDERED_DEPEND. (enum gfc_omp_depend_op): Add OMP_DEPEND_SINK_FIRST and OMP_DEPEND_SINK. (enum gfc_omp_linear_op): New. (struct gfc_omp_clauses): Add critical_name, depend_source, orderedc, defaultmap, nogroup, sched_simd, sched_monotonic, sched_nonmonotonic, simd, threads, grainsize, hint, num_tasks, priority and if_exprs fields. (enum gfc_exec_op): Add EXEC_OMP_END_CRITICAL, EXEC_OMP_TARGET_ENTER_DATA, EXEC_OMP_TARGET_EXIT_DATA, EXEC_OMP_TARGET_PARALLEL, EXEC_OMP_TARGET_PARALLEL_DO, EXEC_OMP_TARGET_PARALLEL_DO_SIMD, EXEC_OMP_TARGET_SIMD, EXEC_OMP_TASKLOOP, EXEC_OMP_TASKLOOP_SIMD. (enum gfc_omp_map_op): Add OMP_MAP_RELEASE, OMP_MAP_ALWAYS_TO, OMP_MAP_ALWAYS_FROM and OMP_MAP_ALWAYS_TOFROM. (OMP_LIST_IS_DEVICE_PTR, OMP_LIST_USE_DEVICE_PTR): New. (enum gfc_omp_if_kind): New. * module.c (enum ab_attribute): Add AB_OMP_DECLARE_TARGET_LINK. (attr_bits): Add AB_OMP_DECLARE_TARGET_LINK entry. (mio_symbol_attribute): Save and restore omp_declare_target_link bit. * trans.h (gfc_omp_scalar_p): New prototype. * frontend-passes.c (gfc_code_walker): Handle new OpenMP 4.5 expressions. * trans.c (trans_code): Handle new OpenMP 4.5 constructs. * resolve.c (gfc_resolve_blocks): Likewise. (gfc_resolve_code): Likewise. * f95-lang.c (LANG_HOOKS_OMP_SCALAR_P): Redefine to gfc_omp_scalar_p. (gfc_attribute_table): Add "omp declare target link". * st.c (gfc_free_statement): Handle EXEC_OMP_END_CRITICAL like EXEC_OMP_CRITICAL before, free clauses for EXEC_OMP_CRITICAL and new OpenMP 4.5 constructs. Free omp clauses even for EXEC_OMP_ORDERED. * match.c (match_exit_cycle): Rename collapse variable to count, set it to orderedc if non-zero, instead of collapse. * trans-decl.c (add_attributes_to_decl): Add "omp declare target link" instead of "omp declare target" for omp_declare_target_link. * trans-common.c (build_common_decl): Likewise. * match.h (gfc_match_omp_target_enter_data, gfc_match_omp_target_exit_data, gfc_match_omp_target_parallel, gfc_match_omp_target_parallel_do, gfc_match_omp_target_parallel_do_simd, gfc_match_omp_target_simd, gfc_match_omp_taskloop, gfc_match_omp_taskloop_simd, gfc_match_omp_end_critical, gfc_match_omp_ordered_depend): New prototypes. * parse.c (decode_omp_directive): Use gfc_match_omp_end_critical instead of gfc_match_omp_critical for !$omp end critical. Handle new OpenMP 4.5 constructs. If ordered directive has depend clause as the first of the clauses, use gfc_match_omp_ordered_depend and ST_OMP_ORDERED_DEPEND instead of gfc_match_omp_ordered and ST_OMP_ORDERED. (case_executable): Add ST_OMP_TARGET_ENTER_DATA, ST_OMP_TARGET_EXIT_DATA and ST_OMP_ORDERED_DEPEND cases. (case_exec_markers): Add ST_OMP_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TARGET_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD cases. (gfc_ascii_statement): Handle new OpenMP 4.5 constructs. (parse_omp_do): Handle ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD. (parse_omp_structured_block): Handle EXEC_OMP_END_CRITICAL instead of EXEC_OMP_CRITICAL, adjust for EXEC_OMP_CRITICAL having omp clauses now. (parse_executable): Handle ST_OMP_TARGET_PARALLEL, ST_OMP_TARGET_PARALLEL_DO, ST_OMP_TARGET_PARALLEL_DO_SIMD, ST_OMP_TASKLOOP and ST_OMP_TASKLOOP_SIMD. gcc/testsuite/ * gfortran.dg/gomp/pr77516.f90: Add dg-warning. * gfortran.dg/gomp/target1.f90: Remove ordered clause where it is no longer allowed and corresponding ordered construct. * gfortran.dg/gomp/linear-1.f90: New test. * gfortran.dg/gomp/declare-simd-2.f90: New test. * gfortran.dg/gomp/declare-target-1.f90: New test. * gfortran.dg/gomp/declare-target-2.f90: New test. libgomp/ * testsuite/libgomp.fortran/examples-4/declare_target-1.f90 (fib_wrapper): Add map(from: x) clause. * testsuite/libgomp.fortran/examples-4/declare_target-2.f90 (e_53_2): Likewise. * testsuite/libgomp.fortran/examples-4/declare_target-4.f90 (accum): Add map(tmp) clause. * testsuite/libgomp.fortran/examples-4/declare_target-5.f90 (accum): Add map(tofrom: tmp) clause. * testsuite/libgomp.fortran/examples-4/target_data-3.f90 (gramSchmidt): Likewise. * testsuite/libgomp.fortran/examples-4/teams-2.f90 (dotprod): Add map(tofrom: sum) clause. * testsuite/libgomp.fortran/nestedfn5.f90 (foo): Add twice map (alloc: a, l) clause. Add defaultmap(tofrom: scalar) clause. * testsuite/libgomp.fortran/pr66199-2.f90: Adjust for linear clause only allowed on the loop iterator. * testsuite/libgomp.fortran/target4.f90 (foo): Add map(t) clause. * testsuite/libgomp.fortran/taskloop2.f90: New test. * testsuite/libgomp.fortran/taskloop4.f90: New test. * testsuite/libgomp.fortran/doacross1.f90: New test. * testsuite/libgomp.fortran/doacross3.f90: New test. * testsuite/libgomp.fortran/taskloop1.f90: New test. * testsuite/libgomp.fortran/taskloop3.f90: New test. * testsuite/libgomp.fortran/doacross2.f90: New test. * testsuite/libgomp.c/doacross-1.c (main): Add missing #pragma omp atomic read. * testsuite/libgomp.c/doacross-2.c (main): Likewise. * testsuite/libgomp.c/doacross-3.c (main): Likewise. From-SVN: r242037
Jakub Jelinek committed -
PR sanitizer/78270 * gcc.dg/asan/pr78270.c: New test. PR sanitizer/78270 * gimplify.c (gimplify_switch_expr): Create live_switch_vars only when SWITCH_BODY is a BIND_EXPR. From-SVN: r242036
Martin Liska committed -
Disable unnecessary calls to dwarf2out_decl for the parents of nested functions. This fixes a libstdc++ build regression on x86_64-apple-darwin, as these calls used to add duplicate attributes (for instance DW_AT_inline and DW_AT_object_pointer) to the corresponding DW_TAG_subprogram DIE. Bootstrapped and regtested on x86_64-linux. gcc/ PR debug/78112 * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl on the context only when it has no DIE yet. testsuite/ PR debug/78112 * g++.dg/pr78112.C: New testcase Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r242035
Pierre-Marie de Rodat committed -
* arm.h (target_cpus): Delete. * arm-opts.h (enum processor_type): Prefix entires with TARGET_CPU_. * arm.c (all_cores): Prefix IDENT with TARGET_CPU_. (all_architectures): Likewise. (arm_option_override): Adjust use of CPU enums. (arm_sched_reorder): Likewise. * vfp.md (movdi_vfp, movdi_vfp_cortexa8): Likewise. * arm.opt (mcpu, mtune): Adjust use of CPU enums. * arm/genopt.sh (processor_type): Prefix enumeration entries with TARGET_CPU_. * arm-tables.opt: Regenerated. From-SVN: r242034
Richard Earnshaw committed -
2016-11-10 Siddhesh Poyarekar <siddhesh.poyarekar@linaro.org> * config/aarch64/aarch64-cores.def (qdf24xx): Update part number. (falkor): New core. * config/aarch64/aarch64-tune.md: Regenerated. * config/arm/arm-cores.def (falkor): New core. * config/arm/arm-tables.opt: Regenerated. * config/arm/arm-tune.md: Regenerated. * config/arm/bpabi.h (BE8_LINK_SPEC): Add falkor support. * config/arm/t-aprofile (MULTILIB_MATCHES): Likewise. * doc/invoke.texi (AArch64 Options/-mtune): Document it. (ARM Options/-mtune): Likewise. From-SVN: r242033
Siddhesh Poyarekar committed -
2016-11-10 Kugan Vivekanandarajah <kuganv@linaro.org> Revert 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: r242032
Kugan Vivekanandarajah committed -
match.pd transforms (A&C)|(B&~C) to ((A^B)&C)^B, which is fewer operations if C is not const (and it is not on simple tests at least, this transform is done very early already). Various processors have "insert" instructions that can do this, but combine cannot build those from the xor-and-xor, especially it has no chance at all to do that if A or B or multiple instructions as well (on PowerPC, the rl[wd]imi instructions can do this with together with a rotate, or a simple shift with appropriate C; other ISAs have similar insns). This patch makes RTL simplify transform (xor (and (xor A B) C) B) back to (ior (and A C) (and B ~C)) for constant C (and similar with A instead of B for that last term). * simplify-rtx.c (simplify_binary_operation_1): Simplify (xor (and (xor A B) C) B) to (ior (and A C) (and B ~C)) and (xor (and (xor A B) C) A) to (ior (and A ~C) (and B C)) if C is a const_int. From-SVN: r242031
Segher Boessenkool committed -
From-SVN: r242030
GCC Administrator committed
-
- 09 Nov, 2016 27 commits
-
-
* g++.dg/asan/asan_test.C: Remove -Wno-format, add -Wno-c++1z-compat. * g++.dg/asan/dejagnu-gtest.h (EXPECT_TRUE): Use "%s" format string in case condition contains % characters. From-SVN: r242027
Jakub Jelinek committed -
PR c++/78283 * mangle.c (start_mangling): Reset G.need_cxx1z_warning. * g++.dg/cpp1z/noexcept-type13.C: New test. From-SVN: r242026
Jakub Jelinek committed -
* libstdc++-v3/include/bits/regex.h (regex_iterator::regex_iterator()): Define end() as _M_pregex == nullptr. * libstdc++-v3/include/bits/regex.tcc (regex_iterator::operator==(), regex_iterator::operator++()): Fix operator==() and operator++() to look at null-ness of _M_pregex on both sides. * testsuite/28_regex/regression.cc: New testcase. From-SVN: r242025
Tim Shen committed -
Rename is_immutable to is_static_initializer to try to capture what it really means. Be more precise about when an address expression, or a binary expression, can be a static initializer. Don't check whether a type has pointers when deciding whether an initializer must be read-write, just check whether it is being used to initialize a global variable. To make that work set the Translate_context function to NULL for a global variable with a static initializer. The effect of this is to let more global variables be initialized directly, rather than being initialized in the generated init function. Reviewed-on: https://go-review.googlesource.com/32917 From-SVN: r242024
Ian Lance Taylor committed -
gcc/ChangeLog: * print-rtl-function.c: Include varasm.h. (print_any_param_name): New function. (print_param): New function. (print_rtx_function): Call print_param for each argument. * print-rtl.c (rtx_writer::finish_directive): New function. * print-rtl.h (rtx_writer::finish_directive): New decl. From-SVN: r242023
David Malcolm committed -
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
Toma Tabacu committed -
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
Janus Weil committed -
* 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
Jason Merrill committed -
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
Jason Merrill committed -
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
Uros Bizjak committed -
From-SVN: r242011
Martin Liska committed -
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
Fritz O. Reese committed -
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
Janus Weil committed -
PR target/77718 * builtins.c (expand_builtin_memcmp): Formatting fix. * gcc.c-torture/execute/pr77718.c: New test. From-SVN: r242007
Jakub Jelinek committed -
* 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
Jakub Jelinek committed -
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
Richard Biener committed -
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
Richard Biener committed -
* 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
Martin Liska committed -
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
Richard Biener committed -
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
Thomas Preud'homme committed -
PR target/78254 * config/m68k/m68k.md: Reject out-of-range bit pos in bit-fields insns operating on a register. From-SVN: r241996
Andreas Schwab committed -
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
Paul Thomas committed -
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
Prathamesh Kulkarni committed -
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
Janus Weil committed -
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
Richard Biener committed -
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
Richard Biener committed -
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
Kugan Vivekanandarajah committed
-