- 14 Jul, 2017 1 commit
-
-
From-SVN: r250195
GCC Administrator committed
-
- 13 Jul, 2017 13 commits
-
-
PR c/81405 identifies a crash when printing fix-it hints from -Wmissing-braces when there are excess elements. The fix-it hints are bogus (which I've filed separately as PR c/81432), but they lead to a crash within the fix-it consolidation logic I added in r247548, in line_corrections::add_hint. The root cause is that some of the fix-it hints are out-of-order with respect to the column numbers they affect, which can lead to negative values when computing the gap between the fix-it hints, leading to bogus memcpy calls that generate out-of-bounds buffer accesses. The fix is to sort the fix-it hints after filtering them, ensuring that the gap >= 0. The patch also adds numerous assertions to the code, both directly, and by moving the memcpy calls and their args behind interfaces (themselves containing gcc_assert). This fixes the crash; it doesn't fix the bug in -Wmissing-braces that leads to the bogus hints. gcc/ChangeLog: PR c/81405 * diagnostic-show-locus.c (fixit_cmp): New function. (layout::layout): Sort m_fixit_hints. (column_range::column_range): Assert that the values are valid. (struct char_span): New struct. (correction::overwrite): New method. (struct source_line): New struct. (line_corrections::add_hint): Add assertions. Reimplement memcpy calls in terms of classes source_line and char_span, and correction::overwrite. (selftest::test_overlapped_fixit_printing_2): New function. (selftest::diagnostic_show_locus_c_tests): Call it. gcc/testsuite/ChangeLog: PR c/81405 * gcc.dg/Wmissing-braces-fixits.c: Add coverage for PR c/81405. */ From-SVN: r250187
David Malcolm committed -
[gcc] 2017-07-12 Will Schmidt <will_schmidt@vnet.ibm.com> * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return early if there is no lhs. [testsuite] 2017-07-12 Will Schmidt <will_schmidt@vnet.ibm.com> * gcc.target/powerpc/fold-vec-missing-lhs: New. From-SVN: r250185
Will Schmidt committed -
2017-07-13 Martin Liska <mliska@suse.cz> * dwarf2out.c (gen_pointer_type_die): Remove dead code. (gen_reference_type_die): Likewise. * stor-layout.c: Remove Pascal-related comment. From-SVN: r250184
Martin Liska committed -
* pt.c (do_class_deduction): Do list deduction in two phases. From-SVN: r250183
Jason Merrill committed -
* g++.old-deja/g++.bugs/900520_03.C: Limit error to c++14_down. * g++.old-deja/g++.law/array2.C: Likewise. From-SVN: r250182
Jason Merrill committed -
From-SVN: r250181
Nathan Sidwell committed -
* libcp1plugin.cc (plugin_build_decl): Use DECL_CXX_{CON,DE}STRUCTOR directly. From-SVN: r250180
Nathan Sidwell committed -
2017-07-13 Martin Liska <mliska@suse.cz> * opts.c (finish_options): Add quotes to error messages. (parse_sanitizer_options): Likewise. 2017-07-13 Martin Liska <mliska@suse.cz> * c-c++-common/ubsan/sanitize-all-1.c: Update scanned pattern. * c-c++-common/ubsan/sanitize-recover-1.c:Likewise. * c-c++-common/ubsan/sanitize-recover-2.c:Likewise. * c-c++-common/ubsan/sanitize-recover-5.c:Likewise. * c-c++-common/ubsan/sanitize-recover-7.c:Likewise. * c-c++-common/ubsan/sanitize-recover-8.c:Likewise. * c-c++-common/ubsan/sanitize-recover-9.c:Likewise. From-SVN: r250179
Martin Liska committed -
2017-07-13 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension. From-SVN: r250178
Thomas Preud'homme committed -
My patch last week to address selection of be8 linking mode broke the build for vxworks. It turns out that this port is one of the few remaining that is still not based on the EABI/AAPCS. This patch fixes the build, but I've not really tested it beyond building the core compiler binaries. Building a workable compiler entails downloading a load of vxworks stuff that I'm not sure where to find. * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define. From-SVN: r250177
Richard Earnshaw committed -
gcc/ * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments during expansion. * builtins.c (expand_asan_emit_allocas_unpoison): Likewise. From-SVN: r250176
Maxim Ostapenko committed -
PR go/81393 syscall: don't use GETREGS/SETREGS on s390 They were removed in recent glibc. Patch by Andreas Krebbel for GCC PR 81393. Reviewed-on: https://go-review.googlesource.com/48231 From-SVN: r250174
Ian Lance Taylor committed -
From-SVN: r250173
GCC Administrator committed
-
- 12 Jul, 2017 13 commits
-
-
re PR target/81193 (PowerPC GCC __builtin_cpu_is and __builtin_cpu_supports should warn about old libraries) [gcc] 2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/81193 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC provides the hardware capability bits, define the macro __BUILTIN_CPU_SUPPORTS__. * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning if GLIBC does not provide the hardware capability bits. Add a gcc_unreachable call if the built-in cpu function is neither __builtin_cpu_is nor __builtin_cpu_supports. (rs6000_get_function_versions_dispatcher): Change the warning that an old GLIBC is used which does not export the capability bits to be an error. * doc/extend.texi (target_clones attribute): Document the restriction that GLIBC 2.23 or newer is needed on the PowerPC. (PowerPC built-in functions): Document that GLIBC 2.23 or newer is needed by __builtin_cpu_is and __builtin_cpu_supports. Document the macros defined by GCC if the newer GLIBC is available. [gcc/testsuite] 2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/81193 * gcc.target/powerpc/bmi-andn-1.c: Add guard against using __builtin_cpu_supports with old GLIBC's. * gcc.target/powerpc/bmi-andn-2.c: Likewise. * gcc.target/powerpc/bmi-bextr-1.c: Likewise. * gcc.target/powerpc/bmi-bextr-2.c: Likewise. * gcc.target/powerpc/bmi-bextr-4.c: Likewise. * gcc.target/powerpc/bmi-bextr-5.c: Likewise. * gcc.target/powerpc/bmi-blsi-1.c: Likewise. * gcc.target/powerpc/bmi-blsi-2.c: Likewise. * gcc.target/powerpc/bmi-blsmsk-1.c: Likewise. * gcc.target/powerpc/bmi-blsmsk-2.c: Likewise. * gcc.target/powerpc/bmi-blsr-1.c: Likewise. * gcc.target/powerpc/bmi-blsr-2.c: Likewise. * gcc.target/powerpc/bmi-tzcnt-1.c: Likewise. * gcc.target/powerpc/bmi-tzcnt-2.c: Likewise. * gcc.target/powerpc/bmi2-bzhi32-1.c: Likewise. * gcc.target/powerpc/bmi2-bzhi64-1.c: Likewise. * gcc.target/powerpc/bmi2-mulx32-1.c: Likewise. * gcc.target/powerpc/bmi2-mulx32-2.c: Likewise. * gcc.target/powerpc/bmi2-mulx64-1.c: Likewise. * gcc.target/powerpc/bmi2-mulx64-2.c: Likewise. * gcc.target/powerpc/bmi2-pdep32-1.c: Likewise. * gcc.target/powerpc/bmi2-pdep64-1.c: Likewise. * gcc.target/powerpc/bmi2-pext32-1.c: Likewise. * gcc.target/powerpc/bmi2-pext64-1.c: Likewise. * gcc.target/powerpc/cpu-builtin-1.c: Likewise. [libgcc] 2017-07-12 Michael Meissner <meissner@linux.vnet.ibm.com> PR target/81193 * configure.ac (PowerPC float128 hardware support): Test whether we can use __builtin_cpu_supports before enabling the ifunc handler. * configure: Regenerate. From-SVN: r250165
Michael Meissner committed -
* config/riscv/riscv.c: Remove unnecessary includes. Reorder remaining includes slightly. * config/riscv/riscv-builtins.c: Include profile-count.h. From-SVN: r250162
Jeff Law committed -
* libcp1plugin.cc (plugin_build_decl): Use DECL_CXX_{CON,DE}STRUCTOR directly. From-SVN: r250159
Nathan Sidwell committed -
* cp-tree.h (DECL_CONSTRUCTOR_P, DECL_MAYBE_IN_CHARGE_CONSTRUCTOR, DECL_DESTRUCTOR_P, DECL_MAYBE_IN_CHARGE_DESTRCTOR): Look at identifier flags. * decl.c (grokfndecl): Set DECL_CXX_CONSTRUCTOR and DECL_CXX_DESTRUCTOR explicitly. * decl2.c (grokclassfn): Likewise. * friend.c (do_friend): Likewise. * method.c (make_thunk, make_alias_for, implicitly_declare_fn): Likewise. From-SVN: r250158
Nathan Sidwell committed -
PR target/79883 * config/avr/avr.c (avr_set_current_function): In diagnostic messages: Quote keywords and (parts of) identifiers. [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or "INTERUPT". From-SVN: r250156
Georg-Johann Lay committed -
gcc/ChangeLog: 2017-07-12 Carl Love <cel@us.ibm.com> * config/rs6000/rs6000-c.c: Add support for built-in functions vector bool char vec_revb (vector bool char); vector bool short vec_revb (vector short char); vector bool int vec_revb (vector bool int); vector bool long long vec_revb (vector bool long long); * doc/extend.texi: Update the built-in documentation file for the new built-in functions. gcc/testsuite/ChangeLog: 2017-07-12 Carl Love <cel@us.ibm.com> * gcc.target/powerpc/p9-xxbr-1.c (rev_bool_char, rev_bool_short, rev_bool_int): Add test cases for builtins. * gcc.target/powerpc/p9-xxbr-2.c (rev_long_long, rev_ulong_ulong): Add test cases for builtins. From-SVN: r250155
Carl Love committed -
gcc/testsuite/ChangeLog: 2017-07-12 Carl Love <cel@us.ibm.com> * gcc.target/powerpc/builtins-1-p9-runnable.c (dg-ddo run): Add lp64 && p9vector_hw. From-SVN: r250154
Carl Love committed -
The backend splitter splitting a 3 operand load on condition into 2 is wrong. The S/390 load on condition instruction might trap on the memory operand even if the condition is false. So if the first load on condition overwrites a register used as part of the memory address of the second the second might trigger a segfault even if it does not actually perform the load. Trying to fix this I noticed that the generated code looks anyway better without the splitter. So removing the splitter entirely is the way to go here. gcc/ChangeLog: 2017-07-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * config/s390/s390.md: Remove movcc splitter. From-SVN: r250153
Andreas Krebbel committed -
This adds code to the backend rtx_costs function in order to model the costs of a load/store on condition. gcc/ChangeLog: 2017-07-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com> * config/s390/s390.c (s390_rtx_costs): Return proper costs for load/store on condition. From-SVN: r250152
Andreas Krebbel committed -
PR target/81407 * config/avr/avr.c (avr_encode_section_info) [progmem && !TREE_READONLY]: Error if progmem object needs constructing. From-SVN: r250151
Georg-Johann Lay committed -
2017-07-12 Christophe Lyon <christophe.lyon@linaro.org> * lib/target-supports.exp (check_stack_check_available): Make testcase name depend on stack_kind. From-SVN: r250149
Christophe Lyon committed -
2017-07-11 Michael Collison <michael.collison@arm.com> * config/aarch64/aarch64-simd.md(aarch64_sub<mode>_compare0): New pattern. * testsuite/gcc.target/aarch64/cmp-2.c: New testcase. From-SVN: r250148
Michael Collison committed -
From-SVN: r250147
GCC Administrator committed
-
- 11 Jul, 2017 13 commits
-
-
2017-07-11 Paolo Carlini <paolo.carlini@oracle.com> PR c++/51270 * g++.dg/warn/Wreturn-local-addr-3.C: New. From-SVN: r250140
Paolo Carlini committed -
* decl.c (grokparms): Downgrade error about array of unknown bound to pedwarn and disable it for C++17. From-SVN: r250137
Jason Merrill committed -
gcc/ChangeLog: 2017-07-11 Carl Love <cel@us.ibm.com> * config/rs6000/rs6000-c.c: Add support for builtins vector unsigned int vec_parity_lsbb (vector signed int); vector unsigned int vec_parity_lsbb (vector unsigned int); vector unsigned __int128 vec_parity_lsbb (vector signed __int128); vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128); vector unsigned long long vec_parity_lsbb (vector signed long long); vector unsigned long long vec_parity_lsbb (vector unsigned long long); * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1. * config/rs6000/altivec.h (vec_parity_lsbb): Add define. * doc/extend.texi: Update the built-in documentation file for the new built-in functions. gcc/testsuite/ChangeLog: 2017-07-11 Carl Love <cel@us.ibm.com> * gcc.target/powerpc/builtins-2-p9-runnable.c: Add new file with test cases for the builtins. From-SVN: r250135
Carl Love committed -
From-SVN: r250134
David Malcolm committed -
gcc/ChangeLog: * diagnostic-show-locus.c: Include "gcc-rich-location.h". (layout::m_primary_loc): New field. (layout::layout): Initialize new field. Move location filtering logic from here to... (layout::maybe_add_location_range): ...this new method. Add support for filtering to just the lines already specified by other locations. (layout::will_show_line_p): New method. (selftest::test_add_location_if_nearby): New test function. (selftest::diagnostic_show_locus_c_tests): Call it. * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby): New method. From-SVN: r250133
David Malcolm committed -
From-SVN: r250130
Nathan Sidwell committed -
2017-07-11 Tom de Vries <tom@codesourcery.com> * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro. (bb_first_real_insn): New function. (nvptx_single): Add extra initialization of broadcasted condition variables. From-SVN: r250129
Tom de Vries committed -
2017-07-11 Yury Gribov <tetra2005@gmail.com> * lib/profopt.exp: Print relative names in UNSUPPORTED AutoFDO tests. From-SVN: r250128
Yury Gribov committed -
From-SVN: r250127
Nathan Sidwell committed -
* doc/xml/faq.xml: Update several old entries. Improve cross-references. * doc/xml/manual/intro.xml: Add anchors to each DR. * doc/html/*: Regenerate. From-SVN: r250125
Jonathan Wakely committed -
* doc/extend.texi (AVR Function Attributes): Remove weblink to Binutils doc as TEXI will mess them up. * doc/invoke.texi (AVR Options): Same here. From-SVN: r250124
Georg-Johann Lay committed -
* config/sparc/sparc.opt (mfix-ut700): New option. (mfix-gr712rc): Likewise. (sparc_fix_b2bst): New variable. * doc/invoke.texi (SPARC options): Document them. (ARM options): Fix warnings. * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP instructions to prevent sequences that can trigger the store-store errata for certain LEON3FT processors. (pass_work_around_errata::gate): Also test sparc_fix_b2bst. (sparc_option_override): Set sparc_fix_b2bst appropriately. * config/sparc/sparc.md (fix_b2bst): New attribute. (in_branch_delay): Prevent stores in delay slot if fix_b2bst. From-SVN: r250114
Daniel Cederman committed -
2017-07-10 Michael Collison <michael.collison@arm.com> * gcc.target/aarch64/var_shift_mask_1.c: Fix for ILP32 From-SVN: r250112
Michael Collison committed
-