Commit Graph

143778 Commits

Author SHA1 Message Date
Richard Henderson
b1de98e3d9 re PR target/69343 (Bootstrap failure on s390{,x}-linux)
PR bootstrap/69343
PR bootstrap/69339
PR tree-opt/68964

Revert:
gcc/
  * tree.c (tm_define_builtin): New.
  (find_tm_vector_type): New.
  (build_tm_vector_builtins): New.
  (build_common_builtin_nodes): Call it.
libitm/
  * Makefile.am (libitm_la_SOURCES) [ARCH_AARCH64]: Add vect128.cc
  (libitm_la_SOURCES) [ARCH_ARM]: Add neon.cc
  (libitm_la_SOURCES) [ARCH_PPC]: Add vect128.cc
  (libitm_la_SOURCES) [ARCH_S390]: Add vect128.cc
  * configure.ac (ARCH_AARCH64): New conditional.
  (ARCH_PPC, ARCH_S390): Likewise.
  * Makefile.in, configure: Rebuild.
  * libitm.h (_ITM_TYPE_M128): Always define.
  * vect64.cc: Split ...
  * vect128.cc: ... out of...
  * config/x86/x86_sse.cc: ... here.
  * config/arm/neon.cc: New file.

From-SVN: r232631
2016-01-20 10:53:56 -08:00
Torvald Riegel
7e10bcfa3c libstdc++: Darwin does not support weak refs without definition.
PR libstdc++/69310
        * config/os/bsd/darwin/os_defines.h (_GLIBCXX_USE_WEAK_REF): Define.

From-SVN: r232628
2016-01-20 17:47:03 +00:00
Jonathan Wakely
3f93466af4 Add C++11 <cmath> overloads to the global namespace
PR libstdc++/60401
	* include/c_compatibility/math.h (acosh, asinh, atanh, acbrt,
	copysign, erf, erfc, exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb,
	lgamma, llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
	nextafter, nexttoward, remainder, remquo, rint, round, scalbln, scalbn,
	tgamma, trunc) [__cplusplus >= 201103L && _GLIBCXX_USE_C99_MATH_TR1]:
	Add using declarations.
	* testsuite/26_numerics/headers/cmath/60401.cc: New.

From-SVN: r232627
2016-01-20 17:44:58 +00:00
Prathamesh Kulkarni
cd8e73dc67 Correct date in ChangeLog entry for r232622
From-SVN: r232626
2016-01-20 17:21:46 +00:00
Prathamesh Kulkarni
d25c769062 re PR c/24293 (Undefined behaviour not diagnosed with -fsyntax-only)
2016-01-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>

        PR c/24293
        * c-tree.h (incomplete_record_decls): Declare.
        * c-parser.c (incomplete_record_decls): Define.
        (c_parser_translation_unit): Iterate through incomplete_record_decls and
        report error if any decl has zero size.
        * c-decl.c (finish_decl): Append static decl with incomplete struct/union
        or enum type to incomplete_record_decls.

testsuite/
        * gcc.dg/pr24293.c: New test.
        * gcc.dg/Wcxx-compat-8.c: Adjust to accept error due to
        incomplete struct type.
        * gcc.dg/declspec-1.c: Likewise.
        * gcc.dg/pr63549.c: Likewise.

From-SVN: r232622
2016-01-20 16:25:23 +00:00
Ilya Verbin
b235cdd5f5 task.c (gomp_create_target_task): Set firstprivate_copies to NULL.
libgomp/
	* task.c (gomp_create_target_task): Set firstprivate_copies to NULL.

From-SVN: r232620
2016-01-20 15:01:24 +00:00
Ilya Enkovich
e15f0e537f mpxrt.c (handler): Fix verbosity for error message.
libmpx/

	* mpxrt/mpxrt.c (handler): Fix verbosity for error message.

From-SVN: r232619
2016-01-20 14:51:36 +00:00
Jakub Jelinek
889d569816 re PR tree-optimization/66612 (FAIL: gcc.target/powerpc/20050830-1.c scan-assembler bdn)
PR tree-optimization/66612
	* gcc.target/powerpc/20050830-1.c: Xfail the scan-assembler test
	for bdn instruction.

From-SVN: r232618
2016-01-20 15:40:02 +01:00
Christophe Lyon
d7cf3dc7d0 [ARM target attributes] Fix effective_target tests
2016-01-20  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/
	* doc/sourcebuild.texi (arm_crypto_pragma_ok): Document new entry.
	(arm_fp_ok): Likewise.
	(arm_fp): Likewise.
	(arm_crypto): Likewise.

	gcc/testsuite/
	* lib/target-supports.exp
	(check_effective_target_arm_fp_ok_nocache): New.
	(check_effective_target_arm_fp_ok): New.
	(add_options_for_arm_fp): New.
	(check_effective_target_arm_crypto_ok_nocache): Require
	target_arm_v8_neon_ok instead of arm32.
	(check_effective_target_arm_crypto_pragma_ok_nocache): New.
	(check_effective_target_arm_crypto_pragma_ok): New.
	(add_options_for_arm_vfp): New.
	* gcc.target/arm/attr-crypto.c: Use arm_crypto_pragma_ok effective
	target. Do not force -mfloat-abi=softfp, use arm_fp_ok effective
	target instead. Force initial fpu to vfp.
	* gcc.target/arm/attr-neon-builtin-fail.c: Do not force
	-mfloat-abi=softfp, use arm_fp_ok effective target instead.
	* gcc.target/arm/attr-neon-fp16.c: Likewise. Remove arm_neon_ok
	dependency.
	* gcc.target/arm/attr-neon2.c: Do not force -mfloat-abi=softfp,
	use arm_vfp effective target instead. Force initial fpu to vfp.
	* gcc.target/arm/attr-neon3.c: Likewise.
	* gcc.target/arm/cmp-2.c: Use arm_fp_ok effective target instead of
	arm_vfp_ok.
	* gcc.target/arm/unsigned-float.c: Likewise.
	* gcc.target/arm/vfp-1.c: Likewise.
	* gcc.target/arm/vfp-ldmdbd.c: Likewise.
	* gcc.target/arm/vfp-ldmdbs.c: Likewise.
	* gcc.target/arm/vfp-ldmiad.c: Likewise.
	* gcc.target/arm/vfp-ldmias.c: Likewise.
	* gcc.target/arm/vfp-stmdbd.c: Likewise.
	* gcc.target/arm/vfp-stmdbs.c: Likewise.
	* gcc.target/arm/vfp-stmiad.c: Likewise.
	* gcc.target/arm/vfp-stmias.c: Likewise.
	* gcc.target/arm/vnmul-1.c: Likewise.
	* gcc.target/arm/vnmul-2.c: Likewise.
	* gcc.target/arm/vnmul-3.c: Likewise.
	* gcc.target/arm/vnmul-4.c: Likewise.

From-SVN: r232616
2016-01-20 15:19:41 +01:00
H.J. Lu
b03c990f38 Fix testsuite/ChangeLog entry
From-SVN: r232615
2016-01-20 06:13:30 -08:00
Christophe Lyon
01ac970459 Fix ChangeLog entry.
From-SVN: r232614
2016-01-20 15:12:13 +01:00
H.J. Lu
e84b00dadd Require non-x32 target for compile-time MPX tests
Compile-time MPX tests don't need the MPX run-time library.  They
should pass for non-x32 target.

	PR testsuite/69366
	* g++.dg/pr63995-1.C: Require non-x32 target, instead of,
	the MPX run-time library, for compile-time MPX test.
	* gcc.target/i386/chkp-always_inline.c: Likewise.
	* gcc.target/i386/chkp-bndret.c: Likewise.
	* gcc.target/i386/chkp-builtins-1.c: Likewise.
	* gcc.target/i386/chkp-builtins-2.c: Likewise.
	* gcc.target/i386/chkp-builtins-3.c: Likewise.
	* gcc.target/i386/chkp-builtins-4.c: Likewise.
	* gcc.target/i386/chkp-const-check-1.c: Likewise.
	* gcc.target/i386/chkp-const-check-2.c: Likewise.
	* gcc.target/i386/chkp-hidden-def.c: Likewise.
	* gcc.target/i386/chkp-label-address.c: Likewise.
	* gcc.target/i386/chkp-lifetime-1.c: Likewise.
	* gcc.target/i386/chkp-narrow-bounds.c: Likewise.
	* gcc.target/i386/chkp-pr69044.c: Likewise.
	* gcc.target/i386/chkp-remove-bndint-1.c: Likewise.
	* gcc.target/i386/chkp-remove-bndint-2.c: Likewise.
	* gcc.target/i386/chkp-strchr.c: Likewise.
	* gcc.target/i386/chkp-strlen-1.c: Likewise.
	* gcc.target/i386/chkp-strlen-2.c: Likewise.
	* gcc.target/i386/chkp-strlen-3.c: Likewise.
	* gcc.target/i386/chkp-strlen-4.c: Likewise.
	* gcc.target/i386/chkp-strlen-5.c: Likewise.
	* gcc.target/i386/chkp-stropt-1.c: Likewise.
	* gcc.target/i386/chkp-stropt-10.c: Likewise.
	* gcc.target/i386/chkp-stropt-11.c: Likewise.
	* gcc.target/i386/chkp-stropt-12.c: Likewise.
	* gcc.target/i386/chkp-stropt-13.c: Likewise.
	* gcc.target/i386/chkp-stropt-14.c: Likewise.
	* gcc.target/i386/chkp-stropt-15.c: Likewise.
	* gcc.target/i386/chkp-stropt-16.c: Likewise.
	* gcc.target/i386/chkp-stropt-2.c: Likewise.
	* gcc.target/i386/chkp-stropt-3.c: Likewise.
	* gcc.target/i386/chkp-stropt-4.c: Likewise.
	* gcc.target/i386/chkp-stropt-5.c: Likewise.
	* gcc.target/i386/chkp-stropt-6.c: Likewise.
	* gcc.target/i386/chkp-stropt-7.c: Likewise.
	* gcc.target/i386/chkp-stropt-8.c: Likewise.
	* gcc.target/i386/chkp-stropt-9.c: Likewise.
	* gcc.target/i386/pr63995-2.c: Likewise.
	* gcc.target/i386/pr64805.c: Likewise.
	* gcc.target/i386/pr65044.c: Likewise.
	* gcc.target/i386/pr65167.c: Likewise.
	* gcc.target/i386/pr65183.c: Likewise.
	* gcc.target/i386/pr65184.c: Likewise.
	* gcc.target/i386/thunk-retbnd.c: Likewise.

From-SVN: r232613
2016-01-20 05:51:42 -08:00
H.J. Lu
c860a14655 Require non-x32 target for compile-time MPX tests
Compile-time MPX tests don't need the MPX run-time library.  They
should pass for non-x32 target.

	PR testsuite/69369
	* g++.dg/pr63995-1.C: Require non-x32 target, instead of,
	the MPX run-time library, for compile-time MPX test.
	* gcc.target/i386/chkp-always_inline.c: Likewise.
	* gcc.target/i386/chkp-bndret.c: Likewise.
	* gcc.target/i386/chkp-builtins-1.c: Likewise.
	* gcc.target/i386/chkp-builtins-2.c: Likewise.
	* gcc.target/i386/chkp-builtins-3.c: Likewise.
	* gcc.target/i386/chkp-builtins-4.c: Likewise.
	* gcc.target/i386/chkp-const-check-1.c: Likewise.
	* gcc.target/i386/chkp-const-check-2.c: Likewise.
	* gcc.target/i386/chkp-hidden-def.c: Likewise.
	* gcc.target/i386/chkp-label-address.c: Likewise.
	* gcc.target/i386/chkp-lifetime-1.c: Likewise.
	* gcc.target/i386/chkp-narrow-bounds.c: Likewise.
	* gcc.target/i386/chkp-pr69044.c: Likewise.
	* gcc.target/i386/chkp-remove-bndint-1.c: Likewise.
	* gcc.target/i386/chkp-remove-bndint-2.c: Likewise.
	* gcc.target/i386/chkp-strchr.c: Likewise.
	* gcc.target/i386/chkp-strlen-1.c: Likewise.
	* gcc.target/i386/chkp-strlen-2.c: Likewise.
	* gcc.target/i386/chkp-strlen-3.c: Likewise.
	* gcc.target/i386/chkp-strlen-4.c: Likewise.
	* gcc.target/i386/chkp-strlen-5.c: Likewise.
	* gcc.target/i386/chkp-stropt-1.c: Likewise.
	* gcc.target/i386/chkp-stropt-10.c: Likewise.
	* gcc.target/i386/chkp-stropt-11.c: Likewise.
	* gcc.target/i386/chkp-stropt-12.c: Likewise.
	* gcc.target/i386/chkp-stropt-13.c: Likewise.
	* gcc.target/i386/chkp-stropt-14.c: Likewise.
	* gcc.target/i386/chkp-stropt-15.c: Likewise.
	* gcc.target/i386/chkp-stropt-16.c: Likewise.
	* gcc.target/i386/chkp-stropt-2.c: Likewise.
	* gcc.target/i386/chkp-stropt-3.c: Likewise.
	* gcc.target/i386/chkp-stropt-4.c: Likewise.
	* gcc.target/i386/chkp-stropt-5.c: Likewise.
	* gcc.target/i386/chkp-stropt-6.c: Likewise.
	* gcc.target/i386/chkp-stropt-7.c: Likewise.
	* gcc.target/i386/chkp-stropt-8.c: Likewise.
	* gcc.target/i386/chkp-stropt-9.c: Likewise.
	* gcc.target/i386/pr63995-2.c: Likewise.
	* gcc.target/i386/pr64805.c: Likewise.
	* gcc.target/i386/pr65044.c: Likewise.
	* gcc.target/i386/pr65167.c: Likewise.
	* gcc.target/i386/pr65183.c: Likewise.
	* gcc.target/i386/pr65184.c: Likewise.
	* gcc.target/i386/thunk-retbnd.c: Likewise.

From-SVN: r232612
2016-01-20 05:48:49 -08:00
Ilya Verbin
23a80f4dc2 libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_run): Pass extra NULL to GOMP_OFFLOAD_async_run.
liboffloadmic/
	* plugin/libgomp-plugin-intelmic.cpp (GOMP_OFFLOAD_run): Pass extra NULL
	to GOMP_OFFLOAD_async_run.

From-SVN: r232611
2016-01-20 13:40:22 +00:00
Ilya Enkovich
28b3301653 re PR tree-optimization/69328 (ice in vect_get_vec_def_for_operand, at tree-vect-stmts.c:1379 with -O3)
gcc/

	PR tree-optimization/69328
	* tree-vect-stmts.c (vect_is_simple_cond): Check compared
	vectors have same number of elements.
	(vectorizable_condition): Fix masked version recognition.

gcc/testsuite/

	PR tree-optimization/69328
	* gcc.dg/pr69328.c: New test.

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r232608
2016-01-20 12:37:01 +00:00
Jonathan Wakely
eac437bf2c Ensure C++ language linkage in cmath and cstdlib
PR libstdc++/69386
	* include/c_global/ccomplex: Ensure C++ language linkage.
	* include/c_global/cmath: Likewise.
	* include/c_global/cstdlib: Likewise.
	* include/c_global/ctgmath: Likewise.
	* testsuite/17_intro/headers/c++2011/linkage.cc: New.

From-SVN: r232607
2016-01-20 12:34:25 +00:00
Eric Botcazou
825da0d20f exp_ch2.adb (Expand_Current_Value): Make an appropriate character literal if the entity is of a character type.
* exp_ch2.adb (Expand_Current_Value): Make an appropriate character
	literal if the entity is of a character type.
	* gcc-interface/lang.opt (fsigned-char): New option.
	* gcc-interface/misc.c (gnat_handle_option): Accept it.
	(gnat_init): Adjust comment.
	* gcc-interface/gigi.h (finish_character_type): New prototype.
	(maybe_character_type): New inline function.
	(maybe_character_value): Likewise.
	* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: For
	a character of CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
	Set TYPE_ARTIFICIAL early and call finish_character_type on the type.
	<E_Enumeration_Subtype>: For a subtype of character with RM_Size and
	Esize equal to CHAR_TYPE_SIZE, make a signed type if flag_signed_char.
	Copy TYPE_STRING_FLAG from type to subtype.
	<E_Array_Type>: Deal with character index types.
	<E_Array_Subtype>: Likewise.
	* gcc-interface/trans.c (gigi): Replace unsigned_char_type_node with
	char_type_node throughout.
	(build_raise_check): Likewise.
	(get_type_length): Deal with character types.
	(Attribute_to_gnu) <Attr_Pos>: Likewise.  Remove obsolete range check
	code.  Minor tweak.
	<Attr_Pred>: Likewise.
	(Loop_Statement_to_gnu): Likewise.
	(Raise_Error_to_gnu): Likewise.
	<N_Indexed_Component>: Deal with character index types.  Remove
	obsolete code.
	<N_Slice>: Likewise.
	<N_Type_Conversion>: Deal with character types.  Minor tweak.
	<N_Unchecked_Type_Conversion>: Likewise.
	<N_In>: Likewise.
	<N_Op_Eq>: Likewise.
	(emit_index_check): Delete.
	* gcc-interface/utils.c (finish_character_type): New function.
	(gnat_signed_or_unsigned_type_for): Deal with built-in character types.
	* gcc-interface/utils2.c (expand_sloc): Replace unsigned_char_type_node
	with char_type_node.
	(build_call_raise): Likewise.
	(build_call_raise_column): Likewise.
	(build_call_raise_range): Likewise.

From-SVN: r232604
2016-01-20 09:01:34 +00:00
Richard Biener
dd6f2cf98c re PR target/69345 (459.GemsFDTD regression)
2016-01-20  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69345
	* tree-ssa-sccvn.h (VN_INFO_RANGE_INFO): New inline function.
	(VN_INFO_PTR_INFO): Likewise.
	* tree-ssa-sccvn.c (set_ssa_val_to): Avoid clearing points-to
	info when it is equal between non-dominating SSA names.
	* tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
	Make sure to look at original SSA infos.

From-SVN: r232603
2016-01-20 08:36:32 +00:00
Jeff Law
bf0bb9703a Add BZ markers
From-SVN: r232602
2016-01-20 00:55:43 -07:00
Jeff Law
bcff091388 [PATCH] [target/25114] Improve comparisons against some small integers for m68k
* config/m68k/predicates.md (pow2_m1_operand): New predicate
	extracted from ...
	(reg_or_pow2_m1_operand): Call pow2_m1_operand.
	(pc_or_label_operand): New predicate.
	* config/m68k/m68k.md: Add new peephole2 patterns for GTU/LEU
	tests for small integers that are 2^n - 1.

	* gcc.target/m68k/pr25114.c: New test.

From-SVN: r232601
2016-01-20 00:54:26 -07:00
Andre Vieira
a3f69631af memset-inline-10.c: Added dg-require-effective-target arm_thumb2_ok.
2016-01-20  Andre Vieira  <andre.simoesdiasvieira@arm.com>

    gcc/testsuite/
    * gcc.target/arm/memset-inline-10.c: Added
    dg-require-effective-target arm_thumb2_ok.

From-SVN: r232600
2016-01-20 01:56:39 +00:00
Jonathan Wakely
74ba78f51a * doc/invoke.texi (Options Summary): Add '.' after @xref.
From-SVN: r232599
2016-01-20 00:26:13 +00:00
GCC Administrator
dac22f1a33 Daily bump.
From-SVN: r232598
2016-01-20 00:16:12 +00:00
Jeff Law
89d0fecd2d re PR tree-optimization/69347 (excessive compile time with -O2)
PR middle-end/69347
	* tree-ssa-threadbackwards.c
	(fsm_find_control_statement_thread_paths): Do not try to lookup
	FSM paths for SSA_NAMEs appearing in abnormal PHIs.

From-SVN: r232593
2016-01-19 16:03:26 -07:00
Jonathan Wakely
4a8c29cc7a * uninclude: Fix third argument to gensub.
From-SVN: r232589
2016-01-19 22:00:17 +00:00
Kugan Vivekanandarajah
ac0653cf6d lto.texi: Remove text that says only Gold has linker plugin support.
gcc/ChangeLog:

2016-01-20  Kugan Vivekanandarajah  <kuganv@linaro.org>

	* doc/lto.texi: Remove text that says only Gold has linker plugin
	support.

From-SVN: r232587
2016-01-19 21:49:32 +00:00
Jonathan Wakely
96e19adabc Add C++-conforming wrappers for stdlib.h and math.h
PR libstdc++/14608
	PR libstdc++/60401
	* include/Makefile.am: Use c_compatibility math.h and stdlib.h for
	--enable-cheaders=c_global configs.
	* include/Makefile.in: Regenerate.
	* include/c_compatibility/math.h: Remove obsolete _GLIBCXX_NAMESPACE_C
	test and allow inclusion from C files.
	* include/c_compatibility/stdlib.h: Likewise. Support freestanding.
	(at_quick_exit, quick_exit): Add using directives.
	* include/c_global/cmath: Use #include_next for math.h.
	* include/c_global/cstdlib: Use #include_next for stdlib.h.
	* testsuite/26_numerics/headers/cmath/14608.cc: New.
	* testsuite/26_numerics/headers/cmath/c99_classification_macros_c.cc:
	Remove xfail for most targets.
	* testsuite/26_numerics/headers/cstdlib/60401.cc: New.

From-SVN: r232586
2016-01-19 21:43:55 +00:00
Eric Botcazou
af33ba0d93 dwarf2out.c (need_endianity_attribute_p): New inline predicate.
* dwarf2out.c (need_endianity_attribute_p): New inline predicate.
	(base_type_die): Add REVERSE parameter and attach DW_AT_endianity to
	the DIE accordingly.
	(modified_type_die): Add REVERSE parameter and pass it recursively,
	as well as to base_type_die.  Adjust presence check accordingly.
	(base_type_for_mode): Adjust call to modified_type_die.
	(add_type_attribute): Add REVERSE parameter and pass it to
	modified_type_die.
	(generic_parameter_die): Adjust call to add_type_attribute.
	(add_scalar_info): Likewise.
	(add_subscript_info): Likewise.
	(gen_array_type_die): Likewise.
	(gen_descr_array_type_die): Likewise.
	(gen_entry_point_die): Likewise.
	(gen_enumeration_type_die): Likewise.
	(gen_formal_parameter_die): Likewise.
	(gen_subprogram_die): Likewise.
	(gen_variable_die ): Likewise.
	(gen_const_die): Likewise.
	(gen_field_die): Likewise.
	(gen_pointer_type_die): Likewise.
	(gen_reference_type_die): Likewise.
	(gen_ptr_to_mbr_type_die): Likewise.
	(gen_inheritance_die): Likewise.
	(gen_subroutine_type_die): Likewise.
	(gen_typedef_die): Likewise.
	(force_type_die): Adjust call to modified_type_die.

From-SVN: r232585
2016-01-19 21:08:10 +00:00
Sandra Loosemore
d0899488d9 standards.texi: Copy-editing for grammar, markup, and sentence flow throughout the file.
2016-01-19  Sandra Loosemore <sandra@codesourcery.com>

	gcc/
	* doc/standards.texi: Copy-editing for grammar, markup, and sentence
	flow throughout the file.  Fix broken link to Objective-C 2.0
	documentation.
	* doc/invoke.texi: More copy-editing; fix numerous typos and spelling
	errors.

From-SVN: r232583
2016-01-19 15:44:11 -05:00
David Malcolm
199501ea41 PR jit/69144: Ensure that libgccjit's tempdir is fully cleaned-up
There were a couple of ways that libgccjit could fail to unlink all
of its tempfiles, leading to /tmp/libgccjit-* tempdirs lingering
after the build:
- dumpfiles requested by gcc_jit_context_enable_dump
- ahead-of-time compilation artifacts which lingered in the tempdir
  after they've been copied up to the output_path.  This was only
  the case for GCC_JIT_OUTPUT_KIND_OBJECT_FILE and
  GCC_JIT_OUTPUT_KIND_EXECUTABLE.

The following patch fixes these by introducing a vec of additional
cleanups to be performed by gcc:jit::tempdir's dtor.

In addition, if a gcc_jit_result * is leaked and
GCC_JIT_BOOL_OPTION_DEBUGINFO is enabled, the tempdir will also
not be cleaned up.  This was the case for tut04-toyvm/toyvm.cc
which the patch fixes by introducing a wrapper around
gcc_jit_result *.  Doing this required some updates to the
corresponding docs.

gcc/jit/ChangeLog:
	PR jit/69144
	* jit-playback.c (gcc::jit::playback::compile_to_file::postprocess):
	Potentially add the temporary artifact to the tempdir's list of
	tempfiles needing additional cleanup.
	(gcc::jit::playback::context::extract_any_requested_dumps): Likewise
	for the dumpfile.
	* jit-tempdir.c (gcc::jit::tempdir::~tempdir): Clean up additional
	tempfiles.
	* jit-tempdir.h (gcc::jit::tempdir::add_temp_file): New method.
	(gcc::jit::tempdir::m_tempfiles): New field.
	* docs/cp/intro/tutorial04.rst: Update for changes to toyvm.cc.
	* docs/examples/tut04-toyvm/toyvm.cc (class compilation_result):
	New.
	(toyvm_function::compile): Change return type from function ptr
	to a compilation_result.
	(toyvm_function::get_function_name): New accessor.
	(toyvm_function::m_funcname): New field.
	(get_function_name): Convert to...
	(toyvm_function::make_function_name): ...this new method.
	(toyvm_function::parse): Call make_function_name.
	(toyvm_function::compile): Convert return type from function ptr
	to a compilation_result.  Use get_function_name.
	(compilation_state::compile): Convert return type from
	gcc_jit_result * to a compilation_result.
	(test_script): Update for above changes, extracting the code from
	the compilation_result.
	(main): Likewise.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.

From-SVN: r232582
2016-01-19 20:37:19 +00:00
Torvald Riegel
f57fc96068 libitm: Remove dead code.
* local_type_traits: Remove file.
	* libitm_i.h: Don't include it anymore.
	(sized_integral): Remove.

From-SVN: r232581
2016-01-19 19:49:14 +00:00
Jason Merrill
33f4884259 re PR c++/59759 (internal compiler error: in unify, using std::enable_if on classes)
PR c++/59759
	* pt.c (convert_template_argument): Handle VAR_DECL properly.

From-SVN: r232580
2016-01-19 14:00:21 -05:00
Wilco Dijkstra
a88d10cb99 [Patch] Fix spurious warning in ccmp.c
2016-01-19  Wilco Dijkstra  <wdijkstr@arm.com>

	* ccmp.c (expand_ccmp_expr_1): Avoid spurious unused warnings.

From-SVN: r232576
2016-01-19 18:02:48 +00:00
Uros Bizjak
7596d5de93 re PR testsuite/68820 (FAIL: gcc.c-torture/execute/builtins/memops-asm.c execution, -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects)
PR testsuite/68820
	* gcc.c-torture/execute/builtins/memops-asm.x: New file.
	* gcc.c-torture/execute/builtins/strstr-asm.x: Ditto.
	* gcc.c-torture/execute/builtins/strstr-asm.c: Remove dg-options.

From-SVN: r232573
2016-01-19 18:10:31 +01:00
Jan Hubicka
ceda2c69d5 re PR ipa/66223 (Diagnostic of pure virtual function call broken, including __cxa_pure_virtual)
PR ipa/66223
	* ipa-devirt.c (is_cxa_pure_virtual_p): New function.
	(maybe_record_node): Record cxa_pure_virtual as the only possible
	target if there are not ohter candidates.
	(possible_polymorphic_call_target_p): Accept cxa_pure_virtual.

	* g++.dg/ipa/devirt-50.C: New testcase.

From-SVN: r232572
2016-01-19 16:49:50 +00:00
Richard Biener
b1b6d906cd hsa-gen.c (get_memory_order_name): Use MEMMODEL_ constants and name.
2016-01-19  Richard Biener  <rguenther@suse.de>

	* hsa-gen.c (get_memory_order_name): Use MEMMODEL_ constants
	and name.
	(get_memory_order): Likewise.

From-SVN: r232571
2016-01-19 15:10:40 +00:00
Marek Polacek
38a979f288 re PR c++/68965 (-Wunused-parameter is reported in variadic lambda or function using sizeof...(xs))
PR c++/68965
	* pt.c (tsubst_copy): Mark elements in expanded vector as used.

	* g++.dg/cpp1y/parameter-pack-1.C: New test.
	* g++.dg/cpp1y/parameter-pack-2.C: New test.

From-SVN: r232569
2016-01-19 14:37:49 +00:00
Kirill Yukhin
f4d0971224 Fix ICE in vectorizable_store ().
gcc/
	* tree-vect-stmts.c (vectorizable_store): Check
	rhs vectype.

From-SVN: r232568
2016-01-19 14:37:23 +00:00
David Malcolm
d6874f5662 Fix memory chunk corruption for opts_obstack (PR jit/68446)
gcc/ChangeLog:
	PR jit/68446
	* gcc.c (driver::decode_argv): Add call to
	init_opts_obstack before init_options_struct.
	* opts.c (init_opts_obstack): Remove idempotency.
	(init_options_struct): Replace call to init_opts_obstack
	with a gcc_assert to verify that it has already been called.
	* toplev.c (toplev::main): Add call to init_opts_obstack before
	calls to init_options_struct.
	(toplev::finalize): Move cleanup of opts_obstack next to
	cleanup of save_decoded_options, clearing the latter, and
	save_decoded_options_count.

From-SVN: r232567
2016-01-19 14:35:16 +00:00
Kyrylo Tkachov
962801c550 [ARM] PR target/69135: Mark ARMv8 vcvt instructions as unconditional
PR target/69135
	* config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Set "conds"
	attribute to unconditional.  Remove %? from output template.

	* gcc.target/arm/pr69135_1.c: New test.

From-SVN: r232566
2016-01-19 14:30:23 +00:00
Wilco Dijkstra
078fe40a48 [PATCH 4/4] Add CCMP selection based on rtx costs
2015-01-19  Wilco Dijkstra  <wdijkstr@arm.com>
		Jiong Wang  <jiong.wang@arm.com>

    gcc/
	* ccmp.c (expand_ccmp_expr_1): Cost the instruction sequences
	generated from different expand order.

    gcc/testsuite/
        * gcc.target/aarch64/ccmp_1.c: Add new tests.


Co-Authored-By: Jiong Wang <jiong.wang@arm.com>

From-SVN: r232565
2016-01-19 14:14:56 +00:00
Wilco Dijkstra
786298dc13 [PATCH 3/4] Add support for rtx costing of CCMP on AArch64
2015-01-19  Wilco Dijkstra  <wdijkstr@arm.com>

    gcc/
        * /config/aarch64/aarch64.c (aarch64_if_then_else_costs):
        Add support for CCMP costing.

From-SVN: r232564
2016-01-19 14:10:49 +00:00
Wilco Dijkstra
786e3c064c [PATCH 2/4] Add support for float CCMP
2015-01-19  Wilco Dijkstra  <wdijkstr@arm.com>

    gcc/
        * ccmp.c (ccmp_candidate_p): Remove integer-only restriction.
        * config/aarch64/aarch64.md (fccmp<mode>): New pattern.
        (fccmpe<mode>): Likewise.
        (fcmp): Rename to fcmp and globalize pattern.
        (fcmpe): Likewise.
        * config/aarch64/aarch64.c (aarch64_gen_ccmp_first): Add FP support.
        (aarch64_gen_ccmp_next): Add FP support.

    gcc/testsuite/

        * gcc.target/aarch64/ccmp_1.c: New testcase.

From-SVN: r232563
2016-01-19 14:09:49 +00:00
Marek Polacek
1e2970064a re PR c++/68586 (Enum template parameter wrongly rejected)
PR c++/68586
	* constexpr.c (clear_cv_cache): New.
	* cp-gimplify.c (clear_fold_cache): New.
	* cp-tree.h (clear_cv_cache, clear_fold_cache): Declare.
	* decl.c (finish_enum_value_list): Call them.

	* g++.dg/cpp0x/enum30.C: New test.

From-SVN: r232562
2016-01-19 14:02:40 +00:00
Wilco Dijkstra
c8012fbce9 [Patch 1/4] Simplify the representation of CCMP patterns by using
2015-01-19  Wilco Dijkstra  <wdijkstr@arm.com>

    gcc/
        * target.def (gen_ccmp_first): Update documentation.
        (gen_ccmp_next): Likewise.
        * doc/tm.texi (gen_ccmp_first): Update documentation.
        (gen_ccmp_next): Likewise.
        * ccmp.c (expand_ccmp_expr): Extract cmp_code from return value of
        expand_ccmp_expr_1.  Improve comments.
        * config/aarch64/aarch64.md (ccmp_and): Use if_then_else for ccmp.
        (ccmp_ior<mode>): Remove pattern.
        (cmp<mode>): Remove expand.
        (cmp): Globalize pattern.
        (cstorecc4): Use cc_register.
        (mov<mode>cc): Remove ccmp_cc_register check.
        * config/aarch64/aarch64.c (aarch64_get_condition_code_1):
        Simplify after removal of CC_DNE/* modes.
        (aarch64_ccmp_mode_to_code): Remove.
        (aarch64_print_operand): Remove 'K' case.  Merge 'm' and 'M' cases.
        In 'k' case use integer as condition.
        (aarch64_nzcv_codes): Remove inverted cases.
        (aarch64_code_to_ccmode): Remove.
        (aarch64_gen_ccmp_first): Use cmp pattern directly.  Return the correct
        comparison with CC register to be used in folowing CCMP/branch/CSEL.
        (aarch64_gen_ccmp_next): Use previous comparison and mode in CCMP
        pattern.  Return the comparison with CC register.  Invert conditions
        when bitcode is OR.
        * config/aarch64/aarch64-modes.def: Remove CC_DNE/* modes.
        * config/aarch64/predicates.md (ccmp_cc_register): Remove.

From-SVN: r232561
2016-01-19 13:59:56 +00:00
Jan Hubicka
756f4e9049 cgraphunit.c (cgraph_node::reset): Clear thunk info and instrumented_version.
* cgraphunit.c (cgraph_node::reset): Clear thunk info and
	instrumented_version.

From-SVN: r232560
2016-01-19 13:28:32 +00:00
Richard Biener
879c27e3a3 re PR tree-optimization/69336 (Constant value not detected)
2016-01-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69336
	* tree-ssa-scopedtables.c (avail_expr_hash): Handle all
	handled components with get_ref_base_and_extent.
	(equal_mem_array_ref_p): Adjust.

	* g++.dg/tree-ssa/pr69336.C: New testcase.

From-SVN: r232559
2016-01-19 13:27:11 +00:00
Jakub Jelinek
015337d35b re PR debug/65779 (undefined local symbol on powerpc [regression])
PR debug/65779
	* shrink-wrap.c: Include valtrack.h.
	(move_insn_for_shrink_wrap): Add DEBUG argument.  If
	MAY_HAVE_DEBUG_INSNS, call dead_debug_add on DEBUG_INSNs
	in between insn and where it will be moved to.  Call
	dead_debug_insert_temp.
	(prepare_shrink_wrap): Adjust caller.  Call dead_debug_local_init
	first and dead_debug_local_finish at the end.
	For uses and defs bitmap, handle all regs in between REGNO and
	END_REGNO, not just the first one.

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

From-SVN: r232558
2016-01-19 14:21:04 +01:00
Richard Biener
e2c768b644 re PR tree-optimization/69352 (profiledbootstrap failure with --with-build-config=bootstrap-lto)
2016-01-19  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/69352
	* tree-ssa-scopedtables.c (avail_expr_hash): Check for size == -1.
	(equal_mem_array_ref_p): Constrain size and max size properly.
	Compare the reverse flag.

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

From-SVN: r232557
2016-01-19 13:19:01 +00:00
Bernd Schmidt
d20c47fc86 * ira.c (ira): Update regstat data if we deleted insns.
From-SVN: r232556
2016-01-19 13:02:17 +00:00