Commit Graph

143049 Commits

Author SHA1 Message Date
David Malcolm
d47ddea195 Fix misleading indentation in gcc/fortran/io.c
Fix this warning:
../../../src/gcc/fortran/io.c: In function ‘match gfc_match_open()’:
../../../src/gcc/fortran/io.c:2003:4: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
    if (!compare_to_allowed_values ("DELIM", delim, NULL, NULL,
    ^
../../../src/gcc/fortran/io.c:2000:2: note: ...this ‘if’ clause, but it is not
  if (!is_char_type ("DELIM", open->delim))
  ^

gcc/fortran/ChangeLog:
	* io.c (gfc_match_open): Fix indentation.

From-SVN: r231519
2015-12-10 15:11:37 +00:00
David Malcolm
a589e68fd0 Fix -Wmisleading-indentation warning in function.c
Fix this warning:
../../../src/gcc/function.c: In function ‘void locate_and_pad_parm(machine_mode, tree, int, int, int, tree, args_size*, locate_and_pad_arg_data*)’:
../../../src/gcc/function.c:4123:2: error: statement is indented as if it were guarded by... [-Werror=misleading-indentation]
  {
  ^
../../../src/gcc/function.c:4119:7: note: ...this ‘if’ clause, but it is not
       if (initial_offset_ptr->var)
       ^

gcc/ChangeLog:
	* function.c (locate_and_pad_parm): Fix indentation.

From-SVN: r231518
2015-12-10 15:06:05 +00:00
Jonathan Wakely
b2a485f2b0 Change tests to use -std=gnu++14 not -std=gnu++1y
* testsuite/experimental/memory/shared_ptr/assign/assign.cc: Replace
	-std=gnu++1y with -std=gnu++14.
	* testsuite/experimental/memory/shared_ptr/cast/cast.cc: Likewise.
	* testsuite/experimental/memory/shared_ptr/comparison/comparison.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/alias_ctor.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/alloc_ctor.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/copy_ctor.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/default_ctor.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/move_ctor.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/pointer_ctor.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/unique_ptr_ctor.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/cons/weak_ptr_ctor.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/dest/dest.cc: Likewise.
	* testsuite/experimental/memory/shared_ptr/modifiers/reset.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/modifiers/swap.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/observers/bool_conv.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/observers/operators.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/observers/owner_before.cc:
	Likewise.
	* testsuite/experimental/memory/shared_ptr/observers/use_count.cc:
	Likewise.

From-SVN: r231517
2015-12-10 14:39:07 +00:00
Jonathan Wakely
aca12aff8b Fix dejagnu directives in shared_ptr test
PR libstdc++/68825
	* include/experimental/bits/shared_ptr.h (__shared_ptr, __weak_ptr,
	experimental::shared_ptr, experimental::weak_ptr): Constrain
	assignment operators.
	* testsuite/experimental/memory/shared_ptr/cons/copy_ctor_neg.cc:
	Change to a compile-only test and change dg-excess-errors to dg-error.

From-SVN: r231516
2015-12-10 14:32:16 +00:00
Eric Botcazou
102a163189 re PR ada/48013 (generic instantiation breaks the No_Elaboration_Code restriction)
PR ada/48013
	* gcc-interface/trans.c (empty_stmt_list_p): New predicate.
	(gigi): Invoke it to compute the No_Elaboration_Code property.
	(insert_code_for): Do not insert the code if it's empty.

From-SVN: r231515
2015-12-10 14:20:50 +00:00
Richard Biener
47e5754e17 tree-ssa-structalias.c (struct variable_info): Add is_ipa_escape_point flag.
2015-12-10  Richard Biener  <rguenther@suse.de>

	* tree-ssa-structalias.c (struct variable_info): Add
	is_ipa_escape_point flag.
	(new_var_info): Initialize to false.
	(find_func_aliases): Generate escape constraints for stores
	properly in IPA mode.
	(ipa_pta_execute): Compute is_ipa_escape_point for globals.

From-SVN: r231514
2015-12-10 14:15:34 +00:00
Eric Botcazou
d747d0057c trans.c (Call_to_gnu): Remove guard for NULL_EXPR.
* gcc-interface/trans.c (Call_to_gnu): Remove guard for NULL_EXPR.
	* gcc-interface/utils2.c (gnat_rewrite_reference) <ERROR_MARK>: Return
	the reference unmodified.
	<NULL_EXPR>: New case.  Likewise.

From-SVN: r231513
2015-12-10 14:06:15 +00:00
Jonathan Wakely
6b4f890601 Improve generated libstdc++ API docs
* doc/doxygen/user.cfg.in: Use EXTENSION_MAPPING tag. Add new headers
	to INPUT. Remove obsolete XML_SCHEMA and XML_DTD tags. Update
	PREDEFINED macros. Set BRIEF_MEMBER_DESC for man-pages.
	* include/backward/strstream: Correct @file comment.
	* include/bits/forward_list.h: Improve Doxygen comments.
	* include/bits/locale_facets_nonio.h: Likewise.
	* include/bits/mutex.h: Likewise.
	* include/bits/shared_ptr.h: Likewise.
	* include/bits/stl_deque.h: Likewise.
	* include/debug/vector (_Safe_vector): Add @brief section to comment.
	* include/experimental/bits/fs_dir.h: Correct @file comment.
	* include/experimental/bits/fs_fwd.h: Likewise.
	* include/experimental/bits/fs_ops.h: Likewise.
	* include/experimental/bits/fs_path.h: Likewise.
	* include/experimental/bits/string_view.tcc: Likewise.
	* include/experimental/optional: Document experimental status.
	* include/experimental/string_view: Correct @file comment.
	* include/ext/pb_ds/detail/bin_search_tree_/traits.hpp: Reduce
	whitespace to avoid Doxygen bug.
	* include/std/bitset: Remove redundant @class Doxygen command. Add
	parentheses to avoid Doxygen bug.
	* include/std/mutex: Improve Doxygen comments.
	* include/tr2/dynamic_bitset: Add missing @param documentation.
	* scripts/run_doxygen: Rename man pages for std::experimental types.

From-SVN: r231512
2015-12-10 14:02:52 +00:00
Eric Botcazou
2ade427a37 gigi.h (create_var_decl): Adjust comment.
* gcc-interface/gigi.h (create_var_decl): Adjust comment.
	(create_subprog_decl): Likewise.
	* gcc-interface/utils.c (create_var_decl): Likewise.
	(create_subprog_decl): Likewise.

From-SVN: r231511
2015-12-10 13:46:38 +00:00
Claudiu Zissulescu
daf9817c1c [ARC] Add support for atomic memory built-in. Add atomic.md file.
gcc/

2015-12-10  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/atomic.md: Add new file.

From-SVN: r231510
2015-12-10 14:40:21 +01:00
Claudiu Zissulescu
b8a64b7f5d [ARC] Add support for atomic memory built-in.
gcc/

2015-12-10  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc-protos.h (arc_expand_atomic_op): Prototype.
	(arc_split_compare_and_swap): Likewise.
	(arc_expand_compare_and_swap): Likewise.
	* config/arc/arc.c (arc_init): Check usage atomic option.
	(arc_pre_atomic_barrier): New function.
	(arc_post_atomic_barrier): Likewise.
	(emit_unlikely_jump): Likewise.
	(arc_expand_compare_and_swap_qh): Likewise.
	(arc_expand_compare_and_swap): Likewise.
	(arc_split_compare_and_swap): Likewise.
	(arc_expand_atomic_op): Likewise.
	* config/arc/arc.h (TARGET_CPU_CPP_BUILTINS): New C macro.
	(ASM_SPEC): Enable mlock option when matomic is used.
	* config/arc/arc.md (UNSPEC_ARC_MEMBAR): Define.
	(VUNSPEC_ARC_CAS): Likewise.
	(VUNSPEC_ARC_LL): Likewise.
	(VUNSPEC_ARC_SC): Likewise.
	(VUNSPEC_ARC_EX): Likewise.
	* config/arc/arc.opt (matomic): New option.
	* config/arc/constraints.md (ATO): New constraint.
	* config/arc/predicates.md (mem_noofs_operand): New predicate.
	* doc/invoke.texi: Document -matomic.
	* config/arc/atomic.md: New file.

gcc/testsuite

2015-12-10  Claudiu Zissulescu  <claziss@synopsys.com>

	* lib/target-supports.exp (check_effective_target_arc_atomic): New
	function.
	(check_effective_target_sync_int_long): Add checks for ARC atomic
	feature.
	(check_effective_target_sync_char_short): Likewise.

From-SVN: r231509
2015-12-10 14:32:21 +01:00
Richard Biener
41eefe133f re PR tree-optimization/68817 (internal compiler error: Segmentation fault (program f951))
2015-12-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68817
	* tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Detect
	gaps early.

	* gfortran.dg/pr68817.f90: New testcase.

From-SVN: r231508
2015-12-10 13:23:22 +00:00
Christophe Lyon
a868fff102 Revert [testsuite][ARM target attributes] Fix effective_target tests
From-SVN: r231507
2015-12-10 14:11:27 +01:00
Eric Botcazou
e2f4c6385e * alias.c (get_alias_set): Add cut-off for recursion.
From-SVN: r231505
2015-12-10 12:12:59 +00:00
Christian Bruel
f9e71dceda fix typo in date format
From-SVN: r231504
2015-12-10 12:41:38 +01:00
Ilya Enkovich
2dab46d5fc tree-vect-stmts.c (vectorizable_assignment): Support useless boolean conversion.
gcc/

	* tree-vect-stmts.c (vectorizable_assignment): Support
	useless boolean conversion.

From-SVN: r231503
2015-12-10 11:23:50 +00:00
Alan Lawrence
17cfefad6d Correct previous ChangeLog (targets is correct, not hosts)
From-SVN: r231501
2015-12-10 10:49:52 +00:00
Alan Lawrence
2f7693bfd3 [install.texi] Add note against GNAT 4.8 on ARM targets
* doc/install/texi: Add note against GNAT 4.8 on ARM hosts.

From-SVN: r231500
2015-12-10 10:48:08 +00:00
Jakub Jelinek
1ff0a84c3d re PR middle-end/68785 (valgrind reports issues with folding on x86_64)
PR tree-optimization/68785
	* gimple-fold.c (fold_ctor_reference): Pass return value from
	native_encode_expr to native_interpret_expr.
	* tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.

	* gcc.dg/pr68785.c: New test.

From-SVN: r231499
2015-12-10 11:14:38 +01:00
Richard Biener
ee7d29b43f re PR ipa/68331 ([meta-bug] fipa-pta issues)
2015-12-10  Richard Biener  <rguenther@suse.de>

	PR ipa/68331
	* tree-ssa-structalias.c (set_uids_in_ptset): Add fndecl
	parameter and make vars_contains_nonlocal properly have
	function-scope semantics in IPA mode.
	(find_what_var_points_to): Add fndecl parameter.
	(find_what_p_points_to): Likewise.
	(pt_solution_includes_global): Remove IPA PTA early out.
	(compute_points_to_sets): Adjust.
	(ipa_pta_execute): Likewise.  Clear final_solutions after
	each function.

	* gcc.dg/torture/ipa-pta-3.c: New testcase.
	* g++.dg/ipa/ipa-pta-1.C: Likewise.

From-SVN: r231498
2015-12-10 09:41:08 +00:00
Tom de Vries
e53ed9f4c5 Fix warnings from including fdl.texi into gnat-style.texi
2015-12-10  Tom de Vries  <tom@codesourcery.com>

	PR ada/65102
	* doc/include/fdl.texi: Add nodefaultgnufreedocumentationlicensenode
	ifdef to allow disabling default @node GNU Free Documentation License.

	* gnat-style.texi: Set nodefaultgnufreedocumentationlicensenode and
	define @node GNU Free Documentation License locally.

From-SVN: r231497
2015-12-10 09:19:04 +00:00
Richard Biener
580a4eedb9 tree-ssa-structalias.c (create_function_info_for): Add missing constraint from nonlocal for DECL_RESULT.
2015-12-10  Richard Biener  <rguenther@suse.de>

	* tree-ssa-structalias.c (create_function_info_for): Add missing
	constraint from nonlocal for DECL_RESULT.

From-SVN: r231496
2015-12-10 09:12:46 +00:00
Richard Biener
2c3903c73b tree-if-conv.c: Include params.h.
2015-12-10  Richard Biener  <rguenther@suse.de>

	* tree-if-conv.c: Include params.h.
	(ifcvt_memrefs_wont_trap): Use PARAM_ALLOW_STORE_DATA_RACES
	instead of flag_tree_loop_if_convert_stores to guard cases
	we'd introduce store-data-races.

From-SVN: r231495
2015-12-10 09:10:40 +00:00
Richard Biener
d4f4e71c84 re PR ipa/68721 (wrong code at -Os and above on x86_64-linux-gnu)
2015-12-10  Richard Biener  <rguenther@suse.de>

	PR ipa/68721
	* ipa-split.c (split_function): Record return value properly
	when the split part doesn't set it.

	* gcc.dg/torture/pr68721.c: New testcase.

From-SVN: r231494
2015-12-10 09:05:58 +00:00
Richard Biener
77ad31753c re PR tree-optimization/68806 (internal compiler error: Segmentation fault)
2015-12-10  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68806
	* tree-vect-loop.c (vect_analyze_loop_2): Properly detect
	reduction chains and ignore SLP reductions.

	* gcc.dg/torture/pr68806.c: New testcase.

From-SVN: r231493
2015-12-10 09:00:58 +00:00
Richard Biener
a839a8f708 tree-if-conv.c (if_convertible_loop_p_1): Do not compute dependences.
2015-12-10  Richard Biener  <rguenther@suse.de>

	* tree-if-conv.c (if_convertible_loop_p_1): Do not compute
	dependences.
	(if_convertible_loop_p): Adjust.

From-SVN: r231492
2015-12-10 09:00:07 +00:00
Tom de Vries
08628df3c0 Remove invalid assert in find_func_aliases_for_builtin_call
2015-12-10  Tom de Vries  <tom@codesourcery.com>

	* tree-ssa-structalias.c (find_func_aliases_for_builtin_call): Remove
	invalid assert.

From-SVN: r231491
2015-12-10 08:56:14 +00:00
Martin Liska
99dcb4ea03 Fix memory leaks in tree-vect-data-refs.c
* tree-vect-data-refs.c: Free an overwritten dataref.

From-SVN: r231490
2015-12-10 08:40:35 +00:00
John David Anglin
787c102712 fptr.c (__canonicalize_funcptr_for_compare): Remove code to initialize call to __dl_fixup once.
* config/pa/fptr.c (__canonicalize_funcptr_for_compare): Remove code
	to initialize call to __dl_fixup once.

From-SVN: r231486
2015-12-10 01:32:10 +00:00
John David Anglin
2f401a8f18 PR 68115/libfortran
PR 68115/libfortran
	* configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
	* configure: Regenerate.
	* elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
	to void.

From-SVN: r231485
2015-12-10 01:08:13 +00:00
John David Anglin
512e4ace54 re PR target/68729 (../Xbae/Methods.c:1772:1: ICE: in extract_insn, at recog.c:2343)
PR target/68729
	* config/pa/pa.c (pa_emit_move_sequence): Don't check that mode is
	consistent with modes of the input and output operands when doing
	reloads to and from floating point registers.  Do reload for all
	address forms.

From-SVN: r231482
2015-12-10 00:41:17 +00:00
GCC Administrator
4cd281545e Daily bump.
From-SVN: r231481
2015-12-10 00:16:14 +00:00
Jan Hubicka
54363f8a92 re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2)
PR ipa/61886
	PR middle-end/25140
	* tree-ssa-alias.c (ptr_deref_may_alias_decl_p): Use compare_base_decls
	(nonoverlapping_component_refs_of_decl_p): Update sanity check.
	(decl_refs_may_alias_p): Use compare_base_decls.
	* alias.c: Include cgraph.h
	(rtx_equal_for_memref_p): Use rtx_equal_for_memref_p.
	(compare_base_decls): New function.
	(base_alias_check): Likewise.
	(memrefs_conflict_p): Likewise.
	(nonoverlapping_memrefs_p): Likewise.
	* alias.h (compare_base_decls): Declare.

	* gcc.c-torture/execute/alias-2.c: New testcase.

From-SVN: r231478
2015-12-09 23:28:01 +00:00
Jan Hubicka
da20571a7c re PR lto/68811 (ICE: in get, at cgraph.h:1218)
PR lto/68811
	* lto.c (lto_fixup_prevailing_decls): Do not check TREE_CHAIN of
	DECL.
	(LTO_NO_PREVAIL): Use gcc_checking_assert.

From-SVN: r231477
2015-12-09 22:37:02 +00:00
Tobias Burnus
985f6c7969 trans.c (gfc_allocate_using_lib,gfc_deallocate_with_status): Introducing __asm__ __volatile__ ("":::"memory") after image control statements.
2015-12-09  Tobias Burnus  <burnus@net-b.de>
            Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>

        * trans.c (gfc_allocate_using_lib,gfc_deallocate_with_status):
        Introducing __asm__ __volatile__ ("":::"memory")
        after image control statements.
        * trans-stmt.c  (gfc_trans_sync, gfc_trans_event_post_wait,
        gfc_trans_lock_unlock, gfc_trans_critical): Ditto.
        * trans-intrinsic.c (gfc_conv_intrinsic_caf_get,
        conv_caf_send): Introducing __asm__ __volatile__ ("":::"memory")
        after send, before get and around sendget.

2015-12-09  Tobias Burnus  <burnus@net-b.de>
            Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>

        * gfortran.dg/coarray_40.f90: New.

Co-Authored-By: Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>

From-SVN: r231476
2015-12-09 23:15:47 +01:00
Jan Hubicka
ff70d83cea re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2)
PR ipa/61886
	* ipa-visibility.c (function_and_variable_visibility): Fix vtable
	rewritting guard.

From-SVN: r231474
2015-12-09 19:40:10 +00:00
Jan Hubicka
378004b9d2 re PR lto/68811 (ICE: in get, at cgraph.h:1218)
PR lto/68811
	* g++.dg/lto/pr68811_0.C: New testcase.
	* g++.dg/lto/pr68811_1.C: New testcase.

	* lto-symtab.c (lto_symtab_merge_decls_2): Decl can never be prevailed
	by itself.

From-SVN: r231473
2015-12-09 19:35:18 +00:00
Tobias Burnus
811582ec14 re PR fortran/68815 (Error/warning diagnostic: '%s' should be converted to %qs-like or %<%s%>-like string strings)
2015-12-09  Tobias Burnus  <burnus@net-b.de>

        PR fortran/68815
        * decl.c (gfc_verify_c_interop_param, variable_decl): Use
        %< ... %> for quoting in diagnostics.
        * io.c (check_format): Ditto.
        * resolve.c (resolve_operator): Ditto.
        * symbol.c (check_conflict): Ditto.
        * trans-common.c (translate_common): Ditto.

From-SVN: r231472
2015-12-09 20:29:46 +01:00
Jan Hubicka
1326155711 re PR lto/61886 (LTO breaks fread with _FORTIFY_SOURCE=2)
PR ipa/61886
	PR middle-end/25140
	* ipa-reference.c (ipa_reference_get_not_read_global,
	ipa_reference_get_not_read_global): Fix WRT aliases.
	(is_improper): Break out from ...
	(is_proper_for_analysis): ... here; fix WRT aliases.
	(analyze_function, generate_summary,
	ipa_reference_write_optimization_summary,
	ipa_reference_read_optimization_summary): Use ipa_reference_var_uid.
	* ipa-refrence.h (ipa_reference_var_uid): New inline.
	* tree-ssa-alias.c: Revert my accidental previous commit.
	(ref_maybe_used_by_call_p_1,
	call_may_clobber_ref_p_1): Use ipa_reference_var_uid.

From-SVN: r231471
2015-12-09 19:29:38 +00:00
Andreas Tobler
0a04f2dfc2 freebsd64.h: Remove the redefinition of WCHAR_TYPE.
2015-12-09  Andreas Tobler  <andreast@gcc.gnu.org>

    * config/rs6000/freebsd64.h: Remove the redefinition of WCHAR_TYPE.

From-SVN: r231470
2015-12-09 20:12:24 +01:00
Aditya Kumar
d57ad2bf74 specify more isl codegen options
* graphite-optimize-isl.c: Include isl/ast_build.h
	(optimize_isl): Set several isl_options_set_* options.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r231467
2015-12-09 18:40:15 +00:00
Aditya Kumar
ce6a2c929e add array access function in the right order
we used to add the access functions in the wrong order, Fortran style, leading to unprofitable interchanges.

	* graphite-sese-to-poly.c (pdr_add_memory_accesses): Iterate in
	the same order as adding data reference access functions.

Co-Authored-By: Sebastian Pop <s.pop@samsung.com>

From-SVN: r231465
2015-12-09 18:35:47 +00:00
Aditya Kumar
834cf25707 dump param name when timing out
* graphite-optimize-isl.c (optimize_isl): Improve dump message.

From-SVN: r231464
2015-12-09 18:33:12 +00:00
Paolo Carlini
2efc721885 re PR c++/60218 ([c++11] ICE using __bases for broken class hierarchy)
/cp
2015-12-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60218
	* semantics.c (calculate_bases_helper): Don't call dfs_walk_all
	when TYPE_BINFO (type) is null.
	(calculate_bases): Handle gracefully a null vector->length ().

/testsuite
2015-12-09  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/60218
	* g++.dg/ext/bases2.C: New.

From-SVN: r231460
2015-12-09 16:59:26 +00:00
Uros Bizjak
026d0d538b sse4_1-roundps-1.c: Remove ASM_SUFFIX define.
* gcc.target/i386/sse4_1-roundps-1.c: Remove ASM_SUFFIX define.
	* gcc.target/i386/sse4_1-roundps-2.c: Ditto.
	* gcc.target/i386/sse4_1-roundps-3.c: Ditto.
	* gcc.target/i386/sse4_1-roundsd-1.c: Ditto.
	* gcc.target/i386/sse4_1-roundsd-2.c: Ditto.
	* gcc.target/i386/sse4_1-roundsd-3.c: Ditto.
	* gcc.target/i386/sse4_1-roundss-1.c: Ditto.
	* gcc.target/i386/sse4_1-roundss-2.c: Ditto.
	* gcc.target/i386/sse4_1-roundss-3.c: Ditto.

From-SVN: r231459
2015-12-09 17:09:02 +01:00
Alexander Monakov
ca0f27b5a4 980716-1.c: Avoid undefined behavior due to passing terminating NULL as int rather than pointer.
* gcc.c-torture/execute/980716-1.c: Avoid undefined behavior due to
	passing terminating NULL as int rather than pointer.

From-SVN: r231458
2015-12-09 18:42:41 +03:00
Marek Polacek
0e0997a2d5 re PR tree-optimization/66949 (ICE at -O2 and -O3 on x86_64-linux-gnu in tree_ssa_phiopt_worker, at tree-ssa-phiopt.c:335)
PR tree-optimization/66949
	* tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Don't call 
	single_non_singleton_phi_for_edges to get the PHI from
	factor_out_conditional_conversion.  Use NULL_TREE instead of NULL.
	(factor_out_conditional_conversion): Adjust declaration.  Make it
	return the newly-created PHI.

	* gcc.dg/torture/pr66949-1.c: New test.
	* gcc.dg/torture/pr66949-2.c: New test.

From-SVN: r231457
2015-12-09 14:58:22 +00:00
James Greenhalgh
4c81f958b3 [Patch AArch64] Reinstate CANNOT_CHANGE_MODE_CLASS to fix pr67609
gcc/

	PR rtl-optimization/67609
	* config/aarch64/aarch64-protos.h
	(aarch64_cannot_change_mode_class): Bring back.
	* config/aarch64/aarch64.c
	(aarch64_cannot_change_mode_class): Likewise.
	* config/aarch64/aarch64.h (CANNOT_CHANGE_MODE_CLASS): Likewise.
	* config/aarch64/aarch64.md (aarch64_movdi_<mode>low): Use
	zero_extract rather than truncate.
	(aarch64_movdi_<mode>high): Likewise.

gcc/testsuite/

	PR rtl-optimization/67609
	* gcc.dg/torture/pr67609.c: New.

From-SVN: r231455
2015-12-09 13:47:19 +00:00
Jakub Jelinek
08554c26c4 re PR tree-optimization/68786 (Aligned masked store is generated for unaligned pointer)
PR tree-optimization/68786
	* tree-if-conv.c: Include builtins.h.
	(predicate_mem_writes): Put result of get_object_alignment (ref)
	into second argument's value.
	* tree-vect-stmts.c (vectorizable_mask_load_store): Put minimum
	pointer alignment into second argument's value.
	* tree-data-ref.c (get_references_in_stmt): Use value of second
	argument for build_aligned_type, and only the type to build
	a zero second argument for MEM_REF.
	* internal-fn.c (expand_mask_load_optab_fn,
	expand_mask_store_optab_fn): Likewise.

From-SVN: r231454
2015-12-09 14:42:06 +01:00
Richard Biener
e56c602ea3 re PR tree-optimization/68583 (Missed if-conversion)
2015-12-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68583
	* tree-if-conv.c (if_convertible_phi_p): Drop
	flag_tree_loop_if_convert_stores check in favor of the
	existing any_mask_load_store check.
	(insert_gimplified_predicates): Likewise.
	(combine_blocks): Likewise.
	(tree_if_conversion): Likewise.
	(ifcvt_memrefs_wont_trap): Properly check
	flag_tree_loop_if_convert_stores in all places that can end
	up introducing store-data-races.
	(if_convertible_gimple_assign_stmt_p): Remove restriction
	on flag_tree_loop_if_convert_stores for stores we can if-convert
	without introducing store-data-races.  Force versioning for
	all if-converted stores.

	* gcc.dg/tree-ssa/ifc-pr68583.c: New testcase.
	* gcc.dg/vect/vect-72.c: Adjust.
	* gcc.dg/vect/vect-cselim-2.c: Likewise.
	* gcc.dg/vect/vect-strided-store-a-u8-i2.c: Likewise.

From-SVN: r231453
2015-12-09 13:30:41 +00:00