Commit Graph

144509 Commits

Author SHA1 Message Date
Joel Sherrill
117799996c config.gcc: Add aarch64-*-rtems*.
2016-02-26  Joel Sherrill <joel@rtems.org>

	* config.gcc: Add aarch64-*-rtems*.
	* gcc/config/aarch64/rtems.h: New file.

From-SVN: r233760
2016-02-26 19:59:55 +00:00
Joel Sherrill
7cb065d6a3 config.host: Add aarch64-*-rtems*.
2016-02-26  Joel Sherrill <joel@rtems.org>

	* libgcc/config.host: Add aarch64-*-rtems*.

From-SVN: r233759
2016-02-26 19:59:04 +00:00
Jason Merrill
56cde07776 re PR c++/69958 (sizeof... computes wrong size)
PR c++/69958
	* pt.c (make_argument_pack): New.
	(tsubst_copy) [SIZEOF_EXPR]: Handle partial expansion.
	(tsubst_copy_and_build): Likewise.

From-SVN: r233758
2016-02-26 14:54:33 -05:00
Keith McDaniel
622174b20d [hsa,testsuite] Introduce offload_device_shared_as effective target
2016-02-26  Keith McDaniel <k.allen.mcdaniel@gmail.com>
	    Martin Jambor  <mjambor@suse.cz>

	* testsuite/lib/libgomp.exp
	(check_effective_target_offload_device_shared_as): New proc.
	* testsuite/libgomp.c++/declare_target-1.C: New test.


Co-Authored-By: Martin Jambor <mjambor@suse.cz>

From-SVN: r233757
2016-02-26 20:42:31 +01:00
Paul E. Murphy
47dfdc53cd sfp-machine.h (_FP_DECL_EX): Declare _fpsr as a union of u64 and double.
2016-02-26  Paul E. Murphy  <murphyp@linux.vnet.ibm.com>
	    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/sfp-machine.h (_FP_DECL_EX): Declare _fpsr as a
	union of u64 and double.
	(FP_TRAPPING_EXCEPTIONS): Return a bitmask of trapping exceptions.
	(FP_INIT_ROUNDMODE): Read the fpscr instead of writing a mystery
	value.
	(FP_ROUNDMODE): Update the usage of _fpscr.


Co-Authored-By: Bill Schmidt <wschmidt@linux.vnet.ibm.com>

From-SVN: r233756
2016-02-26 19:20:54 +00:00
Segher Boessenkool
d1f2bea53f powerpc: Handle DImode rotatert implemented with rlwinm (PR69946)
Some DImode rotate-right-and-mask can be implemented best with a rlwinm
instruction: those that could be a lshiftrt instead of a rotatert, while
the mask is not right-aligned.  Why the rotate in the testcase is not
optimised to a plain shift is another question, but we need to handle
it here anyway.  We compute the shift amount for a 64-bit rotate.  This
is 32 too high in this case; if we print using %h that is masked out (and
this doesn't silently let through invalid instructions, everything is
checked by rs6000_is_valid_shift_mask which is much more thorough).


	PR target/69946
	* config/rs6000/rs6000.c (rs6000_insn_for_shift_mask): Print rlwinm
	shift amount using %h.  Add comment.

gcc/testsuite/
	* gcc.target/powerpc/pr69946.c: New file.

From-SVN: r233755
2016-02-26 19:49:18 +01:00
Richard Biener
4a4f9d2bf8 re PR tree-optimization/69740 (gcc ICE at -O2 and above on valid code on x86_64-linux-gnu in "verify_loop_structure")
PR tree-optimization/69740
	* cfghooks.c (remove_edge): Request loop fixups if we delete
	an edge that might turn an irreducible loop into a natural
	loop.

        PR tree-optimization/69740
	* gcc.c-torture/compile/pr69740-1.c: New test.
	* gcc.c-torture/compile/pr69740-2.c: New test.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r233754
2016-02-26 11:17:02 -07:00
Martin Jambor
ad2a27062e [PR 69920] Prevent SRA from leaving a removed SSA_NAME in IL
2016-02-26  Martin Jambor  <mjambor@suse.cz>

	PR middle-end/69920
	* tree-sra.c (sra_modify_assign): Do not remove loads of
	uninitialized aggregates to SSA_NAMEs.

testsuite/
	* gcc.dg/torture/pr69932.c: New test.
	* gcc.dg/torture/pr69936.c: Likewise.

From-SVN: r233753
2016-02-26 19:06:42 +01:00
Andreas Krebbel
1d11f7ce70 S/390: PR69709 Fix risbg splitter
This fixes a wrong code generation problem with the splitters introduced
with that patch: https://gcc.gnu.org/ml/gcc-patches/2015-07/msg01840.html

The target operand is used as temporary.  This fails if it matches the
source of the left shift which is read after writing the temporary.

Thanks to Dominik for debugging it and thanks to Richard for the fix!

Bootstrapped and regtested on s390x with-arch=z13.

Bye,

-Andreas-

gcc/ChangeLog:

2016-02-26  Richard Henderson  <rth@redhat.com>

	PR target/69709
	* config/s390/s390.md (risbg and risbgn splitters): Allocate new
	pseudo in case the target rtx matches the source of the left
	shift.

gcc/testsuite/ChangeLog:

2016-02-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>

	PR target/69709
	* gcc.target/s390/pr69709.c: New test.

From-SVN: r233752
2016-02-26 18:03:51 +00:00
Martin Jambor
27d39ae1cc [hsa/69568] Fix ld instruction type for packed data
2016-02-26  Martin Jambor  <mjambor@suse.cz>

	PR hsa/69568
	* hsa.h (hsa_type_packed_p): Declare.
	* hsa.c (hsa_type_packed_p): New function.
	* hsa-gen.c (mem_type_for_type): Use unsigned type for packed
	loads.
	(gen_hsa_insns_for_store): Use hsa_type_packed_p.
	* hsa-brig.c (emit_basic_insn): Likewise.

From-SVN: r233751
2016-02-26 18:48:19 +01:00
Martin Jambor
de0fef0dd4 [hsa/69674] Make testsuite libgomp.c/for-3.c compile with -m32
2016-02-26  Martin Jambor  <mjambor@suse.cz>

	pr hsa/69674
	* hsa-gen.c (gen_hsa_phi_from_gimple_phi): Use proper hsa type for
	pointers.
	(gen_hsa_addr): Allow integer constants in TMR_INDEX2.

From-SVN: r233750
2016-02-26 18:45:37 +01:00
Martin Jambor
b15e4689e6 [hsa] Satisfy conditional move operand type constrains
2016-02-26  Martin Jambor  <mjambor@suse.cz>

	* hsa.h (is_a_helper): New overload for hsa_op_immed for
	hsa_op_with_type operands.
	(hsa_unsigned_type_for_type): Declare.
	* hsa.c (hsa_unsigned_type_for_type): New function.
	* hsa-gen.c (gen_hsa_binary_operation): Use hsa_unsigned_type_for_type.
	(gen_hsa_insns_for_operation_assignment): Satisfy constrains of
	the finalizer.  Do not emit extra move.

From-SVN: r233749
2016-02-26 18:42:06 +01:00
Martin Jambor
02108bb58c [hsa] Fail in presence of atomic operations in private segment
2016-02-26  Martin Jambor  <mjambor@suse.cz>

	* hsa-gen.c (gen_hsa_ternary_atomic_for_builtin): Fail in presence of
	atomic operations in private segment.

From-SVN: r233748
2016-02-26 18:39:11 +01:00
Ian Lance Taylor
6b2cd37bd9 re PR go/69966 (libgo: Port syscall.SetsockoptUcred from golang)
PR go/69966
    syscall: Add new Getsockopt functions.
    
    Add GetsockoptICMPv6Filter, GetsockoptIPv6MTUInfo, GetsockoptUcred as
    appropriate.  These functions exist in the master library.
    
    For GCC PR 69966.

    Reviewed-on: https://go-review.googlesource.com/19960

From-SVN: r233747
2016-02-26 17:36:00 +00:00
Martin Jambor
9ece21a6c5 [omp, hsa] Do not gridify simd constructs
2016-02-26  Martin Jambor  <mjambor@suse.cz>

	* omp-low.c (grid_find_ungridifiable_statement): Store problematic
	statements to wi->info.  Also disallow omp simd constructs.
	(grid_target_follows_gridifiable_pattern): Use wi.info to dump reason
	for not gridifying.  Dump special string for omp_for.

From-SVN: r233746
2016-02-26 18:35:29 +01:00
Kyrylo Tkachov
6cfccbb231 [AArch64] Set TREE_TARGET_GLOBALS in aarch64_set_current_function when new tree is the default node to recalculate optab availability
PR target/69245
	* config/aarch64/aarch64.c (aarch64_set_current_function):
	Save/restore target globals when switching to
	target_option_default_node.

	* gcc.target/aarch64/pr69245_1.c: New test.

From-SVN: r233745
2016-02-26 16:02:21 +00:00
Kyrylo Tkachov
ac59ad4efc [AArch64] PR target/69613: Return zero TARGET_SHIFT_TRUNCATION_MASK when SHIFT_COUNT_TRUNCATED is false
PR target/69613
	* config/aarch64/aarch64.c (aarch64_shift_truncation_mask):
	Return 0 if !SHIFT_COUNT_TRUNCATED.

	* gcc.dg/torture/pr69613.c: New test.

From-SVN: r233744
2016-02-26 15:59:45 +00:00
Jakub Jelinek
a2ad54a07a re PR rtl-optimization/69891 (wrong code with -mstringop-strategy=libcall @ i686)
PR rtl-optimization/69891
	* dse.c (scan_insn): If we can't figure out memset arguments
	or they are non-constant, call clear_rhs_from_active_local_stores.

	* gcc.target/i386/pr69891.c: New test.

Co-Authored-By: Eric Botcazou <ebotcazou@adacore.com>

From-SVN: r233743
2016-02-26 16:53:43 +01:00
William Schmidt
0884062c2c Fix ChangeLog formatting
From-SVN: r233742
2016-02-26 15:30:18 +00:00
William Schmidt
d2369d4f0b Update ChangeLog to mention pr61397
From-SVN: r233740
2016-02-26 15:25:29 +00:00
Michael Meissner
c163789bfd p8vector-ldst.c: Adjust to test desired functionality for both 32-bit and 64-bit.
2016-02-26  Michael Meissner <meissner@linux.vnet.ibm.com>
	    Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/p8vector-ldst.c: Adjust to test desired
	functionality for both 32-bit and 64-bit.


Co-Authored-By: Bill Schmidt <wschmidt@linux.vnet.ibm.com>

From-SVN: r233739
2016-02-26 15:24:55 +00:00
Martin Liska
f443514b82 Mention clog10{,f,l} in documentation (Builtins section)
* doc/extend.texi: Mention clog10, clog10f an clog10l
	in Builtins section.

From-SVN: r233738
2016-02-26 11:56:17 +00:00
Martin Liska
7c8fb356ac Replace ENABLE_CHECKING with CHECKING_P in dwarf2out
* dwarf2out.c (new_loc_descr): Replace ENABLE_CHECKING with
	CHECKING_P.
	(resolve_args_picking_1): Likewise.
	* dwarf2out.h (struct GTY): Likewise.

From-SVN: r233737
2016-02-26 10:46:48 +00:00
Martin Liska
ac400631d2 Replace ENABLE_CHECKING macro with flag_checking in HSA
* hsa-gen.c (generate_hsa): Replace ENABLE_CHECKING macro
	with flag_checking.
	* hsa-regalloc.c (linear_scan_regalloc): Likewise.

From-SVN: r233736
2016-02-26 10:10:11 +00:00
Markus Trippelsdorf
fb107ea182 Mention --enable-valgrind-annotations in install.texi
Martin Liska  <mliska@suse.cz>

	* doc/install.texi: Mention --enable-valgrind-annotations.

Co-Authored-By: Martin Liska <mliska@suse.cz>

From-SVN: r233735
2016-02-26 10:02:45 +00:00
Richard Biener
5aed7e2c0d re PR target/69551 (Wrong code with single element vector insert)
2016-02-26  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69551
	* tree-ssa-structalias.c (get_constraint_for_ssa_var): When
	looking through aliases adjust DECL_PT_UID to refer to the
	ultimate alias target.

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

From-SVN: r233734
2016-02-26 08:34:58 +00:00
Jason Merrill
8ba8c3757b re PR c++/69889 (ICE: in assign_temp, at function.c:961)
PR c++/69889

	* cp-tree.h (AGGR_INIT_FROM_THUNK_P): New.
	* tree.c (build_aggr_init_expr): Set it.
	* semantics.c (simplify_aggr_init_expr): Check it.
	* cp-gimplify.c (cp_genericize_r): Don't walk into
	a call/aggr_init from a thunk.

From-SVN: r233733
2016-02-25 23:53:58 -05:00
GCC Administrator
1569de0fd6 Daily bump.
From-SVN: r233732
2016-02-26 00:16:22 +00:00
Martin Liska
bd545bcf1c Do not gather mem stats in run_exit_handles (PR
PR middle-end/69919
	* alloc-pool.c (after_memory_report): New variable.
	* alloc-pool.h (base_pool_allocator ::release): Do not use
	the infrastructure if after_memory_report.
	* toplev.c (toplev::main): Mark after memory report.

From-SVN: r233722
2016-02-25 16:57:39 +00:00
Jason Merrill
bd28a34f33 re PR c++/69842 (Parameter deduction in polymorphic lambdas)
PR c++/69842
	* method.c (forward_parm): Handle parameter packs.
	* lambda.c (maybe_add_lambda_conv_op): Use it for them.

From-SVN: r233719
2016-02-25 10:23:47 -05:00
Jason Merrill
6a0cc1cd6c re PR c++/67364 ("accessing uninitialized member" error in constexpr context)
PR c++/67364
	* constexpr.c (cxx_eval_component_reference): Don't complain about
	unevaluated empty classes.

From-SVN: r233716
2016-02-25 09:09:24 -05:00
Jason Merrill
6284a979db re PR c++/68049 (template instantiation involving may_alias defines symbol twice)
PR c++/68049
	* tree.c (strip_typedefs): Use DECL_ORIGINAL_TYPE.

From-SVN: r233715
2016-02-25 09:09:18 -05:00
Richard Biener
798e2a8ed8 re PR tree-optimization/48795 (-Warray-bounds false positive)
2016-02-25  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/48795
	* tree-vrp.c (check_array_ref): Use array_at_struct_end_p.

	* gcc.dg/Warray-bounds-18.c: New testcase.

From-SVN: r233714
2016-02-25 13:20:25 +00:00
Rainer Orth
9559fbacc6 Require init_priority support for g++.dg/ext/attr-constructor1.C
* g++.dg/ext/attr-constructor1.C: Require init_priority support.

From-SVN: r233713
2016-02-25 12:47:28 +00:00
Ilya Verbin
e6861a99f8 re PR driver/68463 (Offloading fails when some objects are compiled with LTO and some without)
gcc/
	PR driver/68463
	* config/gnu-user.h (CRTOFFLOADBEGIN): Define.  Add crtoffloadbegin.o if
	offloading is enabled and -fopenacc or -fopenmp is specified.
	(CRTOFFLOADEND): Likewise.
	(GNU_USER_TARGET_STARTFILE_SPEC): Add CRTOFFLOADBEGIN.
	(GNU_USER_TARGET_ENDFILE_SPEC): Add CRTOFFLOADEND.
	* lto-wrapper.c (offloadbegin, offloadend): Remove static vars.
	(offload_objects_file_name): New static var.
	(tool_cleanup): Remove offload_objects_file_name file.
	(find_offloadbeginend): Replace with ...
	(find_crtoffloadtable): ... this.
	(run_gcc): Remove offload_argc and offload_argv.
	Get offload_objects_file_name from -foffload-objects=... option.
	Read names of object files with offload from this file, pass them to
	compile_images_for_offload_targets.  Don't call find_offloadbeginend and
	don't pass offloadbegin and offloadend to the linker.  Don't pass
	offload non-LTO files to the linker, because now they're not claimed.
libgcc/
	PR driver/68463
	* Makefile.in (crtoffloadtable$(objext)): New rule.
	* configure.ac (extra_parts): Add crtoffloadtable$(objext) if
	enable_offload_targets is not empty.
	* configure: Regenerate.
	* offloadstuff.c: Move __OFFLOAD_TABLE__ from crtoffloadend to
	crtoffloadtable.
libgomp/
	PR driver/68463
	* testsuite/libgomp.oacc-c-c++-common/parallel-dims-2.c: Remove.
lto-plugin/
	PR driver/68463
	* lto-plugin.c (struct plugin_offload_file): New.
	(offload_files): Change type.
	(offload_files_last, offload_files_last_obj): New.
	(offload_files_last_lto): New.
	(free_2): Adjust accordingly.
	(all_symbols_read_handler): Don't add offload files to lto_arg_ptr.
	Don't call free_1 for offload_files.  Write names of object files with
	offloading to the temporary file.  Add new option to lto_arg_ptr.
	(claim_file_handler): Don't claim file if it contains offload sections
	without LTO sections.  If it contains offload sections, add to the list.

From-SVN: r233712
2016-02-25 12:23:52 +00:00
Jan Hubicka
cf1fcb76fb re PR lto/69630 (LTO ICE in types_same_for_odr at ipa-devirt.c:402)
PR ipa/69630
	* ipa-devirt.c (possible_polymorphic_call_targets): Do not ICE
	on builtin_unreachable.

From-SVN: r233711
2016-02-25 12:10:04 +00:00
Jakub Jelinek
c049b10722 re PR rtl-optimization/69896 (wrong code with -frename-registers @ x64_64)
PR rtl-optimization/69896
	* regcprop.c: Include cfgrtl.h.
	(copyprop_hardreg_forward_1): If noop_p insn uses narrower
	than remembered mode, either delete it (if noop_move_p), or
	treat like copy_p but not noop_p instruction.

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

From-SVN: r233692
2016-02-25 09:09:02 +01:00
Patrick Palka
1137001cd9 re PR c++/69736 ("error: too few arguments to function" in c++14 but not c++11)
Fix PR c++/69736

gcc/cp/ChangeLog:

	PR c++/69736
	* cp-tree.h (REF_PARENTHESIZED_P): Adjust documentation.
	(maybe_undo_parenthesized_ref): Declare.
	* semantics.c (maybe_undo_parenthesized_ref): Split out from
	check_return_expr.
	(finish_call_expr): Use it.
	* typeck.c (check_return_expr): Use it.
	* pt.c (tsubst_copy_and_build) [INDIRECT_REF]: Retain the
	REF_PARENTHESIZED_P flag.

gcc/testsuite/ChangeLog:

	PR c++/69736
	* g++.dg/cpp1y/paren2.C: New test.

From-SVN: r233691
2016-02-25 01:14:27 +00:00
GCC Administrator
a8b233b7f2 Daily bump.
From-SVN: r233690
2016-02-25 00:16:13 +00:00
Martin Sebor
2e9c8641aa PR c/51147 - attribute((mode(byte))) on an enum generates wrong code
gcc/testsuite/ChangeLog:
2016-02-24  Martin Sebor  <msebor@redhat.com>

        PR c/51147
        * gcc.dg/enum-mode-2.c: New test.

From-SVN: r233686
2016-02-24 16:26:42 -07:00
Jakub Jelinek
4429358036 re PR debug/69705 (segfault in libgomp.fortran/task1.f90 with -flto -fno-use-linker-plugin -fno-toplevel-reorder -O1 -g)
PR debug/69705
	* dwarf2out.c (gen_variable_die): Work around buggy LTO
	- allow NULL decl for Fortran DW_TAG_common_block variables.

From-SVN: r233685
2016-02-24 23:04:09 +01:00
Jakub Jelinek
03ca8fb3da re PR c++/69922 (Bogus -Wnonnull-compare for: ... ? static_cast<T*>(this) : nullptr)
PR c++/69922
	* class.c (build_base_path): Set TREE_NO_WARNING on the null_test.
	Avoid folding it.
	* init.c (build_vec_delete_1, build_delete): Don't fold the non-NULL
	tests.
	* cp-gimplify.c (cp_fold): For TREE_NO_WARNING comparisons with NULL,
	unless they are folded into INTEGER_CST, error_mark_node or some
	comparison with NULL, avoid folding them and use either the original
	comparison or non-folded comparison of folded arguments.
	* cp-ubsan.c (cp_ubsan_instrument_vptr): Set TREE_NO_WARNING on the
	comparison, don't fold the comparison right away.

	* g++.dg/warn/Wnonnull-compare-6.C: New test.
	* g++.dg/warn/Wnonnull-compare-7.C: New test.
	* g++.dg/ubsan/pr69922.C: New test.

From-SVN: r233684
2016-02-24 23:01:24 +01:00
Marek Polacek
0b05329bbf re PR c/69819 (ICE on invalid code on x86_64-linux-gnu in tree check: expected function_type or method_type, have array_type in function_args_iter_init, at tree.h:4536)
PR c/69819
	* c-decl.c (finish_decl): Don't update the copy of the type of a
	different decl type.

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

From-SVN: r233683
2016-02-24 21:47:59 +00:00
Jason Merrill
944e9f5fee PR c++/69323 - errors
* friend.c (make_friend_class): Likewise.
	* decl.c (lookup_and_check_tag): Diagnose invalid dependent friend.

From-SVN: r233682
2016-02-24 14:56:09 -05:00
Jason Merrill
b8599b68ed PR c++/69323 - valid
* pt.c (instantiate_class_template_1): Set
	processing_template_decl before substituting friend_type.

From-SVN: r233681
2016-02-24 14:56:03 -05:00
Jason Merrill
4e7bcf32fe * doc/invoke.texi: Adjust -flifetime-dse documentation.
From-SVN: r233680
2016-02-24 14:55:57 -05:00
Martin Sebor
3b96b93aec PR c++/69912 - [6 regression] ICE in build_ctor_subob_ref initializing
PR c++/69912 - [6 regression] ICE in build_ctor_subob_ref initializing
	a flexible array member

gcc/testsuite/ChangeLog:
2016-02-24  Martin Sebor  <msebor@redhat.com>

	PR c++/69912
	* g++.dg/ext/flexary15.C: New test.

gcc/cp/ChangeLog:
2016-02-24  Martin Sebor  <msebor@redhat.com>

	PR c++/69912
	* tree.c (build_ctor_subob_ref): Compare types' main variants
        instead of the types as they are.

From-SVN: r233678
2016-02-24 10:23:35 -07:00
Martin Sebor
57c2c374df Avoid making unportable assumptions about the relationship between SIZE_MAX
and UINT_MAX.

gcc/testsuite/ChangeLog:
        * gcc/testsuite/gcc.dg/builtins-68.c: Avoid making unportable
        assumptions about the relationship between SIZE_MAX and UINT_MAX.
        * gcc/testsuite/g++.dg/ext/builtin_alloca.C: Same.

From-SVN: r233677
2016-02-24 10:04:03 -07:00
Maxim Kuvyrkov
65433bb5b6 re PR debug/61033 (Infinite loop in variable tracking)
PR debug/61033
	* g++.dg/pr61033.C: Add a regression testcase for PR debug/61033.

Co-Authored-By: Charles Baylis <charles.baylis@linaro.org>

From-SVN: r233675
2016-02-24 16:41:52 +00:00
Jason Merrill
a021961c05 Add -flifetime-dse=1.
gcc/
	* common.opt (flifetime-dse): Add -flifetime-dse=1.
gcc/cp/
	* decl.c (start_preparsed_function): Condition ctor clobber on
	flag_lifetime_dse > 1.

From-SVN: r233672
2016-02-24 10:18:04 -05:00