Commit Graph

143451 Commits

Author SHA1 Message Date
Mike Frysinger bd12353b79 longlong: fix sh -Wundef builds
This file fails when building for SuperH as it assumes __SHMEDIA__
is always defined.  Update the code to check if it's defined.

From-SVN: r232143
2016-01-07 22:18:09 +00:00
Andreas Tobler 33b0992375 freebsd.h: Rename SUBTARGET_OVERRIDE_OPTIONS to SUBTARGET_OVERRIDE_INTERNAL_OPTIONS.
2016-01-07  Andreas Tobler  <andreast@gcc.gnu.org>

    * config/arm/freebsd.h: Rename SUBTARGET_OVERRIDE_OPTIONS to
    SUBTARGET_OVERRIDE_INTERNAL_OPTIONS. Adjust to check
    unaligned_access on the gcc_options set.
    * config/arm/arm.c (arm_option_override_internal): Use
    SUBTARGET_OVERRIDE_INTERNAL_OPTIONS.

From-SVN: r232141
2016-01-07 21:35:53 +01:00
Uros Bizjak 0de71e1f51 re PR target/69140 (stack alignment + O1 breaks with Microsoft ABI)
2016-01-07  Uros Bizjak  <ubizjak@gmail.com>

	PR target/69140
	* config/i386/i386.c (ix86_frame_pointer_required): Enable
	frame pointer for TARGET_64BIT_MS_ABI when stack is misaligned.

2016-01-07  Uros Bizjak  <ubizjak@gmail.com>

	Revert
	2016-01-06  Uros Bizjak  <ubizjak@gmail.com>

	PR target/69140
	* config/i386/i386.c (ix86_expand_prologue): Declare fs.sp_valid
	depending on frame_pointer_needed before remaining integer and SSE
	registers are saved.

From-SVN: r232140
2016-01-07 20:06:37 +01:00
H.J. Lu 95918b49df Move pr66680.f90 to libgomp
gcc/testsuite/

	PR fortran/66680
	gfortran.dg/gomp/pr66680.f90: Moved to libgomp.

libgomp/

	PR fortran/66680
	* testsuite/libgomp.fortran/pr66680.f90: New test.

From-SVN: r232138
2016-01-07 10:18:29 -08:00
Sandra Loosemore 365db8e0e5 re PR target/1078 (Problems with attributes documentation)
2016-01-07  Sandra Loosemore <sandra@codesourcery.com>

	PR 1078
	gcc/
	* doc/extend.texi (Nvidia PDX Function Attributes): New section.

From-SVN: r232136
2016-01-07 13:02:25 -05:00
Nick Clifton c8e62a9df1 Add a test for PR66655
PR target/66655
	* g++.dg/pr66655.C: New test.
	* g++.dg/pr66655_1.cc: Test support file.
	* g++.dg/pr66655.h: Test header file.

From-SVN: r232133
2016-01-07 17:13:50 +00:00
Jonathan Wakely f885fa898f Use std::addressof in insert iterators, allocators and promises
PR libstdc++/69105
	PR libstdc++/69106
	PR libstdc++/69114
	* include/bits/stl_iterator.h (back_insert_iterator,
	front_insert_iterator, insert_iterator): Use __addressof (LWG 2324).
	* include/bits/uses_allocator.h (__use_alloc): Use __addressof.
	* include/std/future (__future::base::_State_baseV2::__setter):
	Likewise.
	* include/std/scoped_allocator (__outermost): Likewise.
	* testsuite/20_util/scoped_allocator/69114.cc: New.
	* testsuite/20_util/uses_allocator/69114.cc: New.
	* testsuite/30_threads/promise/69106.cc: New.

From-SVN: r232129
2016-01-07 15:01:33 +00:00
Dominique d'Humieres 64d3ef31df re PR fortran/66680 (ICE with openmp, a loop and a type bound procedure)
2016-01-07  Dominique d'Humieres <dominiq@lps.ens.fr>

	PR fortran/66680
	gfortran.dg/gomp/pr66680.f90: New test.

From-SVN: r232127
2016-01-07 14:21:54 +01:00
H.J. Lu 4cd9ca92cf Add round_nimm_scalar_predicate and use xBm
Add round_nimm_scalar_predicate for scalar SSE integer to floating point
conversions since round_nimm_predicate is for vector operand.

round_constraint can't be used on vector SSE patterns since it is mapped
to "vm".  The "xBm" constraint must be used in this case.

gcc/

	PR target/69171
	* config/i386/sse.md (<sse>_sqrt<mode>2<mask_name><round_name>):
	Use the "xBm" constraint.
	(float<sseintvecmodelower><mode>2<mask_name><round_name):
	Likewise.
	(sse_cvtsi2ss<round_name>): Use round_nimm_scalar_predicate.
	(sse_cvtsi2ssq<round_name>): Likewise.
	(sse_cvtss2si<round_name>): Likewise.
	(sse_cvtss2siq<round_name>): Likewise.
	(sse2_cvtsi2sdq<round_name>): Likewise.
	(sse2_cvtsd2si<round_name>): Likewise.
	(sse2_cvtsd2siq<round_name>): Likewise.
	* config/i386/subst.md (round_nimm_scalar_predicate): New
	predicate.

gcc/testsuite/

	PR target/69171
	* gcc.target/i386/pr69171-1.c: New test.
	* gcc.target/i386/pr69171-2.c: Likewise.
	* gcc.target/i386/pr69171-3.c: Likewise.
	* gcc.target/i386/pr69171-4.c: Likewise.
	* gcc.target/i386/pr69171-5.c: Likewise.
	* gcc.target/i386/pr69171-6.c: Likewise.

From-SVN: r232126
2016-01-07 04:43:06 -08:00
Bernd Schmidt 7e33d4dc9e Fix SSA inconsistencies with invalid asm reg names (PR67639)
PR middle-end/67639
	* varasm.c (make_decl_rtl): Mark invalid register vars as
	DECL_EXTERNAL.

testsuite/
	PR middle-end/67639
	* c-c++-common/pr67639.c: New test.

From-SVN: r232125
2016-01-07 12:17:39 +00:00
Bernd Schmidt c6a0add9d0 Fix a minor issue found by a static analyzer (PR66206).
PR rtl-optimization/66206
	* bt-load.c (find_btr_use): Change first arg to be a pointer to an rtx.
	All callers changed.

From-SVN: r232124
2016-01-07 12:15:59 +00:00
Jakub Jelinek fec64afc1a re PR tree-optimization/69141 (-O2 -fdump-tree-fre ICEs)
PR tree-optimization/69141
	* tree-ssa-pre.c: Include langhooks.h.
	(eliminate_dom_walker::before_dom_children): Use
	lang_hooks.decl_printable_name instead of
	cgraph_node::get ()->name ().

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

From-SVN: r232123
2016-01-07 09:47:44 +01:00
Jakub Jelinek 8fc708b795 re PR c/68960 (__attribute__ ((aligned ())) is ignored for OpenMP private variables)
PR middle-end/68960
	* gimple-expr.c (copy_var_decl): If var has DECL_USER_ALIGN set, copy
	it and DECL_ALIGN too.

	* testsuite/libgomp.c/pr68960.c: New test.

From-SVN: r232122
2016-01-07 09:45:54 +01:00
GCC Administrator 827d8502a5 Daily bump.
From-SVN: r232120
2016-01-07 00:16:11 +00:00
Eric Botcazou f293ad2900 * gcc.target/sparc/20151219-1.c: Skip in 64-bit mode.
From-SVN: r232116
2016-01-06 23:34:10 +00:00
Nathan Sidwell 1a14faf230 correct openacc.h filename
From-SVN: r232114
2016-01-06 21:26:47 +00:00
Robert Suchanek 54e37ccd79 Reorder function types.
* config/mips/mips-ftypes.def: Sort to lexicographical order.

From-SVN: r232113
2016-01-06 21:10:59 +00:00
Jonathan Wakely 373a75fb2a Remove noexcept from function template that can throw
PR libstdc++/69092
	* include/bits/basic_string.h (basic_string::_S_copy_chars<_Iterator>):
	Remove _GLIBCXX_NOEXCEPT.
	testsuite/21_strings/basic_string/cons/char/69092.cc: New.

From-SVN: r232112
2016-01-06 20:34:41 +00:00
Uros Bizjak 5027395ec6 re PR target/69140 (stack alignment + O1 breaks with Microsoft ABI)
PR target/69140
	* config/i386/i386.c (ix86_expand_prologue): Declare fs.sp_valid
	depending on frame_pointer_needed before remaining integer and SSE
	registers are saved.

testsuite/ChangeLog:

	PR target/69140
	* gcc.target/i386/pr69140.c: New test

From-SVN: r232111
2016-01-06 21:19:04 +01:00
David Malcolm 7443cf1305 C: fix reported range of invalid unary dereference.
gcc/c/ChangeLog:
	* c-parser.c (c_parser_unary_expression): For dereferences, build
	a combined location before calling build_indirect_ref, so that
	error reports cover the full range, manually updating the c_expr
	src_range.

gcc/testsuite/ChangeLog:
	* gcc.dg/bad-dereference.c: New test case.

From-SVN: r232110
2016-01-06 20:13:19 +00:00
Bill Schmidt 329289313c vsx.md (*p9_vecload_<mode>): Replace VSX_M mode iterator with VSX_M2.
[gcc]

2015-01-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/vsx.md (*p9_vecload_<mode>): Replace VSX_M
	mode iterator with VSX_M2.
	(*p9_vecstore_<mode>): Likewise.
	(*vsx_le_permute_<mode>): Restrict to !TARGET_P9_VECTOR.
	(*vsx_le_perm_load_<mode> for VSX_LE_128): Likewise.
	(*vsx_le_perm_store_<mode> for VSX_LE_128): Likewise.
	(define_split for VSX_LE128 stores): Likewise.
	(define_peephole2 for TImode LE swaps): Likewise.
	(define_split for VSX_LE128 post-reload stores): Likewise.

[gcc/testsuite]

2015-01-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/p9-lxvx-stxvx-3.c: New test.

From-SVN: r232109
2016-01-06 19:19:47 +00:00
Nathan Sidwell e9b596c132 openacc.c (acc_on_device): Add routine pragma for C++ wrapper.
* openacc.c (acc_on_device): Add routine pragma for C++ wrapper.
	* testsuite/libgomp.oacc-c-c++-common/acc-on-device-2.c: New.

From-SVN: r232104
2016-01-06 15:47:14 +00:00
Szabolcs Nagy 7c961392a6 Fix libatomic multilib parallel build (PR other/67627)
The all-multi target may be built in parallel with the %_.lo
targets which generate make dependencies that are parsed during
the build of all-multi.

This patch forces all-multi to only run after the *_.lo targets
are done.

libatomic:
	PR other/67627
	* Makefile.am (all-multi): Add dependency.
	* Makefile.in: Regenerate.

From-SVN: r232102
2016-01-06 14:51:35 +00:00
Jonathan Wakely 0c3e5dd1e6 Rename bits/mutex.h to avoid clashing with glibc
* include/Makefile.am: Adjust.
	* include/Makefile.in: Regenerate.
	* include/bits/mutex.h: Rename to bits/std_mutex.h.
	* include/std/condition_variable: Adjust include.
	* include/std/mutex: Likewise.

From-SVN: r232101
2016-01-06 13:00:33 +00:00
Andreas Schwab 68dd05da94 * gcc.dg/atomic-invalid-2.c: Remove duplicated content.
From-SVN: r232100
2016-01-06 10:46:20 +00:00
Marek Polacek 6b131d5b1e re PR sanitizer/69099 (ICE when compiling gcc.dg/atomic/c11-atomic-exec-2.c with -fsanitize=float-cast-overflow)
PR sanitizer/69099
	* c-convert.c (convert) [INTEGER_TYPE]: Drop ARG.  Don't pass ARG to
	ubsan_instrument_float_cast.  Fold EXPR.  Use NULL_TREE instead of
	NULL.

	* convert.c (convert_to_integer_1): Adjust call to
	ubsan_instrument_float_cast.  Use NULL_TREE instead of NULL.
	* ubsan.c (ubsan_instrument_float_cast): Drop the ARG parameter.  Use
	EXPR instead of ARG.
	* ubsan.h (ubsan_instrument_float_cast): Adjust declaration.

	* gcc.dg/ubsan/float-cast-overflow-atomic.c: New test.

From-SVN: r232099
2016-01-06 10:24:15 +00:00
Pierre-Marie de Rodat 396a2ee2ec Ada: add XVE/XVU parallel types to lexical scopes
This change adds TYPE_DECL nodes for XVE/XVU parallel types to lexical
scopes so that these types are properly scoped in the debug information.

gcc/ada/ChangeLog:

	* gcc-interface/utils.c: Bump copyright year.
	(rest_of_record_type_compilation): Add XVE/XVU parallel types to
	the current lexical scope.

From-SVN: r232098
2016-01-06 09:18:26 +00:00
GCC Administrator 2670a3c615 Daily bump.
From-SVN: r232096
2016-01-06 00:16:11 +00:00
Sandra Loosemore d1396c9774 re PR target/1078 (Problems with attributes documentation)
2016-01-05  Sandra Loosemore <sandra@codesourcery.com>

	PR 1078
	gcc/
	* doc/extend.texi (RL78 Variable Attributes): New section.

From-SVN: r232092
2016-01-05 15:51:48 -05:00
Marek Polacek 8d9fdb4941 re PR c/69104 (invalid atomic memory order not diagnosed)
PR c/69104
	* builtins.c (get_memmodel): Use expansion point location rather than
	the input location.  Call warning_at rather than warning.
	(expand_builtin_atomic_compare_exchange): Likewise.
	(expand_builtin_atomic_load): Likewise.
	(expand_builtin_atomic_store): Likewise.
	(expand_builtin_atomic_clear): Likewise.

	* gcc.dg/atomic-invalid-2.c: New.

From-SVN: r232090
2016-01-05 20:24:02 +00:00
Mike Frysinger 66f49f07d8 libiberty: {count,dup,write}argv: constify argv input slightly
Would be more useful if we could use "const char * const *", but there's
a long standing bug where gcc warns about incompatible pointers when you
try to pass in "char **".  We can at least constify the array itself as
gcc will not warn in that case.

From-SVN: r232089
2016-01-05 20:23:30 +00:00
H.J. Lu acf93f1edc Use vector_operand on SSE with 16b memory operand
Add vector_operand, which is vector_memory_operand or register_operand,
and use it, instead of nonimmediate_operand, in SSE patterns with 16-byte
memory operand.

gcc/

	PR target/68991
	* config/i386/i386.c (ix86_expand_vector_logical_operator):
	Replace nonimmediate_operand with vector_operand.
	* config/i386/predicates.md (vector_operand): New predicate.
	(general_vector_operand): Replace nonimmediate_operand with
	vector_operand.
	* config/i386/sse.md: Replace nonimmediate_operand with
	vector_operand and m constraint with Bm constraint on SSE
	patterns with 16-byte memory operand.
	* config/i386/subst.md (round_nimm_predicate): Replace
	nonimmediate_operand with vector_operand.
	(round_saeonly_nimm_predicate): Likewise.
	(round_saeonly_nimm_scalar_predicate): New.

gcc/testsuite/

	PR target/68991
	* gcc.target/i386/pr68991.c: New test.

From-SVN: r232088
2016-01-05 12:19:16 -08:00
H.J. Lu 3f50525df2 Add vector_memory_operand and "Bm" constraint
SSE vector arithmetic and logic instructions only accept aligned memory
operand.  This patch adds vector_memory_operand and "Bm" constraint for
aligned SSE memory operand.  They are applied to SSE plusminus and
any_logic patterns.

gcc/

	PR target/68991
	* config/i386/constraints.md (Bm): New constraint.
	* config/i386/predicates.md (vector_memory_operand): New
	predicate.
	* config/i386/sse.md: Replace xm with xBm in plusminus and
	any_logic patterns.

gcc/testsuite/

	PR target/68991
	* g++.dg/pr68991-1.C: New test.
	* g++.dg/pr68991-2.C: Likewise.

From-SVN: r232087
2016-01-05 12:17:26 -08:00
Mike Frysinger ae120683c6 libiberty: dupargv: rewrite to use xstrdup
This func is basically open coding the xstrdup function, so gut it
and use that directly.

From-SVN: r232086
2016-01-05 19:55:21 +00:00
Sandra Loosemore ebd4a2097b re PR target/1078 (Problems with attributes documentation)
2016-01-05  Sandra Loosemore <sandra@codesourcery.com>

	PR 1078
	gcc/
	* doc/extend.texi (V850 Function Attributes): New section.
	(V850 Variable Attributes): New section.

From-SVN: r232085
2016-01-05 14:45:43 -05:00
Olivier Hainque a22189835a aix-unwind.h (ucontext_for): Handle AIX 7.1 specificities.
2016-01-05  Olivier Hainque  <hainque@adacore.com>

	* config/rs6000/aix-unwind.h (ucontext_for): Handle AIX 7.1
	specificities.

From-SVN: r232082
2016-01-05 18:10:31 +00:00
Sandra Loosemore 0d19c66df4 re PR target/1078 (Problems with attributes documentation)
2016-01-05  Sandra Loosemore <sandra@codesourcery.com>

	PR 1078
	gcc/
	* doc/extend.texi (MicroBlaze Function Attributes): Document
	interrupt_handler and fast_interrupt attributes.

From-SVN: r232081
2016-01-05 13:04:01 -05:00
Sergei Trofimovich face88a110 [PATCH v2] ia64: don't use dynamic relocations for local symbols PR other/60465
[PATCH v2] ia64: don't use dynamic relocations for local symbols
	PR other/60465
	* config/ia64/ia64.c (ia64_expand_load_address): Use gprel64
	for local symbolic operands.
	* config/ia64/predicates.md (local_symbolic_operand64): New
	predicate.

        PR other/60465
	* gcc.target/ia64/pr60465-gprel64.c: New test.
	* gcc.target/ia64/pr60465-gprel64-c37.c: New test.

From-SVN: r232080
2016-01-05 10:57:05 -07:00
Kyrylo Tkachov a0866effcd [combine][v2] Canonicalise (r + r) to (r << 1) to aid recognition
PR rtl-optimization/68651
	* combine.c (combine_simplify_rtx): Canonicalize x + x into
	x << 1.

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

From-SVN: r232077
2016-01-05 16:06:06 +00:00
David Malcolm c589e97563 Fix PR c/69122 (-Wmisleading-indentation false positive with empty macros)
gcc/c-family/ChangeLog:
	PR c/69122
	* c-indentation.c (get_visual_column): Remove default argument.
	(should_warn_for_misleading_indentation): For the multiline case,
	update call to get_visual_column for next_stmt_exploc so that it
	captures the location of the first non-whitespace character in the
	relevant line.  Don't issue warnings if there is non-whitespace
	before the next statement.

gcc/testsuite/ChangeLog:
	PR c/69122
	* c-c++-common/Wmisleading-indentation.c (pr69122): New function.

From-SVN: r232076
2016-01-05 15:54:46 +00:00
Nathan Sidwell ce3e43d7c8 re PR c++/58583 ([c++11] ICE with invalid non-static data member initialization in template)
gcc/cp/
	PR c++/58583
	* pt.c (build_non_dependent_expr): Don't try a checking fold when
	parsing an nsdmi.

	gcc/testsuite/
	PR c++/58583
	* g++.dg/cpp0x/nsdmi-template14.C: Adjust test & errors.

From-SVN: r232075
2016-01-05 14:40:11 +00:00
Nathan Sidwell 929710d96c alias.c (compare_base_decls): Use symtab_node::get.
gcc/
	* alias.c (compare_base_decls): Use symtab_node::get.

	gcc/testsuite/
	* gcc.dg/alias-15.c: New.

From-SVN: r232073
2016-01-05 14:15:01 +00:00
Nick Clifton a2faef8e06 re PR target/68770 (Conditional jump or move depends on uninitialised value(s) default_secondary_reload() targhooks.c:940)
PR target/68770
	* ira-costs.c (copy_cost): Initialise the t_icode field of the
	secondary_reload_info structure.

tests:	* g++.dg/pr68770.C: New test.

From-SVN: r232072
2016-01-05 13:20:29 +00:00
Nick Clifton 3360dc9fc2 re PR target/66655 (miscompilation due to ipa-ra on MinGW)
PR target/66655
	* config/i386/cygming.h (MAKE_DECL_ONE_ONLY): Define to use weak
	decls if weak support is available.

From-SVN: r232071
2016-01-05 10:57:01 +00:00
Martin Sebor 56f2741b17 * doc/invoke.texi (Warning Options): Document -Winvalid-memory-model.
From-SVN: r232070
2016-01-04 19:53:10 -07:00
GCC Administrator 9676acebc2 Daily bump.
From-SVN: r232069
2016-01-05 00:16:11 +00:00
Mike Stump 4ece61b644 (check_effective_target_cilkplus): Remove special case for NVPTX.
From-SVN: r232063
2016-01-04 20:01:15 +00:00
Mike Stump 4cfa76e33c target-supports.exp (check_effective_target_cilkplus): cilkplus targets require pthreads.
* lib/target-supports.exp (check_effective_target_cilkplus):
	cilkplus targets require pthreads.

From-SVN: r232062
2016-01-04 19:06:07 +00:00
Michael Meissner d290b03760 rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Add OPTION_MASK_P9_DFORM.
2016-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Add
	OPTION_MASK_P9_DFORM.

From-SVN: r232061
2016-01-04 19:04:49 +00:00
Michael Meissner 4e8a3a35d8 constraints.md (wo constraint): New constraint for ISA 3.0 (power9).
[gcc]
2016-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/constraints.md (wo constraint): New constraint for
	ISA 3.0 (power9).

	* config/rs6000/rs6000.c (rs6000_debug_reg_global): Add support
	for wo constraint.
	(rs6000_init_hard_regno_mode_ok): Likewise.

	* config/rs6000/rs6000.h (r6000_reg_class_enum): Add support for
	wo constraint.

	* config/rs6000/altivec.md (altivec_vperm_<mode>): Clean up vperm
	expanders not to have constraints.  Add support for ISA 3.0 xxperm
	instruction.  Add support for fusing xxlor with xxperm.
	(altivec_vperm_<mode>_internal): Likewise.
	(altivec_vperm_v8hiv16qi): Likewise.
	(altivec_vperm_<mode>v16q): Likewise.
	(altivec_vperm_<mode>_uns): Likewise.
	(vperm_v8hiv4si): Likewise.
	(vperm_v16qiv8hi): Likewise.

	* doc/md.texi (RS/6000 constraints): Document wo constraint.

[gcc/testsuite]
2016-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/p9-permute.c: New test for xxperm code
	generation.

From-SVN: r232060
2016-01-04 18:22:52 +00:00