Commit Graph

152962 Commits

Author SHA1 Message Date
Jeff Law d904a98328 re PR target/74563 (Classic MIPS16 (non-MIPS16e) function return broken)
PR target/74563
	* mips.md ({return,simple_return}_internal): Do not overwrite
	operands[0].

	PR target/74563
	* gcc.target/mips/pr74563: New test.

From-SVN: r246987
2017-04-18 22:52:54 -06:00
GCC Administrator 90e87d4f1a Daily bump.
From-SVN: r246986
2017-04-19 00:16:17 +00:00
Jakub Jelinek 0155ed56af re PR tree-optimization/80443 (ICE on valid code at -O2 on x86_64-linux-gnu: in set_value_range, at tree-vrp.c:367)
PR tree-optimization/80443
	* tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
	instead of adding 1, subtract -1 and similarly instead of subtracting
	1 add -1.

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

From-SVN: r246981
2017-04-18 21:17:32 +02:00
Richard Sandiford f380f60822 re PR rtl-optimization/80357 (ICE in model_update_limit_points_in_group, at haifa-sched.c:1982 on powerpc64le-linux-gnu)
gcc/
	PR rtl-optimization/80357
	* haifa-sched.c (tmp_bitmap): New variable.
	(model_recompute): Handle duplicate use records.
	(alloc_global_sched_pressure_data): Initialize tmp_bitmap.
	(free_global_sched_pressure_data): Free it.

gcc/testsuite/
	PR rtl-optimization/80357
	* gcc.c-torture/compile/pr80357.c: New test.

From-SVN: r246980
2017-04-18 12:49:19 -06:00
Bernd Edlinger 7754ee3577 revert: Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        Revert:
        2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
        * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
        (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
        instead of SYSTEM_HEADER_DIR.

From-SVN: r246979
2017-04-18 18:10:27 +00:00
Jeff Law dd68669b66 re PR middle-end/80422 (ICE on valid code at -O3 in 32-bit mode on x86_64-linux-gnu: in operator[], at vec.h:732)
PR middle-end/80422
	* cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
	predecessors after walking up the insn chain.

	PR middle-end/80422
	* gcc.c-torture/compile/pr80422.c: New test.

From-SVN: r246975
2017-04-18 11:31:30 -06:00
Jakub Jelinek 1cda61fc28 re PR debug/80263 (gcc's internal type "sizetype" leaks out as base type name in the DWARF info)
PR debug/80263
	* dwarf2out.c (modified_type_die): Try harder not to emit internal
	sizetype type into debug info.

	* gcc.dg/debug/dwarf2/pr80263.c: New test.

From-SVN: r246973
2017-04-18 18:58:48 +02:00
Michael Meissner 1997025337 re PR target/80099 (ICE in rs6000_expand_vector_extract, at config/rs6000/rs6000.c:7450)
[gcc]
2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/80099
	* config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
	unneeded test for TARGET_UPPER_REGS_SF.
	* config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.

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

	PR target/80099
	* gcc.target/powerpc/pr80099-1.c: New test.
	* gcc.target/powerpc/pr80099-2.c: Likewise.
	* gcc.target/powerpc/pr80099-3.c: Likewise.
	* gcc.target/powerpc/pr80099-4.c: Likewise.
	* gcc.target/powerpc/pr80099-5.c: Likewise.

From-SVN: r246972
2017-04-18 16:41:06 +00:00
Jakub Jelinek 3b5fb3cb5b re PR sanitizer/80444 (-fcompare-debug failures with -fsanitize-coverage=trace-pc)
PR sanitizer/80444
	* sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
	instead of gsi_after_labels.

	* gcc.dg/sancov/pr80444.c: New test.

From-SVN: r246971
2017-04-18 17:02:06 +02:00
Jeff Law d1446456c3 regcprop.c (maybe_mode_change): Avoid creating copies of the stack pointer.
* regcprop.c (maybe_mode_change): Avoid creating copies of the
	stack pointer.

	Revert:
	2017-04-13  Jeff Law  <law@redhat.com>
	* config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
	in operands[1] if it is a MEM and TARGET_MIPS16 is active.

From-SVN: r246970
2017-04-18 09:00:43 -06:00
Georg-Johann Lay 8c468e1dcd Typo.
From-SVN: r246969
2017-04-18 13:25:42 +00:00
Georg-Johann Lay dddc273f0e re PR c++/79435 (ICE on invalid C++ code (with member access into an incomplete type) on x86_64-linux-gnu: Segmentation fault)
gcc/
	PR target/79435
	* config/avr/avr.c (intl.h): Include it.
	(avr_pgm_check_var_decl) [reason]: Wrap	diagnostic snippets into _().

From-SVN: r246966
2017-04-18 13:15:47 +00:00
Jakub Jelinek 8487c9a550 re PR middle-end/79788 (ICE in expand_expr_real_2, at expr.c:9557)
PR middle-end/79788
	PR middle-end/80375
	* c-common.c (c_common_type_for_mode): Don't handle
	widest_*_literal_type_node here.
	c_common_signed_or_unsigned_type): Likewise.
	(c_common_nodes_and_builtins): Set widest_*_literal_type_node
	to *intTI_type_node or *intDI_type_node depending on whether
	TImode is supported by the target or not.

	* gcc.dg/pr79788-1.c: New test.
	* gcc.dg/pr79788-2.c: New test.

From-SVN: r246965
2017-04-18 15:15:46 +02:00
Jonathan Wakely 38d68cf0f5 Fix incorrect results from std::boyer_moore_searcher
* include/std/functional (default_searcher, __boyer_moore_array_base)
	(__is_std_equal_to, __boyer_moore_base_t, boyer_moore_searcher)
	(boyer_moore_horspool_searcher): Remove redundant namespace
	qualification.
	(default_searcher::operator()): Construct return value early and
	advance second member in-place.
	(boyer_moore_horspool_searcher::operator()): Increment random access
	iterator directly instead of using std::next.
	(boyer_moore_searcher::operator()): Fix return value.
	* testsuite/20_util/function_objects/searchers.cc: Check both parts
	of return values.

From-SVN: r246964
2017-04-18 12:08:00 +01:00
Marek Polacek d6e3e8a54c PR c++/80241 - ICE with alignas pack expansion.
* error.c (dump_expr): Handle TREE_LIST.
	* parser.c (cp_parser_std_attribute_list): Return error_mark if
	make_pack_expansion returns an error.

	* g++.dg/cpp0x/alignas11.C: New test.

From-SVN: r246963
2017-04-18 09:38:55 +00:00
Marek Polacek be7c73ae35 PR c++/80244 - ICE with attribute in template alias.
* tree.c (strip_typedefs): Handle UNDERLYING_TYPE.

	* g++.dg/cpp0x/alias-decl-59.C: New test.

From-SVN: r246962
2017-04-18 09:34:10 +00:00
Martin Liska 6397118495 Validate that destination gcov file does not exist for gcov-tool (PR gcov-profile/78783).
2017-04-18  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/78783
	* libgcov-driver.c (gcov_get_filename): New function.
2017-04-18  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/78783
	* gcov-tool.c (gcov_output_files): Validate that destination
	file is either removed by the tool or by a user.

From-SVN: r246961
2017-04-18 07:24:20 +00:00
GCC Administrator 4c6a5d87fd Daily bump.
From-SVN: r246960
2017-04-18 00:16:21 +00:00
Ian Lance Taylor ea250f5612 libgo: update to Go 1.8.1 release
Reviewed-on: https://go-review.googlesource.com/40775

From-SVN: r246957
2017-04-17 22:10:58 +00:00
Bernd Edlinger 1adb82e117 017-04-17 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR c++/80287
        * class.c (fixup_may_alias): Fix all type variants.

gcc/testsuite
2017-04-17  Bernd Edlinger  <bernd.edlinger@hotmail.de> 

        PR c++/80287
        * g++.dg/lto/pr80287_0.C: New test.

From-SVN: r246955
2017-04-17 20:41:40 +00:00
Jason Merrill d478f1e4c9 PR c++/80415 - wrong error with default arg and array reference.
* tree.c (lvalue_kind): Return clk_class for an array prvalue.

From-SVN: r246954
2017-04-17 15:39:00 -04:00
Jason Merrill 6864d84921 * pt.c (tsubst_init): Set TARGET_EXPR_DIRECT_INIT_P.
From-SVN: r246953
2017-04-17 15:24:31 -04:00
Paul Thomas 4e64ba0091 re PR fortran/80440 (Slow compile when USEing modules)
2017-04-17  Paul Thomas  <pault@gcc.gnu.org>

	PR fortran/80440
	* module.c (find_symtree_for_symbol): Delete.
	(read_module): Remove the call to the above.

From-SVN: r246952
2017-04-17 18:22:03 +00:00
Kelvin Nilsen fb5e562100 re PR target/80315 (Calling __builtin_crypto_vshasigmaw with argument 3 out of range creates an unrecognizable insn)
gcc/testsuite/ChangeLog:

2017-04-12  Kelvin Nilsen  <kelvin@gcc.gnu.org>

	PR target/80315
	* gcc.target/powerpc/pr80315-1.c: New test.
	* gcc.target/powerpc/pr80315-2.c: New test.
	* gcc.target/powerpc/pr80315-3.c: New test.
	* gcc.target/powerpc/pr80315-4.c: New test.

From-SVN: r246949
2017-04-17 16:16:43 +00:00
GCC Administrator bec851e00e Daily bump.
From-SVN: r246948
2017-04-17 00:16:17 +00:00
Tom de Vries afeaeb708e Remove braces around line number in dejagnu directive
2017-04-16  Tom de Vries  <tom@codesourcery.com>

	* g++.dg/parse/error11.C: Remove braces around line number in dejagnu
	  directive.
	* g++.dg/parse/error3.C: Same.
	* g++.old-deja/g++.pt/niklas01a.C: Same.
	* gcc.dg/990506-0.c: Same.
	* gcc.dg/cpp/19990413-1.c: Same.
	* gcc.dg/cpp/pragma-1.c: Same.
	* gcc.dg/cpp/pragma-2.c: Same.
	* gcc.dg/m-un-2.c: Same.
	* objc.dg/private-1.m: Same.

From-SVN: r246945
2017-04-16 08:17:14 +00:00
GCC Administrator 974c3b5485 Daily bump.
From-SVN: r246944
2017-04-16 00:16:16 +00:00
Uros Bizjak 604f37cde8 pr54669.c: Fix dg-do directive.
* gcc.dg/pr54669.c: Fix dg-do directive.
	* gcc.dg/pr78582.c: Ditto.
	* gcc.dg/pr80020.c: Ditto.
	* gcc.dg/torture/pr57993-2.cpp: Ditto.
	* gcc.dg/tree-ssa/builtin-sprintf-3.c: Ditto.
	* gcc.dg/tree-ssa/builtin-sprintf-4.c: Ditto.
	* gcc.dg/tree-ssa/builtin-sprintf-5.c: Ditto.
	* gcc.dg/tree-ssa/builtin-sprintf-6.c: Ditto.
	* gcc.dg/tree-ssa/builtin-sprintf-warn-5.c: Ditto.
	* gcc.dg/tree-ssa/pr79327-2.c: Ditto.
	* gcc.dg/tree-ssa/pr79352.c: Ditto.
	* gcc.dg/tree-ssa/pr79376.c: Ditto.
	* gcc.dg/tree-ssa/pr79691.c: Ditto.

From-SVN: r246941
2017-04-15 22:07:47 +02:00
Dominique d'Humieres 35cfdb17fa deferred_character_3.f90: Fix dg directive.
2017-04-15  Dominique d'Humieres  <dominiq@lps.ens.fr>

	* gfortran.dg/deferred_character_3.f90: Fix dg directive.
	* gfortran.dg/generic_29.f90: Likewise.
	* gfortran.dg/goacc/multi-clause.f90: Likewise.
	* gfortran.dg/pr41922.f90: Likewise.
	* gfortran.dg/pr70006.f90: Likewise.

From-SVN: r246940
2017-04-15 20:17:11 +02:00
Segher Boessenkool f378be388e rs6000: Testcase 20050830-1.c no longer fails (PR66612)
Bin's commit r246810, for PR80153, fixes 20050830-1.c for -m64 (it
already passed for -m32).  So, this patch removes the remaining xfail.


gcc/testsuite/
	PR tree-optimization/66612
	* gcc.target/powerpc/20050830-1.c: Remove xfail.

From-SVN: r246939
2017-04-15 06:11:35 +02:00
Alexandre Oliva e072b0c410 [libcp1] handle anon aggregates linkage-named by typedefs
Arrange for the first typedef to an anonymous type in the same context
to be used as the linkage name for the type.

for  gcc/cp/ChangeLog

	* decl.c (name_unnamed_type): Split out of...
	(grokdeclarator): ... this.
	* decl.h (name_unnamed_type): Declare.

for  libcc1/ChangeLog

	* libcp1plugin.cc (plugin_build_decl): Call name_unnamed_type.

From-SVN: r246938
2017-04-15 03:28:31 +00:00
GCC Administrator 51477ac2b9 Daily bump.
From-SVN: r246937
2017-04-15 00:16:19 +00:00
Janus Weil 4307649214 re PR fortran/80361 ([OOP] bogus recursive call to nonrecursive procedure with -fcheck=recursion)
2017-04-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80361
	* class.c (generate_finalization_wrapper): Give the finalization wrapper
	the recursive attribute.

2017-04-14  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/80361
	* gfortran.dg/class_62.f90: New test case.

From-SVN: r246934
2017-04-14 23:17:52 +02:00
Andrew Burgess dd3d6a42fc arc: Fix for loop end detection
We use a negative ID number to link together the doloop_begin and
doloop_end instructions.  This negative ID number is setup within
doloop_begin, at this point the ID is stored into the loop end
instruction (doloop_end_i) and placed into the doloop_begin_i
instruction.

In arc.c (arc_reorg) we extract the ID from the doloop_end_i
instruction in order to find the matching doloop_begin_i instruction,
though the ID is only used in some cases.

Currently in arc_reorg when we extract the ID we negate it.  This
negation is invalid.  The ID stored in both doloop_end_i and
doloop_begin_i is already negative, the negation in arc_reorg means
that if we need to use the ID to find the doloop_begin_i then we will
never find it (as the IDs will never match).

This commit removes the unneeded negation, moves the extraction of the
ID into a more appropriately scoped block and adds a new test for this
issue.

gcc/ChangeLog:

	* config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
	block, and do not negate it, the stored id is already negative.

gcc/testsuite/ChangeLog:

	* gcc.target/arc/loop-1.c: New file.


Co-Authored-By: Guy Benyei <guybe@mellanox.com>

From-SVN: r246933
2017-04-14 22:14:34 +01:00
Andrew Burgess 8c1d6b64e3 arc: Use @pcl assembler syntax instead of invalid expressions
The old ARC assembler would accept expressions like 'LABEL-(.&-4)'
which would calculate the offset from the PCL to LABEL.  The new ARC
assembler does not accept these expressions, instead there's an @pcl
synax, used like LABEL@pcl which gives the offset from PCL to LABEL.

Most of the use of the old expression syntax have been removed,
however, this one got missed.

gcc/ChangeLog:

	* config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.

From-SVN: r246932
2017-04-14 22:08:35 +01:00
Michael Meissner 31a07c8102 re PR target/80098 (ICE in curr_insn_transform, at lra-constraints.c:3816 on ppc64le)
[gcc]
2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>

	PR target/80098
	* config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
	masks of options that should be turned off if the VSX vector
	options are turned off.
	(OTHER_P8_VECTOR_MASKS): Likewise.
	(OTHER_VSX_VECTOR_MASKS): Likewise.
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Call
	rs6000_disable_incompatible_switches to validate no type switches
	like -mvsx.
	(rs6000_incompatible_switch): New function to disallow turning on
	other vector options if -mno-vsx, -mno-power8-vector, or
	-mno-power9-vector are specified.

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

	PR target/80098
	* gcc.target/powerpc/pr80098-1.c: New test.
	* gcc.target/powerpc/pr80098-2.c: Likewise.
	* gcc.target/powerpc/pr80098-3.c: Likewise.
	* gcc.target/powerpc/pr80098-4.c: Likewise.

From-SVN: r246930
2017-04-14 20:27:18 +00:00
Claudiu Zissulescu 19b250c43a [ARC] Use long jumps for CRT calls
gcc/
2017-04-17  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.

From-SVN: r246927
2017-04-14 13:41:04 +02:00
Claudiu Zissulescu 213c9bf121 [ARC] DWARF emitting cleanup.
The use of CFA_FRAME_BASE_OFFSET and ARG_POINTER_CFA_OFFSET macros
leads to wrong offset calculation for DW_OP_fbreg constructions.
Remove them.

gcc/
2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
	* config/arc/arc.c (arc_decl_pretend_args): Likewise.
	* config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
	(ARG_POINTER_CFA_OFFSET): Likewise.

From-SVN: r246926
2017-04-14 13:40:54 +02:00
Claudiu Zissulescu 1fccdd40cf [ARC] Update mode_dependent_address_p hook.
Update arc_mode_dependent_address_p to avoid emitting subreg(mem (reg
..)) when expanding by relaxing the conditions.

gcc/
2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>

	* config/arc/arc.c (arc_mode_dependent_address_p): Relax
	conditions to take advantage of various optimizations.

From-SVN: r246925
2017-04-14 13:40:43 +02:00
Jeff Law 1f33abd75d mips.mips.md (zero_extendsidi2): Do not allow SP to appear in operands[1] if it is a MEM and TARGET_MIPS16 is active.
* config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
	in operands[1] if it is a MEM and TARGET_MIPS16 is active.
	(zero_extendsidi2_dext): Likewise.

From-SVN: r246924
2017-04-13 23:13:19 -06:00
GCC Administrator 67630cef4d Daily bump.
From-SVN: r246923
2017-04-14 00:16:18 +00:00
Jakub Jelinek 19929ba9c9 plugin-nvptx.c (cuda_lib_inited): Use signed char type instead of char.
* plugin/plugin-nvptx.c (cuda_lib_inited): Use signed char type
	instead of char.

From-SVN: r246918
2017-04-13 21:59:04 +02:00
Jakub Jelinek 099560172f re PR sanitizer/80403 (UBSAN: compile time crash with "type mismatch in binary expression" message in / and % expr)
PR sanitizer/80403
	* fold-const.c (fold_ternary_loc): Revert
	use op0 instead of fold_convert_loc (loc, type, arg0) part of
	2017-04-12 change.

	* g++.dg/ubsan/pr80403-2.C: New test.

From-SVN: r246917
2017-04-13 21:52:58 +02:00
Vladimir Makarov bc04239603 re PR rtl-optimization/80343 (ICE in extract_constrain_insn, at recog.c:2213 (error: insn does not satisfy its constraints))
2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/80343
	* lra-remat.c (update_scratch_ops): Assign original hard reg to
	new scratch pseudo.

2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/80343
	* gcc.target/powerpc/pr80343.c: New.

From-SVN: r246914
2017-04-13 18:08:51 +00:00
Denis Khalikov abac4c3400 re PR sanitizer/80414 ([UBSAN] segfault with -fsanitize=undefined)
PR sanitizer/80414
	* ubsan.c (ubsan_expand_bounds_ifn): Pass original index
	to ubsan_encode_value.

	* c-c++-common/ubsan/bounds-15.c: New test.

From-SVN: r246909
2017-04-13 17:52:23 +03:00
Jeff Law 3535a0fb6f reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs appearing in DEBUG_INSNs.
* reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
	appearing in DEBUG_INSNs.

From-SVN: r246904
2017-04-13 08:02:33 -06:00
Martin Liska 0040ecb07f Do not call memcpy with a NULL argument (PR gcov-profile/80413).
2017-04-13  Martin Liska  <mliska@suse.cz>

	PR gcov-profile/80413
	* gcov-io.c (gcov_write_string): Copy to buffer just when
	allocated size is greater than zero.

From-SVN: r246903
2017-04-13 11:51:28 +00:00
Richard Biener 43a3aa03ac re PR testsuite/80416 (FAIL: g++.dg/torture/pr79671.C -O2 execution test)
2017-04-13  Richard Biener  <rguenther@suse.de>

	PR testsuite/80416
	* g++.dg/torture/pr79671.C: Fix asm constraints.

From-SVN: r246902
2017-04-13 11:17:38 +00:00
Jakub Jelinek 031fbdb9c9 re PR debug/80321 (infinite recursion with inlining of nested function and debug info)
PR debug/80321
	* dwarf2out.c (decls_for_scope): Ignore declarations of
	current_function_decl in BLOCK_NONLOCALIZED_VARS.

	* gcc.dg/debug/pr80321.c: New test.

2017-04-13  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/debug10.adb: New test.
	* gnat.dg/debug10_pkg.ads: New helper.

From-SVN: r246900
2017-04-13 13:05:09 +02:00
Jan Hubicka fb81a61b15 re PR c++/69953 (Using lto causes gtkmm/gparted and gtkmm/inkscape compile to fail)
PR lto/69953 
	* ipa-visibility.c (non_local_p): Fix typos.
	(localize_node): When localizing symbol in same comdat group,
	dissolve the group only when we know external symbols are going
	to be privatized.
	(function_and_variable_visibility): Do not localize DECL_EXTERNAL.

From-SVN: r246899
2017-04-13 08:04:52 +00:00