Commit Graph

142020 Commits

Author SHA1 Message Date
Kyrylo Tkachov
2ca5b4303b [AArch64] PR target/68129: Define TARGET_SUPPORTS_WIDE_INT
PR target/68129
	* config/aarch64/aarch64.h (TARGET_SUPPORTS_WIDE_INT): Define to 1.
	* config/aarch64/aarch64.c (aarch64_print_operand, CONST_DOUBLE):
	Delete VOIDmode case.  Assert that mode is not VOIDmode.
	* config/aarch64/predicates.md (const0_operand): Remove const_double
	match.

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

From-SVN: r230029
2015-11-09 15:53:26 +00:00
Martin Liska
c34311917f Fix memory leaks in IPA.
* ipa-inline-analysis.c (estimate_function_body_sizes): Call
	body_info release function.
	* ipa-prop.c (ipa_release_body_info): New function.
	(ipa_analyze_node): Call the function.
	(ipa_node_params::~ipa_node_params): Release known_csts.
	* ipa-prop.h (ipa_release_body_info): Declare.

From-SVN: r230028
2015-11-09 15:47:01 +00:00
Martin Liska
af121e828e Fix memory leaks and use a pool_allocator
* gcc.c (record_temp_file): Release name string.
	* ifcvt.c (noce_convert_multiple_sets): Use auto_vec instead
	of vec.
	* lra-lives.c (free_live_range_list): Utilize
	lra_live_range_pool for allocation and deallocation.
	(create_live_range): Likewise.
	(copy_live_range): Likewise.
	(lra_merge_live_ranges): Likewise.
	(remove_some_program_points_and_update_live_ranges): Likewise.
	(lra_create_live_ranges_1): Release point_freq_vec that can
	be not freed from previous iteration of the function.
	* tree-eh.c (lower_try_finally_switch): Use auto_vec instead of
	vec.
	* tree-sra.c (sra_deinitialize): Release all vectors in
	base_access_vec.
	* tree-ssa-dom.c (free_dom_edge_info): Make the function extern.
	* tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
	Release edge_info for a removed edge.
	(thread_through_all_blocks): Free region vector.
	* tree-ssa.h (free_dom_edge_info): Declare function extern.

From-SVN: r230027
2015-11-09 15:45:59 +00:00
Andreas Arnez
fc402eec4b [PR debug/67192] Further fix C loops' back-jump location
gcc/c/ChangeLog:

	PR debug/67192
	* c-typeck.c (c_finish_loop): For unconditional loops, set the
	location of the backward-goto to the start of the loop body.

gcc/testsuite/ChangeLog:

	PR debug/67192
	* gcc.dg/guality/pr67192.c (f3, f4): New functions.
	(main): Invoke them.

From-SVN: r230024
2015-11-09 15:35:10 +00:00
Andreas Arnez
f6b0b3db86 [PR debug/67192] Fix C loops' back-jump location
gcc/c/ChangeLog:

	PR debug/67192
	* c-parser.c (c_parser_while_statement): Finish the loop before
	parsing ahead for misleading indentation.
	(c_parser_for_statement): Likewise.

gcc/testsuite/ChangeLog:

	PR debug/67192
	* gcc.dg/guality/pr67192.c: New test.

From-SVN: r230023
2015-11-09 15:31:32 +00:00
Ilya Enkovich
0e657ecb98 optabs.c (expand_vec_cond_expr): Always get sign from type.
gcc/

	* optabs.c (expand_vec_cond_expr): Always get sign from type.
	* tree.c (wide_int_to_tree): Support negative values for boolean.
	(build_nonstandard_boolean_type): Use signed type for booleans.

From-SVN: r230022
2015-11-09 15:11:02 +00:00
Richard Biener
0b3ecf7551 re PR tree-optimization/68248 (ICE on valid code at -O3 on x86_64-linux-gnu in uniform_vector_p, at tree.c:10807)
2015-11-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/68248
	* tree-vect-generic.c (expand_vector_operations_1): Handle
	scalar rhs2.

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

From-SVN: r230021
2015-11-09 14:47:09 +00:00
Richard Biener
64900538f1 re PR tree-optimization/56118 (Piecewise vector / complex initialization from constants not combined)
2015-11-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/56118
	* tree-vectorizer.h (vect_find_last_scalar_stmt_in_slp): Declare.
	* tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Export.
	* tree-vect-data-refs.c (vect_slp_analyze_node_dependences): New
	function.
	(vect_slp_analyze_data_ref_dependences): Instead of computing
	all dependences of the region DRs just analyze the code motions
	SLP vectorization will perform.  Remove SLP instances that
	cannot have their store/load motions applied.
	(vect_analyze_data_refs): Allow DRs without a vectype
	in BB vectorization.

	* gcc.dg/vect/no-tree-sra-bb-slp-pr50730.c: Adjust.

From-SVN: r230020
2015-11-09 12:59:17 +00:00
Julian Brown
cc8ca59eb8 Machine modes for address printing.
* final.c (output_asm_insn): Pass VOIDmode to output_address.
	(output_address): Add MODE argument. Pass to print_operand_address
	hook.
	* targhooks.c (default_print_operand_address): Add MODE argument.
	* targhooks.h (default_print_operand_address): Update prototype.
	* output.h (output_address): Update prototype.
	* target.def (print_operand_address): Add MODE argument.
	* config/vax/vax.c (print_operand_address): Pass VOIDmode to
	output_address.
	(print_operand): Pass access mode to output_address.
	* config/mcore/mcore.c (mcore_print_operand_address): Add MODE
	argument.
	(mcore_print_operand): Update calls to mcore_print_operand_address.
	* config/fr30/fr30.c (fr30_print_operand): Pass VOIDmode to
	output_address.
	* config/lm32/lm32.c (lm32_print_operand): Pass mode in calls to
	output_address.
	* config/tilegx/tilegx.c (output_memory_reference_mode): Remove
	global.
	(tilegx_print_operand): Don't set above global. Update calls to
	output_address.
	(tilegx_print_operand_address): Add MODE argument. Use instead of
	output_memory_reference_mode global.
	* config/frv/frv.c (frv_print_operand_address): Add MODE argument.
	(frv_print_operand): Pass mode to frv_print_operand_address calls.
	* config/mn10300/mn10300.c (mn10300_print_operand): Pass mode to
	output_address.
	* config/cris/cris.c (cris_print_operand_address): Add MODE
	argument.
	(cris_print_operand): Pass mode to output_address calls.
	* config/spu/spu.c (print_operand): Pass mode to output_address
	calls.
	* config/aarch64/aarch64.h (aarch64_print_operand)
	(aarch64_print_operand_address): Remove prototypes.
	* config/aarch64/aarch64.c (aarch64_memory_reference_mode): Delete
	global.
	(aarch64_print_operand): Make static. Update calls to
	output_address.
	(aarch64_print_operand_address): Add MODE argument. Use instead of
	aarch64_memory_reference_mode global.
	(TARGET_PRINT_OPERAND, TARGET_PRINT_OPERAND_ADDRESS): Define target
	hooks.
	* config/aarch64/aarch64.h (PRINT_OPERAND, PRINT_OPERAND_ADDRESS):
	Delete macro definitions.
	* config/pa/pa.c (pa_print_operand): Pass mode in output_address
	calls.
	* config/xtensa/xtensa.c (print_operand): Pass mode in
	output_address calls.
	* config/h8300/h8300.c (h8300_print_operand_address): Add MODE
	argument.
	(h83000_print_operand): Update calls to h8300_print_operand_address
	and output_address.
	* config/ia64/ia64.c (ia64_print_operand_address): Add MODE
	argument.
	* config/tilepro/tilepro.c (output_memory_reference_mode): Delete
	global.
	(tilepro_print_operand): Pass mode to output_address.
	(tilepro_print_operand_address): Add MODE argument. Use instead of
	output_memory_reference_mode.
	* config/nvptx/nvptx.c (output_decl_chunk, nvptx_assemble_integer)
	(nvptx_output_call_insn, nvptx_print_address_operand): Pass VOIDmode
	to output_address calls.
	(nvptx_print_operand_address): Add MODE argument.
	* config/alpha/alpha.c (print_operand): Pass mode argument in
	output_address calls.
	* config/m68k/m68k.c (print_operand): Pass mode argument in
	output_address call.
	* config/avr/avr.c (avr_print_operand_address): Add MODE argument.
	(avr_print_operand): Update calls to avr_print_operand_address.
	* config/sparc/sparc.c (sparc_print_operand_address): Add MODE
	argument. Update calls to output_address.
	(sparc_print_operand): Pass mode to output_address.
	* config/iq2000/iq2000.c (iq2000_print_operand_address): Add MODE
	argument.
	(iq2000_print_operand): Pass mode in output_address calls.
	* config/stormy16/stormy16.c (xstormy16_print_operand_address): Add
	MODE argument.
	(xstormy16_print_operand): Pass mode to
	xstormy16_print_operand_address calls.
	* config/mips/mips.c (mips_print_operand): Update calls to
	output_address.
	(mips_print_operand_address): Add MODE argument.
	* config/epiphany/epiphany.c (epiphany_print_operand): Update calls
	to output_address.
	(epiphany_print_operand_address): Add MODE argument. Add FIXME note.
	* config/pdp11/pdp11.c (pdp11_asm_print_operand): Update call to
	output_address.
	* config/rx/rx.c (rx_print_operand_address): Add MODE argument.
	(rx_print_operand): Update calls to output_address,
	rx_print_operand_address.
	* config/nds32/nds32.c (nds32_print_operand): Update calls to
	output_address.
	(nds32_print_operand_address): Add MODE argument.
	* config/rs6000/rs6000.c (print_operand): Pass mem mode to
	output_address calls.
	* config/c6x/c6x.c (print_address_offset): Pass mem mode to
	output_address call.
	(c6x_print_address_operand): Update calls to output_address.
	(c6x_print_operand_address): Pass mode to above.
	* config/v850/v850.c (v850_print_operand_address): Add MODE
	argument.
	(v850_print_operand): Pass mode to v850_print_operand_address,
	output_address.
	* config/mmix/mmix.c (mmix_print_operand_address): Add MODE
	argument.
	(mmix_print_operand): Pass mode in output_address calls.
	* config/sh/sh.c (sh_print_operand_address): Add MODE argument.
	(sh_print_operand): Pass mem mode to output_address,
	sh_print_operand_address.
	* config/cr16/cr16.c (cr16_print_operand_address): Add MODE
	argument.
	(cr16_print_operand): Pass mode to output_address,
	cr16_print_operand_address.
	* config/bfin/bfin.c (print_address_operand): Pass VOIDmode to
	output_address.
	* config/microblaze/microblaze.c (print_operand): Pass mode to
	output_address.
	* config/nios2/nios2.c (nios2_print_operand): Pass VOIDmode to
	output_address.
	(nios2_print_operand_address): Add MODE argument. Update call to
	nios2_print_operand_address.
	* config/s390/s390.c (print_operand): Pass mode to output_address.
	* config/m32c/m32c.c (m32c_print_operand_address): Add MODE
	argument.
	* config/arc/arc.c (arc_print_operand): Pass VOIDmode to
	output_address.
	* config/arm/arm.c (arm_print_operand_address): Add MODE argument.
	Use instead of output_memory_reference_mode.
	(output_memory_reference_mode): Delete global.
	(arm_print_operand): Pass mem mode to output_address.
	* config/m32r/m32r.c (m32r_print_operand_address): Add MODE
	argument.
	(m32r_print_operand): Pass mode to output_address.
	* config/msp430/msp430.c (msp430_print_operand_addr): Add MODE
	argument.
	(msp430_print_operand): Pass mode to msp430_print_operand_addr.
	* config/i386/i386.c (ix86_print_operand): Pass mode to
	output_address calls.
	(ix86_print_operand_address): Add MODE argument.

From-SVN: r230016
2015-11-09 12:16:55 +00:00
Eric Botcazou
7b95c72903 re PR middle-end/68251 (sorry, unimplemented: reverse storage order for BLKmode)
PR middle-end/68251
	* tree-core.h (REF_REVERSE_STORAGE_ORDER): Move around.
	* tree.h (REF_REVERSE_STORAGE_ORDER): Change to default_def_flag.
	* tree-streamer-in.c (unpack_ts_base_value_fields): Adjust.
	* tree-streamer-out.c (pack_ts_base_value_fields): Likewise.

From-SVN: r230015
2015-11-09 12:14:07 +00:00
Kyrylo Tkachov
0780fbabe8 [RTL-ifcvt] PR rtl-optimization/67749: Do not emit separate SET insn in IF-ELSE case
PR rtl-optimization/67749
	* ifcvt.c (noce_try_cmove_arith): Do not emit move in IF-ELSE
	case before emitting the two blocks.  Instead modify the register
	in the corresponding final insn of the basic block.

From-SVN: r230014
2015-11-09 11:40:17 +00:00
Rainer Orth
e6b6bf09dd Support init priority on Solaris
libgcc:
	* config/ia64/crtbegin.S: Check HAVE_INITFINI_ARRAY_SUPPORT
	value.
	* config/ia64/crtend.S: Likewise.

	gcc:
	* acinclude.m4 (gcc_AC_INITFINI_ARRAY): Allow for differences in
	assembler syntax.
	Support Solaris ld.
	Define HAVE_INITFINI_ARRAY_SUPPORT as 0/1.

	* config/sol2.h (SUPPORTS_INIT_PRIORITY): Define to
	HAVE_INITFINI_ARRAY_SUPPORT.
	* config/initfini-array.h: Check HAVE_INITFINI_ARRAY_SUPPORT
	value.

	* configure.ac (gcc_cv_as_sparc_nobits): Remove.
	* config/sparc/sparc.c (sparc_solaris_elf_asm_named_section):
	Don't check HAVE_AS_SPARC_NOBITS.
	Heed SECTION_NOTYPE.

	* configure: Regenerate.
	* config.in: Regenerate.

From-SVN: r230013
2015-11-09 11:33:30 +00:00
Eric Botcazou
e1c78addb3 re PR middle-end/68253 (conditional jump or move depends on uninitialized value in fold-const.c:5587)
PR middle-end/68253
	* fold-const.c (fold_truth_andor_1): Initialize new variables to 0.

From-SVN: r230011
2015-11-09 10:45:00 +00:00
Thomas Preud'homme
e732ca6c9d thumb2-slow-flash-data.c: Add missing typespec for labelref and check use of constant pool by looking for...
2015-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>

    gcc/
    * gcc.target/arm/thumb2-slow-flash-data.c: Add missing typespec for
    labelref and check use of constant pool by looking for .word and
    similar directives.

From-SVN: r230010
2015-11-09 10:29:06 +00:00
Igor Zamyatin
a42062b176 re PR target/66326 (Floating point exception with -mfpmath=387 and -fcilkplus.)
libcilkrts/

2015-11-09  Igor Zamyatin  <igor.zamyatin@intel.com>

	PR target/66326
	* runtime/config/x86/os-unix-sysdep.c (sysdep_save_fp_ctrl_state):
	Use fnstcw instead fnstsw.


gcc/testsuite

2015-11-09  Igor Zamyatin  <igor.zamyatin@intel.com>

	PR target/66326
	* g++.dg/cilk-plus/CK/pr66326.cc: New test.

From-SVN: r230008
2015-11-09 10:12:34 +00:00
Richard Henderson
00402c9415 i386: Add address spaces for fs/gs segments and tls
* config/i386/i386-c.c (ix86_target_macros): Define __SEG_FS,
        __SEG_GS, __SEG_TLS.
        (ix86_register_pragmas): Register address spaces __seg_fs,
        __seg_gs, __seg_tls.
        * config/i386/i386-protos.h (enum ix86_address_seg): Remove.
        (ADDR_SPACE_SEG_FS, ADDR_SPACE_SEG_GS, ADDR_SPACE_SEG_TLS): New.
        (struct ix86_address): Use addr_space_t instead of ix86_address_seg.
        * config/i386/i386.c (ix86_decompose_address): Likewise.
        (ix86_legitimate_address_p): Likewise.
        (memory_address_length): Likewise.  Check mem address space too.
        (ix86_print_operand): Use ix86_print_operand_address_as.
        (ix86_print_operand_address_as): Rename from
        ix86_print_operand_address, add new addr_space_t parameter.
        Validate that either the parameter or the ix86_address segment
        is default address space.  Handle ADDR_SPACE_SEG_TLS.
        (ix86_print_operand_address): New.
        (ix86_addr_space_subset_p, TARGET_ADDR_SPACE_SUBSET_P): New.
        (ix86_addr_space_convert, TARGET_ADDR_SPACE_CONVERT): New.
        (ix86_addr_space_debug, TARGET_ADDR_SPACE_DEBUG): New.
        (ix86_addr_space_zero_address_valid): New.
        (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): New.
        * config/i386/i386.h (DEFAULT_TLS_SEG_REG): Use addr_space_t constants.
        * config/i386/rdos.h (DEFAULT_TLS_SEG_REG): Likewise.
        * config/i386/predicates.md (address_no_seg_operand): Likewise.
        (vsib_address_operand): Likewise.
        (address_mpx_no_base_operand): Likewise.
        (address_mpx_no_index_operand): Likewise.
        * doc/extend.texi (x86 Named Address Spaces): New section.

        * gcc.target/i386/addr-space-1.c: New test.
        * gcc.target/i386/addr-space-2.c: New test.
        * gcc.target/i386/addr-space-3.c: New test.

From-SVN: r230003
2015-11-09 01:20:21 -08:00
Richard Henderson
1673467767 i386: Disallow address spaces with string insns
While cmps and movs allow a segment override of the ds:esi
source, the es:edi source/destination cannot be overriden.
Simplify things in the backend for now by disallowing
segments for string insns entirely.

	* config/i386/i386.c (ix86_check_no_addr_space): New.
	(decide_alg): Add have_as parameter.
	(alg_usable_p): Likewise; disable rep algorithms if set.
	(ix86_expand_set_or_movmem): Notice if either MEM has a
	non-default address space.
	(ix86_expand_strlen): Likewise.
	* config/i386/i386.md (strmov, strset): Likewise.
	(*strmovdi_rex_1): Use ix86_check_no_addr_space.
	(*strmovsi_1, *strmovqi_1, *rep_movdi_rex64, *rep_movsi, *rep_movqi,
	*strsetdi_rex_1, *strsetsi_1, *strsethi_1, *strsetqi_1,
	*rep_stosdi_rex64, *rep_stossi, *rep_stosqi, *cmpstrnqi_nz_1,
	*cmpstrnqi_1, *strlenqi_1): Likewise.

From-SVN: r230002
2015-11-09 01:19:59 -08:00
Richard Henderson
fe5f926316 i386: Handle address spaces in movabs patterns
* config/i386/i386.md (*movabs<mode>_1): Print the full memory rtx.
	(*movabs<mode>_2): Likewise.

From-SVN: r230001
2015-11-09 01:19:40 -08:00
Richard Henderson
f736b911e6 Add hook for modifying debug info for address spaces
* dwarf2out.c (modified_type_die): Pass the address space number
        through TARGET_ADDR_SPACE_DEBUG to produce the dwarf address class.
        * target.def (TARGET_ADDR_SPACE_DEBUG): New.
        * targhooks.c (default_addr_space_debug): New.
        * targhooks.h (default_addr_space_debug): Declare.
        * doc/tm.texi.in (TARGET_ADDR_SPACE_DEBUG): Mark it.
        * doc/tm.texi: Rebuild.

From-SVN: r230000
2015-11-09 01:19:19 -08:00
Richard Henderson
6626f97034 Add TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID
* gimple.c (check_loadstore): Return false when 0 is a valid address.
        * fold-const.c (const_unop) [ADDR_SPACE_CONVERT_EXPR]: Do not fold
        null when 0 is valid in the source address space.
        * target.def (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): New.
        * targhooks.c (default_addr_space_zero_address_valid): New.
        * targhooks.h (default_addr_space_zero_address_valid): Declare.
        * doc/tm.texi.in (TARGET_ADDR_SPACE_ZERO_ADDRESS_VALID): Mark it.
        * doc/tm.texi: Rebuild.

From-SVN: r229999
2015-11-09 01:18:59 -08:00
Richard Henderson
bd68a3a7e7 Avoid CSE of MEMs in different address spaces
* cselib.c (add_mem_for_addr): Compare address spaces when
        matching memories.
        (cselib_lookup_mem): Likewise.
        * fold-const.c (operand_equal_p): Check address spaces of
        pointer types before checking integer constants.

From-SVN: r229998
2015-11-09 01:18:35 -08:00
Richard Henderson
f0ebde5ace re PR tree-optimization/66768 (address space gets lost on literal pointer)
PR tree-opt/66768

        * tree-ssa-address.c (create_mem_ref_raw): Use a pointer of
        the correct type for the base.

From-SVN: r229997
2015-11-09 01:18:16 -08:00
Jeff Law
d2e2feaa4d [PATCH] Minor refactoring in tree-ssanames.c & freelists verifier
[PATCH] Minor refactoring in tree-ssanames.c & freelists verifier
	* tree-into-ssa.c (names_to_release): No longer static.
	* tree-into-ssa.h (names_to_release): Declare.
	* tree-ssanames.c (verify_ssaname_freelists): New debug function.
	(release_free_names_and_compact_live_names): New function extracted
	from pass_release_ssa_names::execute.
	(pass_release_ssa_names::execute): Use it.

Co-Authored-By: Nathan Sidwell <nathan@acm.org>

From-SVN: r229995
2015-11-09 02:02:27 -07:00
Steven G. Kargl
cdffe78809 re PR fortran/68053 (lower bound of implied shape array restricted too much)
2015-11-08  Steven g. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68053
	* decl.c (add_init_expr_to_sym):  Try to reduce initialization expression
	before testing for a constant value.

2015-11-08  Steven g. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68053
	* gfortran.dg/pr68053.f90: New test.

From-SVN: r229992
2015-11-09 05:50:24 +00:00
Alan Modra
61c94e79eb Configury changes for obstack optimization
Missed from last patch

	* config.in: Regenerate.

From-SVN: r229991
2015-11-09 15:24:15 +10:30
Alan Modra
126e0b6b61 Configury changes for obstack optimization
* configure.ac: Check size of size_t.
	* configure: Regenerate.

From-SVN: r229990
2015-11-09 15:02:08 +10:30
Alan Modra
a186d523f2 Silence obstack.c -Wc++compat warning
* obstack.c (_obstack_newchunk): Silence -Wc++compat warning.
	(_obstack_begin_worker): Likewise.  Move assignment to h->chunk
	after alloc failure check.

From-SVN: r229989
2015-11-09 15:00:26 +10:30
Alan Modra
f0e525fe18 Modify obstack.[hc] to avoid having to include other gnulib files
Using the standard gnulib obstack source requires importing quite a
lot of other files from gnulib, and requires build changes.

include/
	* obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
libiberty/
	* obstack.c (__alignof__): Expand alignof_type from alignof.h.
	(obstack_exit_failure): Don't use exitfail.h.
	(_): Include libintl.h when HAVE_LIBINTL_H and nls enabled.
	Provide default.  Don't include gettext.h.
	(_Noreturn): Define.
	* obstacks.texi: Adjust node references to external libc info files.

From-SVN: r229988
2015-11-09 14:58:21 +10:30
Alan Modra
c9f265c945 Copy gnulib obstack files
This copies obstack.[ch] from gnulib, and updates the docs.  The next
patch should be applied if someone repeats the import at a later date.

include/
	* obstack.h: Import current gnulib file.
libiberty/
	* obstack.c: Import current gnulib file.
	* obstacks.texi: Updated doc, from glibc's manual/memory.texi.

From-SVN: r229987
2015-11-09 14:56:32 +10:30
Alan Modra
62c0f0a637 Update libsanitizer obstack interceptors
New obstack uses sensible types, size_t instead of int for length
params.  Since libsanitizer does not use prototypes from obstack.h to
call the real functions, it's necessary to update the libsanitizer
function declarations emitted by the INTERCEPTOR macro.

	* sanitizer_common/sanitizer_common_interceptors.inc: Update size
	params for _obstack_begin_1, _obstack_begin, _obstack_newchunk
	interceptors.
	* configure.ac: Substitute OBSTACK_DEFS.
	* asan/Makefile.am: Add OBSTACK_DEFS to DEFS.
	* tsan/Makefile.am: Likewise.
	* configure: Regenerate.
	* Makefile.in: Regenerate.
	* asan/Makefile.in: Regenerate.
	* interception/Makefile.in: Regenerate.
	* libbacktrace/Makefile.in: Regenerate.
	* lsan/Makefile.in: Regenerate.
	* sanitizer_common/Makefile.in: Regenerate.
	* tsan/Makefile.in: Regenerate.
	* ubsan/Makefile.in: Regenerate.

From-SVN: r229986
2015-11-09 14:53:25 +10:30
Alan Modra
37697711e7 Correct libvtv obstack use
Fixes a compile error with both old and new obstacks due to
obstack_chunk_free having the wrong signature.  Also, setting chunk
size and alignment before obstack_init is pointless since they are
overwritten.

	* vtv_malloc.cc (obstack_chunk_free): Correct param type.
	(__vtv_malloc_init): Use obstack_specify_allocation.

From-SVN: r229985
2015-11-09 14:49:43 +10:30
Alan Modra
c240b3e0de New obstack_next_free is not an lvalue
New obstack.h casts obstack_next_free to (void *), resulting in it
being a non-lvalue, and warnings on pointer arithmetic.

gcc/
	* gensupport.c (add_mnemonic_string): Make len param a size_t.
	(gen_mnemonic_setattr): Make "size" var a size_t.  Use
	obstack_blank_fast to shrink obstack.  Cast obstack_next_free
	return value.
gcc/objc/
	* objc-encoding.c (encode_aggregate_within): Cast obstack_next_free
	return value.

From-SVN: r229984
2015-11-09 14:47:53 +10:30
Segher Boessenkool
d4c8d5ede1 Fix bb-reorder problem with degenerate cond_jump (PR68182)
The code mistakenly thinks any cond_jump has two successors.  This is
not true if both destinations are the same, as can happen with weird
patterns as in the PR.


	PR rtl-optimization/68182
	* gcc/bb-reorder.c (reorder_basic_blocks_simple): Treat a conditional
	branch with only one successor just like unconditional branches.

From-SVN: r229983
2015-11-09 04:57:19 +01:00
Jeff Law
4f70cb39c0 [PATCH] Remove backedge handling support in tree-ssa-threadupdate.c
* tree-ssa-threadupdate.c (register_jump_thraed): Assert that a
	non-FSM path has no edges marked with EDGE_DFS_BACK.
	(ssa_redirect_edges): No longer call mark_loop_for_removal.
	(thread_single_edge, def_split_header_continue_p): Remove.
	(bb_ends_with_multiway_branch): Likewise.
	(thread_through_loop_header): Remove cases of threading from
	latch through the header.  Simplify knowing we won't thread
	the latch.
	(thread_through_all_blocks): Simplify knowing that only the FSM
	threader needs to handle backedges.

From-SVN: r229982
2015-11-08 20:19:09 -07:00
GCC Administrator
a2478e36e0 Daily bump.
From-SVN: r229980
2015-11-09 00:16:11 +00:00
Jan Hubicka
285af20657 * g++.dg/lto/pr68057_0.C: Fix testcase.
From-SVN: r229968
2015-11-08 19:14:29 +00:00
Joost VandeVondele
c6fa91cfcd Move tests depending on graphite to correct subdirectory.
2015-11-08  Joost VandeVondele <vondele@gcc.gnu.org>

	* gfortran.dg/PR67518.f90: move from here...
	* gfortran.dg/graphite/PR67518.f90: to here.
	* gfortran.dg/PR53852.f90: move from here...
	* gfortran.dg/graphite/PR53852.f90: to here.

From-SVN: r229967
2015-11-08 19:12:53 +00:00
Eric Botcazou
ee45a32dae Merge of the scalar-storage-order branch.
From-SVN: r229965
2015-11-08 18:33:42 +00:00
Martin Sebor
eb11eb157c Clean up fallout on ILP32 from r229831.
gcc/
	PR c++/67942 
	* cp/init.c (warn_placement_new_too_small): Convert integer
	operand of POINTER_PLUS_EXPR to ssize_t to determine its signed
	value.

c-family/
        * c.opt (Wplacement-new): Add a period to the end of
        a sentence.

From-SVN: r229959
2015-11-08 10:53:51 -07:00
Andre Vehreschild
3e4d188a5f re PR fortran/68218 (ALLOCATE with size given by a module function)
gcc/fortran/ChangeLog:

2015-11-08  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/68218
	* trans-array.c (gfc_array_init_size): Add gfc_evaluate_now() when
	array spec in allocate is a function call.

gcc/testsuite/ChangeLog:

2015-11-08  Andre Vehreschild  <vehre@gcc.gnu.org>

	PR fortran/68218
	* gfortran.dg/allocate_with_arrayspec_1.f90: New test.

From-SVN: r229956
2015-11-08 18:37:42 +01:00
Steven G. Kargl
28bc117f58 re PR fortran/68224 (ICE on referencing parameter array with dimension null)
2015-11-08  Steven G. Kargl  <kargl@gc.gnu.org>

	PR fortran/68224
	* array.c (match_array_element_spec): Check of invalid NULL().
	While here, fix nearby comments.

2015-11-08  Steven G. Kargl  <kargl@gc.gnu.org>

	PR fortran/68224
	* gfortran.dg/pr68224.f90: New test.

From-SVN: r229955
2015-11-08 17:25:16 +00:00
Paul Thomas
57905c2bb3 re PR fortran/68196 (ICE on function result with procedure pointer component)
2015-11-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/68196
	* class.c (has_finalizer_component): Prevent infinite recursion
	through this function if the derived type and that of its
	component are the same.
	* trans-types.c (gfc_get_derived_type): Do the same for proc
	pointers by ignoring the explicit interface for the component.

	PR fortran/66465
	* check.c (same_type_check): If either of the expressions is
	BT_PROCEDURE, use the typespec from the symbol, rather than the
	expression.

2015-11-08  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/68196
	* gfortran.dg/proc_ptr_47.f90: New test.

	PR fortran/66465
	* gfortran.dg/pr66465.f90: New test.

From-SVN: r229954
2015-11-08 16:47:58 +00:00
Christophe Lyon
210172f47d [AArch64] Fix vqtb[lx][234] on big-endian
Forgot to commit the new testcases:
gcc/testsuite/gcc.target/aarch64/advsimd-intrinsics/vqtbX.c

From-SVN: r229946
2015-11-08 08:59:31 +01:00
GCC Administrator
46d59b585a Daily bump.
From-SVN: r229944
2015-11-08 00:16:11 +00:00
Eric Botcazou
cad669df64 * config/sparc/sparc.opt (mfix-at697f): Add final period.
From-SVN: r229941
2015-11-07 22:34:20 +00:00
John David Anglin
171258f706 Wno-frame-address.c: Skip on hppa*-*-*.
* gcc.dg/Wno-frame-address.c: Skip on hppa*-*-*.

From-SVN: r229940
2015-11-07 22:22:33 +00:00
Steven G. Kargl
57e596204f re PR fortran/68153 (ICE for intrinsic reshape with negative dim in effective shape)
2015-11-07  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68153
	* check.c (gfc_check_reshape): Improve check for valid SHAPE argument.

2015-11-07  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68153
	* gfortran.dg/pr68153.f90: New test.

From-SVN: r229939
2015-11-07 20:18:17 +00:00
Steven G. Kargl
727cde644d re PR fortran/68151 (ICE on using select case with function of wrong type)
2015-11-07  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68151
	* match.c (match_case_selector):  Check for invalid type.

2015-11-07  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/68151
	* gfortran.dg/pr68151.f90: New test.

From-SVN: r229938
2015-11-07 20:04:43 +00:00
Segher Boessenkool
bc05d49d10 i386: Use the STC bb-reorder algorithm at -Os (PR67864)
For x86, STC still gives better results for optimise-for-size than
"simple" does.  So use STC at -Os as well.


	PR rtl-optimization/67864
	* common/config/i386/i386-common.c (ix86_option_optimization_table)
	<OPT_freorder_blocks_algorithm_>: Use REORDER_BLOCKS_ALGORITHM_STC
	at -Os and up.

From-SVN: r229937
2015-11-07 20:44:21 +01:00
Trevor Saunders
a153644f75 replace BITS_PER_UNIT with __CHAR_BIT__ in target libs
libgcc/ChangeLog:

2015-11-07  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/visium/lib2funcs.c (__set_trampoline_parity): Use
	__CHAR_BIT__ instead of BITS_PER_UNIT.
	* fixed-bit.h: Likewise.
	* fp-bit.h: Likewise.
	* libgcc2.c (__popcountSI2): Likewise.
	(__popcountDI2): Likewise.
	* libgcc2.h: Likewise.
	* libgcov.h: Likewise.

libobjc/ChangeLog:

2015-11-07  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	PR libobjc/24775
	* encoding.c (_darwin_rs6000_special_round_type_align): Use
	__CHAR_BIT__ instead of BITS_PER_UNIT.
	(objc_sizeof_type): Likewise.
	(objc_layout_structure): Likewise.
	(objc_layout_structure_next_member): Likewise.
	(objc_layout_finish_structure): Likewise.
	(objc_layout_structure_get_info): Likewise.

From-SVN: r229936
2015-11-07 19:36:26 +00:00