Commit Graph

128161 Commits

Author SHA1 Message Date
Bingfeng Mei
4a271b7ef0 md.texi: Mention that a target shouldn't implement vec_widen_(s|u)mul_even/odd pair if...
2014-01-29  Bingfeng Mei  <bmei@broadcom.com>

	* doc/md.texi: Mention that a target shouldn't implement 
	vec_widen_(s|u)mul_even/odd pair if it is less efficient
	than hi/lo pair.

From-SVN: r207228
2014-01-29 10:10:20 +00:00
Jakub Jelinek
3d54b29d70 re PR tree-optimization/59594 (wrong code (by tree vectorizer) at -O3 on x86_64-linux-gnu)
PR tree-optimization/59594
	* tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Sort
	a copy of the datarefs vector rather than the vector itself.

	* gcc.dg/vect/no-vfa-vect-depend-2.c: New test.
	* gcc.dg/vect/no-vfa-vect-depend-3.c: New test.
	* gcc.dg/vect/pr59594.c: New test.

From-SVN: r207225
2014-01-29 10:27:43 +01:00
Jason Merrill
15b31f8c7e re PR c++/59791 (ICE: Error reporting routines re-entered. with -fcompare-debug)
PR c++/59791
	* pt.c (tsubst_decl) [VAR_DECL]: Allow in unevaluated context.
	(tsubst_copy): Use it if lookup fails.

From-SVN: r207224
2014-01-28 23:10:58 -05:00
GCC Administrator
52c02a46e8 Daily bump.
From-SVN: r207223
2014-01-29 00:17:01 +00:00
Jason Merrill
4c690cea4c re PR c++/59818 (Bogus error: call of overloaded .... is ambiguous)
PR c++/59818
	* pt.c (tsubst_function_type): Make sure we keep the same function
	quals.

From-SVN: r207215
2014-01-28 17:00:05 -05:00
Ian Lance Taylor
19cef1c1f1 compiler: Put nointerface methods in unique sections.
From-SVN: r207214
2014-01-28 21:44:53 +00:00
Jason Merrill
0f59a31da8 re PR c++/58701 ([c++11] ICE initializing member of static union)
PR c++/58701
	* semantics.c (build_anon_member_initialization): Stop walking
	when we run out of COMPONENT_REFs.

From-SVN: r207209
2014-01-28 16:04:44 -05:00
Jason Merrill
3807059e82 re PR c++/58632 (ICE reusing template parameter name as class name)
PR c++/58632
	* decl.c (lookup_and_check_tag): Ignore template parameters if
	scope == ts_current.
	* pt.c (check_template_shadow): Don't complain about the injected
	class name.

From-SVN: r207208
2014-01-28 16:04:29 -05:00
Paul Thomas
1b2b9969c8 accidental addition
From-SVN: r207205
2014-01-28 20:12:40 +00:00
Paul Thomas
6a4b5f71c9 re PR fortran/59414 ([OOP] ICE in in gfc_conv_expr_descriptor on ALLOCATE inside SELECT TYPE)
2014-01-28  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/59414
	* trans-stmt.c (gfc_trans_allocate): Before the pointer
	assignment to transfer the source _vptr to a class allocate
	expression, the final class reference should be exposed. The
	tail that includes the _data and array references is stored.
	This reduced expression is transferred to 'lhs' and the _vptr
	added. Then the tail is restored to the allocate expression.

2014-01-28  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/59414
	* gfortran.dg/allocate_class_3.f90 : New test

From-SVN: r207204
2014-01-28 20:10:22 +00:00
Thomas Schwinge
e191f50260 Avoid "'dc' may be uninitialized" warning.
libiberty/
	* cp-demangle.c (d_demangle_callback): Put an abort call in place,
	to help the compiler.

From-SVN: r207200
2014-01-28 20:06:44 +01:00
Kazu Hirata
d2ca60c021 * gcc.target/arm/thumb-cbranchqi.c: Accept bls also.
From-SVN: r207199
2014-01-28 17:35:37 +00:00
Jason Merrill
1377eb9a03 * decl.c (duplicate_decls): Tweak.
From-SVN: r207198
2014-01-28 12:06:47 -05:00
Jason Merrill
2e5e7103a3 re PR c++/53756 ([C++1y] ICE: in gen_type_die_with_usage, at dwarf2out.c:18774 with -g and operator auto ())
PR c++/53756
gcc/
	* dwarf2out.c (auto_die): New static.
	(gen_type_die_with_usage): Handle C++1y 'auto'.
	(gen_subprogram_die): If in-class DIE had 'auto', emit type again
	on definition.
gcc/cp/
	* mangle.c (write_unqualified_name): Handle operator auto.

From-SVN: r207197
2014-01-28 12:06:40 -05:00
H.J. Lu
d5d618b5da Add -m16 support for x86
The .code16gcc directive was added to binutils back in 1999:

---
   '.code16gcc' provides experimental support for generating 16-bit code
from gcc, and differs from '.code16' in that 'call', 'ret', 'enter',
'leave', 'push', 'pop', 'pusha', 'popa', 'pushf', and 'popf'
instructions default to 32-bit size.  This is so that the stack pointer
is manipulated in the same way over function calls, allowing access to
function parameters at the same stack offsets as in 32-bit mode.
'.code16gcc' also automatically adds address size prefixes where
necessary to use the 32-bit addressing modes that gcc generates.
---

It encodes 32-bit assembly instructions generated by GCC in 16-bit format
so that GCC can be used to generate 16-bit instructions.  To do that, the
.code16gcc directive must be placed at the very beginning of the assembly
code.  This patch adds -m16 to x86 backend by:

1. Add -m16 and make it mutually exclusive with -m32, -m64 and -mx32.
2. Treat -m16 like -m32 so that --32 is passed to assembler.
3. Output .code16gcc at the very beginning of the assembly code.
4. Turn off 64-bit ISA when -m16 is used.

	PR target/59672
	* config/i386/gnu-user64.h (SPEC_32): Add "m16|" to "m32".
	(SPEC_X32): Likewise.
	(SPEC_64): Likewise.
	* config/i386/i386.c (ix86_option_override_internal): Turn off
	OPTION_MASK_ISA_64BIT, OPTION_MASK_ABI_X32 and OPTION_MASK_ABI_64
	for TARGET_16BIT.
	(x86_file_start): Output .code16gcc for TARGET_16BIT.
	* config/i386/i386.h (TARGET_16BIT): New macro.
	(TARGET_16BIT_P): Likewise.
	* config/i386/i386.opt: Add m16.
	* doc/invoke.texi: Document -m16.

From-SVN: r207196
2014-01-28 08:22:45 -08:00
Dodji Seketeli
367c82866e PR preprocessor/59935 - caret diagnostics crashes on non-file locations
gcc/ChangeLog

	* input.c (location_get_source_line): Bail out on when line number
	is zero, and test the return value of
	lookup_or_add_file_to_cache_tab.

gcc/testsuite/ChangeLog

	* c-c++-common/cpp/warning-zero-location.c: New test.
	* c-c++-common/cpp/warning-zero-location-2.c: Likewise.

Signed-off-by: Dodji Seketeli <dodji@seketeli.org>

From-SVN: r207195
2014-01-28 16:03:19 +01:00
Richard Biener
07ec81f958 re PR middle-end/58742 (pointer arithmetic simplification)
2014-01-28  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/58742
	* tree-ssa-forwprop.c (associate_plusminus): Handle
	pointer subtraction of the form (T)(P + A) - (T)P.

From-SVN: r207194
2014-01-28 14:53:52 +00:00
Kyrylo Tkachov
5facb998d9 arm.c (arm_new_rtx_costs): Remove useless statement at const_int_cost.
* config/arm/arm.c (arm_new_rtx_costs): Remove useless statement
	at const_int_cost.

From-SVN: r207193
2014-01-28 14:17:09 +00:00
Richard Biener
e04faf242e revert: re PR middle-end/45364 (Compiling wine's directx.c with -O1 -g takes a very long time)
2014-01-28  Richard Biener  <rguenther@suse.de>

	Revert
	2014-01-28  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/45364
	PR rtl-optimization/59890
	* var-tracking.c (local_get_addr_clear_given_value): Handle
	already cleared slot.
	(val_reset): Handle not allocated local_get_addr_cache.
	(vt_find_locations): Use post-order on the inverted CFG.

From-SVN: r207182
2014-01-28 13:13:54 +00:00
Richard Biener
6593260b3a tree-data-ref.h (ddr_is_anti_dependent, [...]): Remove.
2014-01-28  Richard Biener  <rguenther@suse.de>

	* tree-data-ref.h (ddr_is_anti_dependent, ddrs_have_anti_deps):
	Remove.

From-SVN: r207181
2014-01-28 12:49:08 +00:00
Jonathan Wakely
156b60e0b9 re PR libstdc++/59656 (weak_ptr::lock function crashes when compiling with -fno-exceptions flag)
2014-01-28  Jonathan Wakely  <jwakely@redhat.com>
	    Kyle Lippincott  <spectral@google.com>

	PR libstdc++/59656
	* include/bits/shared_ptr.h (shared_ptr): Add new non-throwing
	constructor and grant friendship to weak_ptr.
	(weak_ptr::lock()): Use new constructor.
	* include/bits/shared_ptr_base.h
	(_Sp_counted_base::_M_add_ref_lock_nothrow()): Declare new function
	and define specializations.
	(__shared_count): Add new non-throwing constructor.
	(__shared_ptr): Add new non-throwing constructor and grant friendship
	to __weak_ptr.
	(__weak_ptr::lock()): Use new constructor.
	* testsuite/20_util/shared_ptr/cons/43820_neg.cc: Adjust dg-error.
	* testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.

Co-Authored-By: Kyle Lippincott <spectral@google.com>

From-SVN: r207180
2014-01-28 10:23:27 +00:00
Richard Biener
9ec2d2c168 re PR middle-end/45364 (Compiling wine's directx.c with -O1 -g takes a very long time)
2014-01-28  Richard Biener  <rguenther@suse.de>

	PR rtl-optimization/45364
	PR rtl-optimization/59890
	* var-tracking.c (local_get_addr_clear_given_value): Handle
	already cleared slot.
	(val_reset): Handle not allocated local_get_addr_cache.
	(vt_find_locations): Use post-order on the inverted CFG.

From-SVN: r207172
2014-01-28 09:02:59 +00:00
Alan Modra
2ceb362d0a Makefile.in (BUILD_CPPFLAGS): Do not use ALL_CPPFLAGS.
* Makefile.in (BUILD_CPPFLAGS): Do not use ALL_CPPFLAGS.
	* configure.ac <recursive call for build != host>: Define
	GENERATOR_FILE.  Comment.  Use CXX_FOR_BUILD, CXXFLAGS_FOR_BUILD
	and LD_FOR_BUILD too.
	* configure: Regenerate.

From-SVN: r207171
2014-01-28 17:38:22 +10:30
Jason Merrill
63a18c8e46 re PR c++/59823 (conversion operator to const X& causes copy-construction of temporary)
PR c++/59823
	Core DR 1138
	* call.c (reference_binding): Pass LOOKUP_NO_TEMP_BIND for
	list-initialization.  A conversion to rvalue ref that involves
	an lvalue-rvalue conversion is bad.
	(convert_like_real): Give helpful error message.

From-SVN: r207170
2014-01-27 23:31:39 -05:00
Jason Merrill
b89cc12b99 re PR c++/54652 (ICE with -g)
PR c++/54652
	* decl.c (duplicate_decls): Always use oldtype for TYPE_DECL.

From-SVN: r207169
2014-01-27 23:31:30 -05:00
Jason Merrill
9e73c3f3a5 re PR c++/58504 (ICE with type trait as default template parameter)
PR c++/58504
	* pt.c (tsubst_copy_and_build) [TRAIT_EXPR]: Use tsubst for
	types.

From-SVN: r207168
2014-01-27 23:31:23 -05:00
Jason Merrill
b25c2a2f34 re PR c++/58606 ([c++11] ICE with specialization in variadic template)
PR c++/58606
	* pt.c (template_parm_to_arg): Call convert_from_reference.
	(tsubst_template_arg): Don't strip reference refs.

From-SVN: r207167
2014-01-27 23:31:14 -05:00
Jason Merrill
1b87c99180 re PR c++/58639 (ICE on self-referential struct member)
PR c++/58639
	* call.c (build_aggr_conv): Reject value-initialization of reference.

From-SVN: r207166
2014-01-27 23:31:07 -05:00
Jason Merrill
110740003a re PR c++/58812 (ICE initializing an r-value reference with an initializer list)
PR c++/58812
	* call.c (convert_like_real): Give helpful error about excess braces
	for ck_rvalue of scalar type.

From-SVN: r207165
2014-01-27 23:31:01 -05:00
Jason Merrill
f235ad118f Core DR 1288
Core DR 1288
	* call.c (reference_binding): Only elide braces if the single
	element is reference-related.

From-SVN: r207164
2014-01-27 23:30:55 -05:00
Jason Merrill
30f6b7844a re PR c++/58814 (ICE with volatile and attribute vector_size)
PR c++/58814
	* typeck.c (cp_build_modify_expr): Make the RHS an rvalue before
	stabilizing.

From-SVN: r207163
2014-01-27 23:30:38 -05:00
Jason Merrill
9cca4e3d1a re PR c++/58837 ([c++11] ICE using invalid condition in static_assert)
PR c++/58837
	* typeck.c (cp_truthvalue_conversion): Use explicit comparison for
	FUNCTION_DECL.

From-SVN: r207162
2014-01-27 23:30:26 -05:00
Jason Merrill
64d3489790 re PR c++/59097 (ICE with invalid statement expression as array size)
PR c++/59097
	* decl.c (compute_array_index_type): Don't call
	maybe_constant_value for a non-integral expression.

From-SVN: r207161
2014-01-27 23:30:16 -05:00
GCC Administrator
5a21ca2450 Daily bump.
From-SVN: r207159
2014-01-28 00:16:30 +00:00
Steve Ellcey
78c021554f pr52125.c: Add -mno-optgp option.
2014-01-27  Steve Ellcey  <sellcey@mips.com>

	* gcc.target/mips/pr52125.c: Add -mno-optgp option.

From-SVN: r207156
2014-01-27 23:05:05 +00:00
Allan Sandfeld Jensen
0ebe2584bb i386.c (get_builtin_code_for_version): Separate Westmere from Nehalem...
* config/i386/i386.c (get_builtin_code_for_version): Separate
	Westmere from Nehalem, Ivy Bridge from Sandy Bridge and
	Broadwell from Haswell.

testsuite/ChangeLog:

	* g++.dg/ext/mv16.C: New tests.

From-SVN: r207155
2014-01-27 23:45:02 +01:00
Steve Ellcey
a33fc7fe6c mips-common.c (TARGET_DEFAULT_TARGET_FLAGS): Remove TARGET_FP_EXCEPTIONS_DEFAULT and MASK_FUSED_MADD.
2014-01-27  Steve Ellcey  <sellcey@mips.com>

	* common/config/mips/mips-common.c (TARGET_DEFAULT_TARGET_FLAGS):
	Remove TARGET_FP_EXCEPTIONS_DEFAULT and MASK_FUSED_MADD.
	* config/mips/mips.c (mips_option_override): Change setting
	of TARGET_DSP.
	* config/mips/mips.h (TARGET_FP_EXCEPTIONS_DEFAULT): Remove.
	* config/mips/mips.opt (DSP, DSPR2, FP_EXCEPTIONS, FUSED_MADD,
	MIPS3D) Change from Mask to Var.

From-SVN: r207154
2014-01-27 22:38:42 +00:00
Jonathan Wakely
6468818948 mklog: Fix description at top of file.
2014-01-27  Jonathan Wakely  <jwakely@redhat.com>

	* mklog: Fix description at top of file.

From-SVN: r207153
2014-01-27 21:43:09 +00:00
Jeff Law
a99be3c928 * ipa-inline.c (inline_small_functions): Fix typo.
From-SVN: r207151
2014-01-27 14:00:04 -07:00
Ilya Tocar
d256b8669e avx512fintrin.h (_mm512_mask_cvtepi32_storeu_epi8): New.
gcc/
	* config/i386/avx512fintrin.h (_mm512_mask_cvtepi32_storeu_epi8): New.
	(_mm512_mask_cvtsepi32_storeu_epi8): Ditto.
	(_mm512_mask_cvtusepi32_storeu_epi8): Ditto.
	(_mm512_mask_cvtepi32_storeu_epi16): Ditto.
	(_mm512_mask_cvtsepi32_storeu_epi16): Ditto.
	(_mm512_mask_cvtusepi32_storeu_epi16): Ditto.
	(_mm512_mask_cvtepi64_storeu_epi32): Ditto.
	(_mm512_mask_cvtsepi64_storeu_epi32): Ditto.
	(_mm512_mask_cvtusepi64_storeu_epi32): Ditto.
	(_mm512_mask_cvtepi64_storeu_epi16): Ditto.
	(_mm512_mask_cvtsepi64_storeu_epi16): Ditto.
	(_mm512_mask_cvtusepi64_storeu_epi16): Ditto.
	(_mm512_mask_cvtepi64_storeu_epi8): Ditto.
	(_mm512_mask_cvtsepi64_storeu_epi8): Ditto.
	(_mm512_mask_cvtusepi64_storeu_epi8): Ditto.
	(_mm512_storeu_epi64): Ditto.
	(_mm512_cmpge_epi32_mask): Ditto.
	(_mm512_cmpge_epu32_mask): Ditto.
	(_mm512_cmpge_epi64_mask): Ditto.
	(_mm512_cmpge_epu64_mask): Ditto.
	(_mm512_cmple_epi32_mask): Ditto.
	(_mm512_cmple_epu32_mask): Ditto.
	(_mm512_cmple_epi64_mask): Ditto.
	(_mm512_cmple_epu64_mask): Ditto.
	(_mm512_cmplt_epi32_mask): Ditto.
	(_mm512_cmplt_epu32_mask): Ditto.
	(_mm512_cmplt_epi64_mask): Ditto.
	(_mm512_cmplt_epu64_mask): Ditto.
	(_mm512_cmpneq_epi32_mask): Ditto.
	(_mm512_cmpneq_epu32_mask): Ditto.
	(_mm512_cmpneq_epi64_mask): Ditto.
	(_mm512_cmpneq_epu64_mask): Ditto.
	(_mm512_expand_pd): Ditto.
	(_mm512_expand_ps): Ditto.
	* config/i386/i386-builtin-types.def: Add PV16QI, PV16QI, PV16HI,
	VOID_PV8SI_V8DI_QI, VOID_PV8HI_V8DI_QI, VOID_PV16QI_V8DI_QI,
	VOID_PV16QI_V16SI_HI, VOID_PV16HI_V16SI_HI.
	* config/i386/i386.c (ix86_builtins): Add
	IX86_BUILTIN_EXPANDPD512_NOMASK, IX86_BUILTIN_EXPANDPS512_NOMASK,
	IX86_BUILTIN_PMOVDB512_MEM, IX86_BUILTIN_PMOVDW512_MEM,
	IX86_BUILTIN_PMOVQB512_MEM, IX86_BUILTIN_PMOVQD512_MEM,
	IX86_BUILTIN_PMOVQW512_MEM, IX86_BUILTIN_PMOVSDB512_MEM,
	IX86_BUILTIN_PMOVSDW512_MEM, IX86_BUILTIN_PMOVSQB512_MEM,
	IX86_BUILTIN_PMOVSQD512_MEM, IX86_BUILTIN_PMOVSQW512_MEM,
	IX86_BUILTIN_PMOVUSDB512_MEM, IX86_BUILTIN_PMOVUSDW512_MEM,
	IX86_BUILTIN_PMOVUSQB512_MEM, IX86_BUILTIN_PMOVUSQD512_MEM,
	IX86_BUILTIN_PMOVUSQW512_MEM.
	(bdesc_special_args): Add __builtin_ia32_pmovusqd512mem_mask,
	__builtin_ia32_pmovsqd512mem_mask,
	__builtin_ia32_pmovqd512mem_mask,
	__builtin_ia32_pmovusqw512mem_mask,
	__builtin_ia32_pmovsqw512mem_mask,
	__builtin_ia32_pmovqw512mem_mask,
	__builtin_ia32_pmovusdw512mem_mask,
	__builtin_ia32_pmovsdw512mem_mask,
	__builtin_ia32_pmovdw512mem_mask,
	__builtin_ia32_pmovqb512mem_mask,
	__builtin_ia32_pmovusqb512mem_mask,
	__builtin_ia32_pmovsqb512mem_mask,
	__builtin_ia32_pmovusdb512mem_mask,
	__builtin_ia32_pmovsdb512mem_mask,
	__builtin_ia32_pmovdb512mem_mask.
	(bdesc_args): Add __builtin_ia32_expanddf512,
	__builtin_ia32_expandsf512.
	(ix86_expand_special_args_builtin): Handle VOID_FTYPE_PV8SI_V8DI_QI, 
	VOID_FTYPE_PV8HI_V8DI_QI, VOID_FTYPE_PV16HI_V16SI_HI,
	VOID_FTYPE_PV16QI_V8DI_QI, VOID_FTYPE_PV16QI_V16SI_HI.
	* config/i386/sse.md (unspec): Add UNSPEC_EXPAND_NOMASK.
	(avx512f_<code><pmov_src_lower><mode>2_mask_store): New.
	(*avx512f_<code>v8div16qi2_store_mask): Renamed to ...
	(avx512f_<code>v8div16qi2_mask_store): This.
	(avx512f_expand<mode>): New.

testsuite/
	* gcc.target/i386/avx512f-vexpandpd-1.c: Also test _mm512_expand_pd.
	* gcc.target/i386/avx512f-vexpandpd-2.c: Ditto. 
	* gcc.target/i386/avx512f-vexpandps-1.c: Also test _mm512_expand_ps.
	* gcc.target/i386/avx512f-vexpandps-2.c: Ditto. 
	* gcc.target/i386/avx512f-vmovdqu64-1.c: Also test _mm512_storeu_epi64.
	* gcc.target/i386/avx512f-vmovdqu64-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpged-1.c: New. 
	* gcc.target/i386/avx512f-vpcmpged-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpgeq-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpgeq-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpgeud-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpgeud-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpgeuq-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpgeuq-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpled-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpled-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpleq-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpleq-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpleud-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpleud-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpleuq-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpleuq-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpltd-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpltd-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpltq-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpltq-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpltud-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpltud-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpltuq-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpltuq-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpneqd-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpneqd-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpneqq-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpneqq-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpnequd-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpnequd-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpnequq-1.c: Ditto. 
	* gcc.target/i386/avx512f-vpcmpnequq-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovdb-1.c: Also test
	_mm512_mask_cvtepi32_storeu_epi8.
	* gcc.target/i386/avx512f-vpmovdb-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovdw-1.c: Also test
	_mm512_mask_cvtepi32_storeu_epi16.
	* gcc.target/i386/avx512f-vpmovdw-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovqb-1.c: Also test
	_mm512_mask_cvtepi64_storeu_epi8.
	* gcc.target/i386/avx512f-vpmovqb-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovqw-1.c: Also test
	_mm512_mask_cvtepi64_storeu_epi16.
	* gcc.target/i386/avx512f-vpmovqw-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovqd-1.c: Also test
	_mm512_mask_cvtepi64_storeu_epi32.
	* gcc.target/i386/avx512f-vpmovqd-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovsdb-1.c: Also test
	_mm512_mask_cvtsepi32_storeu_epi8.
	* gcc.target/i386/avx512f-vpmovsdb-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovsdw-1.c: Also test
	_mm512_mask_cvtsepi32_storeu_epi16.
	* gcc.target/i386/avx512f-vpmovsdw-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovsqb-1.c: Also test
	_mm512_mask_cvtsepi64_storeu_epi8.
	* gcc.target/i386/avx512f-vpmovsqb-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovsqw-1.c: Also test
	_mm512_mask_cvtsepi64_storeu_epi16.
	* gcc.target/i386/avx512f-vpmovsqw-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovsqd-1.c: Also test
	_mm512_mask_cvtsepi64_storeu_epi32.
	* gcc.target/i386/avx512f-vpmovsqd-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovusdb-1.c: Also test
	_mm512_mask_cvtusepi32_storeu_epi8.
	* gcc.target/i386/avx512f-vpmovusdb-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovusdw-1.c: Also test
	_mm512_mask_cvtusepi32_storeu_epi16.
	* gcc.target/i386/avx512f-vpmovusdw-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovusqb-1.c: Also test
	_mm512_mask_cvtusepi64_storeu_epi8.
	* gcc.target/i386/avx512f-vpmovusqb-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovusqw-1.c: Also test
	_mm512_mask_cvtusepi64_storeu_epi16.
	* gcc.target/i386/avx512f-vpmovusqw-2.c: Ditto. 
	* gcc.target/i386/avx512f-vpmovusqd-1.c: Also test
	_mm512_mask_cvtusepi64_storeu_epi32.
	* gcc.target/i386/avx512f-vpmovusqd-2.c: Ditto. 
	* gcc.target/i386/m128-check.h: Add checkVs, checkVb.

From-SVN: r207150
2014-01-27 19:25:32 +00:00
Kirill Yukhin
e711dffdfe avx512pfintrin.h (_mm512_mask_prefetch_i32gather_pd): New.
gcc/
        * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i32gather_pd): New.
	(_mm512_mask_prefetch_i64gather_pd): Ditto.
	(_mm512_prefetch_i32scatter_pd): Ditto.
	(_mm512_mask_prefetch_i32scatter_pd): Ditto.
	(_mm512_prefetch_i64scatter_pd): Ditto.
	(_mm512_mask_prefetch_i64scatter_pd): Ditto.
	(_mm512_mask_prefetch_i32gather_ps): Fix operand type.
	(_mm512_mask_prefetch_i64gather_ps): Ditto.
	(_mm512_prefetch_i32scatter_ps): Ditto.
	(_mm512_mask_prefetch_i32scatter_ps): Ditto.
	(_mm512_prefetch_i64scatter_ps): Ditto.
	(_mm512_mask_prefetch_i64scatter_ps): Ditto.
	* config/i386/i386-builtin-types.def: Define
	VOID_FTYPE_QI_V8SI_PCINT64_INT_INT and VOID_FTYPE_QI_V8DI_PCINT64_INT_INT.
	* config/i386/i386.c (ix86_builtins): Define IX86_BUILTIN_GATHERPFQPD,
	IX86_BUILTIN_GATHERPFDPD, IX86_BUILTIN_SCATTERPFDPD,
	IX86_BUILTIN_SCATTERPFQPD.
	(ix86_init_mmx_sse_builtins): Define __builtin_ia32_gatherpfdpd,
	__builtin_ia32_gatherpfdps, __builtin_ia32_gatherpfqpd,
	__builtin_ia32_gatherpfqps, __builtin_ia32_scatterpfdpd,
	__builtin_ia32_scatterpfdps, __builtin_ia32_scatterpfqpd,
	__builtin_ia32_scatterpfqps.
	(ix86_expand_builtin): Expand new built-ins.
	* config/i386/sse.md (avx512pf_gatherpf<mode>): Add SF suffix,
	fix memory access data type.
	(*avx512pf_gatherpf<mode>_mask): Ditto.
	(*avx512pf_gatherpf<mode>): Ditto.
	(avx512pf_scatterpf<mode>): Ditto.
	(*avx512pf_scatterpf<mode>_mask): Ditto.
	(*avx512pf_scatterpf<mode>): Ditto.
	(GATHER_SCATTER_SF_MEM_MODE): New.
	(avx512pf_gatherpf<mode>df): Ditto.
	(*avx512pf_gatherpf<mode>df_mask): Ditto.
	(*avx512pf_scatterpf<mode>df): Ditto.

testsuite/
        * gcc.target/i386/avx512pf-vgatherpf0dpd-1.c: New.
	* gcc.target/i386/avx512pf-vgatherpf0qpd-1.c: Ditto.
	* gcc.target/i386/avx512pf-vgatherpf1dpd-1.c: Ditto.
	* gcc.target/i386/avx512pf-vgatherpf1qpd-1.c: Ditto.
	* gcc.target/i386/avx512pf-vscatterpf0dpd-1.c: Ditto.
	* gcc.target/i386/avx512pf-vscatterpf0qpd-1.c: Ditto.
	* gcc.target/i386/avx512pf-vscatterpf1dpd-1.c: Ditto.
	* gcc.target/i386/avx512pf-vscatterpf1qpd-1.c: Ditto.
	* gcc.target/i386/sse-14.c: Add new built-ins, fix AVX-512ER
	built-ins roudning immediate.
	* gcc.target/i386/sse-22.c: Add new built-ins.
	* gcc.target/i386/sse-23.c: Ditto.
	* gcc.target/i386/avx-1.c: Ditto.

From-SVN: r207149
2014-01-27 19:21:02 +00:00
Jonathan Wakely
fb1ca954c0 re PR libstdc++/59215 (tsan: warning in shared_ptr_base.h)
PR libstdc++/59215
	* include/bits/shared_ptr_base.h
	(_Sp_counted_base<_S_atomic>::_M_add_ref_lock()): Use relaxed atomic
	load.

From-SVN: r207147
2014-01-27 17:56:40 +00:00
Arnaud Charlet
b1d1299619 [multiple changes]
2014-01-27  Robert Dewar  <dewar@adacore.com>

	* sem_res.adb (Resolve_Comparison_Op): Add type name/location
	to unordered msg.
	(Resolve_Range): Add type name/location to unordered msg.

2014-01-27  Claire Dross  <dross@adacore.com>

	* a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
	Capacity) is only called with Capacity >= Length (Source) and
	Capacity in Capacity_Range.
	* a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
	a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
	is only called with Capacity >= Source.Capacity. Raise Capacity_Error
	in the code is this is not the case.

2014-01-27  Thomas Quinot  <quinot@adacore.com>

	* sem_ch4.adb (Analyze_Selected_Component): Fix handling of
	selected component in an instance where the component of the
	actual is not visibile at instantiation.

From-SVN: r207146
2014-01-27 17:58:19 +01:00
Ed Schonberg
fcadacf7bf sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type has a dynamic predicate...
2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
	has a dynamic predicate, generate freeze node for Actual_Subtype
	at once, because the declaration of the corresponding predicate
	function will make reference to it.

From-SVN: r207145
2014-01-27 17:55:30 +01:00
Arnaud Charlet
8b4230c823 [multiple changes]
2014-01-27  Tristan Gingold  <gingold@adacore.com>

	* exp_ch7.adb, exp_ch9.adb: Adjust comments.

2014-01-27  Robert Dewar  <dewar@adacore.com>

	* exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
	for 2**X optimization.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* a-suenst.adb: strings.utf_encoding.strings (Decode): Check
	explicitly whether value is in range of Character, because the
	library is typically compiled with range checks disabled, and
	we cannot rely on the implicit check on the argument of 'Val.

2014-01-27  Vincent Celier  <celier@adacore.com>

	* a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
	not the Target to itself.

2014-01-27  Robert Dewar  <dewar@adacore.com>

	* vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
	changes to avoid incorrect use of unordered enum types.

2014-01-27  Thomas Quinot  <quinot@adacore.com>

	* sem_ch4.adb: Minor reformatting.

From-SVN: r207144
2014-01-27 17:54:37 +01:00
Arnaud Charlet
29077c1841 [multiple changes]
2014-01-27  Robert Dewar  <dewar@adacore.com>

	* scn.adb (Check_End_Of_Line): Removed.
	(Error_Long_Line): Removed.
	(Determine_License): Use versions of above routines from Scanner.
	* scng.adb (Check_End_Of_Line): Moved to spec.
	(Error_Long_Line): Removed, no longer used.
	* scng.ads (Check_End_Of_Line): Moved here from body.

2014-01-27  Tristan Gingold  <gingold@adacore.com>

	* exp_ch7.adb (Build_Cleanup_Statements): Call
	Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
	for protected body.
	* exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
	 Remove Service_Name variable.
	(Build_Protected_SUbprogam_Call_Cleanup): New procedure that
	factorize code from the above subprograms.
	* exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.

From-SVN: r207143
2014-01-27 17:52:29 +01:00
Arnaud Charlet
2757c5bf18 [multiple changes]
2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>

	* einfo.adb (Has_Option): Reimplemented.
	* sem_prag.adb (Analyze_Refinement_Clause): Add global
	variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
	External_Constit_Seen and State. Add local variables Body_Ref,
	Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
	avoid a cumbersome while pool. Verify the legality of an external
	state and relevant properties.
	(Check_External_Property): New routine.
	(Check_Matching_State): Remove parameter profile
	and update comment on usage.
	(Collect_Constituent): Store the
	relevant external property of a constituent.
	* sem_util.adb (Async_Readers_Enabled): Update the call to
	Has_Enabled_Property.
	(Async_Writers_Enabled): Update the call to Has_Enabled_Property.
	(Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
	(Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
	(Has_Enabled_Property): Rename formal parameter Extern to State_Id.
	Update comment on usage. Reimplement the logic to recognize the various
	formats of properties.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* par-ch5.adb: Minor reformatting.

2014-01-27  Tristan Gingold  <gingold@adacore.com>

	* s-tposen.ads: Harmonize style and comments.

2014-01-27  Vincent Celier  <celier@adacore.com>

	* projects.texi: Document that shared library projects, by
	default, cannot import projects that are not shared library
	projects.

2014-01-27  Robert Dewar  <dewar@adacore.com>

	* sem_ch8.adb (Find_Selected_Component): Use Replace instead
	of Rewrite.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
	any other exception is raised.
	(Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
	still necessary to perform a conversion in order to remove overlong
	encodings.

From-SVN: r207142
2014-01-27 17:49:44 +01:00
Arnaud Charlet
00ba7be813 [multiple changes]
2014-01-27  Robert Dewar  <dewar@adacore.com>

	* exp_smem.adb: Minor reformatting.

2014-01-27  Thomas Quinot  <quinot@adacore.com>

	* a-calfor.ads: Fix incorrect reference to operator "-" in comment.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
	nodes for operands to the original node for the call, to preserve
	Original_Node pointers within the resolved operands, given that
	they may have been rewritten as well. Previous approach copied
	the operands into a new tree and lost those pointers.

2014-01-27  Claire Dross  <dross@adacore.com>


	* a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* sem_util.adb (Check_Internal_Protected_Use): A call through
	an anonymous access parameter of the current protected function
	is not a potential modification of the current object.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* a-cobove.adb (Reserve_Capacity): Procedure raises
	Capacity_Error, not Constraint_Error, when request cannot be
	satisfied.

2014-01-27  Vincent Celier  <celier@adacore.com>

	* a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
	not the Target to itself.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* exp_ch4.adb (Expand_Concatenate): If the target of the
	concatenation is a library-level entity, always use the off-line
	version of concatenation, regardless of optimization level. This
	is space-efficient, and prevents linking problems when some
	units are compiled with different optimization levels.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* sem_ch5.adb: Code clean up.

2014-01-27  Ed Schonberg  <schonberg@adacore.com>

	* par-ch5.adb (P_Iterator_Specification): Improve error recovery
	when an array or container iterator includes a subtype indication,
	which is only legal in an element iterator.

From-SVN: r207141
2014-01-27 17:43:29 +01:00
Arnaud Charlet
8fdafe44be [multiple changes]
2014-01-27  Thomas Quinot  <quinot@adacore.com>

	* exp_ch7.adb: Minor reformatting.

2014-01-27  Robert Dewar  <dewar@adacore.com>

	* opt.adb (SPARK_Mode): Default for library units is None rather
	than Off.
	* opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
	no longer ordered.
	* sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
	possibility.
	* snames.ads-tmpl (Name_Auto): Removed, no longer used.

2014-01-27  Robert Dewar  <dewar@adacore.com>

	* par-ch5.adb (P_Sequence_Of_Statements): Make entry in
	Suspicious_Labels table if we have identifier; followed by loop
	or block.
	* par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
	* par.adb (Suspicious_Labels): New table.

2014-01-27  Robert Dewar  <dewar@adacore.com>

	* exp_aggr.adb (Check_Bounds): Reason is range check, not
	length check.

2014-01-27  Yannick Moy  <moy@adacore.com>

	* get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
	reference.
	* lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
	function now.
	(Add_SPARK_Xrefs): Include references to constants.
	* spark_xrefs.ads Document new character 'c' for references to
	constants.

2014-01-27  Thomas Quinot  <quinot@adacore.com>

	* exp_smem.adb (Add_Write_After): For a function call, insert write as
	an after action in a transient scope.

From-SVN: r207140
2014-01-27 17:39:57 +01:00
Arnaud Charlet
b3a699930b [multiple changes]
2014-01-27  Thomas Quinot  <quinot@adacore.com>

	* exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
	to a shared variable as an OUT formal in a call to an init proc,
	the 'Read call must be emitted after, not before, the call.

2014-01-27  Robert Dewar  <dewar@adacore.com>

	* gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.

From-SVN: r207139
2014-01-27 17:37:28 +01:00