forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 3
Master #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Master #3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263591 138bc75d-0d04-0410-961f-82ee72b054a4
Committed on behalf of Matthew Malcomson. 2018-08-16 Matthew Malcomson <[email protected]> gcc/ * doc/rtl.texi: Replace old RTX class names with new names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263592 138bc75d-0d04-0410-961f-82ee72b054a4
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(). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263593 138bc75d-0d04-0410-961f-82ee72b054a4
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 <[email protected]> * expr.c (copy_blkmode_to_reg): Perform larger copies when safe. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263594 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263595 138bc75d-0d04-0410-961f-82ee72b054a4
* include/tr1/legendre_function.tcc (__sph_legendre): Avoid warning about signed/unsigned comparison. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263596 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc.target/i386/avx-cvt-2.c: Loosen scan-assembler strings. * gcc.target/i386/avx-cvt-2.c: Ditto. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263598 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263600 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263601 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263602 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263603 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263604 138bc75d-0d04-0410-961f-82ee72b054a4
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263605 138bc75d-0d04-0410-961f-82ee72b054a4
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263606 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263607 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263611 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263612 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263613 138bc75d-0d04-0410-961f-82ee72b054a4
2018-08-17 Martin Liska <[email protected]> * 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 <[email protected]> * 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 <[email protected]> * c.opt: Remove Warn, Init and Report for options with Ignore/Deprecated flag. Warning is done automatically for Deprecated flags. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263614 138bc75d-0d04-0410-961f-82ee72b054a4
PR tree-optimization/86841 * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263615 138bc75d-0d04-0410-961f-82ee72b054a4
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". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263618 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263622 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263623 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263624 138bc75d-0d04-0410-961f-82ee72b054a4
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263625 138bc75d-0d04-0410-961f-82ee72b054a4
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263626 138bc75d-0d04-0410-961f-82ee72b054a4
Huibin Wang <[email protected]> Sandra Loosemore <[email protected]> Chung-Lin Tang <[email protected]> Andrew Jenner <[email protected]> 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263627 138bc75d-0d04-0410-961f-82ee72b054a4
Huibin Wang <[email protected]> Sandra Loosemore <[email protected]> Chung-Lin Tang <[email protected]> C-SKY port: Backend implementation gcc/ * config/csky/*: New. * common/config/csky/*: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263628 138bc75d-0d04-0410-961f-82ee72b054a4
C-SKY port: Documentation gcc/ * doc/extend.texi (C-SKY Function Attributes): New section. * doc/invoke.texi (Option Summary): Add C-SKY options. (C-SKY Options): New section. * doc/md.texi (Machine Constraints): Document C-SKY constraints. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263629 138bc75d-0d04-0410-961f-82ee72b054a4
Chung-Lin Tang <[email protected]> Xianmiao Qu <[email protected]> C-SKY port: Testsuite gcc/testsuite/ * g++.dg/Wno-frame-address.C: Adjust for C-SKY. * g++.dg/torture/type-generic-1.C: Likewise. * gcc.c-torture/compile/20000804-1.c: Likewise. * gcc.c-torture/execute/20101011-1.c: Likewise. * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Likewise. * gcc.dg/20020312-2.c: Likewise. * gcc.dg/Wno-frame-address.c: Likewise. * gcc.dg/c11-true_min-1.c: Likewise. * gcc.dg/sibcall-10.c: Likewise. * gcc.dg/sibcall-9.c: Likewise. * gcc.dg/stack-usage-1.c: Likewise. * gcc.dg/torture/float32-tg-3.c: Likewise. * gcc.dg/torture/float32x-tg-3.c: Likewise. * gcc.dg/torture/float64-tg-3.c: Likewise. * gcc.dg/torture/float64x-tg-3.c: Likewise. * gcc.dg/torture/type-generic-1.c: Likewise. * gcc.target/csky/*: New. * lib/target-supports.exp (check_profiling_available): Add csky-*-elf. (check_effective_target_hard_float): Handle C-SKY targets with single-precision hard float only. (check_effective_target_logical_op_short_circuit): Handle C-SKY. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263630 138bc75d-0d04-0410-961f-82ee72b054a4
* cp-tree.h (cxx_readonly_error): Add location_t argument. * typeck2.c (cxx_readonly_error): Add LOC argument, pass it to ERROR_FOR_ASSIGNMENT macro and readonly_error. Add LOC argument to ERROR_FOR_ASSIGNMENT macro, use error_at instead of error and pass LOC to it. Formatting fixes. * typeck.c (cp_build_unary_op): Pass location to cxx_readonly_error. (cp_build_modify_expr): Pass loc to cxx_readonly_error. * semantics.c (finish_asm_stmt): Pass input_location to cxx_readonly_error. * g++.dg/diagnostic/pr86993.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263891 138bc75d-0d04-0410-961f-82ee72b054a4
type does not have a TYPE_SIZE_UNIT. * gcc.c-torture/compile/dse.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263896 138bc75d-0d04-0410-961f-82ee72b054a4
This patch adds a fix-it hint to missing "typename" errors in the C++ frontend, suggesting the insertion of "typename ". This addresses part of PR c++/63392; however it does not improve the error-recovery for such cases. gcc/cp/ChangeLog: PR c++/63392 * parser.c (cp_parser_diagnose_invalid_type_name): Add fix-it hint. gcc/testsuite/ChangeLog: PR c++/63392 * g++.dg/diagnostic/missing-typename.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263899 138bc75d-0d04-0410-961f-82ee72b054a4
…ed integer types gcc/ChangeLog: PR tree-optimization/87112 * builtins.c (expand_builtin_strnlen): Convert c_strlen result to the type of the bound argument. gcc/testsuite/ChangeLog: PR tree-optimization/87112 * gcc.dg/pr87112.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263900 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263904 138bc75d-0d04-0410-961f-82ee72b054a4
…lexible array member plus offset gcc/ChangeLog: PR tree-optimization/86914 * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF. gcc/testsuite/ChangeLog: PR tree-optimization/86914 * gcc.dg/strlenopt-57.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263905 138bc75d-0d04-0410-961f-82ee72b054a4
* tree-ssa-dse.c (compute_trims): Handle non-constant TYPE_SIZE_UNIT. PR tree-optimization/87110 * gcc.c-torture/compile/pr87110.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263906 138bc75d-0d04-0410-961f-82ee72b054a4
2018-08-28 Martin Liska <[email protected]> * tree.h: Update documentation of fndecl_built_in_p functions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263907 138bc75d-0d04-0410-961f-82ee72b054a4
PR tree-optimization/87117 * tree-ssa-operands.c (add_stmt_operand): STRING_CST may get virtual operands. (get_expr_operands): Handle STRING_CST like other decls. * gcc.dg/lvalue-5.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263908 138bc75d-0d04-0410-961f-82ee72b054a4
PR tree-optimization/87117 * tree-ssa-pre.c (compute_avail): Do not make expressions with predicated values available. (get_expr_value_id): Assert we do not run into predicated value expressions. * gcc.dg/pr87117-2.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263910 138bc75d-0d04-0410-961f-82ee72b054a4
PR tree-optimization/87117 * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P. * gcc.dg/pr87117-1.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263911 138bc75d-0d04-0410-961f-82ee72b054a4
PR tree-optimization/87117 * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Handle removed stmt without LHS (GIMPLE_NOP). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263912 138bc75d-0d04-0410-961f-82ee72b054a4
This test was failing for Power 7 due to the lack of hw support for unaligned accesses. 2018-08-28 Richard Sandiford <[email protected]> gcc/testsuite/ PR testsuite/87078 * gcc.dg/vect/slp-37.c: Restrict scan tests to vect_hw_misalign. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263913 138bc75d-0d04-0410-961f-82ee72b054a4
Fixes many testsuite failures for SVE. 2018-08-28 Richard Sandiford <[email protected]> gcc/ * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded use of tree_to_shwi. Remove duplicated test for the size being a whole number of bytes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263914 138bc75d-0d04-0410-961f-82ee72b054a4
* calls.c (maybe_warn_nonstring_arg): Punt early if warn_stringop_overflow is zero. Don't call get_range_strlen on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST. Swap comparison operands to have constants on rhs. Only use lenrng[1] if non-NULL and INTEGER_CST. Don't uselessly increment lenrng[0]. * gcc.dg/pr87099.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263915 138bc75d-0d04-0410-961f-82ee72b054a4
PR fortran/80477 * trans-expr.c (gfc_conv_procedure_call): Allocatable class scalar results being passed to a derived type formal argument are finalized if possible. Otherwise, rely on existing code for deallocation. Make the deallocation of allocatable result components conditional on finalization not taking place. Make the freeing of data components after finalization conditional on the data being NULL. (gfc_trans_arrayfunc_assign): Change the gcc_assert to a condition to return NULL_TREE. (gfc_trans_assignment_1): If the assignment is class to class and the rhs expression must be finalized but the assignment is not marked as a polymorphic assignment, use the vptr copy function instead of gfc_trans_scalar_assign. PR fortran/86481 * trans-expr.c (gfc_conv_expr_reference): Do not add the post block to the pre block if the expression is to be finalized. * trans-stmt.c (gfc_trans_allocate): If the expr3 must be finalized, load the post block into a finalization block and add it right at the end of the allocation block. 2017-08-28 Paul Thomas <[email protected]> PR fortran/80477 * gfortran.dg/class_result_7.f90: New test. * gfortran.dg/class_result_8.f90: New test. * gfortran.dg/class_result_9.f90: New test. PR fortran/86481 * gfortran.dg/allocate_with_source_25.f90: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263916 138bc75d-0d04-0410-961f-82ee72b054a4
PR tree-optimization/87124 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against constants before looking up avail. * g++.dg/torture/pr87124.C: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263918 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog: * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on GCC_VERSION for usage of "__gcc_dump_printf__" format from >= 3005 to >= 9000. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263920 138bc75d-0d04-0410-961f-82ee72b054a4
2018-08-28 Paolo Carlini <[email protected]> PR c++/86546 * decl.c (finish_case_label): If the type is erroneous early return error_mark_node. /testsuite 2018-08-28 Paolo Carlini <[email protected]> PR c++/86546 * g++.dg/other/switch4.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263921 138bc75d-0d04-0410-961f-82ee72b054a4
Previously the logic that turned "a/b/c/../.." into "a/" failed to preserve an empty path at the end of the iteration sequence, as required by the trailing slash. That meant the result didn't meet the class invariants, and that "a/b/c/d/../../.." would remove four components instead of the three that "../../.." should remove. PR libstdc++/87116 * src/filesystem/std-path.cc (path::lexically_normal): When handling a dot-dot filename, preserve an empty final component in the iteration sequence. [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Use preferred-separator for root-directory. * testsuite/27_io/filesystem/path/generation/normal.cc: Add new tests for more than two adjacent dot-dot filenames. [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Replace slashes with preferred-separator in expected normalized strings. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263922 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog: PR middle-end/86631 * calls.c (alloc_max_size): Treat HOST_WIDE_INT special. * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function. (pass_walloca::gate): Use it. (alloca_call_type): Same. (pass_walloca::execute): Same. * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special. gcc/testsuite/ChangeLog: PR middle-end/86631 * g++.dg/Walloca1.C: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263928 138bc75d-0d04-0410-961f-82ee72b054a4
PR middle-end/86631 * g++.dg/Walloca1.C: Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263930 138bc75d-0d04-0410-961f-82ee72b054a4
* match.pd: Add boolean optimizations. PR tree-optimization/87009 * gcc.dg/pr87009.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263931 138bc75d-0d04-0410-961f-82ee72b054a4
to OP parmeter of generated function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263934 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263936 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263940 138bc75d-0d04-0410-961f-82ee72b054a4
This is the gofrontend version of https://golang.org/cl/91796.
This is part of that CL, just the compiler change and required runtime
changes, in preparation for updating libgo to 1.11.
Relevant part of original CL description:
The hmap field in the maptype is only used by the runtime to check the sizes of
the hmap structure created by the compiler and runtime agree.
Comments are already present about the hmap structure definitions in the
compiler and runtime needing to be in sync.
Reviewed-on: https://go-review.googlesource.com/130976
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263941 138bc75d-0d04-0410-961f-82ee72b054a4
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263942 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ * config/riscv/pic.md: Rewrite. * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for invalid address. * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete. (SOFTF, default_load, softload, softstore): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263943 138bc75d-0d04-0410-961f-82ee72b054a4
This pull request was closed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.