- 17 Aug, 2018 12 commits
-
-
2018-08-17 Jojo <jijie_rong@c-sky.com> Huibin Wang <huibin_wang@c-sky.com> Sandra Loosemore <sandra@codesourcery.com> Chung-Lin Tang <cltang@codesourcery.com> Andrew Jenner <andrew@codesourcery.com> C-SKY port: Configury gcc/ * config.gcc (csky-*-*): New. * configure.ac: Add csky to targets for dwarf2 debug_line support. * configure: Regenerated. contrib/ * config-list.mk (LIST): Add csky-elf and csky-linux-gnu. Co-Authored-By: Andrew Jenner <andrew@codesourcery.com> Co-Authored-By: Chung-Lin Tang <cltang@codesourcery.com> Co-Authored-By: Huibin Wang <huibin_wang@c-sky.com> Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com> From-SVN: r263627
Jojo committed -
This patch converts dump_print and dump_printf_loc from using printf (and thus ATTRIBUTE_PRINTF) to using a new pretty-printer based on pp_format, which supports formatting middle-end types. In particular, the following codes are implemented (in addition to the standard pretty_printer ones): %E: gimple *: Equivalent to: dump_gimple_expr (MSG_*, TDF_SLIM, stmt, 0) %G: gimple *: Equivalent to: dump_gimple_stmt (MSG_*, TDF_SLIM, stmt, 0) %T: tree: Equivalent to: dump_generic_expr (MSG_*, arg, TDF_SLIM). Hence it becomes possible to convert e.g.: if (dump_enabled_p ()) { dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: different sized vector " "types in statement, "); dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM, vectype); dump_printf (MSG_MISSED_OPTIMIZATION, " and "); dump_generic_expr (MSG_MISSED_OPTIMIZATION, TDF_SLIM, nunits_vectype); dump_printf (MSG_MISSED_OPTIMIZATION, "\n"); } into a one-liner: if (dump_enabled_p ()) dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location, "not vectorized: different sized vector " "types in statement, %T and %T\n", vectype, nunits_vectype); Unlike regular pretty-printers, this one captures optinfo_item instances for the formatted chunks as appropriate, so that when written out to a JSON optimization record, the relevant parts of the message are labelled by type, and by source location (so that e.g. %G is entirely equivalent to using dump_gimple_stmt). dump_printf and dump_printf_loc become marked with ATTRIBUTE_GCC_DUMP_PRINTF, which the patch also implements. gcc/c-family/ChangeLog: * c-format.c (enum format_type): Add gcc_dump_printf_format_type. (gcc_dump_printf_length_specs): New. (gcc_dump_printf_flag_pairs): New. (gcc_dump_printf_flag_specs): New. (gcc_dump_printf_char_table): New. (format_types_orig): Add entry for "gcc_dump_printf". (init_dynamic_diag_info): Set up length_char_specs and conversion_specs for gcc_dump_printf_format_type. (handle_format_attribute): Handle gcc_dump_printf_format_type. gcc/ChangeLog: * dump-context.h: Include "dumpfile.h". (dump_context::dump_printf_va): Convert final param from va_list to va_list *. Convert from ATTRIBUTE_PRINTF to ATTRIBUTE_GCC_DUMP_PRINTF. (dump_context::dump_printf_loc_va): Likewise. * dumpfile.c: Include "stringpool.h". (make_item_for_dump_printf_va): Delete. (make_item_for_dump_printf): Delete. (class dump_pretty_printer): New class. (dump_pretty_printer::dump_pretty_printer): New ctor. (dump_pretty_printer::emit_items): New member function. (dump_pretty_printer::emit_any_pending_textual_chunks): New member function. (dump_pretty_printer::emit_item): New member function. (dump_pretty_printer::stash_item): New member function. (dump_pretty_printer::format_decoder_cb): New member function. (dump_pretty_printer::decode_format): New member function. (dump_context::dump_printf_va): Reimplement in terms of dump_pretty_printer. (dump_context::dump_printf_loc_va): Convert final param from va_list to va_list *. (dump_context::begin_scope): Reimplement call to make_item_for_dump_printf. (dump_printf): Update for change to dump_printf_va. (dump_printf_loc): Likewise. (selftest::test_capture_of_dump_calls): Convert "stmt" from greturn * to gimple *. Add a test_decl. Add tests of dump_printf with %T, %E, and %G. * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro. (dump_printf): Replace ATTRIBUTE_PRINTF_2 with ATTRIBUTE_GCC_DUMP_PRINTF (2, 3). (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with ATTRIBUTE_GCC_DUMP_PRINTF (3, 0). * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count" within a dump_printf_loc call to "%wu". (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls, converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd". Add a missing space after "=". * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd". * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call, convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu". * tree-vectorizer.c (try_vectorize_loop_1): Likewise. Remove duplicate "vectorized" from message. gcc/testsuite/ChangeLog: * gcc.dg/format/gcc_diag-1.c: Fix typo. Add test coverage for gcc_dump_printf. * gcc.dg/format/gcc_diag-10.c: Add gimple typedef. Add test coverage for gcc_dump_printf. From-SVN: r263626
David Malcolm committed -
PR libstdc++/86963 * include/std/tuple (__tuple_base): New class template with deleted copy assignment operator. (tuple, tuple<_T1, _T2>): Derive from __tuple_base<tuple> so that implicit copy/move assignment operator will be deleted/suppressed. (tuple::__assignable, tuple<_T1, _T2>::__assignable): New helper functions for SFINAE constraints on assignment operators. (tuple::__nothrow_assignable, tuple<_T1, _T2>::__nothrow_assignable): New helper functions for exception specifications. (tuple::operator=(const tuple&), tuple::operator=(tuple&&)) (tuple<_T1, _T2>::operator=(const tuple&)) (tuple<_T1, _T2>::operator=(tuple&&)): Change parameter types to __nonesuch_no_braces when the operator should be defined implicitly. Use __nothrow_assignable for exception specifications. (tuple::operator=(const tuple<_UElements...>&)) (tuple::operator=(tuple<_UElements...>&&)) (tuple<_T1, _T2>::operator=(const tuple<_U1, _U2>&)) (tuple<_T1, _T2>::operator=(tuple<_U1, _U2>&&)) (tuple<_T1, _T2>::operator=(const pair<_U1, _U2>&)) (tuple<_T1, _T2>::operator=(pair<_U1, _U2>&&)): Constrain using __assignable and use __nothrow_assignable for exception specifications. * python/libstdcxx/v6/printers.py (is_specialization_of): Accept gdb.Type as first argument, instead of a string. (StdTuplePrinter._iterator._is_nonempty_tuple): New method to check tuple for expected structure. (StdTuplePrinter._iterator.__init__): Use _is_nonempty_tuple. * testsuite/20_util/tuple/dr2729.cc: New test. * testsuite/20_util/tuple/element_access/get_neg.cc: Change dg-error to dg-prune-output. From-SVN: r263625
Jonathan Wakely committed -
Same as r263561, but for arm: avoid compilation errors caused by poly initializers getting treated as string literals. Tested on arm-none-linux-gnueabihf. gcc/ChangeLog: * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear polyNxK_t element's TYPE_STRING_FLAG. From-SVN: r263624
Szabolcs Nagy committed -
This gives a name to the conditional branch and conditional return patterns, so that it looks neater in dumps and verbose asm. Also, the comment for conditional branch was out of date; this fixes it. * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns (they were unnamed before). Fix comments. From-SVN: r263623
Segher Boessenkool committed -
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01037.html * include/cpplib.h (enum cpp_macro_kind): New. (struct cpp_macro): Make body trailing array. Add kind field, delete traditional flag. * internal.h (_cpp_new_macro): Declare. (_cpp_reserve_room): New inline. (_cpp_commit_buf): Declare. (_cpp_create_trad_definition): Return new macro. * lex.c (_cpp_commit_buff): New. * macro.c (macro_real_token_count): Count backwards. (replace_args): Pointer equality not orderedness. (_cpp_save_parameter): Use _cpp_reserve_room. (alloc_expansion_token): Delete. (lex_expansion_token): Return macro pointer. Use _cpp_reserve_room. (create_iso_definition): Allocate macro itself. Adjust for different allocation ordering. (_cpp_new_macro): New. (_cpp_create_definition): Adjust for API changes. * traditional.c (push_replacement_text): Don't set traditional flag. (save_replacement_text): Likewise. (_cpp_create_trad_definition): Allocate macro itself, Adjust for different allocation ordering. From-SVN: r263622
Nathan Sidwell committed -
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg01016.html libcpp/ * cpp-id-data.h (uchar, UC): Move to internal.h (struct cpp_macro): Move to cpplib.h. * internal.h (uchar, UC): From cpp-id-data.h. * include/cpplib.h (struct cpp_macro): From cpp-id-data.h. gcc/c-family/ * c-ada-spec.c: Don't #include "cpp-id-data.h" * c-cppbuiltin.c: Likewise. gcc/ * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h". From-SVN: r263618
Nathan Sidwell committed -
2018-08-17 Richard Biener <rguenther@suse.de> PR tree-optimization/86841 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi. From-SVN: r263615
Richard Biener committed -
2018-08-17 Martin Liska <mliska@suse.cz> * common.opt: Remove Warn, Init and Report for options with Ignore/Deprecated flag. Warning is done automatically for Deprecated flags. * config/i386/i386.opt: Likewise. * config/ia64/ia64.opt: Likewise. * config/rs6000/rs6000.opt: Likewise. * cppbuiltin.c (define_builtin_macros_for_compilation_flags): Remove usage of flag_check_pointer_bounds. * lto-wrapper.c (merge_and_complain): Do not handle OPT_fcheck_pointer_bounds. (append_compiler_options): Likewise. * opt-functions.awk: Do not handle Deprecated. * optc-gen.awk: Check that Var, Report and Init are not used for an option with Ignore/Deprecated flag. * opts-common.c (decode_cmdline_option): Do not report CL_ERR_DEPRECATED. (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated options. * opts.h (struct cl_option): Remove cl_deprecated flag. (CL_ERR_DEPRECATED): Remove error enum value. 2018-08-17 Martin Liska <mliska@suse.cz> * g++.dg/opt/mpx.C: Fix scanned pattern. * gcc.target/i386/mpx.c: Likewise. * g++.dg/warn/Wunreachable-code-1.C: Remove. * g++.dg/warn/Wunreachable-code-2.C: Likewise. * gcc.dg/torture/pr52969.c: Likewise. * g++.dg/warn/pr31246-2.C: Likewise. * g++.dg/warn/pr31246.C: Likewise. * gcc.dg/pr33092.c: Likewise. * g++.dg/opt/eh1.C: Remove a deprecated option. * g++.dg/template/inline1.C: Likewise. * g++.dg/tree-ssa/pr81408.C: Likewise. * gcc.dg/pr41837.c: Likewise. * gcc.dg/pr41841.c: Likewise. * gcc.dg/pr42250.c: Likewise. * gcc.dg/pr43084.c: Likewise. * gcc.dg/pr43317.c: Likewise. * gcc.dg/pr51879-18.c: Likewise. * gcc.dg/torture/pr36066.c: Likewise. * gcc.dg/tree-ssa/ifc-8.c: Likewise. * gcc.dg/tree-ssa/ifc-cd.c: Likewise. * gcc.dg/tree-ssa/pr19210-1.c: Likewise. * gcc.dg/tree-ssa/pr45122.c: Likewise. * gcc.target/i386/pr45352-2.c: Likewise. * gcc.target/i386/zee.c: Likewise. * gfortran.dg/auto_char_len_2.f90: Likewise. * gfortran.dg/auto_char_len_4.f90: Likewise. * gfortran.dg/c_ptr_tests_15.f90: Likewise. * gfortran.dg/char_array_structure_constructor.f90: Likewise. * gfortran.dg/gomp/pr47331.f90: Likewise. * gfortran.dg/pr40999.f: Likewise. * gfortran.dg/pr41011.f: Likewise. * gfortran.dg/pr42051.f03: Likewise. * gfortran.dg/pr46804.f90: Likewise. * gfortran.dg/pr83149_1.f90: Likewise. * gfortran.dg/pr83149_b.f90: Likewise. * gfortran.dg/whole_file_1.f90: Likewise. * gfortran.dg/whole_file_10.f90: Likewise. * gfortran.dg/whole_file_11.f90: Likewise. * gfortran.dg/whole_file_12.f90: Likewise. * gfortran.dg/whole_file_13.f90: Likewise. * gfortran.dg/whole_file_14.f90: Likewise. * gfortran.dg/whole_file_15.f90: Likewise. * gfortran.dg/whole_file_16.f90: Likewise. * gfortran.dg/whole_file_17.f90: Likewise. * gfortran.dg/whole_file_18.f90: Likewise. * gfortran.dg/whole_file_19.f90: Likewise. * gfortran.dg/whole_file_2.f90: Likewise. * gfortran.dg/whole_file_20.f03: Likewise. * gfortran.dg/whole_file_3.f90: Likewise. * gfortran.dg/whole_file_4.f90: Likewise. * gfortran.dg/whole_file_5.f90: Likewise. * gfortran.dg/whole_file_6.f90: Likewise. * gfortran.dg/whole_file_7.f90: Likewise. * gfortran.dg/whole_file_8.f90: Likewise. * gfortran.dg/whole_file_9.f90: Likewise. * gcc.dg/vect/vect.exp: Likewise. 2018-08-17 Martin Liska <mliska@suse.cz> * c.opt: Remove Warn, Init and Report for options with Ignore/Deprecated flag. Warning is done automatically for Deprecated flags. From-SVN: r263614
Martin Liska committed -
2018-08-17 Richard Biener <rguenther@suse.de> PR middle-end/86505 * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len () across a va-arg-pack using call adjust its return value accordingly. * gcc.dg/torture/pr86505.c: New testcase. From-SVN: r263613
Richard Biener committed -
re PR tree-optimization/86853 (sprintf optimization for wide strings doesn't account for conversion failure) gcc/ChangeLog: PR tree-optimization/86853 * gimple-ssa-sprintf.c (struct format_result): Rename member. (struct fmtresult): Add member and initialize it in ctors. (format_character): Handle %C. Extend range to NUL. Set MAYFAIL. (format_string): Handle %S the same as %ls. Set MAYFAIL. (format_directive): Set POSUNDER4K when MAYFAIL is set. (parse_directive): Handle %C same as %c. (sprintf_dom_walker::compute_format_length): Adjust. (is_call_safe): Adjust. gcc/testsuite/ChangeLog: PR tree-optimization/86853 * gcc.dg/tree-ssa/builtin-sprintf-10.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-11.c: New test. * gcc.dg/tree-ssa/builtin-sprintf-warn-18.c: Adjust. From-SVN: r263612
Martin Sebor committed -
From-SVN: r263611
GCC Administrator committed
-
- 16 Aug, 2018 25 commits
-
-
* builtins.c (c_strlen): Add new parameter eltsize. Use it for determining how to count the elements. * builtins.h (c_strlen): Adjust prototype. * expr.c (string_constant): Add new parameter mem_size. Set *mem_size appropriately. * expr.h (string_constant): Adjust protoype. * gimple-fold.c (get_range_strlen): Add new parameter eltsize. * gimple-fold.h (get_range_strlen): Adjust prototype. * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize. (format_string): Call get_string_length with eltsize. From-SVN: r263607
Bernd Edlinger committed -
Without this patch, the "line span" markers and the line numbering interacted badly, leading to stray copies of the line-span markers appearing as prefixes on the first source line in a span: missing-header-fixit-3.c: In function 'test': missing-header-fixit-3.c:9:3: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 9 | printf ("%i of %i\n", i, j); | ^~~~~~ missing-header-fixit-3.c:9:3: warning: incompatible implicit declaration of built-in function 'printf' missing-header-fixit-3.c:9:3: note: include '<stdio.h>' or provide a declaration of 'printf' missing-header-fixit-3.c:1:1: |+#include <stdio.h> missing-header-fixit-3.c:1:1:1 | /* Example of a fix-it hint that adds a #include directive, missing-header-fixit-3.c:9:3: missing-header-fixit-3.c:9:3:9 | printf ("%i of %i\n", i, j); | ^~~~~~ With this patch, we now correctly print: missing-header-fixit-3.c: In function 'test': missing-header-fixit-3.c:9:3: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 9 | printf ("%i of %i\n", i, j); | ^~~~~~ missing-header-fixit-3.c:9:3: warning: incompatible implicit declaration of built-in function 'printf' missing-header-fixit-3.c:9:3: note: include '<stdio.h>' or provide a declaration of 'printf' missing-header-fixit-3.c:1:1: + |+#include <stdio.h> 1 | /* Example of a fix-it hint that adds a #include directive, missing-header-fixit-3.c:9:3: 9 | printf ("%i of %i\n", i, j); | ^~~~~~ gcc/ChangeLog: * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string to emit the span, rather than setting it as the prefix. gcc/testsuite/ChangeLog: * gcc.dg/missing-header-fixit-3.c: New test. From-SVN: r263606
David Malcolm committed -
This commit slightly tweaks line-insertion fix-it hints, so that with line-numbering, rather than e.g.: 99 | x = a; |+ break; 110 | case 'b': | ^~~~~~~~ we fill the margin with "+": 99 | x = a; +++ |+ break; 110 | case 'b': | ^~~~~~~~ to emphasize that this is a suggested new line, rather than the user's source. gcc/ChangeLog: * diagnostic-show-locus.c (layout::start_annotation_line): Add "margin_char" parameter, defaulting to space. Use it in place of pp_space for the initial part of the margin. (layout::print_leading_fixits): Use '+' when filling the margin of line-insertion fix-it hints. gcc/testsuite/ChangeLog: * gcc.dg/plugin/diagnostic-test-show-locus-bw-line-numbers.c (test_fixit_insert_newline): Update expected output to show '+' characters in margin of line-insertion fix-it hint. From-SVN: r263605
David Malcolm committed -
There are some patterns that recognise the parallel of an add and a compare, and split it back to the same two insns. This apparently helped RIOS machines before RTL scheduling existed? Either way, it isn't helpful anymore, and even hurts a tiny bit. So, delete it. * config/rs6000/rs6000.md (two unnamed define_insn and define_split): Delete. From-SVN: r263604
Segher Boessenkool committed -
There were many insns that set "length 4" explicitly while that does not make anything clearer to the reader. So, simplify the code. * config/rs6000/altivec.md: Don't set length attribute to the default value. * config/rs6000/darwin.md: Ditto. * config/rs6000/dfp.md: Ditto. * config/rs6000/htm.md: Ditto. * config/rs6000/rs6000.md: Ditto. * config/rs6000/sync.md: Ditto. * config/rs6000/vsx.md: Ditto. From-SVN: r263603
Segher Boessenkool committed -
Now that it is the default for branch insns like for all other insns, we don't need to set it explicitly so often anymore. * config/rs6000/altivec.md: Don't set length attribute to the default value, for branch instructions. * config/rs6000/darwin.md: Ditto. * config/rs6000/rs6000.md: Ditto. From-SVN: r263602
Segher Boessenkool committed -
This moves what is currently the default of the length attribute to the only branch instruction patterns where it applies, namely, the B-form instructions. It was used for the "jump" instruction as well before, but that is an I-form instruction and always has length 4. * config/rs6000/rs6000.md (length): Always define as const_int 4. (unnamed conditional branch define_insn): Set length to 4 or 8 depending on offset. (<bd>_<mode>): Similar, for alternative 0. (<bd>tf_<mode>): Ditto. From-SVN: r263601
Segher Boessenkool committed -
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00977.html libcpp/ * internal.h (_cpp_save_parameter): Take parmno, not macro. (_cpp_unsave_parameters): Declare. * macro.c (_cpp_save_parameter): Take parm number, not macro. Return true on success. (_cpp_unsave_parameters): New. (parse_params): Take parm_no and variadic pointers, not macro. Reimplement parsing logic. (create_iso_definition): Adjust parse_params changes. Call _cpp_unsave_parameters here. (_cpp_create_definition): Don't unsave params here. * traditional.c (scan_parameters): Take n_param pointer, adjust. (_cpp_create_trad_definition): Ajust scan_parameters change. Call _cpp_unsave_parameters. gcc/testsuite/ * gcc.dg/cpp/macsyntx.c: Adjust expected errors. * gcc.dg/cpp/macsyntx2.c: likewise. From-SVN: r263600
Nathan Sidwell committed -
PR testsuite/86745 * gcc.target/i386/avx-cvt-2.c: Loosen scan-assembler strings. * gcc.target/i386/avx-cvt-2.c: Ditto. From-SVN: r263598
Uros Bizjak committed -
* include/tr1/legendre_function.tcc (__sph_legendre): Avoid warning about signed/unsigned comparison. From-SVN: r263596
Jonathan Wakely committed -
PR c++/70693 reports a crash within -Wmisleading-indentation in get_visual_column, reading past the end of a source line. The issue occurs due to a stray carriage return aka '\r' aka ^M, occurring towards the end of line 35 of attachment 38289 - but not at the end itself. This carriage return confuses our line numbering: from that point in the file, the lexer (and thus location_t values) use line numbers that are one larger than those seen by input.c, "cat -n" and emacs. This discrepancy between the lexer's line numbering and input.c's line numbering leads to an out-of-range read in get_visual_column (trying to read column 8, to locate the first non-whitespace on the line containing "break;", but finding the next line, which is only 4 characters long). This patch fixes the ICE by adding a range check to get_visual_column before accessing the input.c line buffer. This is arguably papering over the root cause, but there are presumably other ways of triggering such an out-of-range read by writing to the source file after the lexer but before -Wmisleading-indentation, and we ought to be not ICE in the face of that. gcc/c-family/ChangeLog: PR c++/70693 * c-common.c (selftest::c_family_tests): Call selftest::c_indentation_c_tests. * c-common.h (selftest::c_indentation_c_tests): New decl. * c-indentation.c: Include "selftest.h". (next_tab_stop): Add "tab_width" param, rather than accessing cpp_opts. (get_visual_column): Likewise. Clarify comment. Bulletproof against reading past the end of the line. (get_first_nws_vis_column): Add "tab_width" param. (detect_intervening_unindent): Likewise. (should_warn_for_misleading_indentation): Read tab width from cpp_opts and pass around. (selftest::test_next_tab_stop): New test. (selftest::assert_get_visual_column_succeeds): New function. (ASSERT_GET_VISUAL_COLUMN_SUCCEEDS): New macro. (selftest::assert_get_visual_column_fails): New function. (ASSERT_GET_VISUAL_COLUMN_FAILS): New macro. (selftest::test_get_visual_column): New test. (selftest::c_indentation_c_tests): New function. gcc/testsuite/ChangeLog: PR c++/70693 * c-c++-common/Wmisleading-indentation-pr70693.c: New test. From-SVN: r263595
David Malcolm committed -
This allows copy_blkmode_to_reg to perform larger copies when it is safe to do so by calculating the bitsize per iteration doing the maximum copy allowed that does not read more than the amount of bits left to copy. Strictly speaking, this copying is only done if: 1. the target supports fast unaligned access 2. no padding is being used. This should avoid the issues of the first patch (PR85123) but still work for targets that are safe to do so. Original patch https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01088.html Previous respin https://gcc.gnu.org/ml/gcc-patches/2018-04/msg00239.html gcc/ 2018-08-16 Tamar Christina <tamar.christina@arm.com> * expr.c (copy_blkmode_to_reg): Perform larger copies when safe. From-SVN: r263594
Tamar Christina committed -
C++17 says to use std::uncaught_exceptions() here instead of std::uncaught_exception() but since we only care whether the result is non-zero (and we aren't planning to remove the deprecated version) we can just keep using std::uncaught_exception() and suppress the warning. * include/std/ostream (basic_ostream::sentry::~sentry): Suppress deprecation warnings for using uncaught_exception(). From-SVN: r263593
Jonathan Wakely committed -
Committed on behalf of Matthew Malcomson. 2018-08-16 Matthew Malcomson <matthew.malcomson@arm.com> gcc/ * doc/rtl.texi: Replace old RTX class names with new names. From-SVN: r263592
Matthew Malcomson committed -
* expmed.h (canonicalize_comparison): New declaration. * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function. * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison. * optabs.c (prepare_cmp_insn): Likewise. * rtl.h (unsigned_condition_p): New function which checks if a comparison operator is unsigned. * gcc.target/aarch64/imm_choice_comparison.c: New test. From-SVN: r263591
Vlad Lazar committed -
PR libstdc++/86447 * src/c++11/cow-stdexcept.cc [_GLIBCXX_FULLY_DYNAMIC_STRING] (logic_error::logic_error(logic_error&&)) (logic_error::operator=(logic_error&&)) (runtime_error::runtime_error(runtime_error&&)) (runtime_error::operator=(runtime_error&&)): Copy strings instead of moving, to avoid allocating empty reps for moved-from strings. From-SVN: r263590
Jonathan Wakely committed -
https://gcc.gnu.org/ml/gcc-patches/2018-08/msg00897.html libcpp/ * include/cpplib.h (cpp_user_macro_p, cpp_builtin_macro_p) (cpp_macro_p): New inlines. * directives.c (do_pragma_poison): Use cpp_macro_p. (do_ifdef, do_ifndef): Likewise. Use _cpp_maybe_notify_macro_use. (cpp_pop_definition): Use cpp_macro_p. Move _cpp_free_definition earlier. Don't zap node directly. * expr.c (parse_defined): Use _cpp_maybe_notify_macro_use & cpp_macro_p. * files.c (should_stack_file): Use cpp_macro_p. * identifiers.c (cpp_defined): Likewise. * internal.h (_cpp_mark_macro): Use cpp_user_macro_p. (_cpp_notify_macro_use): Declare. (_cpp_maybe_notify_macro_use): New inline. * lex.c (is_macro): Use cpp_macro_p. * macro.c (_cpp_warn_if_unused_macro): Use cpp_user_macro_p. (enter_macro_context): Likewise. (_cpp_create_definition): Use cpp_builtin_macro_p, cpp_user_macro_p. Move _cpp_free_definition earlier. (_cpp_notify_macro_use): New, broken out of multiple call sites. * traditional.c (fun_like_macro_p): Use cpp_builtin_macro_p. (maybe_start_funlike, _cpp_scan_out_logical_line) (push_replacement_text): Likewise. gcc/c-family/ * c-ada-spec.c (count_ada_macro): Use cpp_user_macro_p. (store_ada_macro): Likewise. * c-ppoutput.c (cb_used_define, dump_macro): Likewise. * c-spellcheck.cc (should-suggest_as_macro_p): Likewise, gcc/ * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p. * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise. gcc/cp/ * name-lookup.c (lookup_name_fuzzy): Likewise. gcc/fortran/ * cpp.c (dump_macro): Use cpp_user_macro_p. From-SVN: r263587
Nathan Sidwell committed -
2018-08-16 Iain Sandoe <iain@sandoe.co.uk> gcc/testsuite * gcc.dg/memcmp-1.c (lib_memcmp): Apply __USER_LABEL_PREFIX__. (lib_strncmp): Likewise. From-SVN: r263586
Iain Sandoe committed -
so don't try to do tests with it. 2018-08-16 Iain Sandoe <iain@sandoe.co.uk> gcc/testsuite/ * c-c++-common/asan/pointer-subtract-3.c: Skip for Darwin. * c-c++-common/asan/pointer-subtract-4.c: Likewise. * g++.dg/torture/pr44295.C : Likewise. From-SVN: r263585
Iain Sandoe committed -
The original issue comes from the fact that the code does ... foo (... bar) { return bar; } The expansion of the return statement causes GCC to try to return the value in a register. GCC will try to emit the move then, from MEM to REG (due to the SSA temporary.). It checks for a mov optab for this which isn't available and then tries to do the move in bits using emit_move_multi_word. emit_move_multi_word will split the move into sub parts, but then needs to get the sub parts and does this using subregs, but it's told it can't do subregs! The compiler is now stuck in an infinite loop. The way this is worked around in the back-end is that we have move patterns in neon.md that usually just force the register instead of checking with the back-end. This prevents emit_move_multi_word from being needed. However the pattern for V4HF and V8HF were guarded by TARGET_NEON && TARGET_FP16. I don't believe the TARGET_FP16 guard to be needed, because the pattern doesn't actually generate code and requires another pattern for that, and a reg to reg move should always be possible anyway. So allowing the force to register here is safe and it allows the compiler to generate a correct error instead of ICEing in an infinite loop. gcc/ 2018-08-16 Tamar Christina <tamar.christina@arm.com> PR target/84711 * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg. * config/arm/neon.md (movv4hf, movv8hf): Refactored to.. (mov<mov>): ..this and enable unconditionally. From-SVN: r263584
Tamar Christina committed -
2018-08-15 Iain Sandoe <iain@sandoe.co.uk> gcc/testsuite: PR testsuite/78544 * gcc.dg/tree-prof/section-attr-1.c: Add Darwin-specific section attributes and matching. * gcc.dg/tree-prof/section-attr-2.c: Likewise. * gcc.dg/tree-prof/section-attr-3.c: Likewise. 6 From-SVN: r263583
Iain Sandoe committed -
About 13 years ago the reg-to-reg patterns were split up, before that time output_move_double could actually handle this case. After the split was done most patterns were updated except for *neon_mov which incorrectly retained reg,reg as a valid alternative. However output_move_double can not handle this and simply returns "" and asserts. This pattern is essentially dead and I'm removing it for clarity. gcc/ 2018-08-16 Tamar Christina <tamar.christina@arm.com> * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative. From-SVN: r263582
Tamar Christina committed -
This patch replaces the "Common" attribute in some aarch64 options with "Target" to make them target-dependent. This doesn't affect their behaviour or how they are documented with "--help", but does mean that they follow the option specification that target-specific options are given the "Target" attribute. Tested by ensuring the changed options are still accepted as before and that they aren't invokable from an invalid target. Bootstrapped and regression tested on aarch64-none-elf with ... regressions. 2018-08-16 Sam Tebbs <sam.tebbs@arm.com> * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt) (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace "Common" with "Target". From-SVN: r263578
Sam Tebbs committed -
2018-08-16 Iain Sandoe <iain@sandoe.co.uk> gcc/testsuite * gcc.dg/asan/pr81923.c: Stringify __USER_LABEL_PREFIX__. From-SVN: r263577
Iain Sandoe committed -
From-SVN: r263576
GCC Administrator committed
-
- 15 Aug, 2018 3 commits
-
-
* config/i386/i386.opt (mmitigate-rop): Mark as deprecated. * doc/invoke.texi (mmitigate-rop): Remove. * config/i386/i386.c: Do not include "regrename.h". (ix86_rop_should_change_byte_p, reg_encoded_number) (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop): Remove. (ix86_reorg): Remove call to ix86_mitigate_rop. * config/i386/i386.md (attr "modrm_class"): Remove. (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor) (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se) (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override. testsuite/Changelog: * gcc.target/i386/rop1.c: Remove. * gcc.target/i386/pr83554 (dg-options): Remove -mmitigate-rop. From-SVN: r263572
Uros Bizjak committed -
* ChangeLog: Fix whitespace. * testsuite/ChangeLog: Ditto. From-SVN: r263571
Uros Bizjak committed -
[testsuite] 2018-08-13 Will Schmidt <will_schmidt@vnet.ibm.com> * gcc.target/powerpc/fold-vec-splat-char.c: New. * gcc.target/powerpc/fold-vec-splat-floatdouble.c: New. * gcc.target/powerpc/fold-vec-splat-int.c: New. * gcc.target/powerpc/fold-vec-splat-longlong.c: New. * gcc.target/powerpc/fold-vec-splat-pixel.c: New. * gcc.target/powerpc/fold-vec-splat-short.c: New. From-SVN: r263570
Will Schmidt committed
-