aboutsummaryrefslogtreecommitdiff
path: root/gcc
AgeCommit message (Collapse)AuthorFilesLines
2019-10-24ipa-reference.c (ipa_reference_optimization_summary_d): Rename ↵Jan Hubicka4-85/+151
statics_not_read and statics_not_written to statics_read and... * ipa-reference.c (ipa_reference_optimization_summary_d): Rename statics_not_read and statics_not_written to statics_read and statics_written respectively. (no_module_statics): New static var. (ipa_reference_get_not_read_global): Rename to ... (ipa_reference_get_read_global): ... this. (ipa_reference_get_not_written_global): Rename to ... (ipa_reference_get_written_global): ... this. (dump_static_vars_set_to_file): Dump no_module_statics. (copy_static_var_set): Add for propagation parameter. (ipa_init): Initialize no_module_statics. (ipa_ref_opt_summary_t::duplicate): Update. (ipa_ref_opt_summary_t::remove): Update. (propagate): Update. (write_node_summary_p): Look correctly for bitmap differences. (ipa_reference_write_optimization_summary): Update. (ipa_reference_read_optimization_summary): Update. * ipa-reference.h (ipa_reference_get_not_read_global): Rename to ... (ipa_reference_get_read_global): ... this. (ipa_reference_get_not_written_global): Rename to ... (ipa_reference_get_written_global): ... this. * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Update. (call_may_clobber_ref_p_1): Update. From-SVN: r277403
2019-10-24MSP430: Remove unused msp430_hard_regno_nregs_*_padding functionsJozef Lawrynowicz2-22/+9
2019-10-24 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/msp430.c (msp430_hard_regno_nregs_has_padding): Remove and add comment. (msp430_hard_regno_nregs_with_padding): Remove. From-SVN: r277395
2019-10-24MSP430: Tweaks to generation of 430X instructionsJozef Lawrynowicz7-6/+36
gcc/ChangeLog: 2019-10-24 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/constraints.md: Allow post_inc for "Ya" constraint. * config/msp430/msp430.md (430x_shift_left): Use RLAM when the constant shift amount is between 1 and 4. (430x_arithmetic_shift_right): Use RRAM when the constant shift amount is between 1 and 4. gcc/testsuite/ChangeLog: 2019-10-24 Jozef Lawrynowicz <jozef.l@mittosystems.com> * gcc.target/msp430/emulate-slli.c: Skip for -mcpu=msp430. Add shift by a constant 5 bits. Update scan-assembler directives. * gcc.target/msp430/emulate-srai.c: Likewise. * gcc.target/msp430/emulate-srli.c: Skip for -mcpu=msp430. From-SVN: r277394
2019-10-24re PR tree-optimization/92205 (ICE in vect_get_vec_def_for_stmt_copy, at ↵Richard Biener4-4/+31
tree-vect-stmts.c:1688 since r277322) 2019-10-24 Richard Biener <rguenther@suse.de> PR tree-optimization/92205 * tree-vect-loop.c (vectorizable_reduction): Restrict search for alternate vectype_in to lane-reducing patterns we support. * gcc.dg/vect/pr92205.c: New testcase. From-SVN: r277375
2019-10-24re PR tree-optimization/92203 (ICE in eliminate_stmt, at tree-ssa-sccvn.c:5492)Richard Biener4-2/+55
2019-10-24 Richard Biener <rguenther@suse.de> PR tree-optimization/92203 * treee-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Skip eliminating conversion stmts inserted by insertion. * gcc.dg/torture/pr92203.c: New testcase. From-SVN: r277374
2019-10-24re PR tree-optimization/65930 (Reduction with sign-change not handled)Richard Biener2-1/+6
2019-10-24 Richard Biener <rguenther@suse.de> PR tree-optimization/65930 * gcc.dg/vect/vect-reduc-2short.c: Fix typo. From-SVN: r277373
2019-10-24re PR tree-optimization/65930 (Reduction with sign-change not handled)Richard Biener6-5/+14
2019-10-24 Richard Biener <rguenther@suse.de> PR tree-optimization/65930 * gcc.dg/vect/vect-reduc-2char-big-array.c: Adjust again. * gcc.dg/vect/vect-reduc-2char.c: Likewise. * gcc.dg/vect/vect-reduc-2short.c: Likewise. * gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise. * gcc.dg/vect/vect-reduc-pattern-2c.c: Likewise. From-SVN: r277372
2019-10-24S/390: Use UNSPEC_GET_TP for thread pointer loadsIlya Leoshkevich5-14/+58
gcc/ChangeLog: 2019-10-24 Ilya Leoshkevich <iii@linux.ibm.com> * config/s390/s390.c (s390_get_thread_pointer): Use gen_get_thread_pointer. (s390_expand_split_stack_prologue): Likewise. * config/s390/s390.md (UNSPEC_GET_TP): New UNSPEC. (*get_tp_31): New 31-bit splitter for UNSPEC_GET_TP. (*get_tp_64): New 64-bit splitter for UNSPEC_GET_TP. (get_thread_pointer<mode>): Use UNSPEC_GET_TP, use parameterized name. gcc/testsuite/ChangeLog: 2019-10-24 Ilya Leoshkevich <iii@linux.ibm.com> * gcc.target/s390/load-thread-pointer-once-2.c: New test. From-SVN: r277368
2019-10-24Fix another UBSAN in Fortran coarray.Martin Liska3-0/+13
2019-10-24 Martin Liska <mliska@suse.cz> PR fortran/92174 * array.c (gfc_resolve_array_spec): Break the loop for out of bounds index. * resolve.c (is_non_constant_shape_array): Likewise. From-SVN: r277367
2019-10-24tree-vect-slp.c (vect_analyze_slp): When reduction group SLP discovery fails ↵Richard Biener4-0/+39
try to handle the reduction as part of... 2019-10-24 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (vect_analyze_slp): When reduction group SLP discovery fails try to handle the reduction as part of SLP reduction discovery. * gcc.dg/vect/slp-reduc-9.c: New testcase. From-SVN: r277366
2019-10-24[C++ PATCH] 'std' identifier not neededNathan Sidwell5-17/+24
https://gcc.gnu.org/ml/gcc-patches/2019-10/msg01707.html * cp-tree.c (CPTI_STD_IDENTIFIER): Delete. (std_identifier): Delete. (DECL_NAME_SPACE_STD_P): Compare against std_node. * decl.c (initialize_predefined_identifiers): 'std' is not needed. (cxx_init_decl_processing): Adjust creation of ::std. Use {push,pop}_nested_namespace. (cxx_builtin_function): Use {push,pop}_nested_namespace. * except.c (init_exception_processing): Likewise. * rtti.c (init_rtti_processing): Likewise. From-SVN: r277365
2019-10-23pr70010.c: Add -Wno-psabi.David Edelsohn5-2/+10
* gcc.target/powerpc/pr70010.c: Add -Wno-psabi. * gcc.target/powerpc/pr70010-[12].c: Require LTO. * gcc.target/powerpc/pr91275.c: Add -mcpu=power8. From-SVN: r277363
2019-10-24Daily bump.GCC Administrator1-1/+1
From-SVN: r277362
2019-10-232019-10-23 Steven G. Kargl <kargl@gcc.gnu.org>Steven G. Kargl2-0/+14
dump-parse-tree.c (show_expr): Add dumping of BT_BOZ constants. From-SVN: r277358
2019-10-23Rework how prefixed instruction length is calculated.Michael Meissner6-21/+121
2019-10-23 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/rs6000-protos.h (rs6000_adjust_insn_length): New declaration. * config/rs6000/rs6000.c (rs6000_insn_cost): Use num_insns insn attribute if it exists, rather than the insn size. If we use the insn size, adjust the size to remove the extra size that prefixed instructions take. (rs6000_adjust_insn_length): New function. * config/rs6000/rs6000.h (ADJUST_INSN_LENGTH): New target hook to update the instruction sized if prefixed instructions are used. * config/rs6000/rs6000.md (prefixed_length attribute): Delete. (non_prefixed_length attribute): Delete. (num_insns attribute): New insn attribute to return the number of instructions. (max_prefixed_insns attribute): New insn attribute to return the maximum number of prefixed instructions in an insn. (length attribute): Do not adjust for prefix instructions here, punt to ADJUST_INSN_LENGTH. (mov<mode>_64bit): Set max_prefixed_insns and num_insns. (movtd_64bit_nodm): Set max_prefixed_insns and num_insns. (mov<mode>_ppc64): Set max_prefixed_insns and num_insns. * config/rs6000/vsx.md: (vsx_mov<mode>_64bit): Set max_prefixed_insns and num_insns. From-SVN: r277352
2019-10-23Implement P1286R2, Contra CWG1778Jason Merrill7-87/+32
The C++11 requirement that an explicit exception-specification on a defaulted function match the implicit one was found to be problematic for std::atomic. This paper, adopted in February, simply removes that requirement: if an explicitly defaulted function has a different exception-specification, that now works just like a user-written function: either it isn't noexcept when it could be, or it is noexcept and will call terminate if an exception is thrown. * method.c (defaulted_late_check): Don't check explicit exception-specification on defaulted function. (after_nsdmi_defaulted_late_checks): Remove. * parser.h (struct cp_unparsed_functions_entry): Remove classes. * parser.c (unparsed_classes): Remove. (push_unparsed_function_queues, cp_parser_class_specifier_1): Adjust. From-SVN: r277351
2019-10-23Reformat some code; Add support for generating PLWA with offsets whose ↵Michael Meissner3-7/+49
bottom 2 bits are non-zero. 2019-10-23 Michael Meissner <meissner@linux.ibm.com> * config/rs6000/rs6000.md (mov<mode>_64bit_dm): Reformat. (movtd_64bit_nodm): Reformat. (mov<mode>_32bit): Reformat. (mov<mode>_softfloat): Reformat. (FMOVE128_GPR splitter): Reformat. (DIFD splitter): Reformat. (TI2 splitter): Reformat. * config/rs6000/predicates.md (lwa_operand): If the bottom two bits of the offset for the memory address are non-zero, use PLWA if prefixed instructions are available. From-SVN: r277349
2019-10-23lto-streamer-out.c (cmp_symbol_files): Watch for overflow.Jan Hubicka2-1/+10
* lto-streamer-out.c (cmp_symbol_files): Watch for overflow. From-SVN: r277348
2019-10-23ipa-reference.c (varpool_removal_hook, [...]): Fix previous patch.Jan Hubicka2-4/+7
* ipa-reference.c (varpool_removal_hook, ipa_reference_c_finalize): Fix previous patch. From-SVN: r277347
2019-10-23lto-streamer-out.c (output_constructor): Push CTORS_OUT timevar.Jan Hubicka5-45/+91
* lto-streamer-out.c (output_constructor): Push CTORS_OUT timevar. (cmp_symbol_files): New. (lto_output): Copy sections in file order. * lto-streamer.h (lto_file_decl_data): Add field order. * lto-common.c (lto_file_finalize): Add order attribute. (lto_create_files_from_ids): Pass order. (lto_file_read): UPdate call of lto_create_files_from_ids. From-SVN: r277346
2019-10-23ipa-reference.h (ipa_reference_var_uid): Move offline.Jan Hubicka3-36/+104
* ipa-reference.h (ipa_reference_var_uid): Move offline. * ipa-reference.c (reference_vars_map_t): new type. (ipa_reference_vars_map, ipa_reference_vars_uids): New static vars. (ipa_reference_var_uid): Implement. (varpool_node_hooks): New static var. (varpool_removal_hook): New function. (is_improper): Do not check bitmap for id==-1 (get_static_name): Update. (ipa_init): Initialize new datastructures. (analyze_function): Do not recompute ids. (propagate): Free reference_vars_to_consider. (stream_out_bitmap): Update. (ipa_reference_read_optimization_summary): Update. From-SVN: r277345
2019-10-23re PR gcov-profile/91971 (Profile directory concatenated with object file path)Qing Zhao2-0/+14
2019-10-23 qing zhao <qing.zhao@oracle.com> PR gcov-profile/91971 * coverage.c (coverage_init): Mangle the full path of filename when filename is a absolute path. From-SVN: r277344
2019-10-23msp430-protos.h (msp430_has_hwmult): New.Jozef Lawrynowicz4-14/+29
2019-10-23 Jozef Lawrynowicz <jozef.l@mittosystems.com> * config/msp430/msp430-protos.h (msp430_has_hwmult): New. * config/msp430/msp430.c (msp430_no_hwmult): Remove. (msp430_has_hwmult): New. (msp430_output_labelref): s/msp430_hwmult_type != MSP430_HWMULT_NONE/msp430_has_hwmult ()/ * config/msp430/msp430.md (mulhisi3): Likewise. (umulhisi3): Likewise. (mulsidi3): Likewise. (umulsidi3): Likewise. From-SVN: r277341
2019-10-23re PR ipa/92074 (26% performance regression on Spec2017 548.exchange2_r)Jan Hubicka2-1/+6
PR ipa/92074 * params.def (inline-heuristics-hint-percent): Set to 600. From-SVN: r277333
2019-10-23Fix a bug with type constraints in constructors.Andrew Sutton4-2/+44
gcc/cp/ * parser.c (cp_parser_constructor_declarator_p): Pass an empty decl-specifier-seq to make sure we parse type constraints as part of a type-specifier. gcc/testsuite/ * g++.dg/cpp2a/concepts5.C: New test. From-SVN: r277323
2019-10-23re PR tree-optimization/65930 (Reduction with sign-change not handled)Richard Biener8-26/+28
2019-10-23 Richard Biener <rguenther@suse.de> PR tree-optimization/65930 * tree-vect-loop.c (check_reduction_path): Allow conversions that only change the sign. (vectorizable_reduction): Relax latch def stmts we handle further. * gcc.dg/vect/vect-reduc-2char-big-array.c: Adjust. * gcc.dg/vect/vect-reduc-2char.c: Likewise. * gcc.dg/vect/vect-reduc-2short.c: Likewise. * gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise. * gcc.dg/vect/vect-reduc-pattern-2c.c: Likewise. From-SVN: r277322
2019-10-23re PR debug/90231 (ivopts causes <optimized away> iterator in the loop)Jakub Jelinek2-8/+107
PR debug/90231 * tree-ssa-loop-ivopts.c (get_debug_computation_at): New function. (remove_unused_ivs): Use it instead of get_computation_at. When choosing best candidate, only consider candidates where get_debug_computation_at actually returns non-NULL. From-SVN: r277321
2019-10-23constexpr.c (cxx_eval_constant_expression): Temporarily change ↵Jakub Jelinek5-10/+27
input_location to CLEANUP_STMT location. * constexpr.c (cxx_eval_constant_expression) <case CLEANUP_STMT>: Temporarily change input_location to CLEANUP_STMT location. * g++.dg/cpp2a/constexpr-dtor3.C: Expect in 'constexpr' expansion of message on the line with variable declaration. * g++.dg/ext/constexpr-attr-cleanup1.C: Likewise. From-SVN: r277320
2019-10-23re PR tree-optimization/92131 (incorrect assumption that (ao >= 0) is always ↵Eric Botcazou4-7/+92
false) PR tree-optimization/92131 * tree-vrp.c (extract_range_from_plus_minus_expr): If the resulting range would be symbolic, drop to varying for any explicit overflow in the constant part or if neither range is a singleton. From-SVN: r277314
2019-10-23Initialize a field in fibonacci_node.Martin Liska2-1/+7
2019-10-23 Martin Liska <mliska@suse.cz> PR middle-end/81669 * fibonacci_heap.h (fibonacci_node::fibonacci_node): Initialize m_data. From-SVN: r277313
2019-10-23[AArch64] Don't apply mode_for_int_vector to scalarsRichard Sandiford2-1/+8
aarch64_emit_approx_sqrt handles both vectors and scalars and was using mode_for_int_vector even for the scalar case. Although that happened to work, it isn't how mode_for_int_vector is supposed to be used. 2019-10-23 Richard Sandiford <richard.sandiford@arm.com> gcc/ * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use int_mode_for_mode rather than mode_for_int_vector for scalars. From-SVN: r277311
2019-10-23re PR tree-optimization/92179 (r277288 causes ICEs compiling several test cases)Richard Biener2-20/+37
2019-10-23 Richard Biener <rguenther@suse.de> PR tree-optimization/92179 * tree-vect-stmts.c (vectorizable_shift): For shift args that are all the same remove type restriction in the SLP case. Adjust SLP code to handle converting of the shift arg to only apply in case the modes are different. From-SVN: r277310
2019-10-23Do not ICE in IPA inliner.Martin Liska4-1/+50
2019-10-23 Martin Liska <mliska@suse.cz> PR ipa/91969 * ipa-inline.c (recursive_inlining): Do not print when curr->count is not initialized. 2019-10-23 Martin Liska <mliska@suse.cz> PR ipa/91969 * g++.dg/ipa/pr91969.C: New test. From-SVN: r277309
2019-10-23tree-vect-slp.c (vect_build_slp_tree_2): Do not build op from scalars in ↵Richard Biener2-2/+8
case there's a constant operand in its definition. 2019-10-23 Richard Biener <rguenther@suse.de> * tree-vect-slp.c (vect_build_slp_tree_2): Do not build op from scalars in case there's a constant operand in its definition. From-SVN: r277308
2019-10-23[Darwin, PPC] Check for out of range asm values.Iain Sandoe2-2/+7
There are some cases in which the value for the max skip to a p2align directive can be negative. The older assembler just ignores these cases where newer tools produce an error. To preserve behaviour, we avoid emitting out of range values. gcc/ChangeLog: 2019-10-23 Iain Sandoe <iain@sandoe.co.uk> * config/rs6000/darwin.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Guard against out of range max skip or log values. From-SVN: r277307
2019-10-23Daily bump.GCC Administrator1-1/+1
From-SVN: r277306
2019-10-22Fix incorrect merge of conflictant names in `dump_graphviz`Giuliano Belinassi2-1/+5
When using lto-dump -callgraph with two or more .o files containing distinct functions with the same name, dump_graphviz incorrectly merged those functions into a single node. This patch fixes this issue by calling `dump_name` instead of `name`, therefore concat'ing the function name with the node's id. To understeand what was the issue, let's say you have two files: a.c: static void foo (void) { do_something (); } b.c: static void foo (void) { do_something_else (); } These are distinct functions and should be represented as distinct nodes in the callgraph dump. 2019-10-22 Giuliano Belinassi <giuliano.belinassi@usp.br> * cgraph.c (dump_graphviz): Change name to dump_name From-SVN: r277299
2019-10-22re PR fortran/92174 (runtime error: index 15 out of bounds for type ↵Steven G. Kargl3-9/+20
'gfc_expr *[15]) 2019-10-22 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/92174 * decl.c (attr_decl1): Move check for F2018:C822 from here ... * array.c (gfc_set_array_spec): ... to here. From-SVN: r277297
2019-10-22re PR tree-optimization/85887 (Missing DW_TAG_lexical_block PC range)Jakub Jelinek2-2/+8
PR tree-optimization/85887 * decl.c (expand_static_init): Drop ECF_LEAF from __cxa_guard_acquire and __cxa_guard_release. From-SVN: r277293
2019-10-22PR c++/85746: Don't fold __builtin_constant_p prematurelyMarc Glisse4-1/+22
2019-10-22 Marc Glisse <marc.glisse@inria.fr> gcc/cp/ * constexpr.c (cxx_eval_builtin_function_call): Only set force_folding_builtin_constant_p if manifestly_const_eval. gcc/testsuite/ * g++.dg/pr85746.C: New file. From-SVN: r277292
2019-10-22[arm] Match subtraction from carry_operationRichard Earnshaw3-0/+26
On Arm we have both carry and borrow operations, but borrow is essentially '~carry'. Of course, with boolean logic ~carry is also 1-carry. GCC transforms (1 - X - LTU (cc, 0)) into (GEU (cc, 0) - X) Now the former matches a real insn in Arm state, using the RSC instruction with #1 as the immediate, but we currently do not recognize the canonicalized form. Nevertheless, given the above logic, this turns out to be quite straight forward as the original expression matches arm_borrow_operation and the revised form can be used with arm_carry_operation. Since we match this new pattern we also update rtx_costs to handle it. * config/arm/arm.md (rsbsi_carryin_reg): New pattern. * config/arm/arm.c (arm_rtx_costs_internal, case MINUS): Handle subtraction from a carry operation. From-SVN: r277290
2019-10-22[arm] make arm_carry_operation and arm_borrow_operation dualsRichard Earnshaw2-1/+5
Arm_carry_operation and arm_borrow_operation are duals: given that we have a comparison that returns a result that relies solely in the carry flag one is the inverse of the other. So there's no reason for one to have a CC mode that the other does not have. This patch restores that equivalence. * config/arm/predicates.md (arm_borrow_operation): Handle CC_ADCmode. From-SVN: r277289
2019-10-22re PR tree-optimization/92173 (ICE in optab_for_tree_code, at optabs-tree.c:81)Richard Biener5-9/+106
2019-10-22 Richard Biener <rguenther@suse.de> PR tree-optimization/92173 * tree-vect-loop.c (vectorizable_reduction): If vect_transform_reduction cannot handle code-generation try without the single-def-use-cycle optimization. Pass optab_vector to optab_for_tree_code to get vector shifts as that's what we'd generate. * gcc.dg/torture/pr92173.c: New testcase. From-SVN: r277288
2019-10-22re PR middle-end/90796 (GCC: O2 vs O3 output differs on simple test)Michael Matz4-11/+104
Fix PR middle-end/90796 PR middle-end/90796 * gimple-loop-jam.c (any_access_function_variant_p): New function. (adjust_unroll_factor): Use it to constrain safety, new parameter. (tree_loop_unroll_and_jam): Adjust call and profitable unroll factor. testsuite/ * gcc.dg/unroll-and-jam.c: Add three invalid and one valid case. From-SVN: r277287
2019-10-22re PR tree-optimization/92173 (ICE in optab_for_tree_code, at optabs-tree.c:81)Richard Biener4-24/+55
2019-10-22 Richard Biener <rguenther@suse.de> PR tree-optimization/92173 * tree-vect-loop.c (vectorizable_reduction): If vect_transform_reduction cannot handle code-generation try without the single-def-use-cycle optimization. Pass optab_vector to optab_for_tree_code to get vector shifts as that's what we'd generate. * gcc.dg/torture/pr92173.c: New testcase. From-SVN: r277286
2019-10-22Come up with json::integer_number and use it in GCOV.Martin Liska6-32/+107
2019-10-22 Martin Liska <mliska@suse.cz> * diagnostic-format-json.cc (json_from_expanded_location): Use json::integer_number. * gcov.c (output_intermediate_json_line): Use new json::integer_number. (output_json_intermediate_file): Likewise. * json.cc (number::print): Move to ... (float_number::print): ... this. (integer_number::print): New. (test_writing_numbers): Move to ... (test_writing_float_numbers): ... this. (test_writing_integer_numbers): New. (json_cc_tests): Register test_writing_integer_numbers. * json.h (class value): Add forward declaration for float_number and integer_number. (enum kind): Add JSON_INTEGER and JSON_FLOAT. (class number): Move to ... (class float_number): ... this. (class integer_number): New. * optinfo-emit-json.cc (optrecord_json_writer::impl_location_to_json): Use json::integer_number. (optrecord_json_writer::location_to_json): Likewise. (optrecord_json_writer::profile_count_to_json): Likewise. (optrecord_json_writer::pass_to_json): Likewise. From-SVN: r277284
2019-10-22Fix PR reference in ChangeLog.Martin Liska1-1/+1
From-SVN: r277283
2019-10-22Fix use after free in vector_size changeRichard Sandiford3-9/+18
r277235 was a bit too mechanical and ended up introducing use after free bugs in both loop and SLP vectorisation. 2019-10-22 Richard Sandiford <richard.sandiford@arm.com> gcc/ * tree-vect-slp.c (vect_slp_bb_region): Check whether autodetected_vector_size rather than vector_size is zero. * tree-vect-loop.c (vect_analyze_loop): Likewise. Set autodetected_vector_size immediately after calling vect_analyze_loop_2. Check for a fatal error before advancing next_size. From-SVN: r277282
2019-10-22[C++] Avoid exposing internal details in aka typesRichard Sandiford9-38/+372
This patch extends r276951 to work for C++ too. 2019-10-22 Richard Sandiford <richard.sandiford@arm.com> gcc/cp/ * cp-tree.h (STF_USER_VISIBLE): New constant. (strip_typedefs, strip_typedefs_expr): Take a flags argument. * tree.c (strip_typedefs, strip_typedefs_expr): Likewise, updating mutual calls accordingly. When STF_USER_VISIBLE is true, only look through typedefs if user_facing_original_type_p. * error.c (dump_template_bindings, type_to_string): Pass STF_USER_VISIBLE to strip_typedefs. (dump_type): Likewise, unless pp_c_flag_gnu_v3 is set. gcc/testsuite/ * g++.dg/diagnostic/aka5.h: New test. * g++.dg/diagnostic/aka5a.C: Likewise. * g++.dg/diagnostic/aka5b.C: Likewise. * g++.target/aarch64/diag_aka_1.C: Likewise. From-SVN: r277281
2019-10-22[testsuite] Make the Wnonnull independent of system headers.Iain Sandoe2-11/+10
To avoid the result of this test depending on the implementation of the system 'string.h', provide prototypes for the two functions used in the test. gcc/testsuite/ChangeLog: 2019-10-22 Iain Sandoe <iain@sandoe.co.uk> * gcc.dg/Wnonnull.c: Provide prototypes for strlen and memcpy. Use __SIZE_TYPE__ instead of size_t. From-SVN: r277280