1. 09 Aug, 2016 34 commits
  2. 08 Aug, 2016 6 commits
    • text/template: reduce maxExecDepth for gccgo further · 0717bdbf
          
          We already lowered the limit of recursive template invocations from
          100,000 to 10,000, but the tests still fail occasionally on
          x86_64-pc-linux-gnu when using GNU ld (so that split stacks are not
          fully functional).  Reduce the limit further, to 1000, enough so that
          the test passes consistently.
          
          Permitting 1000 recursive template invocations still seems capacious
          enough for real world use.
          
          Reviewed-on: https://go-review.googlesource.com/25590
      
      From-SVN: r239261
      Ian Lance Taylor committed
    • c-format.c: suggest the correct format string to use (PR c/64955) · 895aa8e1
      This adds fix-it hints to c-format.c so that it can (sometimes) suggest
      the format string the user should have used.
      
      The patch adds selftests for the new code in c-format.c.  These
      selftests are thus lang-specific.  This is the first time we've had
      lang-specific selftests, and hence the patch also adds a langhook for
      running them.  (Note that currently the Makefile only invokes the
      selftests for cc1).
      
      gcc/c-family/ChangeLog:
      	PR c/64955
      	* c-common.h (selftest::c_format_c_tests): New declaration.
      	(selftest::run_c_tests): New declaration.
      	* c-format.c: Include "selftest.h.
      	(format_warning_va): Add param "corrected_substring" and use
      	it to add a replacement fix-it hint.
      	(format_warning_at_substring): Likewise.
      	(format_warning_at_char): Update for new param of
      	format_warning_va.
      	(argument_parser::check_argument_type): Pass "fki" to
      	check_format_types.
      	(check_format_types): Add param "fki" and pass it to
      	format_type_warning.
      	(deref_n_times): New function.
      	(get_modifier_for_format_len): New function.
      	(selftest::test_get_modifier_for_format_len): New function.
      	(get_format_for_type): New function.
      	(format_type_warning): Add param "fki" and use it to attempt
      	to provide hints for argument types when calling
      	format_warning_at_substring.
      	(selftest::get_info): New function.
      	(selftest::assert_format_for_type_streq): New function.
      	(ASSERT_FORMAT_FOR_TYPE_STREQ): New macro.
      	(selftest::test_get_format_for_type_printf): New function.
      	(selftest::test_get_format_for_type_scanf): New function.
      	(selftest::c_format_c_tests): New function.
      
      gcc/c/ChangeLog:
      	PR c/64955
      	* c-lang.c (LANG_HOOKS_RUN_LANG_SELFTESTS): If CHECKING_P, wire
      	this up to selftest::run_c_tests.
      	(selftest::run_c_tests): New function.
      
      gcc/ChangeLog:
      	PR c/64955
      	* langhooks-def.h (LANG_HOOKS_RUN_LANG_SELFTESTS): New default
      	do-nothing langhook.
      	(LANG_HOOKS_INITIALIZER): Add LANG_HOOKS_RUN_LANG_SELFTESTS.
      	* langhooks.h (struct lang_hooks): Add run_lang_selftests.
      	* selftest-run-tests.c: Include "tree.h" and "langhooks.h".
      	(selftest::run_tests): Call lang_hooks.run_lang_selftests.
      
      gcc/testsuite/ChangeLog:
      	PR c/64955
      	* gcc.dg/format/diagnostic-ranges.c: Add fix-it hints to expected
      	output.
      
      From-SVN: r239260
      David Malcolm committed
    • libgo: don't have .lo depend on .lo.dep · b123572d
          
          Having each .lo depend on the corresponding .lo.dep caused too many
          rebuilds, because the .lo.dep files are rebuilt when Makefile changes.
          Instead, if the .lo.dep file changes, remove the .lo file.
          
          Reviewed-on: https://go-review.googlesource.com/25588
      
      From-SVN: r239258
      Ian Lance Taylor committed
    • Fix selftest::test_lexer_string_locations_ebcdic for systems without iconv (PR bootstrap/72844) · a7d79e5c
      selftest::test_lexer_string_locations_ebcdic has this clause:
      
        /* EBCDIC support requires iconv.  */
        if (!HAVE_ICONV)
          return;
      
      leading to a build failure on systems without iconv.  This conditional
      works in libcpp due to this in libcpp/internal.h:
      
        #if HAVE_ICONV
        #include <iconv.h>
        #else
        #define HAVE_ICONV 0
        typedef int iconv_t;  /* dummy */
        #endif
      
      Fix the problem by ensuring that HAVE_ICONV is always defined within
      gcc/input.c.
      
      gcc/ChangeLog:
      	PR bootstrap/72844
      	* input.c: Ensure that HAVE_ICONV is defined.
      
      From-SVN: r239257
      David Malcolm committed
    • testsuite: fix gotest for absolute srcdir · 9a7b0161
          
          The recent changes to Makefile.am mean that if you configure with an
          absolute path as srcdir then gotest will be invoked with absolute paths
          for the files.  That case never worked.  This patch fixes it.
          
          Reviewed-on: https://go-review.googlesource.com/25587
      
      From-SVN: r239256
      Ian Lance Taylor committed
    • pr71078-1.c: Add require-effective-target c99_runtime. · 9afda630
      2016-08-08  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
      
      testsuite/
      	* gcc.dg/tree-ssa/pr71078-1.c: Add require-effective-target
      	c99_runtime.
      	* gcc.dg/tree-ssa/pr71078-1-double.c: Likewise.
      	* gcc.dg/tree-ssa/pr71078-1-long-double.c: Likewise.
      	* gcc.dg/tree-ssa/pr71078-2.c: Likewise.
      	* gcc.dg/tree-ssa/pr71078-2-double.c: Likewise.
      	* gcc.dg/tree-ssa/pr71078-2-long-double.c: Likewise.
      	* gcc.dg/tree-ssa/pr71078-3.c: Likewise.
      
      From-SVN: r239255
      Prathamesh Kulkarni committed