Commit Graph

145123 Commits

Author SHA1 Message Date
Bernd Schmidt
cb2763b5c4 Fix PR number in ChangeLog
From-SVN: r234830
2016-04-08 12:17:03 +00:00
Marcel Böhme
bdf66f7734 Fix memory allocation size overflows (PR69687, patch by Marcel Böhme)
PR c++/69687
	* cplus-dem.c: Include <limits.h> if available.
	(INT_MAX): Define if necessary.
	(remember_type, remember_Ktype, register_Btype, string_need):
	Abort if we detect cases where we the size of the allocation would
	overflow.

From-SVN: r234829
2016-04-08 12:10:21 +00:00
Marcel Böhme
59dad006fa Handle an overflow case (PR70498, patch by Marcel Böhme).
PR c++/70498
	* cplus-dem.c (gnu_special): Handle case where consume_count returns
	-1.

From-SVN: r234828
2016-04-08 12:06:59 +00:00
Maxim Ostapenko
c3da495616 re PR sanitizer/70541 (unnoticed invalid dereference when using address sanitizer)
2016-04-08  Maxim Ostapenko  <m.ostapenko@samsung.com>

	PR sanitizer/70541
	* asan.c (instrument_derefs): If we get unknown location, extract it
	with EXPR_LOCATION.
	(maybe_instrument_call): Instrument gimple_call's arguments if needed.

	* c-c++-common/asan/pr70541.c: New test.

From-SVN: r234827
2016-04-08 13:46:13 +03:00
Tom de Vries
9f1b833bc3 Remove incorrect warning for parallel implicit firstprivate clause
2016-04-08  Tom de Vries  <tom@codesourcery.com>

	* omp-low.c (lower_omp_target): Set TREE_NO_WARNING for oacc
	implicit firstprivate clause.

	* c-c++-common/goacc/uninit-firstprivate-clause.c: New test.
	* gfortran.dg/goacc/uninit-firstprivate-clause.f95: New test.

From-SVN: r234826
2016-04-08 09:41:16 +00:00
Kyrylo Tkachov
bae7adda10 [ARM] PR target/70566 Check that condition register is dead in tst-imm -> lsls-imm Thumb2 peepholes
PR target/70566
	* config/arm/thumb2.md (tst + branch-> lsls + branch
	peephole below *orsi_not_shiftsi_si): Require that condition
	register is dead after the peephole.
	(second peephole after the above): Likewise.

	* gcc.c-torture/execute/pr70566.c: New test.

From-SVN: r234825
2016-04-08 09:39:44 +00:00
Tom de Vries
211f3d57b1 Add goacc/uninit-copy-clause.{c,f95} testcases
2016-04-08  Tom de Vries  <tom@codesourcery.com>

	* c-c++-common/goacc/uninit-copy-clause.c: New test.
	* gfortran.dg/goacc/uninit-copy-clause.f95: New test.

From-SVN: r234824
2016-04-08 08:48:12 +00:00
Alan Modra
02cf2861fc PR70117, ppc long double isinf
gcc/
	PR target/70117
	* builtins.c (fold_builtin_classify): For IBM extended precision,
	look at just the high-order double to test for NaN.
	(fold_builtin_interclass_mathfn): Similarly for Inf.  For isnormal
	test just the high double for Inf but both doubles for subnormal
	limit.
gcc/testsuite/
	* gcc.target/powerpc/pr70117.c: New.

From-SVN: r234821
2016-04-08 11:41:52 +09:30
GCC Administrator
1f3955796c Daily bump.
From-SVN: r234820
2016-04-08 00:16:17 +00:00
Jakub Jelinek
56e9b7108a re PR testsuite/70581 (gcc.dg/lto/simd-function FAILs)
PR testsuite/70581
	* gcc.dg/lto/simd-function_0.c: New test.

From-SVN: r234817
2016-04-07 23:45:26 +02:00
Jakub Jelinek
5f490f9f7a cgraph.h (struct cgraph_simd_clone): Add mask_mode field.
* cgraph.h (struct cgraph_simd_clone): Add mask_mode field.
	* omp-low.c (simd_clone_init_simd_arrays, simd_clone_adjust): Handle
	node->simdclone->mask_mode != VOIDmode masks.
	(simd_clone_adjust_argument_types): Likewise.  Move sc var definition
	earlier, use it instead of node->simdclone.
	* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
	Set clonei->mask_mode.

	* c-c++-common/attr-simd.c: Add scan-assembler* directives for AVX512F
	clones.
	* c-c++-common/attr-simd-2.c: Likewise.
	* c-c++-common/attr-simd-4.c: Likewise.
	* gcc.dg/gomp/simd-clones-2.c: Likewise.
	* gcc.dg/gomp/simd-clones-3.c: Likewise.

From-SVN: r234816
2016-04-07 23:32:05 +02:00
Thomas Preud'homme
e4ebc74d8c re PR testsuite/70553 (pr70496.c should exclude Thumb only targets)
2016-04-07  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/testsuite/

    PR testsuite/70553
    * gcc.target/arm/pr70496.c: Also require arm_arm_ok effective target.

From-SVN: r234811
2016-04-07 16:19:20 +00:00
Patrick Palka
0146e25f90 Avoid needless unsharing during constexpr evaluation (PR c++/70452)
gcc/cp/ChangeLog:

	PR c++/70452
	* constexpr.c (find_constructor): New function.
	(unshare_constructor): New function.
	(cxx_eval_call_expression): Use unshare_constructor instead of
	unshare_expr.
	(find_array_ctor_elt): Likewise.
	(cxx_eval_vec_init_1): Likewise.
	(cxx_eval_store_expression): Likewise.
	(cxx_eval_constant_expression): Likewise.

From-SVN: r234810
2016-04-07 16:12:05 +00:00
Thomas Schwinge
9817ae350c Scan for parallelization of the oacc kernels test-cases in gfortran.dg/goacc
gcc/testsuite/
	* gfortran.dg/goacc/kernels-loop-2.f95: Scan for parallelization.
	* gfortran.dg/goacc/kernels-loop-data-2.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data-enter-exit-2.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data-enter-exit.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data-update.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-data.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop.f95: Likewise.
	* gfortran.dg/goacc/kernels-loop-n.f95: Likewise, XFAILed.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r234809
2016-04-07 17:21:37 +02:00
Jonathan Wakely
6da8b93163 * testsuite/30_threads/thread/70503.cc: Adjust from xfail to pass.
From-SVN: r234808
2016-04-07 15:26:24 +01:00
GCC Administrator
2e13f1c6c7 Daily bump.
From-SVN: r234805
2016-04-07 00:16:13 +00:00
Patrick Palka
e292f64de0 Fix C++ side of PR c/70436 (missing -Wparentheses warnings)
gcc/cp/ChangeLog:

	PR c/70436
	* parser.c (cp_parser_iteration_statement): New parameter IF_P.
	Pass it through to cp_parser_already_scoped_statement.
	(cp_parser_already_scoped_statement): New parameter IF_P.  Pass
	it through to cp_parser_statement.
	(cp_parser_statement): Pass IF_P through to
	cp_parser_iteration_statement.
	(cp_parser_pragma): Adjust call to
	cp_parser_iteration_statement.

gcc/testsuite/ChangeLog:

	PR c/70436
	* g++.dg/warn/Wparentheses-29.C: New test.

From-SVN: r234802
2016-04-06 23:10:14 +00:00
Patrick Palka
6b37bdaff1 Fix new -Wparentheses warnings encountered during bootstrap
gcc/ChangeLog:

	PR c/70436
	* gimplify.c (gimplify_omp_ordered): Add explicit braces to
	resolve a future -Wparentheses warning.
	* omp-low.c (scan_sharing_clauses): Likewise.
	* tree-parloops.c (eliminate_local_variables): Likewise.

gcc/cp/ChangeLog:

	PR c/70436
	* cp-tree.h (FOR_EACH_CLONE): Restructure macro to avoid
	potentially generating a future -Wparentheses warning in its
	callers.

gcc/fortran/ChangeLog:

	PR c/70436
	* openmp.c (gfc_find_omp_udr): Add explicit braces to resolve a
	future -Wparentheses warning.

gcc/testsuite/ChangeLog:

	PR c/70436
	* g++.dg/plugin/pragma_plugin.c (handle_pragma_sayhello): Add
	explicit braces to resolve a future -Wparentheses warning.

From-SVN: r234801
2016-04-06 23:07:21 +00:00
Richard Henderson
64824205cc re PR preprocessor/61817 (Inconsistent location of tokens in the expansion list of a built-in macro)
PR preprocessor/61817
PR preprocessor/69391

  * internal.h (_cpp_builtin_macro_text): Update decl.
  * macro.c (_cpp_builtin_macro_text): Accept location for __LINE__.
  (builtin_macro): Accept a second location for __LINE__.
  (enter_macro_context): Compute both virtual and real expansion
  locations for the macro.

  * gcc.dg/pr61817-1.c: New test.
  * gcc.dg/pr61817-2.c: New test.
  * gcc.dg/pr69391-1.c: New test.
  * gcc.dg/pr69391-2.c: New test.

From-SVN: r234794
2016-04-06 11:35:16 -07:00
Vladimir Makarov
bc2fc1f3b8 re PR rtl-optimization/70398 (gcc.dg/vect/slp-multitypes-9.c FAILs with -fno-tree-loop-optimize -fno-tree-ter)
2016-04-06  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70398
	* lra-constraints.c (process_address_1): Check zero scale and code
	for reloading with zero scale.

2016-04-06  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/70398
	* testsuite/gcc.target/aarch64/pr70398.c: New.

From-SVN: r234792
2016-04-06 16:48:36 +00:00
Jason Merrill
469abfd2ef * class.c (check_abi_tags): Fix function template handling.
From-SVN: r234790
2016-04-06 12:22:45 -04:00
Eric Botcazou
41414a0258 * gcc.c-torture/execute/20101011-1.c (__VISIUM__): Set DO_TEST to 0.
From-SVN: r234787
2016-04-06 15:28:18 +00:00
Uros Bizjak
081561816b sse.md (shuffletype): Add V32HI and V4TI modes.
* config/i386/sse.md (shuffletype): Add V32HI and V4TI modes.
	(ssescalarsize): Add V8SF, V4SF, V4DF and V2DF modes.

From-SVN: r234784
2016-04-06 17:09:37 +02:00
Eric Botcazou
49a52ebcc0 Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
* src/Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
	* src/Makefile.in: Regenerate.

From-SVN: r234782
2016-04-06 15:07:49 +00:00
Yvan Roux
4066ea8a4e guality.h (main): Avoid GDB being blocked on signals.
2016-04-06  Yvan Roux  <yvan.roux@linaro.org>
	    Pedro Alves  <palves@redhat.com>

	* gcc.dg/guality/guality.h (main): Avoid GDB being blocked on signals.


Co-Authored-By: Pedro Alves <palves@redhat.com>

From-SVN: r234781
2016-04-06 15:07:10 +00:00
Jakub Jelinek
3866f8dd85 i386.c (ix86_simd_clone_compute_vecsize_and_simdlen): Add support for AVX512F clones...
* config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
	Add support for AVX512F clones, include them by default for
	exported OpenMP declare simd functions.  For AVX2 allow simdlen 32
	and use it if charasteric type is 8-bit, for AVX512F allow simdlen
	up to 128.

	* lib/target-supports.exp (check_effective_target_vect_simd_clones):
	Check for avx512f effective targets instead of avx2.
	* gcc.dg/gomp/declare-simd-1.c: Add scan-assembler-times directives
	for AVX512F clones.
	* gcc.dg/gomp/declare-simd-3.c: Likewise.
	* g++.dg/gomp/declare-simd-1.C: Likewise.
	* g++.dg/gomp/declare-simd-3.C: Likewise.
	* g++.dg/gomp/declare-simd-4.C: Likewise.

From-SVN: r234780
2016-04-06 14:47:19 +02:00
Jakub Jelinek
ec35ea455c re PR middle-end/70550 (-Wuninitialized false positives in OpenMP code)
PR middle-end/70550
	* tree.h (OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT): Define.
	* gimplify.c (gimplify_adjust_omp_clauses_1): Set it for implicit
	firstprivate clauses.
	* omp-low.c (lower_send_clauses): Set TREE_NO_WARNING for
	OMP_CLAUSE_FIRSTPRIVATE_IMPLICIT !by_ref vars in task contexts.
	(lower_omp_target): Set TREE_NO_WARNING for
	non-addressable possibly uninitialized vars which are copied into
	addressable temporaries or copied for GOMP_MAP_FIRSTPRIVATE_INT.

	* c-c++-common/gomp/pr70550-1.c: New test.
	* c-c++-common/gomp/pr70550-2.c: New test.

From-SVN: r234779
2016-04-06 14:42:24 +02:00
GCC Administrator
ce043b0c1c Daily bump.
From-SVN: r234771
2016-04-06 00:16:14 +00:00
Nathan Sidwell
c08d28acf8 re PR c++/70512 (ICE on valid code on x86_64-linux-gnu: canonical types differ for identical types)
PR c++/70512
	* class.c (fixup_may_alias): New.
	(fixup_attribute_variants): Call it.

	* g++.dg/ext/attribute-may-alias-5.C: New.

From-SVN: r234768
2016-04-05 23:47:21 +00:00
John David Anglin
d5a28db09e predicates.md (integer_store_memory_operand): Accept REG+D operands with a large offset when reload_in_progress is true.
* config/pa/predicates.md (integer_store_memory_operand): Accept
	REG+D operands with a large offset when reload_in_progress is true.
	(floating_point_store_memory_operand): Likewise.

From-SVN: r234765
2016-04-05 23:42:36 +00:00
Jakub Jelinek
1d510e046c re PR c++/70336 (Incorrect Wconversion warning)
PR c++/70336
	* match.pd (nested int casts): Limit to GIMPLE.

	* c-c++-common/pr70336.c: New test.
	* gcc.dg/torture/builtin-isinf_sign-1.c (foo): Guard tests
	no longer optimized away at -O0 with #ifndef __OPTIMIZE__.

From-SVN: r234764
2016-04-05 23:33:37 +02:00
Jan Hubicka
84278ed9e8 re PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pure_virtual)
PR ipa/66223
	* ipa-devirt.c (maybe_record_node): Fix comment; use
	SANITIZE_UNREACHABLE instead of SANITIZE_UNDEFINED.

	* g++.dg/ipa/devirt-51.C: Use -fsanitize=unreachable.

From-SVN: r234762
2016-04-05 20:58:56 +00:00
Jonathan Wakely
d2aee115cc Restore atomic builtins usage in libstdc++-v3
PR libstdc++/70554
	* acinclude.m4 (GLIBCXX_ENABLE_ATOMIC_BUILTINS): Don't test
	__atomic_fetch_add for bool.
	* configure: Regenerate.

From-SVN: r234761
2016-04-05 20:03:46 +01:00
Jonathan Wakely
d5ec69f374 * testsuite/30_threads/thread/70503.cc: Require -static to work.
From-SVN: r234757
2016-04-05 18:21:48 +01:00
Jakub Jelinek
268a0ec4ed re PR rtl-optimization/70542 (Wrong code with -O3 -mavx2.)
PR rtl-optimization/70542
	* ree.c (add_removable_extension): For VECTOR_MODE_P punt
	if there are any uses other than insn or debug insns.

	* gcc.dg/torture/pr70542.c: New test.
	* gcc.target/i386/avx2-pr70542.c: New test.

From-SVN: r234756
2016-04-05 19:05:23 +02:00
Marc Glisse
02a49e4f9f re PR tree-optimization/70509 (wrong code with extract from a v64qi)
PR tree-optimization/70509
	* simplify-rtx.c (simplify_binary_operation_1) <case VEC_SELECT>:
	Shift HOST_WIDE_INT_1U instead of 1.

Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r234755
2016-04-05 19:01:52 +02:00
Zdenek Sojka
5e8c2eb17e re PR tree-optimization/70509 (wrong code with extract from a v64qi)
PR tree-optimization/70509
	* tree-ssa-forwprop.c (simplify_bitfield_ref): Use bitsize_int instead
	of the vector base type for index.

	* gcc.target/i386/avx512bw-pr70509.c: New test.

From-SVN: r234754
2016-04-05 18:58:50 +02:00
Patrick Palka
c0daf32d0c Fix PR c++/70452 (regression in C++ parsing performance)
gcc/cp/ChangeLog:

	PR c++/70452
	* constexpr.c (struct fundef_copy): New struct.
	(struct fundef_copies_table_t): New struct.
	(fundef_copies_table): New static variable.
	(maybe_initialize_fundef_copies_table): New static function.
	(get_fundef_copy): New static function.
	(save_fundef_copy): New static function.
	(cxx_eval_call_expression): Use get_fundef_copy, and
	save_fundef_copy.
	(constexpr_call_table): Add "deletable" GTY marker.

gcc/testsuite/ChangeLog:

	PR c++/70452
	* g++.dg/ext/constexpr-vla4.C: New test.

From-SVN: r234753
2016-04-05 16:40:00 +00:00
Uros Bizjak
bf867841b4 re PR target/70510 (ICE: output_operand: invalid %-code with -mavx512bw -masm=intel when emitting vpbroatcast)
PR target/70510
	* config/i386/sse.md (iptr): Add V64QI, V32HI, V16SI and V8DI modes.

testsuite/ChangeLog:

	PR target/70510
	* gcc.target/i386/pr70510.c: New test.

From-SVN: r234752
2016-04-05 18:26:40 +02:00
Richard Biener
3022186ac4 re PR middle-end/70526 (GCC 6 miscompiles Firefox JIT compiler)
2016-04-05  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/70526
	* tree-sra.c (build_ref_for_offset): Use prev_base to
	extract the alias pointer type.

	* g++.dg/torture/pr70526.C: New testcase.

From-SVN: r234749
2016-04-05 14:26:59 +00:00
Richard Biener
ac6929b567 dse.c (struct store_info): Remove alias_set member.
2016-04-05  Richard Biener  <rguenther@suse.de>

	* dse.c (struct store_info): Remove alias_set member.
	(struct read_info_type): Likewise.
	(clear_alias_group, clear_alias_mode_table, clear_alias_mode_holder,
	spill_deleted, clear_alias_set_lookup): Remove.
	(get_group_info): Remove dead base == NULL_RTX case.
	(dse_step0): Remove initialization of removed variables.
	(delete_dead_store_insn): Reomve alias set dumping.
	(free_read_records): Remove alias_set handling.
	(canon_address): Remove alias_set_out parameter.
	(record_store): Remove spill_alias_set, it's always zero.
	(check_mem_read_rtx): Likewise.
	(dse_step2): Rename from ...
	(dse_step2_nospill): ... this.  Adjust.
	(scan_stores): Rename from ...
	(scan_stores_nospill): ... this.
	(scan_reads): Rename from ...
	(scan_reads_nospill): ... this.
	(scan_stores_spill, scan_reads_spill): Remove.
	(dse_step3_scan): Remove for_spills argument which is always false.
	(dse_step3): Likewise.
	(dse_step5): Rename from ...
	(dse_step5_nospill): ... this.  Remove alias_set handling.
	(rest_of_handle_dse): Adjust.

From-SVN: r234748
2016-04-05 14:25:35 +00:00
Jonathan Wakely
87cec93ee0 Ensure std::thread helpers have internal linkage
PR libstdc++/70503
	* src/c++11/thread.cc (execute_native_thread_routine,
	execute_native_thread_routine_compat): Give internal linkage.
	* testsuite/30_threads/thread/70503.cc: New test.

From-SVN: r234746
2016-04-05 14:35:32 +01:00
Ville Voutilainen
7b3318c41e re PR libstdc++/70437 (Instantiation loop with pair and is_constructible)
PR libstdc++/70437
 	* include/bits/stl_pair.h (_ConstructiblePair,
	_ImplicitlyConvertiblePair, _MoveConstructiblePair,
	_ImplicitlyMoveConvertiblePair): Add shortcut conditions
	for same-type cases.
	* testsuite/20_util/pair/70437.cc: New.

From-SVN: r234743
2016-04-05 14:31:30 +03:00
Jakub Jelinek
55fc79b2a6 re PR target/70525 (generating 'vpandn' without the mode suffix, gnu as fails to assemble (-mavx512bw))
PR target/70525
	* config/i386/sse.md (*andnot<mode>3): Simplify assertions.
	Use vpandn<ssemodesuffix> for V16SI/V8DImode, vpandnq for
	V32HI/V64QImode, don't use <mask_operand3_1>, fix up formatting.
	(*andnot<mode>3_mask): Remove insn with VI12_AVX512VL iterator.

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

From-SVN: r234739
2016-04-05 10:15:09 +02:00
Richard Biener
62b233f224 re PR middle-end/70499 (internal compiler error: in make_ssa_name_fn, at tree-ssanames.c:266)
2016-04-05  Richard Biener  <rguenther@suse.de>

	PR middle-end/70499
	* gimplify-me.c (gimple_regimplify_operands): Do not rewrite
	non-register type temporaries into SSA.

	* g++.dg/torture/pr70499.C: New testcase.

From-SVN: r234738
2016-04-05 08:05:06 +00:00
Richard Biener
cc05759d4c 20030814-6.c: Fix testcase, disable FRE, remove XFAIL.
2016-04-05  Richard Biener  <rguenther@suse.de>

	* gcc.dg/tree-ssa/20030814-6.c: Fix testcase, disable FRE,
	remove XFAIL.

From-SVN: r234737
2016-04-05 07:23:49 +00:00
Patrick Palka
7a7ac32ac6 Remove class cache_map and use ggc hash_maps instead (PR c++/70452)
gcc/cp/ChangeLog:

	PR c++/70452
	* cp-tree.h (class cache_map): Remove.
	* constexpr.c (cv_cache): Change type to
	GTY((deletable)) hash_map<tree, tree> *.
	(maybe_constant_value): Adjust following the change to cv_cache.
	(clear_cv_cache): New static function.
	(clear_cv_and_fold_caches): Use it.
	* cp-gimplify.c (fold_cache): Change type to
	GTY((deletable)) hash_map<tree, tree> *.
	(clear_fold_cache): Adjust following the change to fold_cache.
	(cp_fold): Likewise.

From-SVN: r234732
2016-04-05 01:20:00 +00:00
GCC Administrator
cefb34aaf0 Daily bump.
From-SVN: r234731
2016-04-05 00:16:15 +00:00
Eric Botcazou
72d1a48d2b re PR target/67172 (i686-w64-mingw32 dwarf2 bootstrap fails with undefined reference to __EH_FRAME_BEGIN__)
PR target/67172
	* libgcc2.c (L__main): Undefine __LIBGCC_EH_FRAME_SECTION_NAME__ if
	__MINGW32__ is defined.

From-SVN: r234727
2016-04-04 22:29:02 +00:00
Bill Seurer
7134713caa MAINTAINERS (Write After Approval): Add myself.
2016-04-04  Bill Seurer  <seurer@linux.vnet.ibm.com>

	* MAINTAINERS (Write After Approval): Add myself.

From-SVN: r234724
2016-04-04 18:46:05 +00:00