Commit Graph

144073 Commits

Author SHA1 Message Date
Thomas Schwinge 18f6014649 Merge BUILT_IN_GOACC_HOST_DATA into BUILT_IN_GOACC_DATA_START
gcc/
	* omp-builtins.def (BUILT_IN_GOACC_HOST_DATA): Remove.
	* omp-low.c (expand_omp_target): Use BUILT_IN_GOACC_DATA_START
	instead.
	libgomp/
	* libgomp.map (GOACC_2.0): Remove GOACC_host_data.
	* oacc-parallel.c (GOACC_host_data): Remove function definition.

From-SVN: r233074
2016-02-02 14:53:55 +01:00
Thomas Schwinge 1a06f5e6a3 libgomp: Skip hsa offloading for OpenACC test cases
libgomp/
	* testsuite/lib/libgomp.exp: Skip hsa offloading for OpenACC test
	cases.

From-SVN: r233073
2016-02-02 13:48:41 +01:00
Thomas Schwinge 033ff3d130 libgomp: Use HSA_RUNTIME_LIB, HSA_KMT_LIB in the testsuite
libgomp/
	* plugin/configfrag.ac (HSA_KMT_LIB, HSA_KMT_LDFLAGS): New
	variables.
	* testsuite/libgomp-test-support.exp.in (hsa_runtime_lib)
	(hsa_kmt_lib): Set variables.
	* testsuite/lib/libgomp.exp (libgomp_init): Use them to amend
	always_ld_library_path.
	* Makefile.in: Regenerate.
	* configure: Likewise.
	* testsuite/Makefile.in: Likewise.

From-SVN: r233072
2016-02-02 13:48:31 +01:00
Thomas Schwinge 4a88d9b77a libgomp: For hsa offloading, compilation is all handled by the target compiler
libgomp/
	* plugin/configfrag.ac (offload_additional_options)
	(offload_additional_lib_paths): Don't amend for hsa offloading.
	* configure: Regenerate.

From-SVN: r233071
2016-02-02 13:48:21 +01:00
Thomas Schwinge 41d809d3c8 libgomp: Don't configure for offloading target if we don't build the corresponding plugin
libgomp/
	* plugin/configfrag.ac: Don't configure for offloading target if
	we don't build the corresponding plugin.
	* configure: Regenerate.

From-SVN: r233070
2016-02-02 13:48:04 +01:00
Richard Biener 9dc03c974f re PR tree-optimization/69606 (wrong code at -Os and above on x86_64-linux-gnu)
2016-02-02  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69606
	* tree-ssa-math-opts.c (bswap_replace): Clear flow sensitive
	info on the result before moving a stmt.

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

From-SVN: r233069
2016-02-02 12:39:36 +00:00
Yuri Rumyantsev 2d4dc2233b re PR middle-end/68542 (10% 481.wrf performance regression)
gcc/

2016-02-02  Yuri Rumyantsev  <ysrumyan@gmail.com>

	PR middle-end/68542
	* config/i386/i386.c (ix86_expand_branch): Add support for conditional
	branch with vector comparison.
	* config/i386/sse.md (VI48_AVX): New mode iterator.
	(define_expand "cbranch<mode>4): Add support for conditional branch
	with vector comparison.
	* tree-vect-loop.c (optimize_mask_stores): New function.
	* tree-vect-stmts.c (vectorizable_mask_load_store): Initialize
	has_mask_store field of vect_info.
	* tree-vectorizer.c (vectorize_loops): Invoke optimaze_mask_stores for
	vectorized loops having masked stores after vec_info destroy.
	* tree-vectorizer.h (loop_vec_info): Add new has_mask_store field and
	correspondent macros.
	(optimize_mask_stores): Add prototype.

gcc/testsuite

2016-02-02  Yuri Rumyantsev  <ysrumyan@gmail.com>

	PR middle-end/68542
	* gcc.dg/vect/vect-mask-store-move-1.c: New test.
	* gcc.target/i386/avx2-vect-mask-store-move1.c: New test.

From-SVN: r233068
2016-02-02 09:46:26 +00:00
Alan Modra 65c98fdec7 [RS6000] lqarx and stqcx. registers
lqarx RT and stqcx. RS are valid only with even numbered gprs.  The
predicate to enforce this happens to allow a loophole, closed by this
patch.

	PR target/69548
gcc/
	* config/rs6000/predicates.md (quad_int_reg_operand): Don't
	allow subregs.
gcc/testsuite/
	* gcc.target/powerpc/pr69548.c: New test.

From-SVN: r233065
2016-02-02 11:59:17 +10:30
GCC Administrator 0b256e745b Daily bump.
From-SVN: r233064
2016-02-02 00:16:14 +00:00
Alan Modra 90c8d97130 [RS6000] ABI_V4 init of toc section
Since 4c4a180d lto has turned off flag_pic when linking a fixed
position executable.  So flag_pic is zero in rs6000_file_start.
However, when we get to actually emitting code, flag_pic may be on
again.  This results in undefined references to ".LCTOC1".

	PR target/68662
	* config/rs6000/rs6000.c (need_toc_init): New var, set it
	whenever toc_label_name used.
	(rs6000_file_start): Don't set up toc section here,
	(rs6000_output_function_epilogue): do so here instead,
	(rs6000_xcoff_file_start): and here.
	* config/rs6000/rs6000.md (load_toc_aix_si): Set need_toc_init.
	(load_toc_aix_di): Likewise.

From-SVN: r233061
2016-02-02 10:31:16 +10:30
Jakub Jelinek d0268b37f8 re PR rtl-optimization/69592 (Compile-time and memory-use hog in combine)
PR rtl-optimization/69592
	* rtlanal.c (nonzero_bits_binary_arith_p): New inline function.
	(cached_nonzero_bits): Use it instead of ARITHMETIC_P.
	(num_sign_bit_copies_binary_arith_p): New inline function.
	(cached_num_sign_bit_copies): Use it instead of ARITHMETIC_P.

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

From-SVN: r233059
2016-02-01 23:39:31 +01:00
Jakub Jelinek e1b81f2ba0 re PR preprocessor/69543 (_Pragma does not apply within macro)
PR preprocessor/69543
	PR c/69558
	* c-pragma.c (handle_pragma_diagnostic): Pass input_location
	instead of loc to control_warning_option.

	* gcc.dg/pr69543.c: New test.
	* gcc.dg/pr69558.c: New test.

From-SVN: r233058
2016-02-01 23:36:07 +01:00
Uros Bizjak bf672ee50f * Add PR number.
From-SVN: r233057
2016-02-01 23:25:31 +01:00
Uros Bizjak 7dd7780d4d anon5.C (dg-opetions): Use -gdwarf-2 instead of -g.
* g++.dg/other/anon5.C (dg-opetions): Use -gdwarf-2 instead of -g.

From-SVN: r233056
2016-02-01 23:20:47 +01:00
Jeff Law 237b87ee2f Fix PR # in last change
From-SVN: r233054
2016-02-01 15:05:58 -07:00
Jeff Law da9a8da809 re PR testsuite/68580 (FAIL: c-c++-common/tsan/pr65400-1.c -O0 execution test)
PR tree-optimization/68580
	* params.def (FSM_MAXIMUM_PHI_ARGUMENTS): New param.
	* tree-ssa-threadbackward.c
	(fsm_find_control_statement_thread_paths): Do not try to walk
	through large PHI nodes.

From-SVN: r233053
2016-02-01 15:03:57 -07:00
Jakub Jelinek 800cb72aae ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Return false when count is incremented above limit...
* ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Return false
	when count is incremented above limit, don't analyze further
	insns afterwards.

From-SVN: r233050
2016-02-01 21:37:49 +01:00
Martin Sebor 9a7013f8af Remove duplicate copy of the test body inadvertently inserted by patch.
From-SVN: r233045
2016-02-01 12:38:53 -07:00
Jakub Jelinek 8131b4d77f omp-low.c (oacc_parse_default_dims): Avoid -Wsign-compare warning...
* omp-low.c (oacc_parse_default_dims): Avoid
	-Wsign-compare warning, make sure value fits into int
	rather than just unsigned int.

From-SVN: r233044
2016-02-01 20:14:59 +01:00
Bin Cheng e681fb2b53 re PR tree-optimization/67921 ("internal compiler error: in build_polynomial_chrec, at tree-chrec.h:147" when using -fsanitize=undefined)
PR tree-optimization/67921
	* fold-const.c (split_tree): New parameters.  Convert pointer
	type variable part to proper type before negating. 
	(fold_binary_loc): Pass new arguments to split_tree.

	gcc/testsuite/ChangeLog
	PR tree-optimization/67921
	* c-c++-common/ubsan/pr67921.c: New test.

From-SVN: r233042
2016-02-01 17:17:47 +00:00
Nathan Sidwell b6adbb9faa nvptx.c (PTX_GANG_DEFAULT): New.
gcc/
	* config/nvptx/nvptx.c (PTX_GANG_DEFAULT): New.
	(nvptx_goacc_validate_dims): Extend to handle global defaults.
	* target.def (OACC_VALIDATE_DIMS): Extend documentation.
	* doc/tm.texti: Rebuilt.
	* doc/invoke.texi (fopenacc-dim): Document.
	* lto-wrapper.c (merge_and_complain): Add OPT_fopenacc_dim_ case.
	(append_compiler_options): Likewise.
	* omp-low.c (oacc_default_dims, oacc_min_dims): New.
	(oacc_parse_default_dims): New.
	(oacc_validate_dims): Add USED arg.  Select non-unity default when
	possible.
	(oacc_loop_fixed_partitions): Return mask of used partitions.
	(oacc_loop_auto_partitions): Emit dump info.
	(oacc_loop_partition): Return mask of used partitions.
	(execute_oacc_device_lower): Parse default dimension arg.  Adjust
	loop partitioning and validation calls.

	gcc/c-family/
	* c.opt (fopenacc-dim=): New option.

	gcc/fortran/
	* lang.opt (fopenacc-dim=): New option.

	libgomp/
	* testsuite/libgomp.oacc-c-c++-common/loop-dim-default.c: New.
	* testsuite/libgomp.oacc-fortran/routine-7.f90: Serialize loop.

From-SVN: r233041
2016-02-01 16:20:13 +00:00
Richard Biener ff86345f83 re PR tree-optimization/69556 (forwprop4/match.pd undoing work from recip)
2016-02-01  Richard Biener  <rguenther@suse.de>

	PR middle-end/69556
	* match.pd: Guard (C1/X)*C2 -> (C1*C2)/X with single_use.

	* gcc.dg/tree-ssa/recip-8.c: New testcase.

From-SVN: r233040
2016-02-01 15:40:23 +00:00
Richard Biener bc369dbd3f re PR tree-optimization/69574 (gcc ICE at -O2 and -O3 on x86_64-linux-gnu in hide_evolution_in_other_loops_than_loop)
2016-02-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69574
	* tree-chrec.c (hide_evolution_in_other_loops_than_loop): Instead
	of asserting return chrec_dont_know.

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

From-SVN: r233039
2016-02-01 15:38:08 +00:00
Martin Liska 0b2e1bfa0a Missing copyright for mem-stats header files.
* mem-stats-traits.h: Add copyright header.
	* mem-stats.h: Likewise.

From-SVN: r233037
2016-02-01 13:57:09 +00:00
Richard Biener ef31818424 re PR tree-optimization/69579 (gcc ICE at -O3 and __sigsetjmp with “tree check: expected ssa_name, have integer_cst in compute_optimized_partition_bases”)
2016-02-01  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69579
	* tree-ssa-loop-ivcanon.c (propagate_constants_for_unrolling):
	Do not propagate through abnormal PHI results.

	* gcc.dg/setjmp-6.c: New testcase.

From-SVN: r233036
2016-02-01 12:39:04 +00:00
Bernd Edlinger 571512d5f5 Don't define guard macros when doing #include_next in math.h and stdlib.h
2016-02-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>

	PR libstdc++/69581
	* include/c_compatibility/math.h: Move header guards.
	* include/c_compatibility/stdlib.h: Likewise.

From-SVN: r233035
2016-02-01 11:13:40 +00:00
Eric Botcazou 04bd58cf16 * postreload.c (reload_cse_simplify): Remove dead code.
From-SVN: r233034
2016-02-01 11:04:22 +00:00
Jakub Jelinek 654745e6f9 re PR rtl-optimization/69570 (if-conversion bug on i?86)
PR rtl-optimization/69570
	* ifcvt.c (bb_ok_for_noce_convert_multiple_sets): Return true only
	if there is more than one set, not if there is a single set.

	* g++.dg/opt/pr69570.C: New test.

From-SVN: r233033
2016-02-01 09:47:27 +01:00
Richard Henderson e6c0c44b5b re PR rtl-optimization/69535 (wrong code with -O -fno-tree-bit-ccp -fno-tree-reassoc due to use of uninitialised value)
PR rtl-opt/69535

  * combine.c (make_compound_operation): When looking through a
  subreg, make sure to re-extend to the width of the outer mode.

From-SVN: r233032
2016-01-31 23:32:01 -08:00
John David Anglin 2c00553806 re PR testsuite/69584 (FAIL: gcc.dg/pr67964.c (test for excess errors))
PR testsuite/69584
	* gcc.dg/tree-ssa/sra-17.c: Fix regexps to work on hpux.
	* gcc.dg/tree-ssa/sra-18.c: Likewise.

From-SVN: r233030
2016-02-01 01:12:23 +00:00
John David Anglin f67cb8fe7b re PR target/68741 (FAIL: tr1/8_c_compatibility/cstdio/functions.cc (test for excess errors))
PR target/68741
	* inclhack.def (hpux_vsscanf): New fix.
	* fixincl.x: Regenerated.
	* tests/base/stdio.h [HPUX_VSSCANF_CHECK]: New test.

From-SVN: r233029
2016-02-01 00:54:22 +00:00
John David Anglin 61083a4ba7 re PR debug/68244 (FAIL: g++.dg/parse/parens3.C -std=gnu++98 (internal compiler error))
PR debug/68244
	* g++.dg/parse/parens3.C: Use register "4" on hppa.

From-SVN: r233028
2016-02-01 00:38:17 +00:00
John David Anglin 6ff3f09a1d vector-5.c: Add -fno-common option on hppa*-*-hpux*.
* gcc.dg/tree-ssa/vector-5.c: Add -fno-common option on hppa*-*-hpux*.

From-SVN: r233027
2016-02-01 00:27:44 +00:00
GCC Administrator 47ba7fb432 Daily bump.
From-SVN: r233026
2016-02-01 00:16:16 +00:00
Joseph Myers e64f7af926 Regenerate .pot files.
gcc/po:
	* gcc.pot: Regenerate.

libcpp/po:
	* cpplib.pot: Regenerate.

From-SVN: r233023
2016-01-31 15:54:00 +00:00
Joseph Myers 1c6e009864 * fi.po: Update.
From-SVN: r233021
2016-01-31 15:48:42 +00:00
Jakub Jelinek 75a27d3584 re PR c++/68763 (ICE: in verify_unstripped_args, at cp/pt.c:1132)
PR c++/68763

	* tree.c (strip_typedefs) [FUNCTION_TYPE]: Avoid building a new
	function type if nothing is changing.

Co-Authored-By: Jason Merrill <jason@redhat.com>

From-SVN: r233020
2016-01-31 09:53:26 -05:00
Jason Merrill 6978c505d0 re PR c++/69009 (ICE in instantiate_decl, at cp/pt.c:21511)
PR c++/69009

	* pt.c (partial_specialization_p, impartial_args): New.
	(instantiate_decl): Call impartial_args.

From-SVN: r233019
2016-01-31 06:53:04 -05:00
Jason Merrill b1568582a0 Fix abi-tag16.C.
* mangle.c (maybe_check_abi_tags): New.
	(write_guarded_var_name): Call it.
	(mangle_ref_init_variable): Call check_abi_tags.

From-SVN: r233018
2016-01-31 06:52:56 -05:00
Jason Merrill b676a0798f Fix abi-tag17.C.
* pt.c (lookup_template_class_1): Don't share TYPE_ATTRIBUTES
	between template and instantiation.

From-SVN: r233017
2016-01-31 06:52:48 -05:00
Paul Thomas 0c221916d6 re PR fortran/67564 (Segfault on sourced allocattion statement with class(*) arrays)
2016-01-31  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67564
	* trans-expr.c (gfc_conv_procedure_call): For the vtable copy
	subroutines, add a string length argument, when the actual
	argument is an unlimited polymorphic class object.

2016-01-31  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67564
	* gfortran.dg/allocate_with_source_17.f03: New test.

From-SVN: r233016
2016-01-31 10:22:05 +00:00
GCC Administrator 03e79d4fa1 Daily bump.
From-SVN: r233015
2016-01-31 00:16:15 +00:00
Jakub Jelinek db7a281800 re PR middle-end/69546 (wrong code with -O and simple int128 arithmetics)
PR tree-optimization/69546
	* wide-int.cc (wi::divmod_internal): For unsigned division
	where both operands fit into uhwi, if o1 is 1 and o0 has
	msb set, if divident_prec is larger than bits per hwi,
	clear another quotient word and return 2 instead of 1.
	Similarly for remainder with msb in HWI set, if dividend_prec
	is larger than bits per hwi.

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

From-SVN: r233012
2016-01-30 19:04:13 +01:00
Paul Thomas e520d5f02a re PR fortran/69566 ([OOP] Failure of SELECT TYPE with unlimited polymorphic function result)
2016-01-30  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/69566
	* trans-expr.c (gfc_conv_procedure_call): Correct expression
	for 'ulim_copy', which was missing a test for 'comp'.

2016-01-30  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/69566
	* gfortran.dg/unlimited_polymorphic_25.f03: New test.

From-SVN: r233011
2016-01-30 17:44:56 +00:00
Martin Sebor 343c05d39f PR r++/68490 - error initializing a structure with a flexible array membe
gcc/testsuite/ChangeLog:
2016-01-30  Martin Sebor  <msebor@redhat.com>                                   
                                                                                
        PR c++/68490                                                            
        * g++.dg/ext/flexary10.C: New test.

From-SVN: r233010
2016-01-30 10:30:32 -07:00
Dominique d'Humieres d6c3a53920 re PR fortran/66707 (Endless compilation on wrong usage of common)
2016-01-30  Dominique d'Humieres  <dominiq@lps.ens.fr>

	PR fortran/66707
	gfortran.dg/common_23.f90: New test.

From-SVN: r233008
2016-01-30 15:07:19 +01:00
Bill Schmidt 52d72fcd1d re PR target/65546 (FAIL: gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c)
2016-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/65546
	* gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c: Correct
	condition being checked, and disable it when the target supports
	misaligned loads and stores.

From-SVN: r233006
2016-01-30 01:18:43 +00:00
GCC Administrator d5555f15a4 Daily bump.
From-SVN: r233005
2016-01-30 00:16:12 +00:00
Martin Jambor fe621379bc [hsa] Atomic assess memory model fixes
2016-01-29  Martin Jambor  <mjambor@suse.cz>

	* hsa-gen.c (get_memory_order_name): Mask with MEMMODEL_BASE_MASK.
	Use short lowercase names.
	(get_memory_order): Mask with MEMMODEL_BASE_MASK.  Support
	MEMMODEL_CONSUME with acquire semantics and MEMMODEL_SEQ_CST with
	acq_rel one.  Protect warning agains segfaults if
	get_memory_order_name returns NULL.
	(gen_hsa_ternary_atomic_for_builtin): Support with MEMMODEL_SEQ_CST
	with release semantics.  Do not warn if get_memory_order already did.
	(gen_hsa_insns_for_call): Support with MEMMODEL_SEQ_CST with acquire
	semantics.  Fix check for relaxed or acquire semantics.  Do not warn
	if get_memory_order already did.

From-SVN: r233000
2016-01-29 23:53:28 +01:00
Jakub Jelinek 3a5d2ba4fc re PR debug/69518 (Flag -g causes "error: type variant has different TYPE_VFIELD")
PR debug/69518
	* c-decl.c (finish_struct): Clear C_TYPE_INCOMPLETE_VARS in
	all type variants, not just TYPE_MAIN_VARIANT.

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

From-SVN: r232998
2016-01-29 21:37:25 +01:00