Commit Graph

150553 Commits

Author SHA1 Message Date
Bernd Schmidt fba1216545 re PR rtl-optimization/78669 (ICE: in combine_and_move_insns, at ira.c:3665 with -Os -fno-tree-ter -mavx512bw)
PR rtl-optimization/78669
	* ira.c (combine_and_move_insns): When deleting an insn, clear the
	replace flag for all used regs in that insn.

	PR rtl-optimization/78669
	* gcc.target/i386/pr78669.c: New test.

From-SVN: r243551
2016-12-12 13:29:48 +00:00
Jonathan Wakely 8152d6eff6 Remove stray character at end of dg-do directive
* testsuite/experimental/filesystem/operations/temp_directory_path.cc:
	Remove stray character at end of dg-do directive.

From-SVN: r243548
2016-12-12 12:44:46 +00:00
George Spelvin 8ae1c2c129 lib1funcs.S (__ashrdi3): Fix typo from r243545.
libgcc/
	* config/avr/lib1funcs.S (__ashrdi3): Fix typo from r243545.

From-SVN: r243546
2016-12-12 11:57:33 +00:00
George Spelvin a5b947fa66 lib1funcs.S (__ashldi3): Use __tmp_reg__ to restore R16 instead of push + pop.
libgcc/
	2016-12-12  George Spelvin  <linux@sciencehorizons.net>
	* config/avr/lib1funcs.S (__ashldi3): Use __tmp_reg__ to restore
	R16 instead of push + pop.
	(__ashrdi3, __lshrdi3): Same. And use __zero_reg__ for signs.

From-SVN: r243545
2016-12-12 11:25:51 +00:00
Rainer Orth 9e9034937b Fix g++.dg/debug/dwarf2/typedef1.C
* g++.dg/debug/dwarf2/typedef1.C: Adjust pattern for last change.

From-SVN: r243544
2016-12-12 11:12:17 +00:00
Toma Tabacu 4a584d050d MIPS: Upgrade to R2 for -mnan=2008 and -mabs=2008.
gcc/testsuite/

	* gcc.target/mips/mips.exp (mips-dg-options): Upgrade to R2 for
	-mnan=2008 and -mabs=2008.

From-SVN: r243542
2016-12-12 10:12:26 +00:00
Thomas Preud'homme 6e4e50f5cb Define arm_arch_core_flags in a single file
2016-12-12  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * config/arm/arm-opts.h: Move struct arm_arch_core_flag and
    arm_arch_core_flags to ...
    * common/config/arm/arm-common.c: There.

From-SVN: r243541
2016-12-12 09:39:51 +00:00
Eric Botcazou 5c2ee2f1fe constraints.md (T): Use special memory constraint.
* config/sparc/constraints.md (T): Use special memory constraint.
	(U): Minor tweak.
	(W): Add TARGET_ARCH64 test.
	* config/sparc/sparc.md (*movdi_insn_sp32): Replace 'W' with 'T'.
	(*movdf_insn_sp32): Likewise.
	(*mov<VM64:mode>_insn_sp32): Likewise.  Replace 'e' with 'f' in
	conjunction with offsettable memory references.

From-SVN: r243540
2016-12-12 07:56:39 +00:00
John David Anglin d688bd654e invoke.texi: Correct capitalization of OpenMP.
* doc/invoke.texi: Correct capitalization of OpenMP.

From-SVN: r243539
2016-12-12 02:54:28 +00:00
Sandra Loosemore 1cf4526c73 nios2.c (nios2_emit_move_sequence): Call copy_rtx to avoid shared structure error.
2016-12-11  Sandra Loosemore  <sandra@codesourcery.com>

	gcc/
	* config/nios2/nios2.c (nios2_emit_move_sequence): Call copy_rtx
	to avoid shared structure error.

From-SVN: r243538
2016-12-11 20:06:30 -05:00
GCC Administrator 8a8289563e Daily bump.
From-SVN: r243537
2016-12-12 00:16:15 +00:00
Bill Schmidt 3113e92dc3 re PR target/78695 (ICE (segfault) on powerpc64le-linux-gnu)
[gcc]

2016-12-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/78695
	* config/rs6000/rs6000.c (find_alignment_op): Discard from
	consideration any artificial definition.

[gcc/testsuite]

2016-12-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/78695
	* gcc.target/powerpc/swaps-stack-protector.c: New test.

From-SVN: r243534
2016-12-11 23:37:17 +00:00
Iain Sandoe 74edc8a9b9 [Darwin, configury] No longer expect to find cross-target headers on the host.
Earlier Darwin (esp. Darwin8 and Darwin9) had FAT libraries and suitable header
installations in /usr/include such that one could build a cross-toolchain 
(including cross-arch) using a common sysroot (including / for “current” version).

However this is no longer true on a number of levels.  A vanilla Darwin system has
no headers installed in /usr and it's certainly not appropriate to try and find
headers/libs for (say) x86-64-darwinNN X powerpc-darwin in /usr on any Darwin NN > 10 
(even Darwin10 is incomplete in that it omits the ppc64 multilib).  In the latter
example, the catch-all in the current configury to mean that 
"foo-darwin" == “foo-version-on-this-system” breaks the cross case 
—target=powerpc-apple-darwin —host=some-system-later-than-darwin10.

gcc/

2016-12-11  Iain Sandoe  <iain@codesourcery.com>

	* configure.ac (CROSS directory tests): Remove the assumption that
	Darwin hosts contain suitable target sysroots in "/".
	* configure: Regenerate.

From-SVN: r243533
2016-12-11 19:37:05 +00:00
Iain Sandoe 38dce2c34c [Darwin, PPC] Fix PR71496 by marking pic base loads as non-copyable.
The Darwin pic base loads (and reloads for non-local-gotos) are not
validly copied (since the pic base label would be duplicated).  Thus, 
mark the pic base {re-}loads as non-copyable.

gcc/

2016-12-11  Iain Sandoe  <iain@codesourcery.com>

	PR rtl-optimization/71496
	* config/rs6000/darwin.md (load_macho_picbase_si): Mark as non-
	copyable.  (load_macho_picbase_di, reload_macho_picbase_si,
	reload_macho_picbase_di): Likewise.

From-SVN: r243532
2016-12-11 19:24:46 +00:00
John David Anglin 84c9e5ff79 pa.c (pa_callee_copies): New function.
* config/pa/pa.c (pa_callee_copies): New function.
	* config/pa/pa.opt (mcaller-copies): New option.
	* doc/invoke.texi (mcaller-copies): Document option.

From-SVN: r243531
2016-12-11 19:08:47 +00:00
Uros Bizjak 8c7cc1a98f re PR target/70799 (STV pass does not convert DImode shifts)
PR target/70799
	* config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
	<case ASHIFT, case LSHIFTRT>: Consider all constant shifts.
	Add FIXME comment.
	(dimode_scalar_chain::compute_convert_gain): Reduce gain for
	constant shifts larger or equal than 32.

testsuite/ChangeLog:

	PR target/70799
	* gcc.target/i386/pr70799-3.c: New test.

From-SVN: r243530
2016-12-11 19:59:07 +01:00
Paolo Carlini a1f7d967aa re PR c++/78637 (ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error: in pop_namespace, at cp/name-lookup.c:3826))
/cp
2016-12-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/78637
	* parser.c (cp_parser_namespace_definition): Increment
	nested_definition_count only if push_namespace succeeds.

/testsuite
2016-12-11  Paolo Carlini  <paolo.carlini@oracle.com>

	PR c++/78637
	* g++.dg/parse/namespace14.C: New.

From-SVN: r243529
2016-12-11 18:15:31 +00:00
Roger Pau Monné a2cb05ed72 x86-64.h: Append --32 to the assembler options when -m16 is used on non-glibc systems as well.
* config/i386/x86-64.h: Append --32 to the assembler options when
	-m16 is used on non-glibc systems as well.

From-SVN: r243528
2016-12-11 17:28:53 +00:00
Allan Sandfeld Jensen 865fc96846 re PR target/70118 (UBSan claims misaligned access in SSE instrinsics)
PR target/70118
	* config/i386/mmintrin.h (__m64_u): New type
	* config/i386/emmintrin.h (_mm_loadl_epi64, _mm_storel_epi64):
	Make the allowed unaligned memory access explicit.

From-SVN: r243527
2016-12-11 17:27:08 +01:00
GCC Administrator 846fbd1e2b Daily bump.
From-SVN: r243523
2016-12-11 00:16:15 +00:00
Thomas Koenig be841e112b re PR fortran/78226 (Fill out location information everywhere)
2016-12-10  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/78226
	* error.c (gfc_warning_internal):  New function.
	* frontend-passes.c (gfc_run_passes):  Call check_locus if
	CHECKING_P is defined.
	(check_locus_code):  New function.
	(check_locus_expr):  New function.
	(check_locus):  New function.
	* gfortran.h:  Add prototype for gfc_warning_internal.

From-SVN: r243520
2016-12-10 22:28:32 +00:00
Krister Walfridsson 8a45a00eee config.gcc (i386-*-netbsd*): Make i486 the default arch on NetBSD.
2016-12-10  Krister Walfridsson  <krister.walfridsson@gmail.com>

	* config.gcc (i386-*-netbsd*): Make i486 the default arch on NetBSD.
	Generally use cpu generic.

From-SVN: r243519
2016-12-10 21:07:10 +00:00
Krister Walfridsson d6574dd103 config.host (i[34567]86-*-netbsdelf*): Add i386/t-crtstuff to tmake_file.
2016-12-10  Krister Walfridsson  <krister.walfridsson@gmail.com>

	* config.host (i[34567]86-*-netbsdelf*): Add i386/t-crtstuff to
	tmake_file.

From-SVN: r243518
2016-12-10 20:59:52 +00:00
Paul Thomas c3879be19f re PR fortran/78350 (ICE in gfc_code2string(): Bad code, at fortran/misc.c:193)
2016-12-10 Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/78350
	* resolve.c (resolve_structure_cons): Remove the block that
	tried to remove a charlen and rely on namespace cleanup.

From-SVN: r243517
2016-12-10 18:35:47 +00:00
Jakub Jelinek c0140e3c5d re PR tree-optimization/78720 (Illegal instruction in generated code)
PR tree-optimization/78720
	* match.pd (A < 0 ? C : 0): Only optimize for signed A.  If shift
	is negative, sign extend to @1's type and than AND with C.

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

Co-Authored-By: Marc Glisse <marc.glisse@inria.fr>

From-SVN: r243516
2016-12-10 13:06:12 +01:00
Jakub Jelinek 2d4102c5cb re PR fortran/78758 (Warning: '__builtin_memcpy' ... overflows the destination for string assignment)
PR fortran/78758
	* tree-object-size.c (compute_object_offset) <case ARRAY_REF>: Handle
	non-zero low bound or non-standard element sizes.

	* gfortran.dg/pr78758.f90: New test.
	* gfortran.dg/pr38868.f: Remove again bogus warning.

From-SVN: r243515
2016-12-10 09:02:21 +01:00
Jakub Jelinek d89ee6dbda re PR sanitizer/78708 ([ASAN][LTO] ICE in expand_ASAN_MARK, at internal-fn.c:380 - when compiling but not linking with ASAN)
PR sanitizer/78708
	* lto-streamer-in.c (input_function): In addition to debug stmts
	without -g, remove IFN_*SAN_* calls if corresponding flag_sanitize
	bit is not enabled.

From-SVN: r243514
2016-12-10 09:01:17 +01:00
GCC Administrator 991dde0a4f Daily bump.
From-SVN: r243513
2016-12-10 00:16:19 +00:00
Paul Thomas c064374dc4 re PR fortran/77903 ([F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces)
2016-12-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/77903
	* decl.c (get_proc_name): Use the symbol tlink field instead of
	the typespec interface field.
	(gfc_match_function_decl, gfc_match_submod_proc): Ditto.
	* gfortran.h : Since the symbol tlink field is no longer used
	by the frontend for change management, change the comment to
	reflect its current uses.
	* parse.c (get_modproc_result): Same as decl.c changes.
	* resolve.c (resolve_fl_procedure): Ditto.

2016-12-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/77903
	* gfortran.dg/submodule_20.f08: New test.

From-SVN: r243507
2016-12-09 22:25:26 +00:00
Bill Schmidt 36823125e4 re PR testsuite/78740 (test case powerpc/pr78691-ppc.c fails starting with its introduction in r243335)
2016-12-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR testsuite/78740
	* gcc.target/powerpc/pr78691-ppc.c: Remove -m32.

From-SVN: r243506
2016-12-09 22:02:04 +00:00
Bill Schmidt 5715e98017 rs6000-passes.def: New file.
2016-12-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* config/rs6000/rs6000-passes.def: New file.
	* config/rs6000/rs6000-protos.h: Declare make_pass_analyze_swaps.
	* config/rs6000/rs6000.c (rs6000_option_override): Remove
	registration of machine-specific passes.
	(pass_analyze_swaps::clone): New function.
	* config/rs6000/t-rs6000: Define PASSES_EXTRA.

From-SVN: r243504
2016-12-09 19:56:02 +00:00
Bill Schmidt 46c0848272 fold-vec-add-7.c: Require effective target to support __int128.
2016-12-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	* gcc.target/powerpc/fold-vec-add-7.c: Require effective target to
	support __int128.

From-SVN: r243503
2016-12-09 19:54:11 +00:00
Martin Sebor a6aba17d00 Add missing part of entry.
From-SVN: r243502
2016-12-09 12:51:43 -07:00
Kugan Vivekanandarajah 7d22d5a3ec re PR tree-optimization/78721 (ICE on valid code at -O2 and -O3 on x86_64-linux-gnu: in set_value_range, at tree-vrp.c:371)
gcc/testsuite/ChangeLog:

2016-12-09  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR ipa/78721
	* gcc.dg/pr78721.c: New test.

gcc/ChangeLog:

2016-12-09  Kugan Vivekanandarajah  <kuganv@linaro.org>

	PR ipa/78721
	* ipa-cp.c (propagate_vr_accross_jump_function): drop_tree_overflow
	after fold_convert.

From-SVN: r243501
2016-12-09 19:47:10 +00:00
Jakub Jelinek 424c77c26e re PR target/72742 (ICE in extract_insn, at recog.c:2309 (error: unrecognizable insn) w/ -Os -mlra)
PR target/72742
	* config/rs6000/rs6000.md (*and<mode>3_imm_mask_dot,
	*and<mode>3_imm_mask_dot2): Add rs6000_is_valid_and_mask to insn
	condition.

	* gcc.c-torture/compile/pr72742.c: New test.

From-SVN: r243500
2016-12-09 20:35:18 +01:00
Segher Boessenkool bb0f9c0249 rs6000: clz/ctz/ffs improvement (PR78683)
On CPUs that implement popcnt[wd] but not cnttz[wd] we can do better for
the ctz sequences than we do today.

CL[TZ]_DEFINED_VALUE_AT_ZERO can return 2, since we always return the
same fixed value (only dependent on TARGET_* options).


	PR target/78683
	* config/rs6000/rs6000.h (CLZ_DEFINED_VALUE_AT_ZERO): Use
	GET_MODE_BITSIZE.  Return 2.
	(CTZ_DEFINED_VALUE_AT_ZERO): Use GET_MODE_BITSIZE.  Return 2.  Handle
	TARGET_POPCNTD the same as TARGET_CTZ.
	* config/rs6000/rs6000.md (ctz<mode>2): Reimplement.
	(ffs<mode>2): Reimplement.

From-SVN: r243499
2016-12-09 20:31:06 +01:00
Marek Polacek 59ab1319cb re PR middle-end/78750 (ICE in get_range_info, at tree-ssanames.c:375)
PR middle-end/78750
	* builtins.c (check_sizes): Use POINTER_TYPE_P.

	* g++.dg/torture/pr78750.C: New.

From-SVN: r243498
2016-12-09 19:05:28 +00:00
Martin Sebor c915eee640 gcc/testsuite/ChangeLog:
on arm-unknown-linux-gnueabi (and likely other ILP32) targets.

From-SVN: r243497
2016-12-09 10:38:17 -07:00
Andre Vieira d5a752ebc3 PR78255: Make postreload aware of NO_FUNCTION_CSE
gcc/ChangeLog:
2016-12-09  Andre Vieira <andre.simoesdiasvieira@arm.com>

	PR rtl-optimization/78255
	* gcc/postreload.c (reload_cse_simplify): Do not CSE a function if
	NO_FUNCTION_CSE is true.

gcc/testsuite/ChangeLog:
2016-12-09  Andre Vieira <andre.simoesdiasvieira@arm.com>

	PR rtl-optimization/78255
	* gcc.target/aarch64/pr78255.c: New.
	* gcc.target/arm/pr78255-1.c: New.
	* gcc.target/arm/pr78255-2.c: New.

From-SVN: r243494
2016-12-09 16:46:42 +00:00
Will Schmidt d9e0fdff4f dimode-1.c: Update syntax on scan-assembler strings
* gcc.target/powerpc/dimode-1.c: Update syntax on scan-assembler
	strings
	* gcc.target/powerpc/dimode-2.c: Likewise.

From-SVN: r243493
2016-12-09 16:19:03 +00:00
Jonathan Wakely 9b796223a3 Fix std::variant for gnu-versioned--namespace build
* include/std/variant: Remove misplaced
	_GLIBCXX_BEGIN_NAMESPACE_VERSION macro.

From-SVN: r243489
2016-12-09 15:22:01 +00:00
Cesar Philippidis 97ad3aef45 re PR ipa/78027 (ICE in new_oacc_loop_routine, at omp-low.c:19000)
PR ipa/78027

	gcc/
	* ipa-icf.c (sem_function::parse): Don't process functions with
	oacc decl attributes, as they may be OpenACC routines.

	gcc/testsuite/
	* c-c++-common/goacc/acc-icf.c: New test.
	* gfortran.dg/goacc/pr78027.f90: New test.

From-SVN: r243488
2016-12-09 06:45:54 -08:00
David Malcolm 6bd8a5c78f Prevent use of MEM_* attr accessor macros as lvalues
gcc/ChangeLog:
	* rtl.h (get_mem_attrs): Add "const" qualifier to returned
	pointer.

From-SVN: r243487
2016-12-09 14:34:48 +00:00
Wilco Dijkstra ac9e52e72b Add the test this time...
PR target/78733
        * gcc.target/aarch64/pr78733.c: New test.

From-SVN: r243486
2016-12-09 14:26:07 +00:00
Janus Weil cdeb16cbf2 re PR fortran/61767 ([OOP] ICE in generate_finalization_wrapper at fortran/class.c:1491)
2016-12-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/61767
	* class.c (has_finalizer_component): Fix this function to detect only
	non-pointer non-allocatable components which have a finalizer.

2016-12-09  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/61767
	* gfortran.dg/finalize_31.f90: New test.

From-SVN: r243483
2016-12-09 14:21:44 +01:00
Andre Vehreschild ffaf9305aa re PR fortran/78505 ([F08] Coarray source allocation not synchronizing on oversubscribed cores)
gcc/fortran/ChangeLog:

2016-12-09  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/78505
	* trans-stmt.c (gfc_trans_allocate): Add sync all after the execution
	of the whole allocate-statement to adhere to the standard.

gcc/testsuite/ChangeLog:

2016-12-09  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/78505
	* gfortran.dg/coarray_alloc_with_implicit_sync_1.f90: New test.

From-SVN: r243482
2016-12-09 13:46:57 +01:00
Andre Vehreschild 39da58667d trans-array.c (gfc_array_deallocate): Remove wrapper.
gcc/fortran/ChangeLog:

2016-12-09  Andre Vehreschild  <vehre@gcc.gnu.org>

	* trans-array.c (gfc_array_deallocate): Remove wrapper.
	(gfc_trans_dealloc_allocated): Same.
	(structure_alloc_comps): Restructure deallocation of (nested)
	allocatable components.  Insert dealloc of sub-component into the block
	guarded by the if != NULL for the component.
	(gfc_trans_deferred_array): Use the almightly deallocate_with_status.
	* trans-array.h: Remove prototypes.
	* trans-expr.c (gfc_conv_procedure_call): Use the almighty deallocate_
	with_status.
	* trans-openmp.c (gfc_walk_alloc_comps): Likewise.
	(gfc_omp_clause_assign_op): Likewise. 
	(gfc_omp_clause_dtor): Likewise.
	* trans-stmt.c (gfc_trans_deallocate): Likewise.
	* trans.c (gfc_deallocate_with_status): Allow deallocation of scalar
	and arrays as well as coarrays.
	(gfc_deallocate_scalar_with_status): Get the data member for coarrays
	only when freeing an array with descriptor.  And set correct caf_mode
	when freeing components of coarrays.
	* trans.h: Change prototype of gfc_deallocate_with_status to allow
	adding statements into the block guarded by the if (pointer != 0) and
	supply a coarray handle.

gcc/testsuite/ChangeLog:

2016-12-09  Andre Vehreschild  <vehre@gcc.gnu.org>

	* gfortran.dg/coarray_alloc_comp_3.f08: New test.
	* gfortran.dg/coarray_alloc_comp_4.f08: New test.
	* gfortran.dg/finalize_18.f90: Add count for additional guard against
	accessing null-pointer.
	* gfortran.dg/proc_ptr_comp_47.f90: New test.

From-SVN: r243480
2016-12-09 13:32:50 +01:00
Nathan Sidwell 3291363771 re PR c++/78550 (bit field and std::initializer_list)
PR c++/78550
	* convert.c (convert_to_integer_1): Maybe fold conversions to
	integral types with fewer bits than its mode.

	testsuite/
	PR c++/78550
	* g++.dg/cpp1y/pr78550.C: New.

From-SVN: r243479
2016-12-09 12:18:36 +00:00
Paul Thomas 345bd7ebbb re PR fortran/44265 (Link error with reference to parameter array in specification expression)
2016-12-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/44265
	* gfortran.h : Add fn_result_spec bitfield to gfc_symbol.
	* resolve.c (flag_fn_result_spec): New function.
	(resolve_fntype): Call it for character result lengths.
	* symbol.c (gfc_new_symbol): Set fn_result_spec to zero.
	* trans-decl.c (gfc_sym_mangled_identifier): Include the
	procedure name in the mangled name for symbols with the
	fn_result_spec bit set.
	(gfc_finish_var_decl): Mark the decls of these symbols
	appropriately for the case where the function is external.
	(gfc_get_symbol_decl): Mangle the name of these symbols.
	(gfc_create_module_variable): Allow them through the assert.
	(gfc_generate_function_code): Remove the assert before the
	initialization of sym->tlink because the frontend no longer
	uses this field.
	* trans-expr.c (gfc_map_intrinsic_function): Add a case to
	treat the LEN_TRIM intrinsic.
	(gfc_trans_string_copy): Deal with Wstringop-overflow warning
	that can occur with constant source lengths at -O3.

2016-12-09  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/44265
	* gfortran.dg/char_result_14.f90: New test.
	* gfortran.dg/char_result_15.f90: New test.

From-SVN: r243478
2016-12-09 11:55:27 +00:00
Martin Liska cdecc83f3e Escape non-printable chars in strings.
* tree-pretty-print.c (pretty_print_string): Escape non-printable
	chars in strings.
	* gcc.dg/tree-ssa/dump-3.c: New test.

From-SVN: r243477
2016-12-09 10:15:33 +00:00