aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2017-12-19re PR c++/83490 (ICE in find_call_stack_args, at dce.c:392)Marek Polacek4-1/+29
PR c++/83490 * config/i386/i386.c (init_cumulative_args): Don't check TYPE_EMPTY_P on an error node. * g++.dg/abi/pr83490.C: New test. From-SVN: r255824
2017-12-19commit_messageClaudiu Zissulescu2-12/+55
From-SVN: r255823
2017-12-19Add a tetst for PR middle-end/83471H.J. Lu2-0/+26
PR middle-end/83471 * g++.dg/torture/pr83471.C: New test. From-SVN: r255821
2017-12-19[PATCH] -fdump-tree, -save-temps=obj & subdirsNathan Sidwell2-8/+23
https://gcc.gnu.org/ml/gcc-patches/2017-12/msg00377.html * opts.c (finish_options): Don't prefix dump_base_name if it already contains directories. From-SVN: r255820
2017-12-19Fix another failing test-case.Martin Liska2-3/+9
2017-12-19 Martin Liska <mliska@suse.cz> * gcc.dg/tree-prof/switch-case-1.c: Scan IPA profile dump file instead of expand in order to not mix it with expanded tree decision tree for the switch statement. From-SVN: r255819
2017-12-19Fix off by one error in loop-unroll.c (PR rtl-optimization/82675).Martin Liska2-1/+7
2017-12-19 Martin Liska <mliska@suse.cz> PR rtl-optimization/82675 * loop-unroll.c (unroll_loop_constant_iterations): Allocate one more element in sbitmap. From-SVN: r255818
2017-12-19re PR c++/83482 (internal compiler error: Segmentation fault)Marek Polacek2-0/+25
PR tree-optimization/83482 * g++.dg/torture/pr83482.C: New test. From-SVN: r255817
2017-12-19gimplify.c (gimplify_expr): Use error_operand_p.Paolo Carlini2-3/+5
2017-12-19 Paolo Carlini <paolo.carlini@oracle.com> * gimplify.c (gimplify_expr): Use error_operand_p. From-SVN: r255816
2017-12-19cp-tree.h: Fix typo in comment.Paolo Carlini2-1/+5
2017-12-19 Paolo Carlini <paolo.carlini@oracle.com> * cp-tree.h: Fix typo in comment. From-SVN: r255815
2017-12-19Added testcase for PR 83329Martin Jambor2-0/+19
2017-12-19 Martin Jambor <mjambor@suse.cz> PR tree-optimization/83329 * gcc.dg/tree-ssa/pr83329.c: New test From-SVN: r255814
2017-12-19re PR c++/79490 (ICE when using -fsyntax-only with CATCH unit testing ↵Paolo Carlini2-0/+16
framework header) 2017-12-19 Paolo Carlini <paolo.carlini@oracle.com> PR c++/79490 * g++.dg/other/fsyntax-only2.C: New. From-SVN: r255812
2017-12-19re PR ada/66205 (gnatbind generates invalid code when finalization is ↵Arnaud Charlet2-12/+5
enabled in restricted runtime) PR ada/66205 * bindgen.adb (Gen_AdaFinal): Revert previous change. From-SVN: r255811
2017-12-19RTEMS/PowerPC: Remove 64-bit soft-float multilibSebastian Huber2-1/+6
gcc/ PR target/83387 * config/rs6000/t-rtems (MULTILIB_REQUIRED): Remove 64-bit soft-float multilib. From-SVN: r255809
2017-12-19SPARC: Make sure that jump is to a label in errata workaroundDaniel Cederman2-1/+7
In some cases the jump could be to a return instruction and in those cases the next_active_insn() function tries to follow an invalid pointer which leads to a crash. This error did not manifest when using a 32-bit version of GCC which is why I did not detect it before. gcc/ * config/sparc/sparc.c (sparc_do_work_around_errata): Make sure the jump is to a label. From-SVN: r255807
2017-12-19re PR tree-optimization/83444 (missing strlen optimization on a member array ↵Jakub Jelinek4-0/+103
of a local struct) PR tree-optimization/83444 * tree-ssa-strlen.c (strlen_check_and_optimize_stmt): Optimize character loads. * gcc.dg/strlenopt-38.c: New test. From-SVN: r255806
2017-12-19re PR ipa/82801 (Internal compiler error with Eigen and ↵Jakub Jelinek4-11/+87
__attribute__((always_inline, flatten))) PR ipa/82801 PR ipa/83346 * ipa-inline.c (flatten_remove_node_hook): New function. (ipa_inline): Keep only nodes with flatten attribute at the end of the array in the order from ipa_reverse_postorder, only walk that portion of array for flattening, if there is more than one such node, temporarily register a removal hook and ignore removed nodes. * g++.dg/ipa/pr82801.C: New test. From-SVN: r255805
2017-12-19re PR tree-optimization/80631 (Compiling with -O3 -mavx2 gives wrong code)Jakub Jelinek2-2/+9
PR tree-optimization/80631 * tree-vect-loop.c (vect_create_epilog_for_reduction): Compare induc_code against MAX_EXPR or MIN_EXPR instead of reduc_fn against IFN_REDUC_MAX or IFN_REDUC_MIN. From-SVN: r255804
2017-12-18tree-ssa-dom.c (record_equivalences_from_phis): Do not record symbolic ↵Jeff Law2-0/+9
equivalences from backedges in the CFG. * tree-ssa-dom.c (record_equivalences_from_phis): Do not record symbolic equivalences from backedges in the CFG. From-SVN: r255803
2017-12-18RevertJeff Law2-16/+13
2017-11-19 Jeff Law <law@redhat.com> * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling of degenerates resulting from ignoring an edge. From-SVN: r255802
2017-12-19Daily bump.GCC Administrator1-1/+1
From-SVN: r255795
2017-12-18PR middle-end/83373 - False positive reported by -Wstringop-overflowMartin Sebor6-0/+259
PR middle-end/83373 - False positive reported by -Wstringop-overflow PR tree-optimization/78450 - strlen(s) return value can be assumed to be less than the size of s gcc/ChangeLog: PR middle-end/83373 PR tree-optimization/78450 * tree-ssa-strlen.c (maybe_set_strlen_range): New function. (handle_builtin_strlen): Call it. gcc/testsuite/ChangeLog: PR middle-end/83373 PR tree-optimization/78450 * gcc.dg/pr83373.c: New test. * gcc.dg/strlenopt-36.c: New test. * gcc.dg/strlenopt-37.c: New test. From-SVN: r255790
2017-12-18re PR libstdc++/80761 (std::set<T,C,A>::insert_return_type uses wrong ↵François Dumont5-32/+21
iterator type) 2017-11-20 François Dumont <fdumont@gcc.gnu.org> PR libstdc++/80761 * include/debug/map.h (std::__debug::map<>::insert_return_type): Define using _Node_insert_return. * include/debug/set.h (std::__debug::set<>::insert_return_type): Likewise. * include/debug/unordered_map: (std::__debug::unordered_map<>::insert_return_type): Likewise. * include/debug/unordered_set: (std::__debug::unordered_set<>::insert_return_type): Likewise. From-SVN: r255789
2017-12-18re PR c++/83116 (Statement with no effect causes wrong code of static object ↵Marek Polacek4-1/+30
constexpr method) PR c++/83116 * constexpr.c (cxx_eval_call_expression): Only look into constexpr_call_table if ctx->strict. * g++.dg/cpp1y/constexpr-83116.C: New test. From-SVN: r255788
2017-12-18rtlanal: dead_or_set_regno_p should handle CLOBBER (PR83424)Segher Boessenkool4-1/+41
In PR83424 combine's move_deaths puts a REG_DEAD note in the wrong place because dead_or_set_regno_p does not account for CLOBBER insns. This fixes it. PR rtl-optimization/83424 * rtlanal.c (dead_or_set_regno_p): Handle CLOBBER just like SET. gcc/testsuite/ PR rtl-optimization/83424 * gcc.dg/pr83424.c: New testsuite. From-SVN: r255787
2017-12-18testsuite: add coverage for diagnostics relating to inlining (PR ↵David Malcolm11-3/+425
tree-optimization/83336) In theory, the diagnostics subsystem can print context information on code inlining when diagnostics are emitted by the middle-end, describing the chain of inlined callsites that led to a particular warning, but PR tree-optimization/83336 describes various issues with this. An underlying issue is that we have very little automated testing for this code: gcc.dg/tm/pr52141.c has a test, but in general, prune.exp filters out the various "inlined from" lines. The following patch adds test coverage for it for C and C++ via a new testsuite plugin, which emits a warning from the middle-end; the test cases use dg-regexp to verify that the "inlined from" lines are emitted correctly, with the correct function names and source locations. Doing so requires a change to prune.exp: the dg-regexp lines have to be handled *before* the "inlined from" lines are stripped. gcc/testsuite/ChangeLog: PR tree-optimization/83336 * g++.dg/cpp0x/missing-initializer_list-include.C: Update for changes to prune.exp's handling of dg-regexp. * g++.dg/plugin/diagnostic-test-inlining-1.C: New test case. * g++.dg/plugin/plugin.exp (plugin_test_list): Add it, via gcc.dg's plugin/diagnostic_plugin_test_inlining.c. * gcc.dg/plugin/diagnostic-test-inlining-1.c: New test case. * gcc.dg/plugin/diagnostic-test-inlining-2.c: Likewise. * gcc.dg/plugin/diagnostic-test-inlining-3.c: Likewise. * gcc.dg/plugin/diagnostic-test-inlining-4.c: Likewise. * gcc.dg/plugin/diagnostic_plugin_test_inlining.c: New test plugin. * gcc.dg/plugin/plugin.exp (plugin_test_list): Add them. * lib/prune.exp (prune_gcc_output): Move call to handle-dg-regexps to before the various text stripping regsup invocations, in particular, to before the stripping of "inlined from". From-SVN: r255786
2017-12-18re PR libstdc++/68430 (std::is_constructible<T>::value == true for ↵Ville Voutilainen2-0/+11
unconstructible type T) PR libstdc++/68430 * testsuite/20_util/is_constructible/68430.cc: New. From-SVN: r255785
2017-12-18re PR middle-end/83460 (FAIL: g++.dg/pr79095-4.C)Jeff Law2-26/+5
PR middle-end/83460 * g++.dg/pr79095-4.C: Remove compromised test. From-SVN: r255784
2017-12-18re PR c++/83300 (Segmentation fault with template and ↵Jakub Jelinek4-3/+38
__attribute__((vector_size (sizeof(int) * N)));) PR c++/83300 * decl2.c (save_template_attributes): Add flags argument, if not ATTR_FLAG_TYPE_IN_PLACE, *decl_p is a type and we want to modify TYPE_ATTRIBUTES, add them on type attribute variant. * g++.dg/ext/vector33.C: New test. From-SVN: r255783
2017-12-18c-warn.c (warn_logical_operator): Return early if -Wlogical-op is not in effect.Marek Polacek2-0/+8
* c-warn.c (warn_logical_operator): Return early if -Wlogical-op is not in effect. From-SVN: r255782
2017-12-18re PR middle-end/83463 (ICE: tree check: expected integer_type or ↵Marek Polacek4-2/+33
enumeral_type or boolean_type or real_type or fixed_point_type, have pointer_type in builtin_memr ef, at gimple-ssa-warn-restrict.c:297) PR middle-end/83463 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Check if TYPE is INTEGRAL_TYPE_P before accessing its min/max values. * gcc.dg/pr83463.c: New test. From-SVN: r255781
2017-12-18[PR c++/59930] template friend injectionNathan Sidwell8-78/+130
https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01168.html PR c++/59930 * name-lookup.c (name_lookup::search_unqualified): Don't search parent namespace when looking for hidden things. * pt.c (tsubst_friend_class): Always push to friend scope, drop unneeded self-friend check. Inject new hidden friend into correct scope. PR c++/59930 * g++.dg/parse/pr81247-c.C: Adjust. * g++.dg/template/pr59930-[123].C: New. From-SVN: r255780
2017-12-18[ARC] Update (u)maddsidi patterns.Claudiu Zissulescu4-4/+51
The accumulator registers are freely used by the compiler. However, there are a number of instructions which are having an intrinsic use of these registers. Update patterns to inform the compiler which ones. gcc/ 2017-09-19 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.md (maddsidi4, maddsidi4_split): Update pattern. (umaddsidi4,umaddsidi4): Likewise. gcc/testsuite 2017-09-19 Claudiu Zissulescu <claziss@synopsys.com> * gcc.target/arc/tumaddsidi4.c: New test. From-SVN: r255779
2017-12-18[ARC] Update legitimate constant hook.Claudiu Zissulescu4-6/+35
Make sure we check the constants in all cases. gcc/ 2017-10-14 Claudiu Zissulescu <claziss@synopsys.com> * config/arc/arc.c (arc_legitimate_constant_p): Always check all constants. testsuite/ 2017-10-14 Claudiu Zissulescu <claziss@synopsys.com> * gcc.target/arc/tls-1.c: New test. From-SVN: r255778
2017-12-18S/390: PR83420: Improve hotpatch option parsing.Andreas Krebbel2-7/+7
With the attached patch we get rid of the following build failure: /home/andreas/build/../gcc/gcc/config/s390/s390.c: In function ‘void s390_option_override()’: /home/andreas/build/../gcc/gcc/config/s390/s390.c:15361:16: error: ‘char* strncpy(char*, const char*, size_t)’ specified bound 256 equals destination size [-Werror=stringop-truncation] strncpy (s, opt->arg, 256); ~~~~~~~~^~~~~~~~~~~~~~~~~~ gcc/ChangeLog: 2017-12-18 Andreas Krebbel <krebbel@linux.vnet.ibm.com> PR target/83420 * config/s390/s390.c (s390_option_override): Avoid strncpy. From-SVN: r255777
2017-12-18re PR ipa/81877 (Incorrect results with lto and -fipa-cp and -fipa-cp-clone)Richard Biener6-45/+49
2017-12-18 Richard Biener <rguenther@suse.de> PR tree-optimization/81877 * tree-ssa-loop-im.c (ref_indep_loop_p): Remove safelen parameters. (outermost_indep_loop): Adjust. (ref_indep_loop_p_1): Likewise. Remove safelen handling again. (can_sm_ref_p): Adjust. * g++.dg/torture/pr81877.C: New testcase. * g++.dg/vect/pr70729.cc: XFAIL. * g++.dg/vect/pr70729-nest.cc: XFAIL. From-SVN: r255776
2017-12-18re PR tree-optimization/77291 (False positive for -Warray-bounds)Richard Biener4-19/+57
2017-12-18 Richard Biener <rguenther@suse.de> PR middle-end/77291 * tree.c (array_at_struct_end_p): Return true if the underlying object has space for at least one element in excess of what the array domain specifies. * gcc.dg/Warray-bounds-26.c: New testcase. From-SVN: r255775
2017-12-18extend.texi (x86 Function Attributes): Reformat nocf_check example to avoid ↵Sandra Loosemore3-9/+29
overfull hbox. 2017-12-17 Sandra Loosemore <sandra@codesourcery.com> gcc/ * doc/extend.texi (x86 Function Attributes): Reformat nocf_check example to avoid overfull hbox. * doc/invoke.texi (Option Summary): Add missing @gol. (C++ Dialect Options): Reformat -Wnoexcept-type example to avoid overfull hbox. From-SVN: r255774
2017-12-17invoke.texi (Option Summary): Add -mverbose-cost-dump to AArch64 and ARM ↵Sandra Loosemore2-2/+28
lists, plus missing -mflip-thumb for ARM. 2017-12-17 Sandra Loosemore <sandra@codesourcery.com> Kyrylo Tkachov <kyrylo.tkachov@arm.com> gcc/ * doc/invoke.texi (Option Summary): Add -mverbose-cost-dump to AArch64 and ARM lists, plus missing -mflip-thumb for ARM. (AArch64 Options): Document -mverbose-cost-dump. (ARM Options): Likewise, plus -mflip-thumb. Co-Authored-By: Kyrylo Tkachov <kyrylo.tkachov@arm.com> From-SVN: r255773
2017-12-17PR bootstrap/83446 - Bootstrap failed on i686Martin Sebor4-3/+48
gcc/testsuite/ChangeLog: PR bootstrap/83446 * c-c++-common/Warray-bounds-3.c: Adjust. * gcc.dg/Warray-bounds-25.c: New test. gcc/ChangeLog: PR bootstrap/83446 * gimple-ssa-warn-restrict.c (builtin_memref::offset_out_of_bounds): Correct the handling of anti-ranges. From-SVN: r255772
2017-12-18Daily bump.GCC Administrator1-1/+1
From-SVN: r255771
2017-12-17invoke.texi (ARC Options): Add missing -mlra entry.Sandra Loosemore2-0/+5
2017-12-17 Sandra Loosemore <sandra@codesourcery.com> gcc/ * doc/invoke.texi (ARC Options): Add missing -mlra entry. From-SVN: r255768
2017-12-17c-attribs.c (common_handle_aligned_attribute): Avoid issuing an error for ↵Martin Sebor2-5/+13
attribute warn_if_not_aligned. gcc/c-family/ChangeLog: * c-attribs.c (common_handle_aligned_attribute): Avoid issuing an error for attribute warn_if_not_aligned. From-SVN: r255767
2017-12-17Revert hunk with debug code that was comitted by mistakeAndi Kleen1-2/+0
From-SVN: r255766
2017-12-17guality.h (guality_check): Cast %lli arguments inf fprintf statements to ↵Uros Bizjak2-11/+19
long long int. * gcc.dg/guality/guality.h (guality_check): Cast %lli arguments inf fprintf statements to long long int. From-SVN: r255765
2017-12-17pa.c (pa_som_asm_init_sections): Fix comment.John David Anglin2-1/+5
* config/pa/pa.c (pa_som_asm_init_sections): Fix comment. From-SVN: r255764
2017-12-17Support -std=f2018Janne Blomqvist15-87/+167
The Fortran committee has decided to rename the upcoming Fortran 2015 standard to Fortran 2018. This is not a reflection of a three year delay in the process, but rather they are following other standards in adopting the year of publication for the name. For more details see N2144. This patch renames GFC_STD_F2015 to GFC_STD_F2018, and makes it a separate flag rather than an alias for GFC_STD_GNU. Also, it adds a -std=f2018 argument, and documents it. Regtested on x86_64-pc-linux-gnu. gcc/fortran/ChangeLog: 2017-12-17 Janne Blomqvist <jb@gcc.gnu.org> * decl.c (gfc_match_implicit_none): Use GFC_STD_F2018 instead of GFC_STD_F2015. * error.c (gfc_notify_std): Add GFC_STD_F2018{_DEL,_OBS} to switch. * gfortran.texi: Document -std=f2018. * interface.c (compare_parameter): Fix comment. * invoke.texi: Document -std=f2018. * lang.opt: Add -std=f2018 argumnet. * libgfortran.h (GFC_STD_F2015): Rename to GFC_STD_F0218, use separate flag bit. (GFC_STD_F2018_DEL): New macro. (GFC_STD_F2018_OBS): Likewise. * match.c (gfc_match_stopcode): Use GFC_STD_F2018. * options.c (set_default_std_flags): Add F2018 flags to defaults. (gfc_handle_option): Set options for -std=f2018. gcc/testsuite/ChangeLog: 2017-12-17 Janne Blomqvist <jb@gcc.gnu.org> * gfortran.dg/error_stop_3.f90: Update -std= option, fix comments. * gfortran.dg/error_stop_4.f90: Update error message. * gfortran.dg/implicit_14.f90: Likewise. * gfortran.dg/spellcheck-procedure_2.f90: Don't warn for F2018 features. From-SVN: r255761
2017-12-17Correct imul (r64) latency for modern Intel CPUsMarkus Trippelsdorf4-4/+80
Since Sandybridge the 64bit multiplication latency is three cycles, not four. So update the costs to reflect reality. * x86-tune-costs.h (skylake_cost, core_cost): Decrease r64 multiply latencies. * gcc.target/i386/wmul-3.c: New test. From-SVN: r255760
2017-12-17invoke.texi: Fix some typos.Sandra Loosemore2-6/+10
2017-12-16 Sandra Loosemore <sandra@codesourcery.com> gcc/ * doc/invoke.texi: Fix some typos. From-SVN: r255759
2017-12-17Daily bump.GCC Administrator1-1/+1
From-SVN: r255758
2017-12-16PR tree-optimization/78918 - missing -Wrestrict on memcpy copying over selfMartin Sebor42-290/+4422
gcc/c-family/ChangeLog: PR tree-optimization/78918 * c-common.c (check_function_restrict): Avoid checking built-ins. * c.opt (-Wrestrict): Include in -Wall. gcc/ChangeLog: PR tree-optimization/78918 * Makefile.in (OBJS): Add gimple-ssa-warn-restrict.o. * builtins.c (check_sizes): Rename... (check_access): ...to this. Rename function arguments for clarity. (check_memop_sizes): Adjust names. (expand_builtin_memchr, expand_builtin_memcpy): Same. (expand_builtin_memmove, expand_builtin_mempcpy): Same. (expand_builtin_strcat, expand_builtin_stpncpy): Same. (check_strncat_sizes, expand_builtin_strncat): Same. (expand_builtin_strncpy, expand_builtin_memset): Same. (expand_builtin_bzero, expand_builtin_memcmp): Same. (expand_builtin_memory_chk, maybe_emit_chk_warning): Same. (maybe_emit_sprintf_chk_warning): Same. (expand_builtin_strcpy): Adjust. (expand_builtin_stpcpy): Same. (expand_builtin_with_bounds): Detect out-of-bounds accesses in pointer-checking forms of memcpy, memmove, and mempcpy. (gcall_to_tree_minimal, max_object_size): Define new functions. * builtins.h (max_object_size): Declare. * calls.c (alloc_max_size): Call max_object_size instead of hardcoding ssizetype limit. (get_size_range): Handle new argument. * calls.h (get_size_range): Add a new argument. * cfgexpand.c (expand_call_stmt): Propagate no-warning bit. * doc/invoke.texi (-Wrestrict): Adjust, add example. * gimple-fold.c (gimple_fold_builtin_memory_op): Detect overlapping operations. (gimple_fold_builtin_memory_chk): Same. (gimple_fold_builtin_stxcpy_chk): New function. * gimple-ssa-warn-restrict.c: New source. * gimple-ssa-warn-restrict.h: New header. * gimple.c (gimple_build_call_from_tree): Propagate location. * passes.def (pass_warn_restrict): Add new pass. * tree-pass.h (make_pass_warn_restrict): Declare. * tree-ssa-strlen.c (handle_builtin_strcpy): Detect overlapping operations. (handle_builtin_strcat): Same. (strlen_optimize_stmt): Rename... (strlen_check_and_optimize_stmt): ...to this. Handle strncat, stpncpy, strncpy, and their checking forms. gcc/testsuite/ChangeLog: PR tree-optimization/78918 * c-c++-common/Warray-bounds.c: New test. * c-c++-common/Warray-bounds-2.c: New test. * c-c++-common/Warray-bounds-3.c: New test. * c-c++-common/Warray-bounds-4.c: New test. * c-c++-common/Warray-bounds-5.c: New test. * c-c++-common/Wrestrict-2.c: New test. * c-c++-common/Wrestrict.c: New test. * c-c++-common/Wrestrict.s: New test. * c-c++-common/Wsizeof-pointer-memaccess1.c: Adjust * c-c++-common/Wsizeof-pointer-memaccess2.c: Same. * g++.dg/torture/Wsizeof-pointer-memaccess1.C: Same. * g++.dg/torture/Wsizeof-pointer-memaccess2.C: Same. * gcc.dg/range.h: New header. * gcc.dg/memcpy-6.c: New test. * gcc.dg/pr69172.c: Adjust. * gcc.dg/pr79223.c: Same. * gcc.dg/pr81345.c: Adjust. * gcc.dg/Wobjsize-1.c: Same. * gcc.dg/Wrestrict-2.c: New test. * gcc.dg/Wrestrict.c: New test. * gcc.dg/Wsizeof-pointer-memaccess1.c: Adjust. * gcc.dg/builtin-stpncpy.c: Same. * gcc.dg/builtin-stringop-chk-1.c: Same. * gcc.target/i386/chkp-stropt-17.c: New test. * gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Adjust. From-SVN: r255755