aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-09-26Add assertions to extract(const_iterator) functionsJonathan Wakely7-8/+46
* include/bits/stl_map.h (map::extract(const_iterator)): Assert that iterator is not past-the-end. * include/bits/stl_multimap.h (multimap::extract(const_iterator)): Likewise. * include/bits/stl_multiset.h (multiset::extract(const_iterator)): Likewise. * include/bits/stl_set.h (set::extract(const_iterator)): Likewise. * include/bits/unordered_map.h (unordered_map::extract(const_iterator)) (unordered_multimap::extract(const_iterator)): Likewise. * include/bits/unordered_set.h (unordered_set::extract(const_iterator)) (unordered_multiset::extract(const_iterator)): Likewise. From-SVN: r240487
2016-09-26re PR libstdc++/77717 ↵Ville Voutilainen2-2/+8
(testsuite/21_strings/basic_string_view/operations/compare/char/1.cc makes undefined memcmp call) PR libstdc++/77717 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc: Fix an out-of-bounds access. From-SVN: r240486
2016-09-26Implement -Wimplicit-fallthrough.Marek Polacek83-46/+4005
Co-Authored-By: Jakub Jelinek <jakub@redhat.com> From-SVN: r240485
2016-09-26dwarf2out.c (stripattributes): Remove unused function.Richard Biener2-96/+97
2016-09-26 Richard Biener <rguenther@suse.de> * dwarf2out.c (stripattributes): Remove unused function. (DEBUG_NORM_MACINFO_SECTION): Rename to DEBUG_MACINFO_SECTION. Push dwarf_split_debug_info handling into init_sections_and_labels. (DEBUG_NORM_MACRO_SECTION): Likewise to DEBUG_MACRO_SECTION. (DEBUG_MACRO_SECTION_FLAGS): Remove. (debug_macinfo_section_name): New global. (output_macinfo): Use debug_macinfo_section_name. (init_sections_and_labels): Split out section and label generation from dwarf2out_init. Set debug_macinfo_section_name. (dwarf2out_init): Move text section label generation and emission to ... (dwarf2out_assembly_start): ... here. (dwarf2out_finish): Call init_sections_and_labels before DWARF output starts. From-SVN: r240484
2016-09-26re PR debug/77692 (gcc.dg/debug/dwarf2/const-2b.c FAILs)Richard Biener2-2/+16
2016-09-26 Richard Biener <rguenther@suse.de> PR debug/77692 * cgraphunit.c (analyze_functions): Before early removing global vars calls the late_global_decl debug handler mark the variable as readonly. From-SVN: r240483
2016-09-26Daily bump.GCC Administrator1-1/+1
From-SVN: r240482
2016-09-25debug.cc: Include debug/vector.François Dumont3-47/+105
2016-09-25 François Dumont <fdumont@gcc.gnu.org> * src/c++11/debug.cc: Include debug/vector. Include cctype. Remove functional. (get_safe_base_mutex): Get mutex based on address lowest non nil bits. * testsuite/23_containers/vector/debug/mutex_association.cc: New. From-SVN: r240479
2016-09-25bitset (bitset::reference::reference(const _Base_ref&, bitset*)): Remove ↵François Dumont7-23/+63
__unused__ attribute. 2016-09-25 François Dumont <fdumont@gcc.gnu.org> * include/debug/bitset (bitset::reference::reference(const _Base_ref&, bitset*)): Remove __unused__ attribute. * include/debug/safe_base.h (_Safe_iterator_base): Make _Safe_sequence_base a friend. (_Safe_iterator_base::_M_attach): Make protected. (_Safe_iterator_base::_M_attach_single): Likewise. (_Safe_iterator_base::_M_detach): Likewise. (_Safe_iterator_base::_M_detach_single): Likewise. (_Safe_sequence_base): Make _Safe_iterator_base a friend. (_Safe_sequence_base::_Safe_sequence_base(_Safe_sequence_base&&)): New. (_Safe_sequence_base::_M_swap): Make protected. (_Safe_sequence_base::_M_attach): Make private. (_Safe_sequence_base::_M_attach_single): Likewise. (_Safe_sequence_base::_M_detach): Likewise. (_Safe_sequence_base::_M_detach_single): Likewise. * include/debug/safe_container.h (_Safe_container::_Safe_container(_Safe_container&&)): Make default. * include/debug/safe_iterator.h (_Safe_iterator::operator++()): Name __scoped_lock instance. * include/debug/safe_iterator.tcc: Remove trailing line. * include/debug/safe_unordered_base.h (_Safe_local_iterator_base::_M_attach): Make protected. (_Safe_local_iterator_base::_M_attach_single): Likewise. (_Safe_local_iterator_base::_M_detach): Likewise. (_Safe_local_iterator_base::_M_detach_single): Likewise. (_Safe_unordered_container_base): Make _Safe_local_iterator_base friend. (_Safe_unordered_container_base::_M_attach_local): Make private. (_Safe_unordered_container_base::_M_attach_local_single): Likewise. (_Safe_unordered_container_base::_M_detach_local): Likewise. (_Safe_unordered_container_base::_M_detach_local_single): Likewise. From-SVN: r240478
2016-09-25re PR fortran/77429 (ICE in gfc_check_dependency, at fortran/dependency.c:1261)Steven G. Kargl4-1/+20
2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77429 * dependency.c (gfc_check_dependency): Convert gcc_assert() to a conditional and possible call to gfc_internal_error(). 2016-09-25 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77429 * gfortran.dg/pr77429.f90: New test. From-SVN: r240477
2016-09-25re PR fortran/77694 (ICE in optimize_binop_array_assignment, at ↵Steven G. Kargl4-0/+21
fortran/frontend-passes.c:1080) 2016-09-22 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77694 * frontend-passes.c (optimize_binop_array_assignment): Check pointer for NULL. 2016-09-22 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/77694 * gfortran.dg/pr77694.f90: New test. From-SVN: r240476
2016-09-25* gcc.target/i386/pr77621.c (dg-options): Add -mno-avx.Uros Bizjak1-1/+1
From-SVN: r240474
2016-09-25algo.h: Generalize usage of std::__iterator_category.François Dumont2-1163/+1009
2016-09-25 François Dumont <fdumont@gcc.gnu.org> * include/parallel/algo.h: Generalize usage of std::__iterator_category. Adjust whitespaces. From-SVN: r240473
2016-09-25This fixes a fallout that actually goes back to 5.0 but went unnoticed.Oleg Endo6-18/+64
The costs for movt and movrt type of insns were not correctly reported and ifcvt thus made some bad choices for SH. A new cset_zero pattern variant is also required to fix the matching for some recent changes in the middle end. gcc/ PR target/51244 * config/sh/sh.c (sh_movt_set_dest, sh_movrt_set_dest): Add overloads. (sh_rtx_costs): Handle SET of movt and movrt patterns. * cnofig/sh/sh-protos.h (sh_movt_set_dest, sh_movrt_set_dest): Forward declare new overloads. * config/sh/sh.md (*cset_zero): Add variant that takes a treg_set_expr operand. gcc/testsuite/ PR target/51244 * gcc.target/sh/pr51244-11.c: Add more detailed expected insn matching. From-SVN: r240471
2016-09-25Daily bump.GCC Administrator1-1/+1
From-SVN: r240470
2016-09-24coarray_lib_comm_1.f90: Really fix test for 32-bit mode.Dominique d'Humieres2-2/+7
2016-09-24 Dominique d'Humieres <dominiq@lps.ens.fr> * gfortran.dg/coarray_lib_comm_1.f90: Really fix test for 32-bit mode. From-SVN: r240467
2016-09-24rs6000.c (expand_block_compare, [...]): Change TARGET_LITTLE_ENDIAN to ↵Aaron Sawdey2-6/+11
!BYTES_BIG_ENDIAN. 2016-09-24 Aaron Sawdey <acsawdey@linux.vnet.ibm.com> * config/rs6000/rs6000.c (expand_block_compare, do_load_for_compare): Change TARGET_LITTLE_ENDIAN to !BYTES_BIG_ENDIAN. From-SVN: r240466
2016-09-24configure.ac (gcc_cv_as_aix_dwloc): Fix typo in assembly fragment.David Edelsohn3-2/+7
* configure.ac (gcc_cv_as_aix_dwloc): Fix typo in assembly fragment. * configure: Regenerate. From-SVN: r240465
2016-09-24Add missing changelong entry for 240455Aaron Sawdey1-0/+19
From-SVN: r240464
2016-09-24coarray_lib_comm_1.f90: Fix test for 32-bit mode.Dominique d'Humieres2-2/+7
2016-09-24 Dominique d'Humieres <dominiq@lps.ens.fr> * gfortran.dg/coarray_lib_comm_1.f90: Fix test for 32-bit mode. From-SVN: r240463
2016-09-24re PR c/77490 (bit-not (~) on boolean should be warned about)Marek Polacek11-4/+134
PR c/77490 * c.opt (Wbool-operation): New. * c-typeck.c (build_unary_op): Warn about bit not on expressions that have boolean value. Warn about ++/-- on booleans. * typeck.c (cp_build_unary_op): Warn about bit not on expressions that have boolean value. * doc/invoke.texi: Document -Wbool-operation. * c-c++-common/Wbool-operation-1.c: New test. * gcc.dg/Wbool-operation-1.c: New test. From-SVN: r240462
2016-09-24Daily bump.GCC Administrator1-1/+1
From-SVN: r240461
2016-09-23lang.opt, [...]: New flag -fdec-static.Fritz Reese17-16/+452
2016-09-23 Fritz Reese <fritzoreese@gmail.com> gcc/fortran/ * lang.opt, invoke.texi, gfortran.texi: New flag -fdec-static. * options.c (set_dec_flags): Set -fdec-static with -fdec. * gfortran.h (symbol_attribute): New attribute automatic. * gfortran.h (gfc_add_automatic): New prototype. * match.h (gfc_match_automatic, gfc_match_static): New functions. * decl.c (gfc_match_automatic, gfc_match_static): Ditto. * symbol.c (gfc_add_automatic): Ditto. * decl.c (match_attr_spec): Match AUTOMATIC and STATIC decls. * parse.c (decode_specification_statement, decode_statement): Ditto. * resolve.c (apply_default_init_local, resolve_fl_variable_derived, resolve_symbol): Support for automatic attribute. * symbol.c (check_conflict, gfc_copy_attr, gfc_is_var_automatic): Ditto. * trans-decl.c (gfc_finish_var_decl): Ditto. gcc/testsuite/gfortran.dg/ * dec_static_1.f90, dec_static_2.f90, dec_static_3.f90, dec_static_4.f90: New testcases. From-SVN: r240458
2016-09-23internal/syscall/unix: add getrandom syscall for MIPS and SPARCIan Lance Taylor5-2/+35
Reviewed-on: https://go-review.googlesource.com/29678 From-SVN: r240457
2016-09-23re PR fortran/48298 ([F03] User-Defined Derived-Type IO (DTIO))Jerry DeLisle17-130/+328
2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR libgfortran/48298 * io/inquire.c (inquire_via_unit): Adjust error check for the two possible internal unit KINDs. * io/io.h: Adjust defines for is_internal_unit and is_char4_unit. (gfc_unit): Add internal unit data to structure. (get_internal_unit): Change declaration to set_internal_unit. (free_internal_unit): Change name to stash_internal_unit_number. (get_unique_unit_number): Adjust parameter argument. Define IOPARM_DT_HAS_UDTIO. (gfc_saved_unit): New structure. * io/list_read.c (next_char_internal): Use is_char4_unit. * io/open.c (st_open): Adjust call to get_unique_unit_number. * io/transfer.c (write_block): Use is_char4_unit. (data_transfer_init): Update check for unit numbers. (st_read_done): Free the various allocated memories used for the internal units and stash the negative unit number and pointer to unit structure to allow reuse. (st_write_done): Likewise stash the freed unit. * io/unit.c: Create a fixed size buffer of 16 gfc_saved_unit's to use as a stack to save newunit unit numbers and unit structure for reuse. (get_external_unit): Change name to get_gfc_unit to better reflect what it does. (find_unit): Change call to get_gfc_unit. (find_or_create_unit): Likewise. (get_internal_unit): Change name to set_internal_unit. Move internal unit from the dtp structure to the gfc_unit structure so that it can be passed to child I/O statements through the UNIT. (free_internal_unit): Change name to stash_internal_unit_number. Push the common.unit number onto the newunit stack, saving it for possible reuse later. (get_unit): Set the internal unit KIND. Use get_unique_unit_number to get a negative unit number for the internal unit. Use get_gfc_unit to get the unit structure and use set_internal_unit to initialize it. (init_units): Initialize the newunit stack. (get_unique_unit_number): Check the stack for an available unit number and use it. If none there get the next most negative number. (close_units): Free any unit structures pointed to from the save stack. 2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/48298 * gfortran.h (gfc_dt): Add *udtio. * ioparm.def: Add bit IOPARM_dt_f2003 to align with library use of bit 25. Add IOPARM_dt_dtio bit to common flags. * resolve.c (resolve_transfer): Set dt->udtio to expression. * io.c (gfc_match_inquire): Adjust error message for internal unit KIND. * libgfortran.h: Adjust defines for GFC_INTERNAL_UNIT4, GFC_INTERNAL_UNIT, and GFC_INVALID_UNIT. * trans-io.c (build_dt): Set common_unit to reflect the KIND of the internal unit. Set mask bit for presence of dt->udtio. 2016-09-23 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/48298 * gfortran.dg/negative_unit_check.f90: Update test. * gfortran.dg/dtio_14.f90: New test. From-SVN: r240456
2016-09-23rs6000.md (cmpmemsi): New define_expand.Aaron Sawdey4-36/+481
* config/rs6000/rs6000.md (cmpmemsi): New define_expand. * config/rs6000/rs6000.c (expand_block_compare): New function used by cmpmemsi pattern to do builtin expansion of memcmp (). (compute_current_alignment): Add helper function for expand_block_compare used to compute alignment as the compare proceeds. (select_block_compare_mode): Used by expand_block_compare to select the mode used for reading the next chunk of bytes in the compare. (do_load_for_compare): Used by expand_block_compare to emit the load insns for the compare. (rs6000_emit_dot_insn): Moved this function to avoid a forward reference from expand_block_compare (). * config/rs6000/rs6000-protos.h (expand_block_compare): Add a prototype for this function. * config/rs6000/rs6000.opt (mblock-compare-inline-limit): Add a new target option for controlling how much code inline expansion of memcmp() will be allowed to generate. From-SVN: r240455
2016-09-23S/390: Fix hotpatch test cases.Dominik Vogt8-7/+17
The attached patch fixes some dg-error tests that were broken since the recent change of the error location. gcc/testsuite/ChangeLog: * gcc.target/s390/hotpatch-compile-1.c: Fixed dg-error test. * gcc.target/s390/hotpatch-compile-2.c: Likewise. * gcc.target/s390/hotpatch-compile-3.c: Likewise. * gcc.target/s390/hotpatch-compile-4.c: Likewise. * gcc.target/s390/hotpatch-compile-5.c: Likewise. * gcc.target/s390/hotpatch-compile-6.c: Likewise. * gcc.target/s390/hotpatch-compile-14.c: Likewise. From-SVN: r240454
2016-09-23compiler: better abstraction layer for diagnostics.Than McIntosh22-846/+1217
Introduce an abstraction layer for reporting diagnostics, so as to avoid directly using the native GCC interfaces such as "error_at", "warning_at", "open_quote", "close_quote", etc. The new interfaces have the same look and feel as the GCC equivalents, but make calls into back-end functions to allow the back end to select the proper final reporting routine. Reviewed-on: https://go-review.googlesource.com/29191 * go-gcc-diagnostics.cc: New file. * go-location.h (Location): Remove operator source_location. Add operator==. * go-system.h: #include <sstream>. * Make-lang.in (GO_OBJS): Add go/go-diagnostics.o and go/go-gcc-diagnostics.o. (CFLAGS-go/go-gcc-diagnostics.o): New variable. From-SVN: r240453
2016-09-23hooks.c (hook_bool_bool_false, [...]): For arguments with ATTRIBUTE_UNUSED...Jakub Jelinek2-88/+87
* hooks.c (hook_bool_bool_false, hook_bool_bool_gcc_optionsp_false, hook_bool_mode_false, hook_bool_mode_true, hook_bool_mode_const_rtx_false, hook_bool_mode_const_rtx_true, hook_bool_mode_rtx_false, hook_bool_mode_rtx_true, hook_bool_const_rtx_insn_const_rtx_insn_true, hook_bool_mode_uhwi_false, hook_void_FILEptr_constcharptr, hook_bool_FILEptr_rtx_false, hook_bool_gsiptr_false, hook_bool_const_tree_hwi_hwi_const_tree_false, hook_bool_const_tree_hwi_hwi_const_tree_true, default_can_output_mi_thunk_no_vcall, hook_int_uint_mode_1, hook_int_const_tree_0, hook_int_const_tree_const_tree_1, hook_int_rtx_0, hook_int_rtx_bool_0, hook_void_tree, hook_void_constcharptr, hook_void_tree_treeptr, hook_void_int_int, hook_bool_tree_false, hook_bool_const_tree_false, hook_bool_tree_true, hook_bool_const_tree_true, hook_bool_tree_tree_false, hook_bool_tree_tree_true, hook_bool_tree_bool_false, hook_bool_rtx_insn_true, hook_bool_rtx_false, hook_bool_uintp_uintp_false, hook_bool_rtx_mode_int_int_intp_bool_false, hook_rtx_rtx_null, hook_rtx_tree_int_null, hook_uint_mode_0, hook_constcharptr_const_tree_null, hook_tree_tree_int_treep_bool_null, hook_tree_tree_tree_null, hook_tree_tree_tree_tree_null, hook_constcharptr_const_rtx_insn_null, hook_constcharptr_const_tree_const_tree_null, hook_constcharptr_int_const_tree_null, hook_constcharptr_int_const_tree_const_tree_null, hook_tree_const_tree_null, hook_bool_rtx_insn_int_false, hook_void_rtx_insn_int, hook_void_gcc_optionsp): For arguments with ATTRIBUTE_UNUSED, remove parameter name as well as ATTRIBUTE_UNUSED. From-SVN: r240452
2016-09-23re PR go/77701 (suspicious code in go/go-gcc.cc)Chris Manghane2-4/+10
PR go/77701 * go-gcc.cc (Gcc_backend::Gcc_backend): Fix calls to integer_type to pass arguments in the correct order. From-SVN: r240451
2016-09-23re PR testsuite/77713 (gcc.dg/tree-ssa/builtin-sprintf.c compilation failed ↵Martin Sebor2-0/+11
to produce executable) gcc/testsuite/ChangeLog: PR testsuite/77713 * gcc.dg/tree-ssa/builtin-sprintf.c (test_e_long_double): Avoid assuming long double is bigger than double. From-SVN: r240450
2016-09-23Implement P0138R2, C++17 construction rules for enum class valuesJakub Jelinek6-0/+287
Implement P0138R2, C++17 construction rules for enum class values * cp-tree.h (is_direct_enum_init): Declare. * decl.c (is_direct_enum_init): New function. (reshape_init): Use it. * typeck.c (convert_for_assignment): Likewise. * g++.dg/cpp1z/direct-enum-init1.C: New test. From-SVN: r240449
2016-09-23Make-lang.in (check-c++1z): Pass RUNTESTFLAGS down to make check-g++.Jakub Jelinek2-1/+4
* Make-lang.in (check-c++1z): Pass RUNTESTFLAGS down to make check-g++. From-SVN: r240448
2016-09-23Avoid reallocation for basic_string::clear()Jonathan Wakely5-1/+216
PR libstdc++/56166 PR libstdc++/77582 * include/bits/basic_string.h (basic_string::clear()): Drop reference and use empty rep. * include/ext/rc_string_base.h (__rc_string_base::_M_clear()): Likewise. * testsuite/21_strings/basic_string/56166.cc: New. * testsuite/ext/vstring/modifiers/clear/56166.cc: New. From-SVN: r240447
2016-09-23Optimize truncating a basic_stringJonathan Wakely3-4/+19
* include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI] (basic_string::erase(size_type, size_type)): Add fast path for truncating the string, by calling _M_set_length directly. (basic_string::erase(__const_iterator, __const_iterator)): Likewise. * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI] (basic_string::resize(size_type, _CharT)): Likewise. From-SVN: r240446
2016-09-23vec.h (vNULL): Extend comment to say = vNULL initialization isn't needed for ↵Jakub Jelinek2-1/+6
static vars. * vec.h (vNULL): Extend comment to say = vNULL initialization isn't needed for static vars. From-SVN: r240445
2016-09-23sel-sched-ir.c (sel_global_bb_info, [...]): Remove unnecessary = vNULL ↵Jakub Jelinek10-20/+32
initialization of file scope vec. * sel-sched-ir.c (sel_global_bb_info, sel_region_bb_info, loop_nests, s_i_d, last_added_blocks): Remove unnecessary = vNULL initialization of file scope vec. * passes.c (pass_tab, enabled_pass_uid_range_tab, disabled_pass_uid_range_tab): Likewise. * haifa-sched.c (sched_luids, h_i_d): Likewise. * tree-chkp-opt.c (check_infos): Likewise. * sel-sched.c (vec_av_set, vec_temp_moveop_nops): Likewise. c/ * c-parser.c (incomplete_record_decls): Remove unnecessary = vNULL initialization of file scope vec. cp/ * constexpr.c (call_stack): Remove unnecessary = vNULL initialization of file scope vec. From-SVN: r240444
2016-09-23vec.h (vnull::operator vec): Add constexpr keyword for C++11 and later.Jakub Jelinek2-0/+8
* vec.h (vnull::operator vec): Add constexpr keyword for C++11 and later. From-SVN: r240443
2016-09-23Fix gcc.dg/tree-ssa/builtin-sprintf-warn-4.cDavid Malcolm2-1/+8
gcc/testsuite/ChangeLog PR preprocessor/77672 * gcc.dg/tree-ssa/builtin-sprintf-warn-4.c (test): Update expected multiline output from first warning to reflect change in r240434. From-SVN: r240442
2016-09-23builtin-sprintf-warn-2.c: Fix xfail pattern.Thomas Preud'homme2-2/+6
2016-09-23 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/testsuite/ * gcc.dg/tree-ssa/builtin-sprintf-warn-2.c: Fix xfail pattern. From-SVN: r240441
2016-09-23Fix incorrect file in ChangeLog on previous commitMatthew Fortune1-1/+1
gcc/ * tree-ssa-loop-prefetch.c (issue_prefetch_ref): Add call to duplicate_ssa_name_ptr_info. From-SVN: r240440
2016-09-23Ensure points-to information is maintained for prefetch.Doug Gilmore2-0/+18
gcc/ PR tree-optimization/77654 * tree-ssa-alias.c (issue_prefetch_ref): Add call to duplicate_ssa_name_ptr_info. From-SVN: r240439
2016-09-23re PR testsuite/77411 (object-size-9.c -fpic -m32 failure)Bernd Edlinger2-0/+10
2016-09-23 Bernd Edlinger <bernd.edlinger@hotmail.de> Tom de Vries <tom@codesourcery.com> PR testsuite/77411 * c-c++-common/ubsan/object-size-9.c: Call __builtin_exit in C++. Co-Authored-By: Tom de Vries <tom@codesourcery.com> From-SVN: r240437
2016-09-23atomic-12.c: Skip for C++1z.Marek Polacek13-23/+43
* c-c++-common/gomp/atomic-12.c: Skip for C++1z. * c-c++-common/gomp/atomic-13.c: Likewise. * c-c++-common/gomp/atomic-14.c: Likewise. * c-c++-common/pr60439.c: Remove invalid code. * g++.dg/expr/bitfield4.C: Robustify for C++1z. * g++.dg/expr/bitfield5.C: Likewise. * g++.dg/expr/bitfield6.C: Likewise. * g++.dg/expr/bool1.C: Likewise. * g++.dg/expr/bool3.C: Likewise. * g++.dg/expr/lval3.C: Likewise. * g++.dg/expr/lval4.C: Likewise. * g++.old-deja/g++.jason/bool5.C: Likewise. From-SVN: r240436
2016-09-23* configure.ac: Define HAVE_MEMALIGN for newlib.Jason Merrill3-0/+7
From-SVN: r240435
2016-09-23Provide location information for terminator characters (PR preprocessor/77672)David Malcolm6-33/+104
substring_loc::get_location currently fails for the final terminator character in a STRING_CST from the C frontend, so that format_warning_va falls back to using the location of the string as a whole. This patch tweaks things [1] so that we use the final closing quote as the location of the terminator character, as requested in PR preprocessor/77672. [1] specifically, cpp_interpret_string_1. gcc/ChangeLog: PR preprocessor/77672 * input.c (selftest::test_lexer_string_locations_simple): Update test to expect location information of the terminator character at the location of the final closing quote. (selftest::test_lexer_string_locations_hex): Likewise. (selftest::test_lexer_string_locations_oct): Likewise. (selftest::test_lexer_string_locations_letter_escape_1): Likewise. (selftest::test_lexer_string_locations_letter_escape_2): Likewise. (selftest::test_lexer_string_locations_ucn4): Likewise. (selftest::test_lexer_string_locations_ucn8): Likewise. (selftest::test_lexer_string_locations_u8): Likewise. (selftest::test_lexer_string_locations_utf8_source): Likewise. (selftest::test_lexer_string_locations_concatenation_1): Likewise. (selftest::test_lexer_string_locations_concatenation_2): Likewise. (selftest::test_lexer_string_locations_concatenation_3): Likewise. (selftest::test_lexer_string_locations_macro): Likewise. (selftest::test_lexer_string_locations_long_line): Likewise. gcc/testsuite/ChangeLog: PR preprocessor/77672 * gcc.dg/plugin/diagnostic-test-string-literals-1.c (test_terminator_location): New function. libcpp/ChangeLog: PR preprocessor/77672 * charset.c (cpp_interpret_string_1): Add a source_range for the NUL-terminator, using the location of the trailing quote of the final string. From-SVN: r240434
2016-09-23Really commit testcase intended for r240230.Fritz Reese1-0/+27
2016-09-23 Fritz Reese <fritzoreese@gmail.com> Really commit testcase intended for r240230. * gcc/testsuite/gfortran.dg/dec_structure_15.f90: Really commit. From-SVN: r240433
2016-09-23tree-ssa-sccvn.c (visit_reference_op_call): Value number virtual definition ↵Richard Biener4-3/+68
to virtual use if... 2016-09-23 Richard Biener <rguenther@suse.de> * tree-ssa-sccvn.c (visit_reference_op_call): Value number virtual definition to virtual use if the call devirtualizes to a const or pure function. (visit_use): Also visit calls we can devirtualize to a const or pure function. * gcc.dg/tree-ssa/ssa-fre-56.c: New testcase. From-SVN: r240431
2016-09-23re PR tree-optimization/77697 (suspicious code in tree-ssa-forwprop.c)Richard Biener2-7/+12
2016-09-23 Richard Biener <rguenther@suse.de> PR tree-optimization/77697 * tree-ssa-forwprop.c (defcodefor_name): Remove bogus code, signal error if we have sth ternary or unhandled. From-SVN: r240430
2016-09-23Revert bogus dg-extract-results.sh changeRainer Orth2-1/+5
* dg-extract-results.sh: Revert bogus change. From-SVN: r240429
2016-09-23[PATCH 17/17][ARM] Add tests for NEON FP16 ACLE intrinsics.Matthew Wahab55-17/+2276
testsuite/ 2016-09-23 Matthew Wahab <matthew.wahab@arm.com> * gcc.target/advsimd-intrinsics/advsimd-intrinsics.exp: Enable -march=armv8.2-a+fp16 when supported by the hardware. * gcc.target/aarch64/advsimd-intrinsics/binary_op_float.inc: New. * gcc.target/aarch64/advsimd-intrinsics/binary_op_no64.inc: Add F16 tests, enabled if macro HAS_FLOAT16_VARIANT is defined. Add semi-colons to a macro invocations. * gcc.target/aarch64/advsimd-intrinsics/cmp_fp_op.inc: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/aarch64/advsimd-intrinsics/cmp_op.inc: Likewise. * gcc.target/aarch64/advsimd-intrinsics/cmp_zero_op.inc: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vabd.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vabs.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vadd.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vcage.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vcagt.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vcale.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vcalt.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vceq.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vceqz_1.c: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vcge.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/aarch64/advsimd-intrinsics/vcgez_1.c: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vcgt.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/aarch64/advsimd-intrinsics/vcgtz_1.c: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vcle.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/aarch64/advsimd-intrinsics/vclez_1.c: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vclt.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/aarch64/advsimd-intrinsics/vcltz_1.c: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vcvt.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. Also fix some white-space. * gcc.target/aarch64/advsimd-intrinsics/vcvtX.inc: New. * gcc.target/aarch64/advsimd-intrinsics/vcvta_1.c: New. * gcc.target/aarch64/advsimd-intrinsics/vcvtm_1.c: New. * gcc.target/aarch64/advsimd-intrinsics/vcvtp_1.c: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vfma.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. Also fix some long lines and white-space. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vfms.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. Also fix some long lines and white-space. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vmax.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/aarch64/advsimd-intrinsics/vmaxnm_1.c: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vmin.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/aarch64/advsimd-intrinsics/vminnm_1.c: New. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vmul.c: Add F16 tests, enabled if macro __ARM_FEATURE_FP16_VECTOR_ARITHMETIC is defined. * gcc.target/aarch64/advsimd-intrinsics/vmul_lane.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vmul_n.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vneg.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vpXXX.inc: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vpadd.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vpmax.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vpmin.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vrecpe.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vrecps.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vrnd.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrndX.inc: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vrnda.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vrndm.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vrndn.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vrndp.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vrndx.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrsqrte.c: Likewise. * gcc.target/aarch64/advsimd-intrinsics/vrsqrts.c: Likewise. * gcc.target/gcc.target/aarch64/advsimd-intrinsics/vsub.c: Likewise. From-SVN: r240427