1. 02 Dec, 2015 12 commits
  2. 01 Dec, 2015 28 commits
    • fptr.c (__canonicalize_funcptr_for_compare): Initialize fixup values if saved… · 9a32d437
      fptr.c (__canonicalize_funcptr_for_compare): Initialize fixup values if saved GOT address doesn't match runtime address.
      
      	* config/pa/fptr.c (__canonicalize_funcptr_for_compare): Initialize
      	fixup values if saved GOT address doesn't match runtime address.
      	(fixup_branch_offset): Reorder list.
      
      From-SVN: r231135
      John David Anglin committed
    • PR68577: Handle narrowing for vector popcount, etc. · b1b6836e
      This patch adds support for simple cases where a vector
      internal function returns wider results than the scalar
      equivalent.  It punts on other cases.
      
      Tested on powerpc64-linux-gnu and x86_64-linux-gnu.
      
      gcc/
      	PR tree-optimization/68577
      	* tree-vect-stmts.c (simple_integer_narrowing): New function.
      	(vectorizable_call): Restrict internal function handling
      	to NONE and NARROW cases, using simple_integer_narrowing
      	to test for the latter.  Add cost of narrowing operation
      	and insert it where necessary.
      
      gcc/testsuite/
      	PR tree-optimization/68577
      	* gcc.dg/vect/pr68577.c: New test.
      
      From-SVN: r231131
      Richard Sandiford committed
    • freebsd64.h (ELFv2_ABI_CHECK): Add new macro. · e5f31031
      2015-12-01  Andreas Tobler  <andreast@gcc.gnu.org>
      
          * config/rs6000/freebsd64.h (ELFv2_ABI_CHECK): Add new macro.
          (SUBSUBTARGET_OVERRIDE_OPTIONS): Use it to decide whether to set
          rs6000_current_abi to ABI_AIX or ABI_ELFv2.
      
      From-SVN: r231129
      Andreas Tobler committed
    • re PR libffi/65726 (libffi fails to build when not bootstrapping: configure:… · 7eb46bec
      re PR libffi/65726 (libffi fails to build when not bootstrapping: configure: error: C++ preprocessor "/lib/cpp" fails sanity check)
      
      2015-12-01  Andreas Tobler  <andreast@gcc.gnu.org>
      
          PR libffi/65726
          * Makefile.def (lang_env_dependencies): Make libffi depend
          on cxx.
          * Makefile.in: Regenerate.
      
      From-SVN: r231128
      Andreas Tobler committed
    • nvptx-protos.h (nvptx_output_aligned_decl): Declare. · 69823d76
      	gcc/
      	* config/nvptx/nvptx-protos.h (nvptx_output_aligned_decl): Declare.
      	* config/nvptx/nvptx.h (ASM_OUTPUT_ALIGNED_DECL_COMMON,
      	ASM_OUTPUT_ALIGNED_DECL_LOCAL): Forward to nvptx_output_aligned_decl.
      	* config/nvptx/nvptx.c (write_fn_marker, write_var_marker): New.
      	(write_fn_proto, write_fn_proto_from_insn): Call write_fn_marker.
      	(init_output_initializer): Call write_var_marker.
      	(nvptx_output_aligned_decl): New.
      	(nvptx_assemble_undefined_decl, nvptx_file_end): Call write_var_marker.
      
      	gcc/testsuite/
      	* gcc.target/nvptx/uninit-decl.c: New.
      
      From-SVN: r231127
      Nathan Sidwell committed
    • alias-1.c: New testcase. · 9dc39706
      	* gcc.c-torture/execute/alias-1.c: New testcase.
      	* c-common.c: Do not silently ignore -fstrict-aliasing changes.
      
      From-SVN: r231125
      Jan Hubicka committed
    • lto-streamer-out.c (hash_tree): Do not stream TYPE_ALIAS_SET. · 8c86248e
      	* lto-streamer-out.c (hash_tree): Do not stream TYPE_ALIAS_SET.
      	* tree-streamer-out.c (pack_ts_type_common_value_fields): Do not
      	stream TYPE_ALIAS_SET.
      	* tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
      	stream TYPE_ALIAS_SET.
      
      	* lto.c (compare_tree_sccs_1): Do not compare TYPE_ALIAS_SET.
      
      From-SVN: r231124
      Jan Hubicka committed
    • nvptx.c (nvptx_function_arg_advance): Don't consider mode. · ac856078
      	* config/nvptx/nvptx.c (nvptx_function_arg_advance): Don't
      	consider mode.
      
      From-SVN: r231121
      Nathan Sidwell committed
    • re PR tree-optimization/64769 (ICE: tree check: expected integer_cst, have… · 0b2a1378
      re PR tree-optimization/64769 (ICE: tree check: expected integer_cst, have parm_decl in simd_clone_clauses_extract, at omp-low.c:12503 with -fopenmp-simd)
      
      	PR tree-optimization/64769
      	* c-c++-common/gomp/pr64769.c: New test.
      
      From-SVN: r231120
      Marek Polacek committed
    • rs6000.c (const_load_sequence_p): Handle extra indirection for large and small code models. · 3b47f4cc
      [gcc]
      
      2015-12-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* config/rs6000/rs6000.c (const_load_sequence_p): Handle extra
      	indirection for large and small code models.
      	(adjust_vperm): Likewise.
      
      [gcc/testsuite]
      
      2015-12-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
      
      	* gcc.target/powerpc/swaps-p8-22.c: New.
      
      From-SVN: r231119
      Bill Schmidt committed
    • OpenACC host_data support. · 37d5ad46
      	gcc/
      	* gimple-pretty-print.c (dump_gimple_omp_target): Add host_data
      	support.
      	* gimple.h (gf_mask): Add GF_OMP_TARGET_KIND_OACC_HOST_DATA.
      	(is_gimple_omp_oacc): Add support for above.
      	* gimplify.c (omp_region_type): Add ORT_ACC_HOST_DATA.
      	(omp_notice_variable): Diagnose undefined implicit uses of
      	use_device variables in offloaded regions.
      	(gimplify_scan_omp_clauses): Add host_data, use_device
      	support. Diagnose undefined mapping of use_device variables in
      	OpenACC clauses.
      	(gimplify_omp_workshare): Add host_data support.
      	(gimplify_expr): Likewise.
      	* omp-builtins.def (BUILT_IN_GOACC_HOST_DATA): New.
      	* omp-low.c (lookup_decl_in_outer_ctx)
      	(maybe_lookup_decl_in_outer_ctx): Add optional argument to skip
      	host_data regions.
      	(scan_sharing_clauses): Support use_device.
      	(check_omp_nesting_restrictions): Support host_data.
      	(expand_omp_target): Support host_data.
      	(lower_omp_target): Skip over outer host_data regions when looking
      	up decls. Support use_device.
      	(make_gimple_omp_edges): Support host_data.
      	* tree-nested.c (convert_nonlocal_omp_clauses): Add use_device
      	clause.
      
      	gcc/c/
      	* c-parser.c (c_parser_omp_clause_name): Add use_device support.
      	(c_parser_oacc_clause_use_device): New function.
      	(c_parser_oacc_all_clauses): Add use_device support.
      	(OACC_HOST_DATA_CLAUSE_MASK): New macro.
      	(c_parser_oacc_host_data): New function.
      	(c_parser_omp_construct): Add host_data support.
      	* c-tree.h (c_finish_oacc_host_data): Add prototype.
      	* c-typeck.c (c_finish_oacc_host_data): New function.
      	(c_finish_omp_clauses): Add use_device support.
      
      	gcc/cp/
      	* cp-tree.h (finish_oacc_host_data): Add prototype.
      	* parser.c (cp_parser_omp_clause_name): Add use_device support.
      	(cp_parser_oacc_all_clauses): Add use_device support.
      	(OACC_HOST_DATA_CLAUSE_MASK): New macro.
      	(cp_parser_oacc_host_data): New function.
      	(cp_parser_omp_construct): Add host_data support.
      	(cp_parser_pragma): Add host_data support.
      	* semantics.c (finish_omp_clauses): Add use_device support.
      	(finish_oacc_host_data): New function.
      
      	gcc/c-family/
      	* c-pragma.c (oacc_pragmas): Add PRAGMA_OACC_HOST_DATA.
      	* c-pragma.h (pragma_kind): Add PRAGMA_OACC_HOST_DATA.
      	(pragma_omp_clause): Add PRAGMA_OACC_CLAUSE_USE_DEVICE.
      
      	libgomp/
      	* oacc-parallel.c (GOACC_host_data): New function.
      	* libgomp.map (GOACC_host_data): Add to GOACC_2.0.1.
      	* testsuite/libgomp.oacc-c-c++-common/host_data-1.c: New test.
      	* testsuite/libgomp.oacc-c-c++-common/host_data-2.c: New test.
      	* testsuite/libgomp.oacc-c-c++-common/host_data-3.c: New test.
      	* testsuite/libgomp.oacc-c-c++-common/host_data-4.c: New test.
      	* testsuite/libgomp.oacc-c-c++-common/host_data-5.c: New test.
      	* testsuite/libgomp.oacc-c-c++-common/host_data-6.c: New test.
      
      
      Co-Authored-By: Cesar Philippidis <cesar@codesourcery.com>
      Co-Authored-By: James Norris <James_Norris@mentor.com>
      
      From-SVN: r231118
      Julian Brown committed
    • re PR tree-optimization/67916 (wrong code at -O3 on x86_64-linux-gnu) · 4bc84763
      	PR tree-optimization/67916
      	* gcc.dg/torture/pr67916.c: New test.
      
      From-SVN: r231117
      Marek Polacek committed
    • re PR middle-end/68582 (-Wunused-function doesn't warn about unused static… · 8b6ab677
      re PR middle-end/68582 (-Wunused-function doesn't warn about unused static __attribute__((noreturn)) functions)
      
      	PR middle-end/68582
      	* cgraphunit.c (check_global_declaration): Only depend on TREE_THIS_VOLATILE
      	for VAR_DECLs.
      
      	* c-c++-common/pr68582.c: New test.
      
      From-SVN: r231116
      Marek Polacek committed
    • PR68474: Fix tree-call-cdce.c:use_internal_fn · 6c59645f
      We'd call gen_shrink_wrap_conditions for functions that it can't handle
      but edom_only_function can.
      
      Tested on x86_64-linux-gnu.
      
      gcc/
      	PR tree-optimization/68474
      	* tree-call-cdce.c (use_internal_fn): Protect call to
      	gen_shrink_wrap_conditions.
      
      gcc/testsuite/
      	PR tree-optimization/68474
      	* gcc.dg/pr68474.c: New test.
      
      From-SVN: r231115
      Richard Sandiford committed
    • re PR target/68617 (arm ice output_operand: invalid %-code for -march=armv6k + thumb) · 5797378a
      2015-12-01  Christian Bruel  <christian.bruel@st.com>
      
              PR target/68617
              * config/arm/arm.opt (unaligned_access): Save.
              * config/arm/arm-c.c (__ARM_FEATURE_UNALIGNED): Conditionally define.
              * config/arm/arm.c (arm_option_override): Move unaligned_access setting
              (arm_option_override_internal): ... here.
              * config/arm/arm.h (TARGET_32BIT_P): New macro.
      
      // testsuite
              PR target/68617
              * gcc.target/arm/attr-unaligned-load-ice.c: New test.
      
      From-SVN: r231114
      Christian Bruel committed
    • Move pr46032*.c tests · f6b65a61
      2015-12-01  Tom de Vries  <tom@codesourcery.com>
      
      	* gcc.dg/pr46032.c: Move to ...
      	* gcc.dg/vect/pr46032.c: here.  Add dg-require-effective-target
      	vect_int.
      	* gcc.dg/pr46032-2.c: Move to ...
      	* gcc.dg/gomp/pr46032-2.c: ... here.  Drop dg-require-effective-target fopenmp.
      	* gcc.dg/pr46032-3.c: Move to ...
      	* gcc.dg/gomp/pr46032-3.c: ... here.  Drop dg-require-effective-target fopenmp.
      
      From-SVN: r231113
      Tom de Vries committed
    • dump-parse-tree.c (show_omp_clauses): Handle optional num and static arguments for the gang clause. · 2a70708e
      	gcc/fortran/
      	* dump-parse-tree.c (show_omp_clauses): Handle optional num and static
      	arguments for the gang clause.
      	* gfortran.h (gfc_omp_clauses): Rename gang_expr as gang_num_expr.
      	Add gang_static_expr.
      	* openmp.c (gfc_free_omp_clauses): Update to free gang_num_expr and
      	gang_static_expr.
      	(match_oacc_clause_gang): Update to support both num and static in
      	the same clause.
      	(resolve_omp_clauses): Formatting.  Also handle gang_num_expr and
      	gang_static_expr.
      	(resolve_oacc_params_in_parallel): New const char arg argument.
      	Use it to report more accurate gang, worker and vector clause errors.
      	(resolve_oacc_loop_blocks): Update calls to
      	resolve_oacc_params_in_parallel.
      	* trans-openmp.c (gfc_trans_omp_clauses): Update the gimplification of
      	the gang clause.
      	(gfc_trans_oacc_combined_directive): Make use of gang_num_expr and
      	gang_static_expr.  Remove OMP_LIST_REDUCTION from construct_clauses.
      
      	gcc/testsuite/
      	* gfortran.dg/goacc/gang-static.f95: Add tests for gang num arguments.
      	* gfortran.dg/goacc/loop-2.f95: Update expected diagnostics.
      	* gfortran.dg/goacc/loop-6.f95: Likewise.
      	* gfortran.dg/goacc/loop-7.f95: New test.
      	* gfortran.dg/goacc/reduction-2.f95: New test.
      
      From-SVN: r231112
      Cesar Philippidis committed
    • re PR tree-optimization/68379 (BB vectorization: definition in block 13 follows… · 4f0a0218
      re PR tree-optimization/68379 (BB vectorization: definition in block 13 follows the use for SSA_NAME)
      
      2015-12-01  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/68379
      	* tree-vect-stmts.c (vectorizable_load): For BB vectorization
      	always base loads on the first used DR of a group.
      	* tree-vect-data-refs.c (vect_slp_analyze_and_verify_node_alignment):
      	Compute alignment of the first scalar element unconditionally.
      
      	* gcc.dg/torture/pr68379.c: New testcase.
      	* gfortran.dg/pr68379-1.f90: Likewise.
      	* gfortran.dg/pr68379-2.f: Likewise.
      
      From-SVN: r231111
      Richard Biener committed
    • re PR ada/68590 (FAIL: gnat.dg/loop_optimization19.adb scan-tree-dump-not optimized "Index_Check") · 2d3f4bf7
      2015-12-01  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/68590
      	* genmatch.c (struct capture_info): Add match_use_count.
      	(capture_info::walk_match): Increment match_use_count.
      	(dt_simplify::gen_1): For GENERIC, only wrap multi-use
      	replacements in a save_expr if they occur more often than
      	in the original expression.
      
      From-SVN: r231110
      Richard Biener committed
    • [testsuite] Fix pr46032* testcases. · bb0d3b5e
      2015-12-01  Christophe Lyon  <christophe.lyon@linaro.org>
      
      	* gcc.dg/pr46032.c: Add dg-require-effective-target fopenmp.
      	* gcc.dg/pr46032-2.c: Likewise.
      	* gcc.dg/pr46032-3.c: Likewise.
      
      From-SVN: r231109
      Christophe Lyon committed
    • re PR ipa/68470 (Internal Compiler Error observed by g++-4.9.2 and a few other… · ece95567
      re PR ipa/68470 (Internal Compiler Error observed by g++-4.9.2 and a few other versions (reported to Debian))
      
      2015-12-01  Richard Biener  <rguenther@suse.de>
      
      	PR ipa/68470
      	* ipa-split.c (split_function): Handle main part not returning.
      
      	* g++.dg/torture/pr68470.C: New testcase.
      
      From-SVN: r231108
      Richard Biener committed
    • Define path::_Cmpt after specializing path::__is_encoded_char · 22f5095f
      	* include/experimental/bits/fs_path.h (path::_Cmpt): Move definition
      	after path::__is_encoded_char explicit specializations.
      
      From-SVN: r231107
      Jonathan Wakely committed
    • re PR middle-end/68595 (ice in const_vector_mask_from_tree at expr.c:11455) · 5a308cf1
      gcc/
      
      	PR middle-end/68595
      	* tree-vect-stmts.c (vect_init_vector): Cast boolean
      	scalars to a proper value before building a vector.
      
      gcc/testsuite/
      
      	PR middle-end/68595
      	* gcc.dg/pr68595.c: New test.
      
      From-SVN: r231106
      Ilya Enkovich committed
    • Fix armv6+thumb1 unaligned tests · 4265bac7
      From-SVN: r231105
      Christian Bruel committed
    • * gcc-interface/Makefile.in (ADA_EXCLUDE_SRCS): Reorder. · 5b1ab307
      From-SVN: r231104
      Eric Botcazou committed
    • Improve error reporting from genattrtab.c · 48144522
      The errors reported by check_attr_value weren't very helpful because
      they always used the location of the define(_enum)_attr, even if the
      error was in a define_insn.  Also, the errors reported by
      check_attr_test didn't say which attribute was faulty.
      
      Although not technically a bug fix, it was really useful in writing
      the patch for PR68432.
      
      Tested on a variety of targets.
      
      gcc/
      	* genattrtab.c (check_attr_test): Take an attr_desc instead of
      	an is_const flag.  Put the file_location argument first.
      	Update recursive calls.  Improve error messages.
      	(check_attr_value): Take a file location and use it instead
      	of attr->loc.  Improve error messages.  Update calls to
      	check_attr_test.
      	(check_defs): Update call to check_attr_value.
      	(make_canonical): Likewise.
      	(gen_attr): Likewise.
      	(main): Likewise.
      	(gen_insn_reserv): Update call to check_attr_test.
      
      From-SVN: r231103
      Richard Sandiford committed
    • Fix typo in aarch64.c · c178abcc
      2015-12-01  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
      
      	* config/aarch64/aarch64.c (aarch64_builtin_reciprocal): Fix typo.
      
      From-SVN: r231101
      Ramana Radhakrishnan committed
    • re PR ada/68590 (FAIL: gnat.dg/loop_optimization19.adb scan-tree-dump-not optimized "Index_Check") · 287f8f17
      2015-12-01  Richard Biener  <rguenther@suse.de>
      
      	PR middle-end/68590
      	* match.pd: Merge (eq @0 @0) and (ge/le @0 @0) patterns.
      
      From-SVN: r231100
      Richard Biener committed