summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add TYPE_EMPTY_RECORD for C++ empty classhjl/pr60336/x86H.J. Lu2016-02-1723-18/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Empty record should be returned and passed the same way in C and C++. This patch overloads a bit, side_effects_flag, in tree_base for C++ empty class. Middle-end and x86 backend are updated to ignore empty records for parameter passing and function value return. Other targets may need similar changes. get_ref_base_and_extent is changed to set bitsize to 0 for empty records so that when ref_maybe_used_by_call_p_1 calls get_ref_base_and_extent to get 0 as the maximum size on empty record. Otherwise, find_tail_calls won't perform tail call optimization for functions with empty record parameters, as shown in g++.dg/pr60336-1.C and g++.dg/pr60336-2.C. A new cxx target hook, function_skip_empty_class_p, is added, which defaults to return false. This ABI change is enabled only if the ABI level is at least 10, which is updated in GCC 6, and the target hook TARGET_CXX_FUNCTION_SKIP_EMPTY_CLASS_P returns true. gcc/ PR c++/60336 PR middle-end/67239 PR target/68355 * calls.c (initialize_argument_information): Warn empty record if they are used in a variable argument list or aren't the last arguments. Replace targetm.calls.function_arg, targetm.calls.function_incoming_arg and targetm.calls.function_arg_advance with function_arg, function_incoming_arg and function_arg_advance. (expand_call): Replace targetm.calls.function_arg, targetm.calls.function_incoming_arg and targetm.calls.function_arg_advance with function_arg, function_incoming_arg and function_arg_advance. (emit_library_call_value_1): Likewise. (store_one_arg): Use 0 for empty record size. Don't push 0 size argument onto stack. (must_pass_in_stack_var_size_or_pad): Return false for empty record. * dse.c (get_call_args): Replace targetm.calls.function_arg and targetm.calls.function_arg_advance with function_arg and function_arg_advance. * explow.c (hard_function_value): Use 0 for empty record size. * expr.c (block_move_libcall_safe_for_call_parm): Replace targetm.calls.function_arg and targetm.calls.function_arg_advance with function_arg and function_arg_advance. (copy_blkmode_to_reg): Use 0 for empty record size. * function.c (aggregate_value_p): Replace targetm.calls.return_in_memory with return_in_memory. (assign_parm_data_all): Add warn_empty_record. (assign_parms_augmented_arg_list): Set warn_empty_record if empty records are used in a variable argument list or aren't the last arguments. (assign_parm_find_entry_rtl): Warn empty record if warn_empty_record is set. Replace targetm.calls.function_incoming_arg with function_incoming_arg. (assign_parms): Only warn empty record once. Replace targetm.calls.function_arg_advance with function_arg_advance. (gimplify_parameters): Replace targetm.calls.function_arg_advance with function_arg_advance. (locate_and_pad_parm): Use 0 for empty record size. (warn_empty_record): New function. (function_arg_advance): New wrapper function. (function_arg): Likewise. (function_incoming_arg): Likewise. (return_in_memory): Likewise. * lto-streamer-out.c (hash_tree): Call hstate.add_flag with TYPE_EMPTY_RECORD for types. * print-tree.c (print_node): Also handle TYPE_EMPTY_RECORD. * ubsan.c (ubsan_type_descriptor): Likewise. * target.def (cxx): Add function_skip_empty_class_p. * target.h (function_arg_advance): New prototype. (function_arg): Likewise. (function_incoming_arg): Likewise. (return_in_memory): Likewise. * targhooks.c (std_gimplify_va_arg_expr): Use 0 for empty record size. * tree-dfa.c (get_ref_base_and_extent): Likewise. * tree-core.h (tree_base): Mention TYPE_EMPTY_RECORD in comments for side_effects_flag. * tree-streamer-in.c (unpack_ts_base_value_fields): Stream in TYPE_EMPTY_RECORD for types. * tree-streamer-out.c (pack_ts_base_value_fields): Stream out TYPE_EMPTY_RECORD for types. * tree.h (TYPE_EMPTY_RECORD): New. (type_is_empty_record_p): New static inline function. * var-tracking.c (prepare_call_arguments): Replace targetm.calls.function_arg and targetm.calls.function_arg_advance with function_arg and function_arg_advance. * config/i386/i386.c (ix86_gimplify_va_arg): Use 0 for empty record size. (TARGET_CXX_FUNCTION_SKIP_EMPTY_CLASS_P): New hook to return true. * doc/tm.texi.in (TARGET_CXX_FUNCTION_SKIP_EMPTY_CLASS_P): New hook. * doc/tm.texi: Regenerated. gcc/c PR c++/60336 PR middle-end/67239 PR target/68355 * c-aux-info.c (gen_type): Add TYPE_EMPTY_RECORD check. gcc/cp/ PR c++/60336 PR middle-end/67239 PR target/68355 * class.c (is_empty_collection): New function. (is_empty_record): Likewise. (finish_struct_1): Set TYPE_EMPTY_RECORD with return value from is_empty_record () if the ABI level is at least 10. gcc/lto/ PR c++/60336 PR middle-end/67239 PR target/68355 * lto.c (compare_tree_sccs_1): Call compare_values with TYPE_EMPTY_RECORD for types. gcc/testsuite/ PR c++/60336 PR middle-end/67239 PR target/68355 * g++.dg/abi/empty12.C: New test. * g++.dg/abi/empty12.h: Likewise. * g++.dg/abi/empty12a.c: Likewise. * g++.dg/abi/empty13.C: Likewise. * g++.dg/abi/empty13.h: Likewise. * g++.dg/abi/empty13a.c: Likewise. * g++.dg/abi/empty14.C: Likewise. * g++.dg/abi/empty14.h: Likewise. * g++.dg/abi/empty14a.c: Likewise. * g++.dg/abi/empty15.C: Likewise. * g++.dg/abi/empty15.h: Likewise. * g++.dg/abi/empty15a.c: Likewise. * g++.dg/abi/empty16.C: Likewise. * g++.dg/abi/empty16.h: Likewise. * g++.dg/abi/empty16a.c: Likewise. * g++.dg/abi/empty17.C: Likewise. * g++.dg/abi/empty17.h: Likewise. * g++.dg/abi/empty17a.c: Likewise. * g++.dg/pr60336-1.C: Likewise. * g++.dg/pr60336-2.C: Likewise. * g++.dg/pr60336-3.C: Likewise. * g++.dg/pr60336-4.C: Likewise. * g++.dg/pr60336-5.C: Likewise. * g++.dg/pr60336-6.C: Likewise. * g++.dg/pr60336-7.C: Likewise. * g++.dg/pr60336-8.C: Likewise. * g++.dg/pr60336-9.C: Likewise. * g++.dg/pr60336-10.C: Likewise. * g++.dg/pr60336-11.C: Likewise. * g++.dg/pr60336-12.C: Likewise. * g++.dg/pr68355.C: Likewise.
* Add more tests for empty typesH.J. Lu2016-02-179-0/+252
|
* Rename to is_empty_type/is_really_empty_typeH.J. Lu2016-02-171-27/+20
|
* Properly pass C++ empty classH.J. Lu2016-02-1717-30/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use 0 for empty record size in TARGET_GIMPLIFY_VA_ARG_EXPR. PR c++/60336 PR middle-end/67239 PR target/68355 * config/aarch64/aarch64.c (aarch64_gimplify_va_arg_expr): Use 0 for empty record size. * config/mep/mep.c (mep_gimplify_va_arg_expr): Likewise. * config/mips/mips.c (mips_std_gimplify_va_arg_expr): Likewise. (mips_gimplify_va_arg_expr): Likewise. * config/msp430/msp430.c (msp430_gimplify_va_arg_expr): Likewise. * config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise. * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Likewise. * config/s390/s390.c (s390_gimplify_va_arg): Likewise. * config/sh/sh.c (sh_gimplify_va_arg_expr): Likewise. * config/sparc/sparc.c (sparc_gimplify_va_arg): Likewise. * config/spu/spu.c (spu_gimplify_va_arg_expr): Likewise. * config/stormy16/stormy16.c (xstormy16_gimplify_va_arg_expr): Likewise. * config/visium/visium.c (visium_gimplify_va_arg): Likewise. * config/xtensa/xtensa.c (xtensa_gimplify_va_arg_expr): Likewise. * config/alpha/alpha.c (alpha_setup_incoming_varargs): Replace targetm.calls.function_arg_advance with function_arg_advance. (alpha_gimplify_va_arg_1): Use 0 for empty record size. * config/microblaze/microblaze.c (microblaze_expand_prologue): Replace targetm.calls.function_arg with function_arg. Replace targetm.calls.function_arg_advance with function_arg_advance. * config/tilegx/tilegx.c (tilegx_setup_incoming_varargs): Replace targetm.calls.function_arg_advance with function_arg_advance. (tilegx_gimplify_va_arg_expr): Use 0 for empty record size. * config/tilepro/tilepro.c (tilepro_setup_incoming_varargs): Replace targetm.calls.function_arg_advance with function_arg_advance. (tilepro_gimplify_va_arg_expr): Use 0 for empty record size.
* Add TYPE_EMPTY_RECORD for C++ empty classH.J. Lu2016-02-1742-70/+703
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Empty record should be returned and passed the same way in C and C++. This patch overloads a bit, side_effects_flag, in tree_base for C++ empty class. Middle-end and x86 backend are updated to ignore empty records for parameter passing and function value return. Other targets may need similar changes. get_ref_base_and_extent is changed to set bitsize to 0 for empty records so that when ref_maybe_used_by_call_p_1 calls get_ref_base_and_extent to get 0 as the maximum size on empty record. Otherwise, find_tail_calls won't perform tail call optimization for functions with empty record parameters, as shown in g++.dg/pr60336-1.C and g++.dg/pr60336-2.C. This ABI change is enabled only if the ABI level is at least 10, which is updated in GCC 6. gcc/ PR c++/60336 PR middle-end/67239 PR target/68355 * calls.c (initialize_argument_information): Warn empty record if they are used in a variable argument list or aren't the last arguments. Replace targetm.calls.function_arg, targetm.calls.function_incoming_arg and targetm.calls.function_arg_advance with function_arg, function_incoming_arg and function_arg_advance. (expand_call): Replace targetm.calls.function_arg, targetm.calls.function_incoming_arg and targetm.calls.function_arg_advance with function_arg, function_incoming_arg and function_arg_advance. (emit_library_call_value_1): Likewise. (store_one_arg): Use 0 for empty record size. Don't push 0 size argument onto stack. (must_pass_in_stack_var_size_or_pad): Return false for empty record. * dse.c (get_call_args): Replace targetm.calls.function_arg and targetm.calls.function_arg_advance with function_arg and function_arg_advance. * explow.c (hard_function_value): Use 0 for empty record size. * expr.c (block_move_libcall_safe_for_call_parm): Replace targetm.calls.function_arg and targetm.calls.function_arg_advance with function_arg and function_arg_advance. (copy_blkmode_to_reg): Use 0 for empty record size. * function.c (aggregate_value_p): Replace targetm.calls.return_in_memory with return_in_memory. (assign_parm_data_all): Add warn_empty_record. (assign_parms_augmented_arg_list): Set warn_empty_record if empty records are used in a variable argument list or aren't the last arguments. (assign_parm_find_entry_rtl): Warn empty record if warn_empty_record is set. Replace targetm.calls.function_incoming_arg with function_incoming_arg. (assign_parms): Only warn empty record once. Replace targetm.calls.function_arg_advance with function_arg_advance. (gimplify_parameters): Replace targetm.calls.function_arg_advance with function_arg_advance. (locate_and_pad_parm): Use 0 for empty record size. (warn_empty_record): New function. (function_arg_advance): New wrapper function. (function_arg): Likewise. (function_incoming_arg): Likewise. (return_in_memory): Likewise. * lto-streamer-out.c (hash_tree): Call hstate.add_flag with TYPE_EMPTY_RECORD for types. * print-tree.c (print_node): Also handle TYPE_EMPTY_RECORD. * ubsan.c (ubsan_type_descriptor): Likewise. * target.h (function_arg_advance): New prototype. (function_arg): Likewise. (function_incoming_arg): Likewise. (return_in_memory): Likewise. * targhooks.c (std_gimplify_va_arg_expr): Use 0 for empty record size. * tree-dfa.c (get_ref_base_and_extent): Likewise. * tree-core.h (tree_base): Mention TYPE_EMPTY_RECORD in comments for side_effects_flag. * tree-streamer-in.c (unpack_ts_base_value_fields): Stream in TYPE_EMPTY_RECORD for types. * tree-streamer-out.c (pack_ts_base_value_fields): Stream out TYPE_EMPTY_RECORD for types. * tree.h (TYPE_EMPTY_RECORD): New. (type_is_empty_record_p): New static inline function. * var-tracking.c (prepare_call_arguments): Replace targetm.calls.function_arg and targetm.calls.function_arg_advance with function_arg and function_arg_advance. * config/i386/i386.c (ix86_gimplify_va_arg): Use 0 for empty record size. gcc/c PR c++/60336 PR middle-end/67239 PR target/68355 * c-aux-info.c (gen_type): Add TYPE_EMPTY_RECORD check. gcc/cp/ PR c++/60336 PR middle-end/67239 PR target/68355 * class.c (is_empty_collection): New function. (is_empty_record): Likewise. (finish_struct_1): Set TYPE_EMPTY_RECORD with return value from is_empty_record () if the ABI level is at least 10. gcc/lto/ PR c++/60336 PR middle-end/67239 PR target/68355 * lto.c (compare_tree_sccs_1): Call compare_values with TYPE_EMPTY_RECORD for types. gcc/testsuite/ PR c++/60336 PR middle-end/67239 PR target/68355 * g++.dg/abi/empty12.C: New test. * g++.dg/abi/empty12.h: Likewise. * g++.dg/abi/empty12a.c: Likewise. * g++.dg/abi/empty13.C: Likewise. * g++.dg/abi/empty13.h: Likewise. * g++.dg/abi/empty13a.c: Likewise. * g++.dg/abi/empty14.C: Likewise. * g++.dg/abi/empty14.h: Likewise. * g++.dg/abi/empty14a.c: Likewise. * g++.dg/abi/empty15.C: Likewise. * g++.dg/abi/empty15.h: Likewise. * g++.dg/abi/empty15a.c: Likewise. * g++.dg/pr60336-1.C: Likewise. * g++.dg/pr60336-2.C: Likewise. * g++.dg/pr60336-3.C: Likewise. * g++.dg/pr60336-4.C: Likewise. * g++.dg/pr60336-5.C: Likewise. * g++.dg/pr60336-6.C: Likewise. * g++.dg/pr60336-7.C: Likewise. * g++.dg/pr60336-8.C: Likewise. * g++.dg/pr60336-9.C: Likewise. * g++.dg/pr68355.C: Likewise.
* xtensa: fix libgcc build with --text-section-literalsjcmvbkbc2016-02-173-0/+11
| | | | | | | | | | | | | | | | Functions __muldf3_aux, __divdf3_aux, __mulsf3_aux and __divsf3_aux don't start with leaf_entry, so they need explicit .literal_position, otherwise libgcc build fails in the presence of --text-section-literals. 2016-02-17 Max Filippov <jcmvbkbc@gmail.com> libgcc/ * config/xtensa/ieee754-df.S (__muldf3_aux, __divdf3_aux): Add .literal_position before the function. * config/xtensa/ieee754-sf.S (__mulsf3_aux, __divsf3_aux): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233505 138bc75d-0d04-0410-961f-82ee72b054a4
* * doc/extend.texi (C++ Attributes): Correct description ofredi2016-02-172-1/+6
| | | | | | warn_unused type attribute. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233502 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-17 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2016-02-172-1/+9
| | | | | | | PR libgfortran/69651 * io/list_read.c (push_char4): Fix the pointer usage for xrealloc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233500 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc]wschmidt2016-02-174-1/+32
| | | | | | | | | | | | | | | | | 2016-02-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * config/rs6000/altivec.md (*altivec_lvxl_<mode>_internal): Output correct instruction. [gcc/testsuite] 2012-02-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * gcc.target/powerpc/vec-cg.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233499 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-17 Richard Biener <rguenther@suse.de>rguenth2016-02-172-9/+38
| | | | | | | | | | | | | PR rtl-optimization/69609 * bb-reorder.c (struct bbro_basic_block_data): Add priority member. (find_traces_1_round): When ending a trace update cached priority of successors. (bb_to_key): Use cached priority when available. (copy_bb): Initialize cached priority. (reorder_basic_blocks_software_trace_cache): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233498 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-17 Richard Biener <rguenther@suse.de>rguenth2016-02-172-1/+6
| | | | | | | | PR testsuite/69586 * gcc.dg/uninit-21.c: Add -fno-short-enums. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233497 138bc75d-0d04-0410-961f-82ee72b054a4
* [AArch64] PR target/69161: Don't use special predicate for CCmode ↵ktkachov2016-02-175-8/+57
| | | | | | | | | | | | | | | | | | | | | | | | comparisons in expressions that require matching modes PR target/69161 * config/aarch64/predicates.md (aarch64_comparison_operator_mode): New predicate. (aarch64_comparison_operator): Break overly long line into two. (aarch64_comparison_operation): Likewise. * config/aarch64/aarch64.md (cstorecc4): Use aarch64_comparison_operator_mode instead of aarch64_comparison_operator. (cstore<mode>4): Likewise. (aarch64_cstore<mode>): Likewise. (*cstoresi_insn_uxtw): Likewise. (cstore<mode>_neg): Likewise. (*cstoresi_neg_uxtw): Likewise. * gcc.c-torture/compile/pr69161.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233496 138bc75d-0d04-0410-961f-82ee72b054a4
* [ARM] PR target/69161: Don't ignore mode when matching comparison operator ↵ktkachov2016-02-174-7/+29
| | | | | | | | | | | | | | | | | | | | in cstore-like patterns PR target/69161 * config/arm/predicates.md (arm_comparison_operator_mode): New predicate. * config/arm/arm.md (*mov_scc): Use arm_comparison_operator_mode instead of arm_comparison_operator. (*mov_negscc): Likewise. (*mov_notscc): Likewise. * config/arm/thumb2.md (*thumb2_mov_scc): Likewise. (*thumb2_mov_negscc): Likewise. (*thumb2_mov_negscc_strict_it): Likewise. (*thumb2_mov_notscc): Likewise. (*thumb2_mov_notscc_strict_it): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233495 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-17 David Sherwood <david.sherwood@arm.com>davids2016-02-173-2/+8
| | | | | | | | | | | gcc/testsuite: PR target/69532 * gcc.target/arm/fmaxmin.c: Change effective target to arm_v8_neon_hw. * gcc.target/arm/vect-fmaxmin.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233494 138bc75d-0d04-0410-961f-82ee72b054a4
* As part of the final cleanup of aarch64_internal_mov_immediate a return waswilco2016-02-172-0/+6
| | | | | | | | | | | | | | | | accidentally removed. This causes the 2-instruction case to fallthrough into the general case even when it found a match. An example immediate is 0xcccccccccccccccd which was using 2 instructions in GCC5 but now requires 4. Adding the return fixes the regressions. 2016-02-17 Wilco Dijkstra <wdijkstr@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_internal_mov_immediate): Add missing return. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233490 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc.dg/ifcvt-4.c: Skip on Visium.ebotcazou2016-02-172-1/+5
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233489 138bc75d-0d04-0410-961f-82ee72b054a4
* * config/visium/visium.c (machine_libfunc_index): New enum.ebotcazou2016-02-172-18/+88
| | | | | | | | | | | | | | | | | (machine_libfuncs): New structure. (visium_libfuncs): New static variable. (TARGET_INIT_LIBFUNCS): Define to... (visium_init_libfuncs): ...this. New function. (expand_block_move_4): Use the appropriate libfunc. (expand_block_move_2): Likewise. (expand_block_move_1): Likewise. (expand_block_set_4): Likewise. (expand_block_set_2): Likewise. (expand_block_set_1): Likewise. (visium_trampoline_init): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233488 138bc75d-0d04-0410-961f-82ee72b054a4
* * config/msp430/msp430.c (msp430_mcu_data): Sync with data fromnickc2016-02-172-3/+22
| | | | | | | TI's devices.csv file as of March 2016. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233487 138bc75d-0d04-0410-961f-82ee72b054a4
* * exp_ch4.adb (Expand_N_Indexed_Component): Active synchronization ifebotcazou2016-02-175-1/+51
| | | | | | | | | the prefix denotes an entity which Has_Atomic_Components. * gcc-interface/trans.c (node_is_atomic): Return true if the prefix denotes an entity which Has_Atomic_Components. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233485 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR onlyebotcazou2016-02-175-5/+51
| | | | | | | for fat pointer or scalar types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233484 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-16 Tim Shen <timshen@google.com>timshen2016-02-174-11/+38
| | | | | | | | | | | PR libstdc++/69794 * include/bits/regex_scanner.h: Add different special character sets for grep and egrep regex. * include/bits/regex_scanner.tcc: Use _M_spec_char more uniformly. * testsuite/28_regex/regression.cc: Add new testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233482 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/10200jason2016-02-1711-60/+107
| | | | | | | | | | PR c++/69753 * call.c, cp-tree.h, name-lookup.c, pt.c, search.c, semantics.c, tree.c, typeck2.c: Revert earlier changes. * parser.c (cp_parser_lookup_name): Ignore namespace-scope non-type templates after -> or . git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233481 138bc75d-0d04-0410-961f-82ee72b054a4
* Daily bump.gccadmin2016-02-171-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233480 138bc75d-0d04-0410-961f-82ee72b054a4
* [gcc]kelvin2016-02-166-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | 2016-02-16 Kelvin Nilsen <kelvin@gcc.gnu.org> PR Target/48344 * opts-global.c (handle_common_deferred_options): Introduce and initialize two global variables to remember command-line options specifying a stack-limiting register. * opts.h: Add extern declarations of the two new global variables. * emit-rtl.c (init_emit_once): Initialize the stack_limit_rtx variable based on the values of the two new global variables. [gcc/testsuite] 2016-02-16 Kelvin Nilsen <kelvin@gcc.gnu.org> PR Target/48344 * gcc.target/powerpc/pr48344-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233477 138bc75d-0d04-0410-961f-82ee72b054a4
* 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org>tkoenig2016-02-164-2/+32
| | | | | | | | | | | | | | | PR fortran/69742 * frontend-passes.c (cfe-expr_0): Don't register functions from within an ASSOCIATE statement. 2015-02-16 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/69742 * gfortran.dg/associate_21.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233474 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/69835jakub2016-02-1616-25/+235
| | | | | | | | | | | | | | | | | | | | | | | | * common.opt (Wnonnull-compare): New warning. * doc/invoke.texi (-Wnonnull): Remove text about comparison of arguments against NULL. (-Wnonnull-compare): Document. * Makefile.in (OBJS): Add gimple-ssa-nonnull-compare.o. * tree-pass.h (make_pass_warn_nonnull_compare): Declare. * passes.def (pass_warn_nonnull_compare): Add. * gimple-ssa-nonnull-compare.c: New file. c-family/ * c.opt (Wnonnull-compare): Enable for -Wall. c/ * c-typeck.c (build_binary_op): Revert 2015-09-09 change. cp/ * typeck.c (cp_build_binary_op): Revert 2015-09-09 change. testsuite/ * c-c++-common/nonnull-1.c: Use -Wnonnull-compare instead of -Wnonnull in dg-options. * c-c++-common/nonnull-2.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233472 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/69657jason2016-02-164-3/+30
| | | | | | | | * name-lookup.c (lookup_qualified_name): Add find_hidden parm. (set_decl_namespace): Pass it. Complain about finding a hidden friend. * name-lookup.h: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233470 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/gigi.h (maybe_debug_type): New inline function.ebotcazou2016-02-164-11/+34
| | | | | | | | | | * gcc-interface/misc.c (gnat_get_array_descr_info): Use it. Call maybe_character_value on the array bounds. Get to the base type of the index type and call maybe_debug_type on it. * gcc-interface/utils.c (finish_character_type): Add special treatment git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233469 138bc75d-0d04-0410-961f-82ee72b054a4
* * gcc-interface/misc.c (gnat_enum_underlying_base_type): New function.ebotcazou2016-02-162-0/+16
| | | | | | | (LANG_HOOKS_ENUM_UNDERLYING_BASE_TYPE): Define to above. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233467 138bc75d-0d04-0410-961f-82ee72b054a4
* [AArch64] Remove AARCH64_EXTRA_TUNE_RECIP_SQRT from Cortex-A57 tuningjgreenhalgh2016-02-162-2/+6
| | | | | | | | | | | gcc/ * config/aarch64/aarch64.c (cortexa57_tunings): Remove AARCH64_EXTRA_TUNE_RECIP_SQRT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233463 138bc75d-0d04-0410-961f-82ee72b054a4
* [Patch AArch64] Use software sqrt expansion always for ↵jgreenhalgh2016-02-162-2/+8
| | | | | | | | | | | | | -mlow-precision-recip-sqrt gcc/ * config/aarch64/aarch64.c (use_rsqrt_p): Always use software reciprocal sqrt for -mlow-precision-recip-sqrt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233462 138bc75d-0d04-0410-961f-82ee72b054a4
* [Patch AArch64] GCC 6 regression in vector performance. - Fix vector ↵jgreenhalgh2016-02-164-28/+92
| | | | | | | | | | | | | | | | | initialization to happen with lane load instructions. gcc/ * config/aarch64/aarch64.c (aarch64_expand_vector_init): Refactor, always use lane loads to construct non-constant vectors. gcc/testsuite/ * gcc.target/aarch64/vector_initialization_nostack.c: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233461 138bc75d-0d04-0410-961f-82ee72b054a4
* [Patch AArch64] Restrict 16-bit sqrdml{sa}h instructions to FP_LO_REGSjgreenhalgh2016-02-162-4/+11
| | | | | | | | | | | | | gcc/ * config/aarch64/aarch64.md (arch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Fix register constraints for operand 3. (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233460 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/69801jakub2016-02-162-0/+7
| | | | | | | * gcc.dg/pr69801.c: Add empty dg-options. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233459 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c/64748jnorris2016-02-168-15/+76
| | | | | | | | | | | | | | | | gcc/c/ * c-parser.c (c_parser_oacc_data_clause_deviceptr): Allow parms. gcc/cp/ * parser.c (cp_parser_oacc_data_clause_deviceptr): Remove checking. * semantics.c (finish_omp_clauses): Add deviceptr checking. gcc/testsuite/ * c-c++-common/goacc/deviceptr-1.c: Add tests. * g++.dg/goacc/deviceptr-1.c: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233458 138bc75d-0d04-0410-961f-82ee72b054a4
* PR tree-optimization/69820jakub2016-02-164-10/+66
| | | | | | | | | | | | * tree-vect-patterns.c (type_conversion_p): Return false if *orig_type is unsigned single precision or boolean. (vect_recog_dot_prod_pattern, vect_recog_widen_mult_pattern): Formatting fix. * gcc.dg/vect/pr69820.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233457 138bc75d-0d04-0410-961f-82ee72b054a4
* PR rtl-optimization/69764jakub2016-02-162-0/+17
| | | | | | | | | PR rtl-optimization/69771 * optabs.c (expand_binop): Ensure for shift optabs invalid CONST_INT op1 is valid for GET_MODE_INNER (mode) and force it into a reg. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233456 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-16 Richard Biener <rguenther@suse.de>rguenth2016-02-166-19/+58
| | | | | | | | | | | | | | | | | PR tree-optimization/69776 * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Get alias sets from caller. (indirect_refs_may_alias_p): Likewise. (refs_may_alias_p_1): Pass alias sets as from ao_ref. * tree-ssa-sccvn.c (vn_reference_lookup): Also adjust vr alias-set according to tbaa_p. * tree-ssa-dom.c (lookup_avail_expr): Add tbaa_p flag. (optimize_stmt): For redundant store discovery do not allow tbaa. * gcc.dg/torture/pr69776-2.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233453 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix bswap optimization on big-endian (PR69714, 67781).bernds2016-02-164-30/+185
| | | | | | | | | | | | | | PR tree-optimization/69714 * tree-ssa-math-opts.c (find_bswap_or_nop): Revert previous change. Return NULL if we have irrelevant high bytes on BIG_ENDIAN. testsuite/ PR tree-optimization/69714 * gcc.dg/torture/pr69714.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233452 138bc75d-0d04-0410-961f-82ee72b054a4
* [ARC] Add single/double IEEE precission FPU support.claziss2016-02-1611-104/+1103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gcc/ 2016-02-16 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc-modes.def (CC_FPU, CC_FPU_UNEQ): New modes. * config/arc/arc-opts.h (FPU_SP, FPU_SF, FPU_SC, FPU_SD, FPU_DP) (FPU_DF, FPU_DC, FPU_DD, FXP_DP): Define. * config/arc/arc.c (arc_init): Check FPU options. (get_arc_condition_code): Handle new CC_FPU* modes. (arc_select_cc_mode): Likewise. (arc_conditional_register_usage): Allow 64 bit datum into even-odd register pair only. Allow access for ARCv2 accumulator. (gen_compare_reg): Whenever we have FPU support use FPU compare instructions. (arc_reorg): Don't generate brcc insns when FPU compare instructions are involved. * config/arc/arc.h (TARGET_DPFP): Add TARGET_FP_DPAX condition. (TARGET_OPTFPE): Add condition when ARC EM can use optimized floating point emulation. (ACC_REG_FIRST, ACC_REG_LAST, ACCL_REGNO, ACCH_REGNO): Define. (REVERSE_CONDITION): Add new CC_FPU* modes. (TARGET_FP_SP_BASE): Define. (TARGET_FP_DP_BASE): Likewise. (TARGET_FP_SP_FUSED): Likewise. (TARGET_FP_DP_FUSED): Likewise. (TARGET_FP_SP_CONV): Likewise. (TARGET_FP_DP_CONV): Likewise. (TARGET_FP_SP_SQRT): Likewise. (TARGET_FP_DP_SQRT): Likewise. (TARGET_FP_DP_AX): Likewise. * config/arc/arc.md (ARCV2_ACC): New constant. (type): New fpu type attribute. (SDF): Conditional iterator. (cstore<mode>, cbranch<mode>): Change expand condition. (addsf3, subsf3, mulsf3, adddf3, subdf3, muldf3): New expands, handles FPU/FPX cases as well. * config/arc/arc.opt (mfpu): New option. * config/arc/fpx.md (addsf3_fpx, subsf3_fpx, mulsf3_fpx): Renamed. (adddf3, muldf3, subdf3): Removed. * config/arc/predicates.md (proper_comparison_operator): Recognize CC_FPU* modes. * config/arc/fpu.md: New file. * doc/invoke.texi (ARC Options): Document mfpu option. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233451 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-16 Richard Biener <rguenther@suse.de>rguenth2016-02-162-1/+8
| | | | | | | | | PR rtl-optimization/69291 * ifcvt.c (noce_try_store_flag_constants): Re-instantiate noce_operand_ok check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233448 138bc75d-0d04-0410-961f-82ee72b054a4
* Don't call call_cgraph_insertion_hooks in simd_clone_createvries2016-02-164-1/+18
| | | | | | | | | | | | 2016-02-16 Tom de Vries <tom@codesourcery.com> PR lto/67709 * omp-low.c (simd_clone_create): Remove call to symtab->call_cgraph_insertion_hooks. * testsuite/libgomp.fortran/declare-simd-4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233447 138bc75d-0d04-0410-961f-82ee72b054a4
* PR tree-optimization/69802jakub2016-02-164-10/+81
| | | | | | | | | | | | | | * tree-ssa-reassoc.c (update_range_test): If op is SSA_NAME_IS_DEFAULT_DEF, give up unless tem is a positive op == 1 test of precision 1 integral op, otherwise handle that case as op itself. Fix up formatting. (optimize_range_tests_to_bit_test, optimize_range_tests): Fix up formatting. * gcc.dg/pr69802.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233446 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-16 Richard Biener <rguenther@suse.de>rguenth2016-02-162-1/+7
| | | | | | | | | PR tree-optimization/69586 * tree-vrp.c (register_edge_assert_for_2): Handle all integral types for conversion sources. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233445 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-16 Richard Biener <rguenther@suse.de>rguenth2016-02-164-0/+23
| | | | | | | | | | | PR middle-end/69801 * fold-const.c (operand_equal_p): For COND_EXPR zero operand mask OEP_ADDRESS_OF. * gcc.dg/pr69801.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233444 138bc75d-0d04-0410-961f-82ee72b054a4
* Daily bump.gccadmin2016-02-161-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233441 138bc75d-0d04-0410-961f-82ee72b054a4
* [RS6000] reload_vsx_from_gprsf splitteramodra2016-02-153-53/+61
| | | | | | | | | | | | | | | | | | | | | | | | | This is PR68973 part 2, caused by the reload_vsx_from_gprsf splitter emitting an invalid move. The patch also fixes uses of TFmode, which cannot now be assumed to be IBM double-double. PR target/68973 * config/rs6000/rs6000.md (reload_vsx_from_gprsf): Rewrite splitter. (p8_mtvsrd_df, p8_mtvsrd_sf): New. (p8_mtvsrd_1, p8_mtvsrd_2): Delete. (p8_mtvsrwz): New. (p8_mtvsrwz_1, p8_mtvsrwz_2): Delete. (p8_xxpermdi_<mode>): Take two DF inputs rather than one TF. (p8_fmrgow_<mode>): Likewise. (reload_vsx_from_gpr<mode>): Make clobber IF. Adjust for above changes. (reload_fpr_from_gpr<mode>): Similarly. Use "d" for op0 constraint. (reload_vsx_from_gprsf): Use p8_mtvsrd_sf rather than attempting to use movdi_internal64. Remove op0_di. * config/rs6000/vsx.md (vsx_xscvspdpn_directmove): Make op1 SFmode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233438 138bc75d-0d04-0410-961f-82ee72b054a4
* * sv.po: Update.jsm282016-02-152-141/+145
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233437 138bc75d-0d04-0410-961f-82ee72b054a4
* 2016-02-15 Jerry DeLisle <jvdelisle@gcc.gnu.org>jvdelisle2016-02-155-64/+208
| | | | | | | | | | | | | | | | | | | | | PR libgfortran/69651 * io/list_read.c: Entire file trailing spaces removed. (CASE_SEPARATORS): Remove '!'. (is_separator): Add namelist mode as condition with '!'. (push_char): Remove un-needed memset. (push_char4): Likewise and remove 'new' pointer. (eat_separator): Remove un-needed use of notify_std. (read_logical): If '!' bang encountered when not in namelist mode got bad_logical to give an error. (read_integer): Likewise reject '!'. (read_character): Remove condition testing c = '!' which is now inside the is_separator macro. (parse_real): Reject '!' unless in namelist mode. (read_complex): Reject '!' unless in namelist mode. (read_real): Likewise reject '!'. PR libgfortran/69651 * gfortran.dg/read_bang.f90: New test. * gfortran.dg/read_bang4.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233436 138bc75d-0d04-0410-961f-82ee72b054a4
* PR c++/69658jakub2016-02-154-4/+20
| | | | | | | | | | * init.c (expand_default_init): Only call reshape_init in the direct-initialization from an initializer list case. * g++.dg/init/pr69658.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233435 138bc75d-0d04-0410-961f-82ee72b054a4