1. 30 Apr, 2015 11 commits
  2. 29 Apr, 2015 29 commits
    • re PR libstdc++/65839 (xmethods need updating once gdb decides how to fix 18285) · 8996b63b
      	PR libstdc++/65839
      	* python/libstdcxx/v6/xmethods.py (get_bool_type): New function.
      	Replace all lookups of "bool" with this.
      	(get_std_size_type): New function.  Replace all lookups of std::size_t
      	with this.
      	(*Worker): New method get_result_type.
      	(DequeWorkerBase.__init__): New arg val_type.  All callers updated.
      	(ListWorkerBase.__init__): New arg val_type.  All callers updated.
      	(UniquePtrGetWorker.__init__): New arg elem_type.  All callers updated.
      	Delete setting of name, enabled.
      	(UniquePtrDerefWorker.__init__): New arg elem_type.  All callers
      	updated.  Delete setting of name.
      	(UniquePtrMethodsMatcher): Rewrite for consistency with all other
      	libstdc++ xmethod matchers.
      	* testsuite/libstdc++-xmethods/array.cc: Add whatis tests.
      	* testsuite/libstdc++-xmethods/associative-containers.cc: Ditto.
      	* testsuite/libstdc++-xmethods/deque.cc: Ditto.
      	* testsuite/libstdc++-xmethods/forwardlist.cc: Ditto.
      	* testsuite/libstdc++-xmethods/list.cc: Ditto.
      	* testsuite/libstdc++-xmethods/unique_ptr.cc: Ditto.
      	* testsuite/libstdc++-xmethods/vector.cc: Ditto.
      
      From-SVN: r222599
      Doug Evans committed
    • compiler: Consider multi-result calls in escape analysis. · 1dea42c9
      When building connection graphs between objects, the analysis
      only handled calls of the form `call(...)` or `var := call(...)`.
      Functions with multiple results being used e.g. `var, _ = call(...)`
      were not analyzed, causing some escaping variables to be marked as
      non-escaping.
      
      From-SVN: r222598
      Ian Lance Taylor committed
    • compiler: Propagate escape info from closures to enclosed variables. · 67b68b81
      If a closure escapes, the enclosed variables must escape via the
      closure.  Reachability analysis had a bug where the enclosed
      variables were not considered as reachable from the closure.
      
      From-SVN: r222597
      Ian Lance Taylor committed
    • Use consistent naming for value type attributes. · b693b879
      	* python/libstdcxx/v6/xmethods.py (ArrayWorkerBase): Rename _valtype
      	to _val_type.
      	(ArraySizeWorker, ArrayEmptyWorker): Ditto.
      	(ArrayFrontWorker, ArrayBackWorker): Ditto.
      	(ArrayAtWorker, ArraySubscriptWorker): Ditto.
      	(DequeWorkerBase): Rename elemtype to val_type.
      	(ForwardListWorkerBase): Rename _elem_type to _val_type.
      	(ForwardListFrontWorker): Ditto.  And rename elem_address to
      	val_address.
      	(ForwardListMethodsMatcher): Rename elem_type to val_type.
      	(VectorWorkerBase): Rename _elemtype to _val_type.
      
      From-SVN: r222596
      Doug Evans committed
    • runtime: Support -buildmode=c-shared. · 081564fa
      These changes permit using the go tool from the upcoming Go
      1.5 release with -buildmode=c-archive to build gccgo code into
      an archive file that can be linked with a C program.
      
      From-SVN: r222594
      Ian Lance Taylor committed
    • mips-cpus.def: (mips4): Change default processor from PROCESSOR_R8000 to PROCESSOR_R10000. · 2f79da78
      2015-04-29  Steve Ellcey  <sellcey@imgtec.com>
      
      	* config/mips/mips-cpus.def: (mips4): Change default processor
      	from PROCESSOR_R8000 to PROCESSOR_R10000.
      
      From-SVN: r222593
      Steve Ellcey committed
    • re PR target/65871 (bzhi builtin/intrinsic wrongly assumes bzhi instruction… · ec4c68c8
      re PR target/65871 (bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag)
      
      	PR target/65871
              * config/i386/i386.md (*bmi_bextr_<mode>_cczonly): New pattern.
              (*bmi2_bzhi_<mode>3_1_cczonly): Ditto.
              (setcc+movzbl peephole2): Check also clobbered reg.
              (setcc+andl peephole2): Ditto.
      
      From-SVN: r222592
      Uros Bizjak committed
    • re PR c++/50800 (Internal compiler error in finish_member_declarations, possibly… · 9f7fb685
      re PR c++/50800 (Internal compiler error in finish_member_declarations, possibly related to may_alias attribute)
      
      	PR c++/50800
      	* tree.c (apply_identity_attributes): Fix handling of classes.
      
      From-SVN: r222591
      Jason Merrill committed
    • c-common.c (handle_section_attribute): Refactor to reduce nesting and… · 0373796b
      c-common.c (handle_section_attribute): Refactor to reduce nesting and distinguish between error cases.
      
              * c-common.c (handle_section_attribute): Refactor to reduce
              nesting and distinguish between error cases.
      
      From-SVN: r222590
      Josh Triplett committed
    • mips.h (CRT_CALL_STATIC_FUNCTION): Fix the macro to use la/jalr instead of jal. · 8d92d274
      gcc/ChangeLog:
      
      2015-04-21  Petar Jovanovic  <petar.jovanovic@rt-rk.com>
      
      	* config/mips/mips.h (CRT_CALL_STATIC_FUNCTION): Fix the macro to use
      	la/jalr instead of jal.
      
      gcc/testsuite/ChangeLog:
      
      2015-04-21  Petar Jovanovic  <petar.jovanovic@rt-rk.com>
      
      	* gcc.target/mips/call-from-init.c: New test.
      	* gcc.target/mips/mips.exp: Add section_start to mips_option_groups.
      
      From-SVN: r222589
      Petar Jovanovic committed
    • re PR target/65871 (bzhi builtin/intrinsic wrongly assumes bzhi instruction… · 3c908a5b
      re PR target/65871 (bzhi builtin/intrinsic wrongly assumes bzhi instruction doesn't set the ZF flag)
      
      	PR target/65871
      	* config/i386/i386.md (*bmi_bextr_<mode>_cczonly): New pattern.
      	(*bmi2_bzhi_<mode>3_1_cczonly): Ditto.
      
      testsuite/ChangeLog:
      
      	PR target/65871
      	* gcc.target/i386/pr65871-1.c: New test
      	* gcc.target/i386/pr65871-2.c: Ditto.
      
      From-SVN: r222588
      Uros Bizjak committed
    • re PR c/64610 (No -Wbool-compare warning on "(0 != a) >= 0") · 716c0ba6
      	PR c/64610
      	* c-common.c (maybe_warn_bool_compare): Warn when comparing a boolean
      	with 0/1.
      
      	* c-c++-common/Wbool-compare-1.c (fn1): Remove a few lines.
      	* c-c++-common/Wbool-compare-2.c: New test.
      
      From-SVN: r222587
      Marek Polacek committed
    • Fix libgcc installation for offload targets. · d28ad5d4
      	* Makefile.in (real_host_noncanonical): New variable.
      	(libsubdir): Use it.
      	* configure.ac (real_host_noncanonical): Compute.  Remove special
      	case for intelmicemul.
      	* configure: Regenerate.
      
      From-SVN: r222585
      Bernd Schmidt committed
    • [PR libgomp/65099] nvptx mkoffload: pass "-m32" or "-m64" to the compiler · f82a9d90
      ... depending on "-foffload-abi=[...]".
      
      Coding style/code copied from gcc/config/i386/intelmic-mkoffload.c for
      consistency.
      
      	gcc/
      	* config/nvptx/mkoffload.c (target_ilp32): New variable.
      	(main): Set it depending on "-foffload-abi=[...]".
      	(compile_native, main): Use it to pass "-m32" or "-m64" to the
      	compiler.
      
      From-SVN: r222583
      Thomas Schwinge committed
    • [AArch64] Fix PR/65770 vstN_lane on bigendian · aaf3de7a
      gcc/:
      
      	* config/aarch64/aarch64-simd.md (vec_store_lanesoi_lane<mode>,
      	vec_store_lanesci_lane<mode>, vec_store_lanesxi_lane<mode>):
      	Flip lane index back at assembly time for bigendian.
      
      gcc/testsuite/:
      
      	* gcc.target/aarch64/vstN_lane_1.c: New file.
      
      From-SVN: r222582
      Alan Lawrence committed
    • re PR libstdc++/65760 (invalid use of incomplete type with std::is_convertible<C, C>) · 952bc7a6
      	PR libstdc++/65760
      	* include/std/functional (__check_func_return_type): Use is_same to
      	avoid using _is_convertible on incomplete types.
      	* testsuite/20_util/function/65760.cc: New.
      
      From-SVN: r222581
      Jonathan Wakely committed
    • Add OMP_STANDALONE_CLAUSES. · b811915d
      	gcc/
      	* tree.h (OMP_STANDALONE_CLAUSES): New macro.
      	* gimplify.c (gimplify_omp_workshare): Use it.
      	gcc/c/
      	* c-parser.c (c_parser_oacc_enter_exit_data): Use
      	OMP_STANDALONE_CLAUSES.
      	gcc/cp/
      	* parser.c (cp_parser_oacc_enter_exit_data): Use
      	OMP_STANDALONE_CLAUSES.
      
      From-SVN: r222580
      Thomas Schwinge committed
    • re PR libstdc++/64657 (Support iterators with overloaded operator-comma) · f970a17d
      	PR libstdc++/64657
      	* include/bits/basic_string (basic_string::_S_copy_chars): Cast
      	expression to void.
      	* include/bits/locale_facets_nonio.tcc (money_get::_M_extract,
      	time_get::_M_extract_num, time_get::_M_extract_name,
      	time_get::_M_extract_wday_or_month): Likewise.
      	* include/bits/stl_algo.h (__includes, __replace_copy_if,
      	__is_sorted_until, __is_permutation, transform): Likewise.
      	* include/bits/stl_algobase.h (swap_ranges, __copy_move::__copy_m,
      	__equal::equal, __lexicographical_compare_impl, equal): Likewise.
      	* include/bits/stl_numeric.h (inner_product): Likewise.
      	* include/bits/stl_uninitialized.h (__uninitialized_copy_a): Likewise.
      	* testsuite/util/testsuite_iterators.h (output_iterator_wrapper,
      	input_iterator_wrapper): Declare unusable comma operator.
      	* testsuite/21_strings/basic_string/cons/char/64657.cc: New.
      	* testsuite/21_strings/basic_string/modifiers/assign/char/64657.cc:
      	New.
      
      From-SVN: r222579
      Jonathan Wakely committed
    • re PR c++/64667 (-Winit-self ignored for reference fields) · 0aa359c1
      /cp
      2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/64667
      	* init.c (perform_member_init): Handle references for -Winit-self.
      
      /testsuite
      2015-04-29  Paolo Carlini  <paolo.carlini@oracle.com>
      
      	PR c++/64667
      	* g++.dg/warn/Winit-self-3.C: New.
      
      From-SVN: r222577
      Paolo Carlini committed
    • Makefile.in (build/genrecog.o): Depend on inchash.h. · 72d33bd3
      gcc/
      	* Makefile.in (build/genrecog.o): Depend on inchash.h.
      	(build/genrecog$(build_exeext): Depend on build/hash-table.o and
      	build/inchash.o
      	* genrecog.c: Rewrite most of the code except for the third page.
      
      From-SVN: r222575
      Richard Sandiford committed
    • inchash.h, inchash.c: Include bconfig.h for build objects. · 34ba5aff
      gcc/
      	* inchash.h, inchash.c: Include bconfig.h for build objects.
      	* Makefile.in (build/inchash.o): New rule.
      
      From-SVN: r222574
      Richard Sandiford committed
    • namelist_87.f90: Use dg-add-options ieee. · 94a82811
      	* gfortran.dg/namelist_87.f90: Use dg-add-options ieee.
      
      From-SVN: r222573
      Uros Bizjak committed
    • re PR target/65924 (ICE const_int_operand failed on arm-none-eabi) · b43482db
      gcc/
      2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
      
      	PR target/65924
      	* config/arm/thumb2.md (*thumb2_addsi3_compare0_scratch): Fix operand
      	number in type attribute expression.
      
      gcc/testsuite/
      2015-04-29  Yvan Roux  <yvan.roux@linaro.org>
      
      	PR target/65924
      	* gcc.target/arm/pr65924.c: New test.
      
      From-SVN: r222572
      Yvan Roux committed
    • loop-iv.c (canon_condition): Generalize to all types of integer constant. · 674dd710
      gcc/
      	* loop-iv.c (canon_condition): Generalize to all types of integer
      	constant.
      
      From-SVN: r222571
      Richard Sandiford committed
    • gimple-walk.c #include TLC · 917c68f5
      Also look at return values of parse_input_constraint and
      parse_output_constraint.
      
      From-SVN: r222569
      Bernhard Reutner-Fischer committed
    • [ARM]Remove vec_shr and vec_shr optabs · ee9da432
              * config/arm/neon.md (vec_shl<mode>, vec_shr<mode>): Remove.
      
      From-SVN: r222568
      Alan Lawrence committed
    • Move pass_stdarg to after pass_dce in pass_all_optimizations · 32966af8
      2015-04-29  Tom de Vries  <tom@codesourcery.com>
      
      	PR tree-optimization/65893
      	* passes.def (pass_all_optimizations): Move pass_stdarg to after
      	pass_dce.
      
      From-SVN: r222567
      Tom de Vries committed
    • Fix OpenMP's target update directive in templated code. · 2c8f0683
          FAIL: g++.dg/gomp/tpl-target-update.C  -std=c++98 (internal compiler error)
          FAIL: g++.dg/gomp/tpl-target-update.C  -std=c++98 (test for excess errors)
          FAIL: g++.dg/gomp/tpl-target-update.C  -std=c++11 (internal compiler error)
          FAIL: g++.dg/gomp/tpl-target-update.C  -std=c++11 (test for excess errors)
          FAIL: g++.dg/gomp/tpl-target-update.C  -std=c++14 (internal compiler error)
          FAIL: g++.dg/gomp/tpl-target-update.C  -std=c++14 (test for excess errors)
      
          [...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C: In instantiation of 'void f(T, T) [with T = int]':
          [...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C:19:9:   required from here
          [...]/source-gcc/gcc/testsuite/g++.dg/gomp/tpl-target-update.C:10:9: internal compiler error: tree check: expected oacc_parallel or oacc_kernels or oacc_data or oacc_host_data or omp_parallel or omp_task or omp_for or omp_simd or cilk_simd or cilk_for or omp_distribute or oacc_loop or omp_teams or omp_target_data or omp_target or omp_sections or omp_single, have omp_target_update in tsubst_expr, at cp/pt.c:14209
          0xf5aae1 tree_range_check_failed(tree_node const*, char const*, int, char const*, tree_code, tree_code)
                  [...]/source-gcc/gcc/tree.c:9384
          0x66e201 tree_range_check
                  [...]/source-gcc/gcc/tree.h:2979
          0x66e201 tsubst_expr
                  [...]/source-gcc/gcc/cp/pt.c:14209
          0x6695e3 tsubst_expr
                  [...]/source-gcc/gcc/cp/pt.c:13752
          0x66ac07 tsubst_expr
                  [...]/source-gcc/gcc/cp/pt.c:13938
          0x667c41 instantiate_decl(tree_node*, int, bool)
                  [...]/source-gcc/gcc/cp/pt.c:20367
          0x6ae386 instantiate_pending_templates(int)
                  [...]/source-gcc/gcc/cp/pt.c:20484
          0x6edc3d cp_write_global_declarations()
                  [...]/source-gcc/gcc/cp/decl2.c:4456
      
      	gcc/cp/
      	* pt.c (tsubst_expr) <OMP_TARGET_UPDATE>: Use
      	OMP_TARGET_UPDATE_CLAUSES instead of OMP_CLAUSES.
      	gcc/testsuite/
      	* g++.dg/gomp/tpl-target-update.C: New file.
      
      From-SVN: r222564
      Thomas Schwinge committed
    • re PR tree-optimization/65917 (XFAIL: gcc.dg/tree-ssa/20030922-2.c… · b5040634
      re PR tree-optimization/65917 (XFAIL: gcc.dg/tree-ssa/20030922-2.c scan-tree-dump-times dom1 "if " 2)
      
      2015-04-29  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/65917
      	* gcc.dg/tree-ssa/20030922-2.c: Disable ifcombine and XFAIL.
      
      From-SVN: r222562
      Richard Biener committed