- 12 Dec, 2016 18 commits
-
-
Fix for PR preprocessor/78680 PR preprocessor/78680 identifies a crash when attempting to issue a -Wformat warning, where the format string includes a string token split across multiple physical source lines via backslash-continued lines. The issue is that libcpp is generating bogus range information for such tokens. For example, in: void fn1() { __builtin_printf("\ %ld.\n\ 2\n"); }; the range of the string token is printed as: __builtin_printf("\ ^~ whereas the range ought to be: __builtin_printf("\ ^~ %ld.\n\ ~~~~~~~ 2\n"); }; ~~~~ The root cause is that the line notes expressing the update of the buffer in lex.c aren't yet updated when the end-point of the token is computed 3095 tok_range.m_finish 3096 = linemap_position_for_column (pfile->line_table, 3097 CPP_BUF_COLUMN (buffer, buffer->cur)); so that the physical line is still regarded as that of the start of the token, and, where CPP_BUF_COLUMN uses (BUF)->line_base, line_base is still the location of the first physical line in the and hence the column information is too large (as if it were the offset in the *logical* line). (the printed range is somewhat misleading; the actual buggy range extends beyond the "\ in the line, but within diagnostic-show-locus.c layout::print_annotation_line only prints up to the xbound set by layout::print_source_line and so truncates most of the buggy range). The fix is to ensure that line notes are handled before calculating the end-point of the token range. This leads to the range for the string token being correctly computed, as: __builtin_printf("\ ^~ %ld.\n\ ~~~~~~~ 2\n"); }; ~~~~ and this leads to get_substring_ranges_for_loc failing gracefully, rather than crashing. gcc/testsuite/ChangeLog: PR preprocessor/78680 * gcc.dg/format/pr78680.c: New test case. * gcc.dg/plugin/diagnostic-test-expressions-1.c (test_multiline_token): New function. * gcc.dg/plugin/diagnostic-test-string-literals-1.c (test_backslash_continued_logical_lines): New function. libcpp/ChangeLog: PR preprocessor/78680 * lex.c (_cpp_lex_direct): Ensure line notes are processed before computing the end-point of the token. From-SVN: r243567
David Malcolm committed -
libiberty/ PR c++/78252 * cp-demangle.c (struct d_print_info): Add is_lambda_arg field. (d_print_init): Initialize it. (d_print_comp_inner) <DEMANGLE_COMPONENT_TEMPLATE_PARAM>: Check is_lambda_arg for auto. <DEMANGLE_COMPONENT_REFERENCE, DEMANGLE_COMPONENT_RVALUE_REFERENCE>: Skip smashing check when is_lambda_arg. <DEMANGLE_COMPONENT_LAMBDA>: Increment is_lambda_arg around arg printing. * testsuite/demangle-expected: Add lambda auto mangling cases. gcc/testsuite/ PR c++/78252 * g++.dg/cpp1y/lambda-mangle-1.C: New. From-SVN: r243566
Nathan Sidwell committed -
PR target/78738 * config/i386/i386.h (X87_ENABLE_ARITH): Also enable for flag_unsafe_math_optimizations. (X87_ENABLE_FLOAT): Ditto. testsuite/ChangeLog: PR target/78738 * gcc.target/i386/pr78738.c: New test. From-SVN: r243559
Uros Bizjak committed -
* lib/target-supports.exp (check_effective_target_newlib_broken_long_double_io): New check. (check_effective_target_frexpl): Likewise. * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc: XFAIL run if newlib_broken_long_double_io. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc: Likewise. * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc: Likewise. * testsuite/27_io/basic_ostream/inserters_arithmetic/char/hexfloat.cc: Likewise. From-SVN: r243558
Kyrylo Tkachov committed -
* testsuite/experimental/filesystem/operations/is_empty.cc: Remove stray character at end of dg-do directive. From-SVN: r243555
Jonathan Wakely committed -
PR middle-end/78716 * gimplify.c (gimplify_va_arg_expr): Don't require ADDR_EXPR for Case 1; check POINTER_TYPE_P instead. * g++.dg/other/vararg-5.C: New. From-SVN: r243553
Marek Polacek committed -
libgfortran: * configure.ac: Call GCC_CHECK_LINKER_HWCAP. * Makefile.am (libgfortran_la_LDFLAGS): Add HWCAP_LDFLAGS. * aclocal.m4: Regenerate. * configure: Regenerate. * Makefile.in: Regenerate. config: * hwcaps.m4: New file. libitm: * acinclude.m4 (LIBITM_CHECK_LINKER_FEATURES): Remove. * aclocal.m4: Regenerate. * configure.ac: Call GCC_CHECK_LINKER_HWCAP instead of LIBITM_CHECK_LINKER_HWCAP. From-SVN: r243552
Rainer Orth committed -
re PR rtl-optimization/78669 (ICE: in combine_and_move_insns, at ira.c:3665 with -Os -fno-tree-ter -mavx512bw) PR rtl-optimization/78669 * ira.c (combine_and_move_insns): When deleting an insn, clear the replace flag for all used regs in that insn. PR rtl-optimization/78669 * gcc.target/i386/pr78669.c: New test. From-SVN: r243551
Bernd Schmidt committed -
* testsuite/experimental/filesystem/operations/temp_directory_path.cc: Remove stray character at end of dg-do directive. From-SVN: r243548
Jonathan Wakely committed -
libgcc/ * config/avr/lib1funcs.S (__ashrdi3): Fix typo from r243545. From-SVN: r243546
George Spelvin committed -
libgcc/ 2016-12-12 George Spelvin <linux@sciencehorizons.net> * config/avr/lib1funcs.S (__ashldi3): Use __tmp_reg__ to restore R16 instead of push + pop. (__ashrdi3, __lshrdi3): Same. And use __zero_reg__ for signs. From-SVN: r243545
George Spelvin committed -
* g++.dg/debug/dwarf2/typedef1.C: Adjust pattern for last change. From-SVN: r243544
Rainer Orth committed -
gcc/testsuite/ * gcc.target/mips/mips.exp (mips-dg-options): Upgrade to R2 for -mnan=2008 and -mabs=2008. From-SVN: r243542
Toma Tabacu committed -
2016-12-12 Thomas Preud'homme <thomas.preudhomme@arm.com> gcc/ * config/arm/arm-opts.h: Move struct arm_arch_core_flag and arm_arch_core_flags to ... * common/config/arm/arm-common.c: There. From-SVN: r243541
Thomas Preud'homme committed -
* config/sparc/constraints.md (T): Use special memory constraint. (U): Minor tweak. (W): Add TARGET_ARCH64 test. * config/sparc/sparc.md (*movdi_insn_sp32): Replace 'W' with 'T'. (*movdf_insn_sp32): Likewise. (*mov<VM64:mode>_insn_sp32): Likewise. Replace 'e' with 'f' in conjunction with offsettable memory references. From-SVN: r243540
Eric Botcazou committed -
* doc/invoke.texi: Correct capitalization of OpenMP. From-SVN: r243539
John David Anglin committed -
2016-12-11 Sandra Loosemore <sandra@codesourcery.com> gcc/ * config/nios2/nios2.c (nios2_emit_move_sequence): Call copy_rtx to avoid shared structure error. From-SVN: r243538
Sandra Loosemore committed -
From-SVN: r243537
GCC Administrator committed
-
- 11 Dec, 2016 9 commits
-
-
[gcc] 2016-12-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/78695 * config/rs6000/rs6000.c (find_alignment_op): Discard from consideration any artificial definition. [gcc/testsuite] 2016-12-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR target/78695 * gcc.target/powerpc/swaps-stack-protector.c: New test. From-SVN: r243534
Bill Schmidt committed -
Earlier Darwin (esp. Darwin8 and Darwin9) had FAT libraries and suitable header installations in /usr/include such that one could build a cross-toolchain (including cross-arch) using a common sysroot (including / for “current” version). However this is no longer true on a number of levels. A vanilla Darwin system has no headers installed in /usr and it's certainly not appropriate to try and find headers/libs for (say) x86-64-darwinNN X powerpc-darwin in /usr on any Darwin NN > 10 (even Darwin10 is incomplete in that it omits the ppc64 multilib). In the latter example, the catch-all in the current configury to mean that "foo-darwin" == “foo-version-on-this-system” breaks the cross case —target=powerpc-apple-darwin —host=some-system-later-than-darwin10. gcc/ 2016-12-11 Iain Sandoe <iain@codesourcery.com> * configure.ac (CROSS directory tests): Remove the assumption that Darwin hosts contain suitable target sysroots in "/". * configure: Regenerate. From-SVN: r243533
Iain Sandoe committed -
The Darwin pic base loads (and reloads for non-local-gotos) are not validly copied (since the pic base label would be duplicated). Thus, mark the pic base {re-}loads as non-copyable. gcc/ 2016-12-11 Iain Sandoe <iain@codesourcery.com> PR rtl-optimization/71496 * config/rs6000/darwin.md (load_macho_picbase_si): Mark as non- copyable. (load_macho_picbase_di, reload_macho_picbase_si, reload_macho_picbase_di): Likewise. From-SVN: r243532
Iain Sandoe committed -
* config/pa/pa.c (pa_callee_copies): New function. * config/pa/pa.opt (mcaller-copies): New option. * doc/invoke.texi (mcaller-copies): Document option. From-SVN: r243531
John David Anglin committed -
PR target/70799 * config/i386/i386.c (dimode_scalar_to_vector_candidate_p) <case ASHIFT, case LSHIFTRT>: Consider all constant shifts. Add FIXME comment. (dimode_scalar_chain::compute_convert_gain): Reduce gain for constant shifts larger or equal than 32. testsuite/ChangeLog: PR target/70799 * gcc.target/i386/pr70799-3.c: New test. From-SVN: r243530
Uros Bizjak committed -
re PR c++/78637 (ICE on invalid C++ code on x86_64-linux-gnu (internal compiler error: in pop_namespace, at cp/name-lookup.c:3826)) /cp 2016-12-11 Paolo Carlini <paolo.carlini@oracle.com> PR c++/78637 * parser.c (cp_parser_namespace_definition): Increment nested_definition_count only if push_namespace succeeds. /testsuite 2016-12-11 Paolo Carlini <paolo.carlini@oracle.com> PR c++/78637 * g++.dg/parse/namespace14.C: New. From-SVN: r243529
Paolo Carlini committed -
* config/i386/x86-64.h: Append --32 to the assembler options when -m16 is used on non-glibc systems as well. From-SVN: r243528
Roger Pau Monné committed -
PR target/70118 * config/i386/mmintrin.h (__m64_u): New type * config/i386/emmintrin.h (_mm_loadl_epi64, _mm_storel_epi64): Make the allowed unaligned memory access explicit. From-SVN: r243527
Allan Sandfeld Jensen committed -
From-SVN: r243523
GCC Administrator committed
-
- 10 Dec, 2016 8 commits
-
-
2016-12-10 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/78226 * error.c (gfc_warning_internal): New function. * frontend-passes.c (gfc_run_passes): Call check_locus if CHECKING_P is defined. (check_locus_code): New function. (check_locus_expr): New function. (check_locus): New function. * gfortran.h: Add prototype for gfc_warning_internal. From-SVN: r243520
Thomas Koenig committed -
2016-12-10 Krister Walfridsson <krister.walfridsson@gmail.com> * config.gcc (i386-*-netbsd*): Make i486 the default arch on NetBSD. Generally use cpu generic. From-SVN: r243519
Krister Walfridsson committed -
2016-12-10 Krister Walfridsson <krister.walfridsson@gmail.com> * config.host (i[34567]86-*-netbsdelf*): Add i386/t-crtstuff to tmake_file. From-SVN: r243518
Krister Walfridsson committed -
2016-12-10 Paul Thomas <pault@gcc.gnu.org> PR fortran/78350 * resolve.c (resolve_structure_cons): Remove the block that tried to remove a charlen and rely on namespace cleanup. From-SVN: r243517
Paul Thomas committed -
PR tree-optimization/78720 * match.pd (A < 0 ? C : 0): Only optimize for signed A. If shift is negative, sign extend to @1's type and than AND with C. * gcc.c-torture/execute/pr78720.c: New test. Co-Authored-By: Marc Glisse <marc.glisse@inria.fr> From-SVN: r243516
Jakub Jelinek committed -
re PR fortran/78758 (Warning: '__builtin_memcpy' ... overflows the destination for string assignment) PR fortran/78758 * tree-object-size.c (compute_object_offset) <case ARRAY_REF>: Handle non-zero low bound or non-standard element sizes. * gfortran.dg/pr78758.f90: New test. * gfortran.dg/pr38868.f: Remove again bogus warning. From-SVN: r243515
Jakub Jelinek committed -
re PR sanitizer/78708 ([ASAN][LTO] ICE in expand_ASAN_MARK, at internal-fn.c:380 - when compiling but not linking with ASAN) PR sanitizer/78708 * lto-streamer-in.c (input_function): In addition to debug stmts without -g, remove IFN_*SAN_* calls if corresponding flag_sanitize bit is not enabled. From-SVN: r243514
Jakub Jelinek committed -
From-SVN: r243513
GCC Administrator committed
-
- 09 Dec, 2016 5 commits
-
-
re PR fortran/77903 ([F08] gfortran 6.1.0/7.0.0 accept invalid code with conflicting module/submodule interfaces) 2016-12-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/77903 * decl.c (get_proc_name): Use the symbol tlink field instead of the typespec interface field. (gfc_match_function_decl, gfc_match_submod_proc): Ditto. * gfortran.h : Since the symbol tlink field is no longer used by the frontend for change management, change the comment to reflect its current uses. * parse.c (get_modproc_result): Same as decl.c changes. * resolve.c (resolve_fl_procedure): Ditto. 2016-12-09 Paul Thomas <pault@gcc.gnu.org> PR fortran/77903 * gfortran.dg/submodule_20.f08: New test. From-SVN: r243507
Paul Thomas committed -
re PR testsuite/78740 (test case powerpc/pr78691-ppc.c fails starting with its introduction in r243335) 2016-12-09 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR testsuite/78740 * gcc.target/powerpc/pr78691-ppc.c: Remove -m32. From-SVN: r243506
Bill Schmidt committed -
2016-12-09 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * config/rs6000/rs6000-passes.def: New file. * config/rs6000/rs6000-protos.h: Declare make_pass_analyze_swaps. * config/rs6000/rs6000.c (rs6000_option_override): Remove registration of machine-specific passes. (pass_analyze_swaps::clone): New function. * config/rs6000/t-rs6000: Define PASSES_EXTRA. From-SVN: r243504
Bill Schmidt committed -
2016-12-09 Bill Schmidt <wschmidt@linux.vnet.ibm.com> * gcc.target/powerpc/fold-vec-add-7.c: Require effective target to support __int128. From-SVN: r243503
Bill Schmidt committed -
From-SVN: r243502
Martin Sebor committed
-