1. 09 Oct, 2015 18 commits
    • Testsuite: add dg-{begin|end}-multiline-output commands · 9e531d37
      This patch adds an easy way to write tests for expected multiline
      output.  For example we can test carets and underlines for
      a particular diagnostic with:
      
      /* { dg-begin-multiline-output "" }
       typedef struct _GMutex GMutex;
                      ^~~~~~~
         { dg-end-multiline-output "" } */
      
      multiline.exp is used by prune.exp; hence we need to load it before
      prune.exp via *load_gcc_lib* for the testsuites of the various
      non-"gcc" support libraries (e.g. boehm-gc).
      
      gcc/testsuite/ChangeLog:
      	* lib/multiline.exp: New file.
      	* lib/prune.exp: Load multiline.exp.
      	(prune_gcc_output): Call into multiline.exp to handle any
      	multiline output directives.
      	* lib/libgo.exp: Load multiline.exp before prune.exp, using
      	load_gcc_lib.
      
      boehm-gc/ChangeLog:
      	* testsuite/lib/boehm-gc.exp: Load multiline.exp before
      	prune.exp, using load_gcc_lib.
      
      libatomic/ChangeLog:
      	* testsuite/lib/libatomic.exp: Load multiline.exp before
      	prune.exp, using load_gcc_lib.
      
      libgomp/ChangeLog:
      	* testsuite/lib/libgomp.exp: Load multiline.exp before prune.exp,
      	using load_gcc_lib.
      
      libitm/ChangeLog:
      	* testsuite/lib/libitm.exp: Load multiline.exp before prune.exp,
      	using load_gcc_lib.
      
      libvtv/ChangeLog:
      	* testsuite/lib/libvtv.exp: Load multiline.exp before prune.exp,
      	using load_gcc_lib.
      
      From-SVN: r228655
      David Malcolm committed
    • [PR 67794] Also remap SSA_NAMEs defined in ASMs in IPA-SRA · 6651d6b4
      2015-10-09  Martin Jambor  <mjambor@suse.cz>
      
      	tree-optimization/67794
      	* tree-sra.c (replace_removed_params_ssa_names): Do not distinguish
      	between types of state,ents but accept original definitions as a
      	parameter.
      	(ipa_sra_modify_function_body): Use FOR_EACH_SSA_DEF_OPERAND to
      	iterate over definitions.
      
      testsuite/
              * gcc.dg/ipa/ipa-sra-10.c: Nw test.
              * gcc.dg/torture/pr67794.c: Likewise.
      
      From-SVN: r228654
      Martin Jambor committed
    • rs6000.c (rs6000_offload_options): New. · 1a025b05
      	* config/rs6000/rs6000.c (rs6000_offload_options): New.
      	(TARGET_OFFLOAD_OPTIONS): New.
      
      From-SVN: r228653
      James Norris committed
    • [PR67891] don't test is_gimple_reg after parm expansion · 01a7166b
      for  gcc/ChangeLog
      
      	PR middle-end/67891
      	* cfgexpand.c (set_parm_rtl): Drop is_gimple_reg test.
      
      From-SVN: r228652
      Alexandre Oliva committed
    • [PR67766] reorder handling of parallels, concats and promoted values in return · fc5851fe
      for  gcc/ChangeLog
      
      	PR middle-end/67766
      	* function.c (expand_function_end): Move return value
      	promotion past the handling of PARALLELs and CONCATs.
      
      From-SVN: r228651
      Alexandre Oliva committed
    • [PR67828] don't unswitch on default defs of non-parms · f813d16e
      for  gcc/ChangeLog
      
      	PR rtl-optimizatoin/67828
      	* tree-ssa-loop-unswitch.c: Include tree-ssa.h.
      	(tree_may_unswitch_on): Don't unswitch on expressions
      	involving undefined values.
      
      for  gcc/testsuite/ChangeLog
      
      	PR rtl-optimization/67828
      	* gcc.dg/torture/pr67828.c: New.
      
      From-SVN: r228650
      Alexandre Oliva committed
    • * MAINTAINERS (Write After Approval): Add myself. · 6be1d686
      From-SVN: r228649
      Martin Liska committed
    • genmatch.c (print_operand): Fix formatting. · eee7b6c4
      2015-10-09  Richard Biener  <rguenther@suse.de>
      
      	* genmatch.c (print_operand): Fix formatting.
      	(dt_node::append_simplify): Warn for multiple simplifiers
      	that match the same pattern.
      	* match.pd (log (exp @0)): Remove duplicates.
      
      From-SVN: r228648
      Richard Biener committed
    • fix Changelog entry removed at revision 228479 · 0c063d60
      From-SVN: r228647
      Christian Bruel committed
    • Missed ChangeLog for previous libstdc++-v3 commit · 7b5fde83
      Add include/experimental/bits dir
      
      	* include/experimental/erase_if.h: Move to ...
      	* include/experimental/bits/erase_if.h: New.
      	* include/experimental/fs_dir.h: Move to ...
      	* include/experimental/bits/fs_dir.h: New.
      	* include/experimental/fs_fwd.h: Move to ...
      	* include/experimental/bits/fs_fwd.h: New.
      	* include/experimental/fs_ops.h: Move to ...
      	* include/experimental/bits/fs_ops.h: New.
      	* include/experimental/fs_path.h: Move to ...
      	* include/experimental/bits/fs_path.h: New.
      	* include/experimental/string_view.tcc: Move to ...
      	* include/experimental/bits/string_view.tcc: New.
      	* include/Makefile.am: Add include/experimental/bits sub-directory.
      	* include/Makefile.in: Regenerate.
      	* include/experimental/filesystem: Adjust includes.
      	* include/experimental/map: Likewise.
      	* include/experimental/set: Likewise.
      	* include/experimental/string_view: Likewise.
      	* include/experimental/unordered_map: Likewise.
      	* include/experimental/unordered_set: Likewise.
      
      From-SVN: r228646
      Jonathan Wakely committed
    • Add include/experimental/bits dir · ea4554ea
      From-SVN: r228645
      Jonathan Wakely committed
    • [PATCH PR target/67366 2/2] [gimple-fold.c] Support movmisalign optabs in gimple-fold.c · f869c12f
      This patch by Richard allows for movmisalign optabs to be supported
      in gimple-fold.c. This caused a bit of pain in the testsuite with strlenopt-8.c
      in conjunction with the ARM support for movmisalign_optabs as the test
      was coded up to do different things depending on whether the target
      supported misaligned access or not. However now with unaligned access
      being allowed for different levels of the architecture in the arm backend,
      the concept of the helper function non_strict_align mapping identically
      to the definition of STRICT_ALIGNMENT disappears.
      
      Adjusted thusly for ARM. The testsuite/lib changes were tested with an
      arm-none-eabi multilib that included architecture variants that did not
      support unaligned access and architecture variants that did.
      
      The testing matrix for this patch was:
      
      1. x86_64 bootstrap and regression test - no regressions.
      2. armhf bootstrap and regression test - no regressions.
      3. arm-none-eabi cross build and regression test for
      
      {-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp}
      {-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard}
      {-marm/-mcpu=arm7tdmi/-mfloat-abi=soft}
      {-mthumb/-mcpu=arm7tdmi/-mfloat-abi=soft}
      
      with no regressions.
      
      Ok to apply ?
      
      2015-10-09  Richard Biener  <rguenth@suse.de>
      
      	PR target/67366
      	* gimple-fold.c (optabs-query.h): Include
      	(gimple_fold_builtin_memory_op): Allow unaligned stores
      	when movmisalign_optabs are available.
      
      2015-10-09  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
      
      	PR target/67366
      	* lib/target-supports.exp (check_effective_target_non_strict_align):
      	Adjust for arm*-*-*.
      	* gcc.target/arm/pr67366.c: New test.
      
      From-SVN: r228644
      Ramana Radhakrishnan committed
    • [Patch PR target/67366 1/2] [ARM] - Add movmisalignhi / si patterns · a46b23e1
      
      This adds movmisalignhi and movmisalignsi expanders when unaligned
      access is allowed by the architecture. This allows the mid-end
      to expand to misaligned loads and stored.
      
      Compared code generated for the Linux kernel and
      it changes code generation for a handful of files all for the better
      basically by reducing the stack usage.
      
      Tested by :
      
      1. armhf bootstrap and regression test - no regressions.
      2.. arm-none-eabi cross build and regression test for
      
          {-marm/-march=armv7-a/-mfpu=vfpv3-d16/-mfloat-abi=softfp}
          {-mthumb/-march=armv8-a/-mfpu=crypto-neon-fp-armv8/-mfloat-abi=hard}
          {-marm/-mcpu=arm7tdmi/-mfloat-abi=soft}
          {-mthumb/-mcpu=arm7tdmi/-mfloat-abi=soft}
      
      Will apply to trunk once 2/2 is approved.
      
      regards
      Ramana
      
      2015-10-09  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
      
              PR target/67366
              * config/arm/arm.md (movmisalign<mode>): New.
              * config/arm/iterators.md (HSI): New.
      
      From-SVN: r228643
      Ramana Radhakrishnan committed
    • * MAINTAINERS (Write After Approval): Add myself. · dc0e2060
      From-SVN: r228642
      Alexander Fomin committed
    • Make-lang.in: Make sure that GNAT1_OBJS and not just GNAT1_ADA_OBJS are compiled only after... · f81ff612
      	* gcc-interface/Make-lang.in: Make sure that GNAT1_OBJS and not just
      	GNAT1_ADA_OBJS are compiled only after generated files are created.
      
      From-SVN: r228636
      Eric Botcazou committed
    • re PR middle-end/67891 (FAIL: gcc.dg/pr43300.c (internal compiler error) on alpha-linux-gnu) · c0f62740
      2015-10-09  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/67891
      	* gimple-match.h (gimple_simplified_result_is_gimple_val):
      	New helper.
      	(gimple_resimplify1): Declare.
      	(gimple_resimplify2): Likewise.
      	(gimple_resimplify3): Likewise.
      	* gimple-match-head.c (gimple_resimplify1): Export.
      	(gimple_resimplify2): Likewise.
      	(gimple_resimplify3): Likewise.
      	(maybe_push_res_to_seq): Use gimple_simplified_result_is_gimple_val.
      	* gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
      	* tree-ssa-sccvn.c (visit_reference_op_load): Use gimple_resimplify1
      	to avoid creating stmts without VN info.
      
      	* gcc.dg/tree-ssa/pr67891.c: New testcase.
      
      From-SVN: r228635
      Richard Biener committed
    • [PATCH] [5/n] Fix minor SSA_NAME leaks · 2795c84a
      	* value-prof.c (gimple_ic): Add missing calls to unlink_stmt_vdef
      	and release_ssa_name in two places.
      	(gimple_stringop_fixed_value): Similarly.
      
      From-SVN: r228632
      Jeff Law committed
    • Daily bump. · 83ebb841
      From-SVN: r228631
      GCC Administrator committed
  2. 08 Oct, 2015 22 commits
    • ipa-icf.c (sem_item::compare_symbol_references): Fix use of availability. · d7e2ff72
      
      	* ipa-icf.c (sem_item::compare_symbol_references): Fix use
      	of availability.
      
      From-SVN: r228628
      Jan Hubicka committed
    • [PATCH] [4/n] Fix minor SSA_NAME leaks · 716e92f4
              * tree-ssa-loop-im.c (rewrite_bittest): Add missing call to
              release_defs.
      
      From-SVN: r228627
      Jeff Law committed
    • [PATCH] [4/n] Fix minor SSA_NAME leaks · c05bba07
      	* tree-ssa-loop-im.c (rewrite_bittest): Add missing call to
      	release_defs.
      
      From-SVN: r228626
      Jeff Law committed
    • [PATCH] [3/n] Fix minor SSA_NAME leaks · 7af9b2ff
      	* tree-stdarg.c (expand_ifn_va_arg_1): Add missing call to
      	unlink_stmt_vdef and release_ssa_name_fn.
      
      From-SVN: r228625
      Jeff Law committed
    • [PATCH] [2/n] Fix minor SSA_NAME leaks · d8bf7dce
      	* tree-ssa-dse.c (dse_optimize_stmt): Add missing call to
      	release_defs.
      
      From-SVN: r228624
      Jeff Law committed
    • liboffloadmic: Add missed checks for malloc and strdup return values · 6fd2e66a
      liboffloadmic/
      	* runtime/offload_engine.cpp (Engine::init_process): Use strdup instead
      	of sizeof+malloc+sprintf, check for return value.
      	* runtime/offload_env.cpp (MicEnvVar::get_env_var_kind): Check for
      	strdup return value.
      	* runtime/offload_host.cpp (__offload_init_library_once): Check for
      	strdup return value.  Fix size calculation of COI_HOST_THREAD_AFFINITY.
      	* runtime/emulator/coi_device.cpp (COIProcessWaitForShutdown): Check for
      	malloc return value.
      
      From-SVN: r228622
      Ilya Verbin committed
    • Round up the SSE register save area only if needed · bc8642d6
      There is is no point to round up the SSE register save area to 16 bytes if
      the incoming stack boundary is less than 16 bytes.
      
      	* config/i386/i386.c (ix86_compute_frame_layout): Round up the
      	SSE register save area to 16 bytes only if the incoming stack
      	boundary is no less than 16 bytes.
      
      From-SVN: r228621
      H.J. Lu committed
    • [PATCH] [1/n] Fix minor SSA_NAME leaks · d1acc3f4
      	* tree-ssa-phiopt.c (factor_out_conversion): Add missing calls to
      	release_ssa_name.  Fix typo in comment.
      
      From-SVN: r228619
      Jeff Law committed
    • nvptx.h (struct machine_function): Add comment. · 25662751
      	* config/nvptx/nvptx.h (struct machine_function): Add comment.
      	* config/nvptx/nvptx.c (nvptx_declare_function_name): Functions
      	may return pointer as well as in memory.
      	(nvptx_output_return): Likewise.
      
      From-SVN: r228618
      Nathan Sidwell committed
    • Move sqrt and cbrt simplifications to match.pd · 4835c978
      This patch moves the sqrt and cbrt simplification rules to match.pd.
      builtins.c now only does the constant folding.
      
      Bootstrapped & regression-tested on x86_64-linux-gnu.
      
      gcc/
      	* builtins.c (fold_builtin_sqrt, fold_builtin_cbrt): Delete.
      	(fold_builtin_1): Update accordingly.  Handle constant arguments here.
      	* match.pd: Add rules previously handled by fold_builtin_sqrt
      	and fold_builtin_cbrt.
      
      gcc/testsuite/
      	* gcc.dg/builtins-47.c: Test the optimized dump instead.
      
      From-SVN: r228616
      Richard Sandiford committed
    • Make tree_expr_nonnegative_warnv_p recurse into SSA names · 68e57f04
      The upcoming patch to move sqrt and cbrt simplifications to match.pd
      caused a regression because the (abs @0)->@0 simplification didn't
      trigger for:
      
              (abs (convert (abs X)))
      
      The simplification is based on tree_expr_nonnegative_p, which at
      the moment just gives up if it sees an SSA_NAME.
      
      This patch makes tree_expr_nonnegative_p recurse into SSA name
      definitions, but limits the depth of recursion to a small number
      for the reason mentioned in the comment (adapted from an existing
      comment in gimple_val_nonnegative_real_p).  The patch reuses code
      in tree-vrp.c, moving it to gimple-fold.c.  It also replaces calls
      to gimple_val_nonnegative_real_p with calls to tree_expr_nonnegative_p.
      
      A knock-on effect is that we can now prove _i_589 < 0 is false in
      sequences like:
      
            i_1917 = ASSERT_EXPR <i_1075, i_1075 == 0>;
            _i_589 = (const int) i_1917;
            _i_1507 = ASSERT_EXPR <_i_589, _i_589 < 0>;
      
      This defeats an assert in tree-vrp.c that ASSERT_EXPR conditions
      are never known to be false.  Previously the assert only ever used
      local knowledge and so would be limited to cases like x != x for
      integer x.  Now that we use global knowledge it's possible to prove
      the assertion condition is false in blocks that are in practice
      unreachable.  The patch therefore removes the assert.
      
      Bootstrapped & regression-tested on x86_64-linux-gnu.  I didn't write
      a specific test because this is already covered by the testsuite if
      the follow-on patch is also applied.
      
      gcc/
      	* params.def (PARAM_MAX_SSA_NAME_QUERY_DEPTH): New param.
      	* doc/invoke.texi (--param max-ssa-name-query-depth): Document.
      	* fold-const.h (tree_unary_nonnegative_warnv_p)
      	(tree_single_nonnegative_warnv_p, tree_call_nonnegative_warnv_p)
      	(tree_expr_nonnegative_warnv_p): Add depth parameters.
      	* fold-const.c: Include gimple-fold.h and params.h.
      	(tree_ssa_name_nonnegative_warnv_p): New function.
      	(tree_unary_nonnegative_warnv_p, tree_binary_nonnegative_warnv_p)
      	(tree_single_nonnegative_warnv_p, tree_call_nonnegative_warnv_p)
      	(tree_invalid_nonnegative_warnv_p, tree_expr_nonnegative_warnv_p):
      	Add a depth parameter and increment it for recursive calls to
      	tree_expr_nonnegative_warnv_p.  Use tree_ssa_name_nonnegative_warnv_p
      	to handle SSA names.
      	* gimple-fold.h (gimple_val_nonnegative_real_p): Delete.
      	(gimple_stmt_nonnegative_warnv_p): Declare.
      	* tree-vrp.c (remove_range_assertions): Remove assert that condition
      	cannot be proven false.
      	(gimple_assign_nonnegative_warnv_p, gimple_call_nonnegative_warnv_p)
      	(gimple_stmt_nonnegative_warnv_p): Move to...
      	* gimple-fold.c: ...here.  Add depth parameters and pass them
      	down to the tree routines.  Accept statements that aren't
      	assignments or calls but just return false for them.
      	(gimple_val_nonnegative_real_p): Delete.
      	* tree-ssa-math-opts.c (gimple_expand_builtin_pow): Use
      	tree_expr_nonnegative_p instead of gimple_val_nonnegative_real_p.
      	Check HONOR_NANs first.
      
      From-SVN: r228614
      Richard Sandiford committed
    • Fix Solaris bootstrap · 170f473b
      2015-10-08  Martin Jambor  <mjambor@suse.cz>
      
      	* ipa-cp.c (meet_with_1): Make the argument of abs signed.  Remove
      	unnecessary MIN.
      
      From-SVN: r228607
      Martin Jambor committed
    • cp-tree.h (SIMPLE_TARGET_EXPR_P): New. · 338976c2
      	* cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
      	* init.c (get_nsdmi): Use it.
      	* typeck2.c (massage_init_elt): Use it.
      
      From-SVN: r228606
      Jason Merrill committed
    • format · afd7acb2
      From-SVN: r228605
      Jason Merrill committed
    • * zh_TW.po: Update. · de8b96f4
      From-SVN: r228603
      Joseph Myers committed
    • re PR c++/67557 (Calling copy constructor of base class in constructor of… · 3c769e5a
      re PR c++/67557 (Calling copy constructor of base class in constructor of derived class produces crashing code)
      
      	PR c++/67557
      
      	* call.c (is_base_field_ref): New.
      	(unsafe_copy_elision_p): New.
      	(build_over_call): Use it.
      
      From-SVN: r228602
      Jason Merrill committed
    • tree-vect-loop.c (vect_analyze_loop_operations): Skip virtual phi in the tail of outer-loop. · 25a2c75d
      gcc/
      
      	* tree-vect-loop.c (vect_analyze_loop_operations): Skip virtual phi
      	in the tail of outer-loop.
      
      gcc/testsuite/
      
      	* gcc.dg/vect/vect-outer-simd-3.c: New test.
      
      From-SVN: r228601
      Yuri Rumyantsev committed
    • rs6000.c (rs6000_xcoff_debug_unwind_info): Always return UI_NONE. · a5220d61
      * config/rs6000/rs6000.c (rs6000_xcoff_debug_unwind_info): Always
      return UI_NONE.
      
      From-SVN: r228600
      David Edelsohn committed
    • tree-ssa-loop-unswitch.c: Include "gimple-iterator.h" and "cfghooks.h"... · a01e93f1
      gcc/
      
      	* tree-ssa-loop-unswitch.c: Include "gimple-iterator.h" and
      	"cfghooks.h", add prototypes for introduced new functions.
      	(tree_ssa_unswitch_loops): Use from innermost loop iterator, move all
      	checks on ability of loop unswitching to tree_unswitch_single_loop;
      	invoke tree_unswitch_single_loop or tree_unswitch_outer_loop depending
      	on innermost loop check.
      	(tree_unswitch_single_loop): Add all required checks on ability of
      	loop unswitching under zero recursive level guard.
      	(tree_unswitch_outer_loop): New function.
      	(find_loop_guard): Likewise.
      	(empty_bb_without_guard_p): Likewise.
      	(used_outside_loop_p): Likewise.
      	(get_vop_from_header): Likewise.
      	(hoist_guard): Likewise.
      	(check_exit_phi): Likewise.
      
      gcc/testsuite/
      
      	* gcc.dg/loop-unswitch-2.c: New test.
      	* gcc.dg/loop-unswitch-3.c: Likewise.
      	* gcc.dg/loop-unswitch-4.c: Likewise.
      
      From-SVN: r228599
      Yuri Rumyantsev committed
    • tree-ssa-reassoc.c (dump_ops_vector): Print newline after each ops element. · f28ff5b5
      	* tree-ssa-reassoc.c (dump_ops_vector): Print newline after each
      	ops element.
      
      From-SVN: r228598
      Marek Polacek committed
    • Dump only required dse1 file · 63b241ca
      2015-10-08  Tom de Vries  <tom@codesourcery.com>
      
      	* gcc.dg/dse.c: Only dump in dse1 pass.
      	* gcc.dg/tree-ssa/pr30375.c: Same.
      
      From-SVN: r228597
      Tom de Vries committed
    • S/390: Use create_tmp_var_raw in s390_atomic_assign_expand_fenv. · f2c0c243
      gcc/ChangeLog:
      
      2015-10-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
      
      	PR c/65345
      	* config/s390/s390.c (s390_atomic_assign_expand_fenv): Use
      	create_tmp_var_raw instead of create_tmp_var.
      
      From-SVN: r228594
      Andreas Krebbel committed