aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2019-08-02re PR fortran/90297 (gcc/fortran/resolve.c: 2 * possibly redundant code ?)Steven G. Kargl4-0/+35
2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/90297 * match.c (gfc_match_equivalence): Check that EQUIVALENCE is followed by '('. 2019-08-02 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/90297 * gfortran.dg/equiv_10.f90: New test. From-SVN: r274031
2019-08-02Add future.md.Michael Meissner3-0/+523
2019-08-02 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/future.md: New file. * config/rs6000/rs6000.md: Include future.md. * config/rs6000/t-rs6000 (MD_INCLUDES): Add future.md. From-SVN: r274030
2019-08-02rework Ada EH Machine_Occurrence deallocationAlexandre Oliva3-47/+316
Introduce exception handler ABI #1 to ensure single release, no access after release of reraised Machine_Occurrences, and no failure to re-reraise a Machine_Occurrence. Unlike Ada exceptions, foreign exceptions do not get a new Machine_Occurrence upon reraise, but each handler would delete the exception upon completion, normal or exceptional, save for the case of a 'raise;' statement within the handler, that avoided the delete by clearing the exception pointer that the cleanup would use to release it. The cleared exception pointer might then be used by a subsequent reraise within the same handler. Get_Current_Excep.all would also expose the Machine_Occurrence to reuse by Reraise_Occurrence, even for native exceptions. Under ABI #1, Begin_Handler_v1 claims responsibility for releasing an exception by saving its cleanup and setting it to Claimed_Cleanup. End_Handler_v1 restores the cleanup and runs it, as long as it isn't still Claimed_Cleanup (which indicates an enclosing handler has already claimed responsibility for releasing it), and as long as the same exception is not being propagated up (the next handler of the propagating exception will then claim responsibility for releasing it), so reraise no longer needs to clear the exception pointer, and it can just propagate the exception, just like Reraise_Occurrence. ABI #1 is fully interoperable with ABI #0, i.e., exception handlers that call the #0 primitives can be linked together with ones that call the #1 primitives, and they will not misbehave. When a #1 handler claims responsibility for releasing an exception, even #0 reraises dynamically nested within it will refrain from releasing it. However, when a #0 handler is a handler of a foreign exception that would have been responsible for releasing it with #1, a Reraise_Occurrence of that foreign or other Machine_Occurrence-carrying exception may still cause the exception to be released multiple times, and to be used after it is first released, even if other handlers of the foreign exception use #1. for gcc/ada/ChangeLog * libgnat/a-exexpr.adb (Begin_Handler_v1, End_Handler_v1): New. (Claimed_Cleanup): New. (Begin_Handler, End_Handler): Document. * gcc-interface/trans.c (gigi): Switch to exception handler ABI #1. (Exception_Handler_to_gnu_gcc): Save the original cleanup returned by begin handler, pass it to end handler, and use EH_ELSE_EXPR to pass a propagating exception to end handler. (gnat_to_gnu): Leave the exception pointer alone for reraise. (add_cleanup): Handle EH_ELSE_EXPR, require it by itself. From-SVN: r274029
2019-08-02re PR c++/56428 ([C++11] "is not a constant expression" when comparing ↵Marek Polacek2-0/+30
non-type template argument to nullptr) PR c++/56428 * g++.dg/cpp0x/nontype4.C: New test. From-SVN: r274028
2019-08-02re PR c++/53009 (pointer to static member function of template class is ↵Marek Polacek2-0/+37
“invalid” as a template argument of another template class) PR c++/53009 * g++.dg/cpp0x/nontype3.C: New test. From-SVN: r274027
2019-08-02function.c (assign_parm_adjust_stack_rtl): Revise STRICT_ALIGNMENT check to ↵Bernd Edlinger2-2/+6
use targetm.slow_unaligned_access instead. 2019-08-02 Bernd Edlinger <bernd.edlinger@hotmail.de> * function.c (assign_parm_adjust_stack_rtl): Revise STRICT_ALIGNMENT check to use targetm.slow_unaligned_access instead. From-SVN: r274025
2019-08-02re PR c++/77575 (Bogus error when alias template yielding a reference type ↵Marek Polacek2-0/+12
used as template template argument) PR c++/77575 * g++.dg/cpp0x/nontype2.C: New test. From-SVN: r274024
2019-08-02function.c (assign_param_data_one): Remove unused data members.Bernd Edlinger2-2/+4
2019-08-02 Bernd Edlinger <bernd.edlinger@hotmail.de> * function.c (assign_param_data_one): Remove unused data members. From-SVN: r274023
2019-08-02simd_pcs_attribute.c: New test.Steve Ellcey4-0/+62
2019-08-02 Steve Ellcey <sellcey@marvell.com> * gcc.target/aarch64/simd_pcs_attribute.c: New test. * gcc.target/aarch64/simd_pcs_attribute-2.c: Ditto. * gcc.target/aarch64/simd_pcs_attribute-3.c: Ditto. From-SVN: r274020
2019-08-02omp-simd-clone.c (simd_clone_adjust_return_type): Remove call to ↵Steve Ellcey2-6/+12
build_distinct_type_copy. 2019-08-02 Steve Ellcey <sellcey@marvell.com> * omp-simd-clone.c (simd_clone_adjust_return_type): Remove call to build_distinct_type_copy. (simd_clone_adjust_argument_types): Ditto. (simd_clone_adjust): Call build_distinct_type_copy here. (expand_simd_clones): Ditto. From-SVN: r274019
2019-08-02re PR tree-optimization/91201 (SIMD not generated for horizontal sum of ↵Uros Bizjak4-0/+41
bytes in array) PR target/91201 * config/i386/sse.md (*vec_extractv16qi_zext): New insn pattern. testsuite/ChangeLog: PR target/91201 * gcc.target/i386/sse4_1-pr91201.c: New test. From-SVN: r274018
2019-08-02tree-ssa-loop-im: simplify casts in comparatorsAlexander Monakov2-4/+10
* tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Simplify casts from 'const void *'. (sort_locs_in_loop_postorder_cmp): Likewise. From-SVN: r274011
2019-08-02PR c++/91230 - wrong error with __PRETTY_FUNCTION__ and generic lambda.Marek Polacek4-1/+36
* pt.c (value_dependent_expression_p): Consider __PRETTY_FUNCTION__ inside a template function value-dependent. * g++.dg/cpp1y/lambda-generic-pretty1.C: New test. From-SVN: r274009
2019-08-02* gcc.dg/torture/pr91323.c: Also check comparison results.Uros Bizjak1-3/+3
From-SVN: r274008
2019-08-02invoke.texi (hot-bb-count-fraction): Rework description.Eric Botcazou4-23/+63
* doc/invoke.texi (hot-bb-count-fraction): Rework description. (hot-bb-count-ws-permille): Likewise. (hot-bb-frequency-fraction): Likewise. (unlikely-bb-count-fraction): Likewise. * params.def (hot-bb-count-fraction): Rework description. (hot-bb-count-ws-permille): Likewise. (hot-bb-frequency-fraction): Likewise. (unlikely-bb-count-fraction): Likewise. Remove min and max values. * predict.c (get_hot_bb_threshold): Deal with 0 HOT_BB_COUNT_FRACTION. From-SVN: r274006
2019-08-02re PR target/91323 (LTGT rtx produces UCOMISS instead of COMISS)Uros Bizjak4-3/+65
PR target/91323 * config/i386/i386-expand.c (ix86_unordered_fp_compare) <case LTGT>: Return false. testsuite/ChangeLog: PR target/91323 * gcc.dg/torture/pr91323.c: New test. From-SVN: r274005
2019-08-02vec.h (vec::sort): Add gcc_qsort_r support.Richard Biener3-8/+105
2019-08-02 Richard Biener <rguenther@suse.de> * vec.h (vec::sort): Add gcc_qsort_r support. (vec::bsearch): Add an overload with gcc_qsort_r style callbacks. * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Adjust to gcc_qsort_r style callback. (sort_locs_in_loop_postorder_cmp): Likewise. (analyze_memory_references): Use gcc_sort_r interfaces. (find_ref_loc_in_loop_cmp): Use new bsearch overload. From-SVN: r274004
2019-08-02Properly detect working jobserver in gcc driver.Martin Liska4-1/+58
2019-08-02 Martin Liska <mliska@suse.cz> PR lto/91313 * gcc.c (driver::maybe_run_linker): Call detect_jobserver to detect working job server. (driver::detect_jobserver): Test whether jobserver is active from GCC driver. That will prevent situation where GCC is invoked from a LD plugin and the linker already uses file descriptors suggested by make. That leads to a wrong detection. * gcc.h (driver): Add detect_jobserver. * lto-wrapper.c (jobserver_active_p): Simplify sscanf by not scanning for --jobserver-auth prefix. From-SVN: r274003
2019-08-02tree.c (handle_nodiscard_attribute): Do not warn about nodiscard applied to ↵Paolo Carlini4-1/+22
a constructor. /cp 2019-08-02 Paolo Carlini <paolo.carlini@oracle.com> * tree.c (handle_nodiscard_attribute): Do not warn about nodiscard applied to a constructor. /testsuite 2019-08-02 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/cpp1z/nodiscard6.C: New. From-SVN: r274002
2019-08-02Fix gcc.dg/torture/ssa-fre-{5,7}.c failure for avrSenthil Kumar Selvaraj3-0/+7
The test assumes 32 bit integers (and pointers), and therefore fails for the avr target, which has 16 bit integers. Fix failure for avr by adding dg-require-effective-target int32. gcc/testsuite/ChangeLog: 2019-08-02 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com> * gcc.dg/torture/ssa-fre-5.c: Add dg-require-effective-target int32. * gcc.dg/torture/ssa-fre-7.c: Likewise. From-SVN: r274001
2019-08-02pr88140.c: Move to ...Uros Bizjak2-2/+2
* gcc.c-torture/pr88140.c: Move to ... * gcc.c-torture/compile/pr88140.c: ... here. From-SVN: r273999
2019-08-02re PR tree-optimization/91201 (SIMD not generated for horizontal sum of ↵Jakub Jelinek7-0/+78
bytes in array) PR tree-optimization/91201 * config/i386/i386-expand.c (ix86_expand_vector_extract): For elt == 0 V16QImode extraction without sse4.1 try to use V4SImode lowpart extraction. * gcc.target/i386/sse2-pr91201-3.c: New test. * gcc.target/i386/sse2-pr91201-4.c: New test. * gcc.target/i386/sse2-pr91201-5.c: New test. * gcc.target/i386/sse2-pr91201-6.c: New test. From-SVN: r273998
2019-08-02Mark DECL_SET_IS_OPERATOR_DELETE for user-provided delete operators.Martin Liska4-1/+52
2019-08-02 Martin Liska <mliska@suse.cz> * decl.c (grok_op_properties): Mark DECL_SET_IS_OPERATOR_DELETE for user-provided delete operators. 2019-08-02 Martin Liska <mliska@suse.cz> * g++.dg/cpp1y/new2.C: New test. From-SVN: r273996
2019-08-02Fix gcc.dg/torture/ssa-fre-6.c failure for avrSenthil Kumar Selvaraj2-0/+5
The test assumes 32 bit integers (and pointers), and therefore fails for the avr target, which has 16 bit integers. Fix failure for avr by adding dg-require-effective-target int32. gcc/testsuite/ChangeLog 2019-08-02 Senthil Kumar Selvaraj <senthilkumar.selvaraj@microchip.com> * gcc.dg/torture/ssa-fre-6.c: Add dg-require-effective-target int32. From-SVN: r273995
2019-08-02Check -shared is available for pr87906_0.CKito Cheng2-0/+5
gcc/testsuite/ChangeLog: * g++.dg/lto/pr87906_0.C: Add dg-require-effective-target shared check. From-SVN: r273994
2019-08-02Daily bump.GCC Administrator1-1/+1
From-SVN: r273993
2019-08-01PR c++/90947 - Simple lookup table of array of strings is miscompiledMartin Sebor10-2/+574
gcc/cp/ChangeLog: PR c++/90947 * decl.c (reshape_init_array_1): Avoid truncating initializer lists containing string literals. gcc/testsuite/ChangeLog: PR c++/90947 * c-c++-common/array-1.c: New test. * g++.dg/abi/mangle73.C: New test. * g++.dg/cpp2a/nontype-class23.C: New test. * g++.dg/init/array53.C: New test. gcc/ChangeLog: PR c++/90947 * tree.c (type_initializer_zero_p): Define. * tree.h (type_initializer_zero_p): New function. From-SVN: r273989
2019-08-01* cfgrtl.c (relink_block_chain): Add line returns in dump file.Eric Botcazou2-3/+7
From-SVN: r273988
2019-08-01cgraph.h (cgraph_edge::maybe_hot_p): Tweak comment.Eric Botcazou4-40/+61
* cgraph.h (cgraph_edge::maybe_hot_p): Tweak comment. * cgraph.c (cgraph_edge::maybe_hot_p): Likewise. Remove useless test. * predict.c (maybe_hot_count_p): Likewise. (maybe_hot_bb_p): Tweak comment. (maybe_hot_edge_p): Likewise. (probably_never_executed): Likewise. Minor tweak. (probably_never_executed_bb_p): Likewise. (unlikely_executed_edge_p): Likewise. (probably_never_executed_edge_p): Likewise. (optimize_function_for_size_p): Likewise. (optimize_function_for_speed_p): Likewise. (function_optimization_type): Likewise. (optimize_bb_for_size_p): Likewise. (optimize_bb_for_speed_p): Likewise. (bb_optimization_type): Likewise. (optimize_edge_for_size_p): Likewise. (optimize_edge_for_speed_p): Likewise. (optimize_insn_for_size_p): Likewise. (optimize_insn_for_speed_p): Likewise. (optimize_loop_for_size_p): Likewise. (optimize_loop_for_speed_p): Likewise. (optimize_loop_nest_for_speed_p): Likewise. (optimize_loop_nest_for_size_p): Likewise. (predictable_edge_p): Likewise. (handle_missing_profiles): Minor tweak. From-SVN: r273983
2019-08-01Fix comment about use of @pcrel@got.Michael Meissner2-1/+6
2019-08-01 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/predicates.md (pcrel_external_address): Update comment. From-SVN: r273982
2019-08-01re PR tree-optimization/85693 (Generation of SAD (Sum of Absolute ↵Uros Bizjak5-1/+47
Difference) instruction) PR target/85693 * config/i386/mmx.md (usadv8qi): New expander. testsuite/ChangeLog: PR target/85693 * gcc.target/i386/pr85693-1.c: New test. From-SVN: r273981
2019-08-01re PR c++/90590 (enumeration value not handled in switch warning for ↵Matthew Beliveau7-0/+56
std::ios_base::seek_dir) PR c++/90590 * c-warn.c (c_do_switch_warnings): Suppress warning for enumerators with reserved names that are in a system header. * c-c++-common/pr90590-1.c: New test. * c-c++-common/pr90590-1.h: New test. * c-c++-common/pr90590-2.c: New test. * c-c++-common/pr90590-2.h: New test. From-SVN: r273980
2019-08-01mmx.md (vec_extractv2si_0): Add (r,x) alternative.Uros Bizjak2-12/+80
* config/i386/mmx.md (vec_extractv2si_0): Add (r,x) alternative. (*vec_extractv2si_0_zext_sse4): New insn pattern. (*vec_extractv2si_0_zext): Ditto. (*vec_extractv2si_1): Add (rm,x) alternative. (*vec_extractv2si_1_zext): New insn pattern. (*vec_extractv2si_zext_mem): Add "TARGET_MMX || TARGET_MMX_WITH_SSE" insn constraint. From-SVN: r273979
2019-08-01domwalk: use gcc_sort_rRichard Biener2-9/+13
2019-08-01 Richard Biener <rguenther@suse.de> * domwalk.c (bb_postorder): Remove static variable. (cmp_bb_postorder): Adjust. (sort_bbs_postorder): Adjust and use gcc_sort_r. (dom_walker::walk): Adjust. From-SVN: r273978
2019-08-01sort.cc: introduce gcc_sort_rAlexander Monakov4-18/+89
* sort.cc (sort_r_ctx): New struct. (reorder23): Make templated on context type. (reorder45): Ditto. (cmp1): Ditto. Adjust signature. (netsort): Ditto. (mergesort): Ditto. [CHECKING_P] (cmp2to3): New static function. Use it... (gcc_qsort) [CHECKING_P]: ...here. (gcc_sort_r): New function. * system.h (sort_r_cmp_fn): New function typedef. (qsort_chk): Adjust signature. (gcc_sort_r): Declare. * vec.c (qsort_chk_error): Adjust. (qsort_chk): Adjust. From-SVN: r273977
2019-08-01PR c++/90805 - detect narrowing in case values.Marek Polacek6-12/+50
* decl.c (case_conversion): Detect narrowing in case values. * c-c++-common/pr89888.c: Update expected dg-error. * g++.dg/cpp0x/Wnarrowing17.C: New test. * g++.dg/cpp0x/enum28.C: Update expected dg-error. From-SVN: r273976
2019-08-01Fix pr89330_0.C testWilco Dijkstra2-0/+5
Fix pr89330_0.C test by adding missing effective target shared. Committed as obvious. testsuite/ * gcc/testsuite/g++.dg/lto/pr89330_0.C: Add effective-target shared. From-SVN: r273973
2019-08-01tree-ssa-pre.c (has_abnormal_preds): Remove global var.Richard Biener2-5/+6
2019-08-01 Richard Biener <rguenther@suse.de> * tree-ssa-pre.c (has_abnormal_preds): Remove global var. (compute_antic): Localize it here. From-SVN: r273971
2019-08-01Make-lang.in (lto.install-common): Remove unnecessary slash between ↵Bernd Edlinger2-1/+6
$(DESTDIR) and $(bindir). 2019-08-01 Bernd Edlinger <bernd.edlinger@hotmail.de> * Make-lang.in (lto.install-common): Remove unnecessary slash between $(DESTDIR) and $(bindir). From-SVN: r273969
2019-08-01RISC-V: Fix testcase on rv64Kito Cheng2-1/+5
gcc/testsuite/ChangeLog: * gcc.target/riscv/attribute-10.c: Fix testcase on rv64. From-SVN: r273968
2019-08-01Daily bump.GCC Administrator1-1/+1
From-SVN: r273960
2019-07-31decl2.c (delete_sanity): Improve diagnostic locations, use ↵Paolo Carlini4-7/+39
cp_expr_loc_or_loc in four places. /cp 2019-07-31 Paolo Carlini <paolo.carlini@oracle.com> * decl2.c (delete_sanity): Improve diagnostic locations, use cp_expr_loc_or_loc in four places. /testsuite 2019-07-31 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/diagnostic/delete1.C: New. From-SVN: r273952
2019-07-31RISC-V: Raise error on unexpected ISA string at end.Maxim Blinov4-0/+22
2019-07-31 Maxim Blinov <maxim.blinov@embecosm.com> gcc/ * common/config/riscv/riscv-common.c: Check -march string ends with null. gcc/testsuite/ * gcc.target/riscv/attribute-10.c: New test. From-SVN: r273951
2019-07-31PR c++/90538 - multiple expansions of capture packsJason Merrill7-53/+91
Previously, with init-capture the type of the closure field was a DECLTYPE_TYPE of the initializer. But since each time we tsubst a lambda we get a different lambda, that meant that if the initializer is a lambda, we'd end up with different closure types in the field and initializer after substitution (PR 87322). We dealt with this by remembering the lambda instantiation within each pack expansion element, using local_specialization_stack to separate the elements. But that broke this testcase, because it lost lambda capture proxies that also use local_specializations. So, this patch removes the local_specializations changes from that patch and fixes 87322 differently, by giving init-capture fields 'auto' type and doing deduction later. There's a bit of a kludge to get the right number of fields by pretending that 'auto...' uses the parameter packs from the initializer, but it does the trick. * cp-tree.h (DECLTYPE_FOR_INIT_CAPTURE): Remove. * lambda.c (add_capture): Copy parameter packs from init. (lambda_capture_field_type): Always use auto for init-capture. * pt.c (uses_parameter_packs): Return tree. (tsubst) [DECLTYPE_TYPE]: Remove init-capture handling. (gen_elem_of_pack_expansion_instantiation): Don't push local_specialization_stack. (prepend_one_capture): New. (tsubst_lambda_expr): Use it. Don't touch local_specializations. (do_auto_deduction): Avoid redundant error. From-SVN: r273944
2019-07-31Fix copy_node of TEMPLATE_INFO.Jason Merrill3-4/+14
build_clone uses copy_node to duplicate the TEMPLATE_INFO for a clone, but this clears TREE_CHAIN, which was TI_ARGS in a TEMPLATE_INFO. * cp-tree.h (struct tree_template_info): Use tree_base instead of tree_common. Add tmpl and args fields. (TI_TEMPLATE, TI_ARGS): Adjust. From-SVN: r273943
2019-07-31ipa-devirt: make qsort helpers staticAlexander Monakov2-2/+7
* ipa-devirt.c (type_warning_cmp): Make static. (decl_warning_cmp): Ditto. From-SVN: r273942
2019-07-31re PR target/91050 (-mdejagnu-cpu=<cpu> does not affect the -m<cpu> ↵Peter Bergner6-11/+35
assembler option) PR target/91050 * config/rs6000/rs6000.opt (mdejagnu-cpu=): Delete option. * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove use of deleted rs6000_dejagnu_cpu_index variable. * config/rs6000/rs6000.h (DRIVER_SELF_SPECS): Define. (SUBTARGET_DRIVER_SELF_SPECS): Likewise. * config/darwin.h (DRIVER_SELF_SPECS): Rename from this ... (SUBTARGET_DRIVER_SELF_SPECS): ...to this. * config/i386/i386.h (DRIVER_SELF_SPECS): Define. (SUBTARGET_DRIVER_SELF_SPECS): Likewise. From-SVN: r273941
2019-07-31re PR tree-optimization/91280 (ICE in get_constraint_for_component_ref, at ↵Richard Biener4-3/+257
tree-ssa-structalias.c:3259 since r260354) 2019-07-31 Richard Biener <rguenther@suse.de> PR tree-optimization/91280 * tree-ssa-structalias.c (get_constraint_for_component_ref): Decompose MEM_REF manually for offset handling. * g++.dg/torture/pr91280.C: New testcase. From-SVN: r273936
2019-07-31re PR c/91192 (non-deterministic ICE on invalid)Jakub Jelinek2-2/+10
PR c/91192 * c-parser.c (c_parser_sizeof_expression): Call set_c_expr_source_range even if finish is UNKNOWN_LOCATION, just use start as finish in that case. From-SVN: r273935
2019-07-31re PR tree-optimization/91293 (Wrong code with -O3 -mavx2)Richard Biener6-0/+74
2019-07-31 Richard Biener <rguenther@suse.de> PR tree-optimization/91293 * tree-vect-slp.c (vect_build_slp_tree_2): Do not swap operands of reduction stmts. * gcc.dg/vect/pr91293-1.c: New testcase. * gcc.dg/vect/pr91293-2.c: Likewise. * gcc.dg/vect/pr91293-3.c: Likewise. From-SVN: r273934