Commit Graph

140048 Commits

Author SHA1 Message Date
Nathan Sidwell 9ebddeb045 plugin-nvptx.c: Don't include dlfcn.h.
* plugin/plugin-nvptx.c: Don't include dlfcn.h.
	(cuda_errlist): Constify.
	(errmsg):  Move into ...
	(cuda_error): ... here.  Make smaller.
	(_XSTR, _STR): Delete.
	(cuda_synames): Delete.
	(verify_device_library): Delete.
	(nvptx_init): Don't call it.

From-SVN: r226539
2015-08-04 00:40:18 +00:00
GCC Administrator 1f1833cce0 Daily bump.
From-SVN: r226538
2015-08-04 00:16:13 +00:00
Ian Lance Taylor 1ca95ba067 syscall: RawSockaddr fix for ppc64, ppc64le
The struct RawSockaddr contains a field Data which
    should be uint8 on ppc64 and ppc64le, but is declared
    as int8 in gccgo.  This change adds a two new files
    which contain the structure declaration for
    RawSockaddr, one with the correct types for for ppc64
    and ppc64le, and the other for non-ppc64 platforms.
    
    Fixes golang/go#11469
    
    Reviewed-on: https://go-review.googlesource.com/11946

From-SVN: r226533
2015-08-03 21:18:56 +00:00
Peter Bergner ab977fd881 htm.md (tabort.): Restrict the source operand to using a base register.
gcc/
	* config/rs6000/htm.md (tabort.): Restrict the source operand to
	using a base register.

gcc/testsuite/
	* gcc.target/powerpc/htm-tabort-no-r0.c: New test.

From-SVN: r226532
2015-08-03 16:11:20 -05:00
David Malcolm afed345982 Refactoring of timevar API
gcc/ChangeLog:
	* main.c (main): Pass in NULL for toplev's external_timer.
	* timevar.c: Include coretypes.h.
	(class timer::named_items): New.
	(timer::named_items::named_items): New.
	(timer::named_items::~named_items): New.
	(timer::named_items::push): New.
	(timer::named_items::pop): New.
	(timer::named_items::print): New.
	(timer::timer): Initialize field "m_jit_client_items".
	(timer::~timer): New.
	(timer::push): Move bulk of implementation to...
	(timer::push_internal): ...here.  New function.
	(timer::pop): Move bulk of implementation to...
	(timer::pop_internal): ...here.  New function.
	(timer::push_client_item): New.
	(timer::pop_client_item): New.
	(timer::print_row): New function, taken from timer::print.
	(timer::print): Print "GCC items" header if we also have client
	items.  Move row-printing to timer::print_row.  Print any client
	items.
	(timer::get_topmost_item_name): New method.
	* timevar.def (TV_JIT_ACQUIRING_MUTEX): New.
	(TV_JIT_CLIENT_CODE): New.
	* timevar.h (timer::push_client_item): New declaration.
	(timer::pop_client_item): New declaration.
	(timer::get_topmost_item_name): New method.
	(timer::push_internal): New declaration.
	(timer::pop_internal): New declaration.
	(timer::print_row): New declaration.
	(timer::named_items): New declaration.
	(timer::m_jit_client_items): New field.
	(timer): Add friend class named_items.
	(auto_timevar::auto_timevar): Add timer param.
	(auto_timevar::~auto_timevar): Use field "m_timer".
	(auto_timevar::m_timer): New field.
	* toplev.c (initialize_rtl): Add g_timer as param when
	constructing auto_timevar instance.
	(toplev::toplev): Add "external_timer" param, and use it to
	initialize the "g_timer" global if non-NULL.
	(toplev::~toplev): If this created "g_timer", delete it.
	* toplev.h (toplev::toplev): Replace "use_TV_TOTAL" bool param
	with "external_timer" timer *.

gcc/jit/ChangeLog:
	* docs/topics/compatibility.rst (LIBGCCJIT_ABI_4): New.
	* docs/topics/contexts.rst (GCC_JIT_BOOL_OPTION_DUMP_SUMMARY):
	We no longer show a profile.
	* docs/topics/index.rst (Topic Reference): Add performance.rst.
	* docs/topics/performance.rst: New file.
	* docs/_build/texinfo/libgccjit.texi: Regenerate.
	* jit-playback.c (gcc::jit::playback::context::compile): Add timer
	param when constructing the "toplev" instance.
	(gcc::jit::playback::context::acquire_mutex): Add timer param when
	constructing auto_timevar instance.
	(gcc::jit::playback::context::make_fake_args): If we have a timer,
	add "-ftime-report".
	(gcc::jit::playback::context::invoke_driver): Add timer param when
	constructing auto_timevar instance.
	(gcc::jit::playback::context::dlopen_built_dso): Likewise.
	* jit-playback.h (gcc::jit::playback::context::get_timer): New accessor.
	* jit-recording.c: Include timevar.h.
	(gcc::jit::recording::context::context): Initialize field "m_timer".
	* jit-recording.h: Add forward declaration of class timer.
	(gcc::jit::recording::context::set_timer): New method.
	(gcc::jit::recording::context::get_timer): New method.
	(gcc::jit::recording::context::m_timer): New field.
	* libgccjit++.h (gccjit::timer): New class.
	(gccjit::auto_time): New class.
	(gccjit::context::set_timer): New method.
	(gccjit::context::get_timer): New.
	(gccjit::timer::timer): New.
	(gccjit::timer::push): New.
	(gccjit::timer::pop): New.
	(timer::print): New.
	(timer::get_inner_timer): New.
	(timer::release): New.
	(auto_time::auto_time): New.
	(auto_time::~auto_time): New.
	* libgccjit.c: Include timevar.h.
	(struct gcc_jit_timer): New.
	(gcc_jit_timer_new): New function.
	(gcc_jit_timer_release): New function.
	(gcc_jit_context_set_timer): New function.
	(gcc_jit_context_get_timer): New function.
	(gcc_jit_timer_push): New function.
	(gcc_jit_timer_pop): New function.
	(gcc_jit_timer_print): New function.
	* libgccjit.h (LIBGCCJIT_HAVE_TIMING_API): New macro.
	(gcc_jit_timer): New typedef.
	(gcc_jit_timer_new): New function.
	(gcc_jit_timer_release): New function.
	(gcc_jit_context_set_timer): New function.
	(gcc_jit_context_get_timer): New function.
	(gcc_jit_timer_push): New function.
	(gcc_jit_timer_pop): New function.
	(gcc_jit_timer_print): New function.
	* libgccjit.map (LIBGCCJIT_ABI_4): New.
	(gcc_jit_timer_new): New function.
	(gcc_jit_timer_release): New function.
	(gcc_jit_context_set_timer): New function.
	(gcc_jit_context_get_timer): New function.
	(gcc_jit_timer_push): New function.
	(gcc_jit_timer_pop): New function.
	(gcc_jit_timer_print): New function.

gcc/testsuite/ChangeLog:
	* jit.dg/test-benchmark.c (test_jit): Add param "timer" and use
	it to push/pop timing items.
	(main): For each optimization level, create a gcc_jit_timer, and
	time all of the iteration within that level cumulatively.
	* jit.dg/test-error-gcc_jit_timer_pop-mismatch.c: New test case.
	* jit.dg/test-error-gcc_jit_timer_pop-too-many.c: New test case.

From-SVN: r226530
2015-08-03 20:14:21 +00:00
Ian Lance Taylor ef9da28d8f compiler: Don't allow multiple function declarations.
Fixes golang/go#11573.
    
    Reviewed-on: https://go-review.googlesource.com/12508

From-SVN: r226529
2015-08-03 19:55:00 +00:00
Alexander Basov de0fb9055c re PR middle-end/64744 (ARM: gcc internal compiler error: in store_field, at expr.c:6659)
PR middle-end/64744
	PR middle-end/48470
	PR middle-end/43404
	* cfgexpand.c (expand_one_var): Add check if stack is going to
	be used in naked function.
	* expr.c (expand_expr_addr_expr_1): Remove excess checking
	whether expression should not reside in MEM.
	* function.c (use_register_for_decl): Do not use registers for
	non-register things (volatile, float, BLKMode) in naked functions.

	PR middle-end/64744
	PR middle-end/48470
	PR middle-end/43404
	* gcc.target/arm/pr43404.c : New testcase.
	* gcc.target/arm/pr48470.c : New testcase.
	* gcc.target/arm/pr64744-1.c : New testcase.
	* gcc.target/arm/pr64744-2.c : New testcase.

From-SVN: r226528
2015-08-03 13:34:31 -06:00
Ian Lance Taylor f2fef1c8a3 compiler: Don't make erroneous type descriptors.
There is no need to make type descriptors for named types when there
    are errors during package compilation.  Particularly, if the error in
    package compilation is from a malformed named type, there is no
    guarantee a type descriptor can be created.
    
    Fixes golang/go#11560.
    
    Reviewed-on: https://go-review.googlesource.com/12792

From-SVN: r226527
2015-08-03 18:53:56 +00:00
Ian Lance Taylor ca81dee392 libgo/testsuite: kill sleep process in gotest
This change modifies the "gotest" shell script
    to kill all processes, including "sleep", spawned
    by the timeout subshell. This prevents the sleep
    process from living beyond the gotest process.
    
    BACKGROUND
    
    The "gotest" shell script spawns "sleep" processes
    in the background to kill off test cases that run
    past their specified timeout. There are commands
    included that appear to kill the sleep process,
    but they only kill the parent shell, causing the
    sleep process to reparent.
    
    The orphaned sleep process can cause issues when
    gotest is run under some build systems, such as
    Ninja [0]. The particular issue with Ninja is the
    method it uses to identify terminated processes:
    it creates a pipe, passes the write end to the
    child process, and waits for EOF. In the case of
    libgo/gotest, the orphaned sleep process inherits
    the pipe FD and keeps it open for 4 minutes by
    default.
    
    [0] https://github.com/martine/ninja
    
    Reviewed-on: https://go-review.googlesource.com/12227

From-SVN: r226526
2015-08-03 18:23:42 +00:00
Ian Lance Taylor 3d6d2a63b2 re PR go/67101 (mprof.goc:408:5: error: calling ‘__builtin_frame_address’ with a nonzero argument is unsafe [-Werror=frame-address])
PR go/67101

    runtime: Remove call to __builtin_frame_address.
    
    __builtin_frame_address was only supposed to use nonzero arguments
    for debugging purposes.  Calling it with nonzero arguments can have
    unpredictable results and uses are now marked unsafe when
    -Wframe-address is enabled.
    
    Reviewed-on: https://go-review.googlesource.com/13063

From-SVN: r226525
2015-08-03 17:54:50 +00:00
John David Anglin 8a9212788d re PR target/67060 (FAIL: gcc.dg/pr56228.c (test for excess errors))
PR target/67060
	* config/pa/pa.md (call_reg_64bit): Remove reg:DI 1 clobber.
	Adjust splits to match new pattern.

From-SVN: r226522
2015-08-03 17:26:19 +00:00
Michael Meissner c477a66743 vector.md (VEC_L): Add KFmode and TFmode.
2015-08-03  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/vector.md (VEC_L): Add KFmode and TFmode.
	(VEC_M): Likewise.
	(VEC_N): Likewise.
	(mov<mode>, VEC_M iterator): Add support for IEEE 128-bit floating
	point in VSX registers.

	* config/rs6000/constraints.md (wb constraint): Document unused
	w<x> constraint.
	(we constraint): Likewise.
	(wo constraint): Likewise.
	(wp constraint): New constraint for IEEE 128-bit floating point in
	VSX registers.
	(wq constraint): Likewise.

	* config/rs6000/predicates.md (easy_fp_constant): Add support for
	IEEE 128-bit floating point in VSX registers.
	(easy_scalar_constant): Likewise.

	* config/rs6000/rs6000.c (rs6000_debug_reg_global): Add new
	constraints (wp, wq) for IEEE 128-bit floating point in VSX
	registers.
	(rs6000_init_hard_regno_mode_ok): Likewise.

	* config/rs6000/vsx.md (VSX_LE_128): Add support for IEEE 128-bit
	floating point in VSX registers.
	(VSX_L): Likewise.
	(VSX_M): Likewise.
	(VSX_M2): Likewise.
	(VSm): Likewise.
	(VSs): Likewise.
	(VSr): Likewise.
	(VSa): Likewise.
	(VSv): Likewise.
	(vsx_le_permute_<mode>): Add support to properly swap bytes for
	IEEE 128-bit floating point in VSX registers on little endian.
	(vsx_le_undo_permute_<mode>): Likewise.
	(vsx_le_perm_load_<mode>): Likewise.
	(vsx_le_perm_store_<mode>): Likewise.
	(splitters for IEEE 128-bit fp moves): Likewise.

	* config/rs6000/rs6000.h (enum r6000_reg_class_enum): Add wp and
	wq constraints.

	* config/rs6000/altivec.md (VM): Add support for IEEE 128-bit
	floating point in VSX registers.
	(VM2): Likewise.

	* doc/md.text (Machine Constraints): Document wp and wq
	constraints on PowerPC.

From-SVN: r226520
2015-08-03 17:06:24 +00:00
H.J. Lu 472fd3cce4 Add a testcase for PR tree-optimization/67077
PR tree-optimization/67077
	* gcc.dg/pr67077.c: New test.

From-SVN: r226518
2015-08-03 09:58:03 -07:00
Steven G. Kargl 5c4aa279fe re PR fortran/66942 (trans-expr.c:5701 runtime error: member call on null pointer of type 'struct vec')
2015-08-03  Steven G. Kargl  <kargl@gcc.gnu.org>

	PR fortran/66942
	* trans-expr.c (gfc_conv_procedure_call): Avoid NULL pointer reference

From-SVN: r226517
2015-08-03 16:56:39 +00:00
Jeff Law c2a96ec20f re PR middle-end/66314 (ice in verify_loop_structure)
PR middle-end/66314
	PR gcov-profile/66899
	* tree-ssa-threadupdate.c (mark_threaded_blocks): Correctly
	iterate over the jump threading paths when an element in the
	jump threading paths array is eliminated.

	PR middle-end/66314
	PR gcov-profile/66899
	* gcc.dg/pr66899.c: New test.
	* gcc.dg/pr66314.c: New test.

From-SVN: r226516
2015-08-03 10:26:13 -06:00
Jonathan Wakely 93411db8c7 re PR libstdc++/67078 (FAIL: 24_iterators/container_access.cc (test for excess errors) on aarch64-none-elf)
PR libstdc++/67078
	* include/bits/range_access.h (size, empty, data): Fix _N bad name.

From-SVN: r226515
2015-08-03 16:56:17 +01:00
Segher Boessenkool 0027ed3d7a * Makefile.in (OBJS): Put gimple-match.o and generic-match.o first.
From-SVN: r226514
2015-08-03 17:33:45 +02:00
Patrick Palka c0503346d8 Avoid recomputing the defining predicate chains for the same PHI
gcc/ChangeLog:

	* tree-ssa-uninit.c (find_uninit_use): Declare and pass to
	is_use_properly_guarded the variable def_preds.  Free its
	contents before returning.
	(prune_uninit_phi_opnds_in_unrealizable_paths): Same.
	(is_use_properly_guarded): Replace local variable def_preds with
	a parameter.  Adjust accordingly.  Only update *def_preds if it's
	the empty vector.

From-SVN: r226511
2015-08-03 14:57:25 +00:00
Marek Polacek 420a9d9bd8 re PR c/67088 (Incorrect location of error on invalid type used in bit-field declaration)
PR c/67088
	* c-decl.c (check_bitfield_type_and_width): Add location parameter.
	Use it.
	(grokdeclarator): Pass LOC down to check_bitfield_type_and_width.

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

From-SVN: r226506
2015-08-03 13:55:28 +00:00
Richard Biener 5030111533 genmatch.c (simplify::for_subst_vec): New member.
2015-08-03  Richard Biener  <rguenther@suse.de>

	* genmatch.c (simplify::for_subst_vec): New member.
	(binary_ok): New helper for for lowering.
	(lower_for): Delay substituting operators into result expressions
	if we can merge the results eventually again.
	(capture_info::walk_result): Adjust for user_id appearing as
	result expression operator.
	(expr::gen_transform): Likewise.
	(dt_simplify::gen_1): Likewise.
	(dt_simplify::gen): Pass not substituted operators to tail
	functions or initialize local variable with it.
	(decision_tree::gen): Adjust function signature.
	* match.pd: Fix tests against global code and add default
	cases to switch stmts.

From-SVN: r226505
2015-08-03 13:45:22 +00:00
Richard Biener d4b71b95fe genmatch.c (simplify::for_subst_vec): New member.
2015-08-03  Richard Biener  <rguenther@suse.de>

	* genmatch.c (simplify::for_subst_vec): New member.
	(binary_ok): New helper for for lowering.
	(lower_for): Delay substituting operators into result expressions
	if we can merge the results eventually again.
	(capture_info::walk_result): Adjust for user_id appearing as
	result expression operator.
	(expr::gen_transform): Likewise.
	(dt_simplify::gen_1): Likewise.
	(dt_simplify::gen): Pass not substituted operators to tail
	functions or initialize local variable with it.
	(decision_tree::gen): Adjust function signature.
	* match.pd: Fix tests against global code and add default
	cases to switch stmts.

From-SVN: r226504
2015-08-03 13:28:46 +00:00
Richard Biener 1d2fdec6bc genmatch.c (dt_simplify::gen): Create captures array with an initializer.
2015-08-03  Richard Biener  <rguenther@suse.de>

	* genmatch.c (dt_simplify::gen): Create captures array
	with an initializer.

From-SVN: r226503
2015-08-03 13:20:22 +00:00
Ulrich Weigand 4c0cca1801 configure.ac: Set aliasing_flags to -fno-strict-aliasing if...
gcc/ChangeLog:

	* configure.ac: Set aliasing_flags to -fno-strict-aliasing if
	the host compiler is affected by placement new aliasing bug.
	* configure: Regenerate.
	* Makefile.in (ALIASING_FLAGS): New variable.
	(ALL_CXXFLAGS): Add $(ALIASING_FLAGS).

From-SVN: r226499
2015-08-03 11:48:57 +00:00
Szabolcs Nagy 1f71aee9c1 [ARM] PR target/66731 Fix vnmul insn with -frounding-math
gcc:

	PR target/66731
	* config/arm/vfp.md (negmuldf3_vfp): Add new pattern.
	(negmulsf3_vfp): Likewise.
	(muldf3negdf_vfp): Disable for -frounding-math.
	(mulsf3negsf_vfp): Likewise.
	* config/arm/arm.c (arm_new_rtx_costs): Fix NEG cost for VNMUL,
	fix MULT cost with -frounding-math.

gcc/testsuite:

	PR target/66731
	* gcc.target/arm/vnmul-1.c: New.
	* gcc.target/arm/vnmul-2.c: New.
	* gcc.target/arm/vnmul-3.c: New.
	* gcc.target/arm/vnmul-4.c: New.

From-SVN: r226496
2015-08-03 11:12:00 +00:00
Mikael Morin 2ab320ad36 Fix random class_allocate_18.f90 failure
PR fortran/64921
gcc/fortran/
	* class.c (generate_finalization_wrapper): Set finalization
	procedure symbol's always_explicit attribute.
gcc/testsuite/
	* gfortran.dg/class_allocate_20.f90: New.

From-SVN: r226493
2015-08-03 10:03:55 +00:00
Kyrylo Tkachov 44fef04ab1 [RTL-ifcvt] Improve conditional select ops on immediates
* ifcvt.c (noce_try_store_flag_constants): Make logic of the case
	when diff == STORE_FLAG_VALUE or diff == -STORE_FLAG_VALUE more
	explicit.  Prefer to add the flag whenever possible.
	(noce_process_if_block): Try noce_try_store_flag_constants before
	noce_try_cmove.

	* gcc.target/aarch64/csel_bfx_1.c: New test.
	* gcc.target/aarch64/csel_imms_inc_1.c: Likewise.

From-SVN: r226491
2015-08-03 08:14:42 +00:00
Richard Biener 03038b8b7a genmatch.c (struct sinfo, [...]): New hash-map to record equivalent transforms.
2015-08-03  Richard Biener  <rguenther@suse.de>

	* genmatch.c (struct sinfo, struct sinfo_hashmap_traits, sinfo_map_t):
	New hash-map to record equivalent transforms.
	(dt_node::analyze): Populate the equivalent transforms hash-map.
	(dt_simplify::info): Add reference to hash-map entry.
	(dt_simplify::gen): If we have split out a function for the
	transform, generate a call to it.
	(sinfo_hashmap_traits::hash): New function.
	(compare_op): New helper function for ...
	(sinfo_hashmap_traits::equal_keys): ... this new function.
	(decision_tree::gen): Split out common equivalent transforms
	into functions.

From-SVN: r226490
2015-08-03 07:39:12 +00:00
Richard Biener 5c099d40da gimple-fold.c (fold_gimple_assign): Remove folding of the comparison in COND_EXPRs.
2015-08-03  Richard Biener  <rguenther@suse.de>

	* gimple-fold.c (fold_gimple_assign): Remove folding of
	the comparison in COND_EXPRs.

From-SVN: r226489
2015-08-03 07:28:11 +00:00
Richard Biener a0c012fda9 gimple-match-head.c (gimple_simplify): For [VEC_]COND_EXPRs on the rhs of assignments first simplify the embedded...
2015-08-03  Richard Biener  <rguenther@suse.de>

	* gimple-match-head.c (gimple_simplify): For [VEC_]COND_EXPRs
	on the rhs of assignments first simplify the embedded
	GENERIC condition.

From-SVN: r226488
2015-08-03 07:27:40 +00:00
Richard Biener 52639a6165 re PR tree-optimization/66917 (ARM: NEON: memcpy compiles to vst1 with incorrect alignment)
2015-08-03  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/66917
	* tree-vectorizer.h (struct dataref_aux): Add base_element_aligned
	field.
	(DR_VECT_AUX): New macro.
	(set_dr_misalignment): Adjust.
	(dr_misalignment): Likewise.
	* tree-vect-data-refs.c (vect_compute_data_ref_alignment):
	Compute whether the base is at least element aligned.
	* tree-vect-stmts.c (ensure_base_align): Adjust.
	(vectorizable_store): If the base is not element aligned
	preserve alignment of the original access if misalignment is unknown.
	(vectorizable_load): Likewise.

From-SVN: r226487
2015-08-03 07:13:36 +00:00
Bin Cheng 94b8fdccca MAINTAINERS (loop ivopts): Add the entry and myself.
* MAINTAINERS (loop ivopts): Add the entry and myself.

From-SVN: r226486
2015-08-03 01:54:28 +00:00
GCC Administrator 839a1d4aed Daily bump.
From-SVN: r226483
2015-08-03 00:16:11 +00:00
Martin Sebor 8423e57caa c.opt (-Wframe-address): New warning option.
gcc/ChangeLog
2015-07-28  Martin Sebor  <msebor@redhat.com>

    * c-family/c.opt (-Wframe-address): New warning option.
    * doc/invoke.texi (Wframe-address): Document it.
    * doc/extend.texi (__builtin_frame_address, __builtin_return_address):
    Clarify possible effects of calling the functions with non-zero
    arguments and mention -Wframe-address.
    * builtins.c (expand_builtin_frame_address): Handle -Wframe-address.

gcc/testsuite/ChangeLog
2015-07-28  Martin Sebor  <msebor@redhat.com>

    * g++.dg/Wframe-address-in-Wall.C: New test.
    * g++.dg/Wframe-address.C: New test.
    * g++.dg/Wno-frame-address.C: New test.
    * gcc.dg/Wframe-address-in-Wall.c: New test.
    * gcc.dg/Wframe-address.c: New test.
    * gcc.dg/Wno-frame-address.c: New test.

From-SVN: r226480
2015-08-02 17:14:18 -06:00
Patrick Palka 8ebca419e8 Improve -Wmisleading-indentation heuristics
gcc/c-family/ChangeLog:

	* c-indentation.c (should_warn_for_misleading_indentation):
	Improve heuristics.

gcc/testsuite/ChangeLog:

	* c-c++-common/Wmisleading-indentation.c: Add more tests.

From-SVN: r226479
2015-08-02 17:39:23 +00:00
Patrick Palka 1a1e101ff5 Remove is_first_nonwhitespace_on_line(), instead improve get_visual_column()
gcc/c-family/ChangeLog:

	* c-indentation.c (get_visual_column): Add parameter first_nws,
	use it.  Update comment documenting the function.
	(is_first_nonwhitespace_on_line): Remove.
	(should_warn_for_misleading_indentation): Replace usage of
	of is_first_nonwhitespace_on_line with get_visual_column.

From-SVN: r226478
2015-08-02 17:35:33 +00:00
Patrick Palka 992118a1f9 Refactor entry point to -Wmisleading-indentation
gcc/c-family/ChangeLog:

	* c-indentation.h (struct token_indent_info): Define.
	(get_token_indent_info): Define.
	(warn_for_misleading_information): Declare.
	* c-common.h (warn_for_misleading_information): Remove.
	* c-identation.c (warn_for_misleading_indentation):
	Change declaration to take three token_indent_infos.  Adjust
	accordingly.
	* c-identation.c (should_warn_for_misleading_indentation):
	Likewise.  Bail out early if the body is a compound statement.
	(guard_tinfo_to_string): Define.

gcc/c/ChangeLog:

	* c-parser.c (c_parser_if_body): Take token_indent_info
	argument. Call warn_for_misleading_indentation even when the
	body is a semicolon.  Extract token_indent_infos corresponding
	to the guard, body and next tokens.  Adjust call to
	warn_for_misleading_indentation accordingly.
	(c_parser_else_body): Likewise.
	(c_parser_if_statement): Likewise.
	(c_parser_while_statement): Likewise.
	(c_parser_for_statement): Likewise.

gcc/cp/ChangeLog:

	* parser.c (cp_parser_selection_statement): Move handling of
	semicolon body to ...
	(cp_parser_implicitly_scoped_statement): .. here.  Call
	warn_for_misleading_indentation even when the body is a
	semicolon.  Extract token_indent_infos corresponding to the
	guard, body and next tokens.  Adjust call to
	warn_for_misleading_indentation accordingly.  Take
	token_indent_info argument.
	(cp_parser_already_scoped_statement): Likewise.
	(cp_parser_selection_statement, cp_parser_iteration_statement):
	Extract a token_indent_info corresponding to the guard token.

From-SVN: r226477
2015-08-02 17:31:55 +00:00
Michael Collison fea8f6c692 arm.md (*arm_smin_cmp): New pattern.
2015-08-01  Michael Collison  <michael.collison@linaro.org
	    Ramana Radhakrishnan  <ramana.radhakrishnan@linaro.org>

	* gcc/config/arm/arm.md (*arm_smin_cmp): New pattern.
	(*arm_umin_cmp): Likewise.

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

From-SVN: r226476
2015-08-02 05:15:55 +00:00
Caroline Tice b0cca5ecbb re PR bootstrap/66521 (xgcc: cc1plus segfaults when compiling libstdc++-v3/src/c++11/ostream-inst.cc)
Fix PR 66521

libvtv/ChangeLog

2015-08-01  Caroline Tice  <cmtice@google.com>

        PR 66521
        * Makefile.am: Update to match latest tree.
        * Makefile.in: Regenerate.
        * testsuite/lib/libvtv: Brought up to date.
        * vtv_malloc.cc (VTV_DEBUG): Update function call to match renamed
        function (old bug!).
        * vtv_rts.cc (debug_functions, debug_init, debug_verify_vtable): Update
        initializations to work correctly with VTV_DEBUG defined.

gcc/ChangeLog:

2015-08-01  Caroline Tice  <cmtice@google.com>

        PR 66521
        * vtable-verify.c (vtbl_mangled_name_types, vtbl_mangled_name_ids): New
        global variables.
        (vtbl_find_mangled_name):  New function.
        (vtbl_register_mangled_name):  New function.
        (vtbl_map_get_node):  If DECL_ASSEMBLER_NAME is "<anon>", look up
        mangled name in mangled name vectors.
        (find_or_create_vtbl_map_node):  Ditto.
        (var_is_used_for_virtual_call_p):  Add recursion_depth parameter;
        update recursion_depth on function entry; pass it to every recursive
        call; automatically exit if depth > 25 (give up looking at that point).
        (verify_bb_vtables):  Initialize recursion_depth and pass it to
        var_is_used_for_virtual_call_p.
        * vtable-verify.h (vtbl_mangbled_name_types, vtbl_mangled_name_ids): New
        global variable decls.
        (vtbl_register_mangled_name): New extern function decl.

gcc/cp/ChangeLog:
2015-08-01  Caroline Tice  <cmtice@google.com>

        PR 66521
        * mangle.c : Add vtable-verify.h to include files.
        (get_mangled_vtable_map_var_name):  If the DECL_ASSEMBLER_NAME
        is "<anon>" get the real mangled name for the class instead, and
        also store the real mangled name in a vector for use later.

From-SVN: r226471
2015-08-01 18:17:39 -07:00
GCC Administrator 68e3e6a259 Daily bump.
From-SVN: r226468
2015-08-02 00:16:12 +00:00
Paul Thomas 28ed836457 re PR fortran/67091 ([OOP] Bad result for type-bound procedures returning pointers to the intrinsic function ASSOCIATED)
2015-08-01  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/67091
	* trans-intrinsic.c (gfc_conv_associated): Add the pre and post
	blocks for the second argument to se.

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

	PR fortran/67091
	* gfortran.dg/associated_target_6.f03: New test

From-SVN: r226464
2015-08-01 18:37:25 +00:00
Tom de Vries 805134b917 Allow non-overflow ops in reductions
2015-08-01  Tom de Vries  <tom@codesourcery.com>

	* tree.c (operation_can_overflow, operation_no_trapping_overflow): New
	function.
	* tree.h (operation_can_overflow, operation_no_trapping_overflow):
	Declare.
	* tree-vect-loop.c (vect_is_simple_reduction_1): Use
	operation_no_trapping_overflow.  Allow non-overflow operations.
	* graphite-sese-to-poly.c (is_reduction_operation_p): Allow non-overflow
	operations.

	* gcc.dg/autopar/reduc-2char.c (init_arrays): Mark with attribute
	optimize ("-ftree-parallelize-loops=0").
	Add successful scans for 2 detected reductions.	 Add xfail scans for 3
	detected reductions.
	* gcc.dg/autopar/reduc-2short.c: Same.
	* gcc.dg/autopar/reduc-8.c (init_arrays): Mark with attribute
	optimize ("-ftree-parallelize-loops=0").  Add successful scans for 2
	detected reductions.
	* gcc.dg/vect/trapv-vect-reduc-4.c: Update scan to match vectorized min
	and max reductions.

From-SVN: r226463
2015-08-01 08:29:29 +00:00
GCC Administrator faf4ac3218 Daily bump.
From-SVN: r226462
2015-08-01 00:16:16 +00:00
Ian Lance Taylor 1393eb7608 compiler: Report errors for malformed builtin calls.
Errors reported from malformed builtin calls are handled in a later
    pass than the one in which they are detected.  If a malformed builtin
    call is lowered into an error expression too early, these errors will
    never be reported.
    
    Fixes golang/go#11561.
    
    Reviewed-on: https://go-review.googlesource.com/12778

From-SVN: r226459
2015-07-31 23:17:49 +00:00
Kaz Kojima 1fc642f1a7 re PR target/67049 (sh64-elf: internal compiler error: in df_uses_record, at df-scan.c:3001)
PR target/67049
* config/sh/sh.md (GOTaddr2picreg): Fix typo added with the last change.

From-SVN: r226457
2015-07-31 22:19:51 +00:00
Ian Lance Taylor 04628a1d33 compiler: Check the type in function declarations.
Function declarations don't create a block where the variables listed
    in the parameter list are declared.  Because there are no variables
    declared, the types of the parameter variables is unchecked, allowing
    for invalid values to be used as the type.  This patch adds a special
    case to the check_types pass for function declarations.
    
    Fixes golang/go#11567.
    
    Reviewed-on: https://go-review.googlesource.com/12662

From-SVN: r226456
2015-07-31 22:16:12 +00:00
Ian Lance Taylor 3176040661 compiler: Update unicode tables.
Fixes golang/go#11569.
    
    Reviewed-on: https://go-review.googlesource.com/12652

From-SVN: r226452
2015-07-31 19:11:18 +00:00
Nathan Sidwell 430bcac10d * MAINTAINERS (nvptx): Add self.
From-SVN: r226449
2015-07-31 17:54:31 +00:00
Ian Lance Taylor 2e2fc3bd51 compiler: Don't allow builtin function values.
According to the spec, http://golang.org/ref/spec#Built-in_functions:
    "built-in functions do not have standard Go types, so they can only
    appear in call expressions; they cannot be used as function values."
    
    Fixes golang/go#11570.
    
    Reviewed-on: https://go-review.googlesource.com/12543

From-SVN: r226448
2015-07-31 17:52:38 +00:00
Kyrylo Tkachov d459fde28f [ARM][2/3] Make if_neg_move and if_move_neg into insn_and_split
* config/arm/arm.md (*if_neg_move): Convert to insn_and_split.
	Enable for TARGET_32BIT.
	(*if_move_neg): Likewise.

From-SVN: r226447
2015-07-31 16:39:35 +00:00
Nick Clifton c0a5daa401 m32r.c (m32r_attribute_identifier): New function.
* config/m32r/m32r.c (m32r_attribute_identifier): New function.
	Returns true for __model__.
	(TARGET_ATTRIBUTE_TAKES_IDENTIFIER_P): Define.

From-SVN: r226445
2015-07-31 15:55:16 +00:00