1. 25 Jun, 2019 12 commits
    • Create GCN-specific gthreads · 76d46331
      2019-06-25  Kwok Cheung Yeung  <kcy@codesourcery.com>
                  Andrew Stubbs  <ams@codesourcery.com>
      
              gcc/
      	* config.gcc (thread_file): Set to gcn for AMD GCN.
      	* config/gcn/gcn.c (gcn_emutls_var_init): New function.
      	(TARGET_EMUTLS_VAR_INIT): New hook.
      
      	config/
      	* gthr.m4 (GCC_AC_THREAD_HEADER): Add case for gcn.
      
      	libgcc/
      	* configure: Regenerate.
      	* config/gcn/gthr-gcn.h: New.
      
      Co-Authored-By: Andrew Stubbs <ams@codesourcery.com>
      
      From-SVN: r272647
      Kwok Cheung Yeung committed
    • [PR 90939] Remove outdated assert in ipcp_bits_lattice::meet_with · 4c3d8760
      2019-06-25  Martin Jambor  <mjambor@suse.cz>
      
      	PR ipa/90939
      	* ipa-cp.c (ipcp_bits_lattice::meet_with): Remove assert.
      
      	testsuite/
      	* g++.dg/lto/pr90939_[01].C: New test.
      
      From-SVN: r272646
      Martin Jambor committed
    • re PR tree-optimization/90930 (Excessive memory consumption) · 332d6c41
      2019-06-25  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90930
      	* tree-ssa-reassoc.c (reassociate_bb): Only rewrite expression
      	into parallel form in the last pass instance.
      
      	* gcc.dg/tree-ssa/reassoc-24.c: Adjust.
      	* gcc.dg/tree-ssa/reassoc-25.c: Likewise.
      
      From-SVN: r272644
      Richard Biener committed
    • [ARC] Fix for PR89838 · 673f01b8
      gcc/
      xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* config/arc/arc.c (arc_symbol_binds_local_p): New function.
      	(arc_legitimize_pic_address): Simplify and cleanup the function.
      	(SYMBOLIC_CONST): Remove.
      	(prepare_pic_move): Likewise.
      	(prepare_move_operands): Handle complex mov cases here.
      	(arc_legitimize_address_0): Remove call to
      	arc_legitimize_pic_address.
      	(arc_legitimize_address): Remove call to
      	arc_legitimize_tls_address.
      	* config/arc/arc.md (movqi_insn): Allow Cm3 match.
      	(movhi_insn): Likewise.
      
      /gcc/testsuite
      xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>
      
      	* gcc.target/arc/pr89838.c: New file.
      
      From-SVN: r272643
      Claudiu Zissulescu committed
    • Implement alternate "__intN__" form of "__intN" type · 5e580306
      gcc/ChangeLog:
      
      	* gcc/c-family/c-common.c (c_common_nodes_and_builtins): Define
      	alternate "__intN__" name for "__intN" types.
      	* gcc/c/c-parser.c (c_parse_init): Create keyword for "__intN__" type.
      	* gcc/cp/lex.c (init_reswords): Likewise.
      	* gcc/config/msp430/msp430.h: Use __int20__ for SIZE_TYPE and
      	PTRDIFF_TYPE.
      	* gcc/cp/cp-tree.h (cp_decl_specifier_seq): New bitfield "int_n_alt".
      	* gcc/c/c-decl.c (declspecs_add_type): Don't pedwarn about "__intN" ISO
      	C incompatibility if alternate "__intN__" form is used.
      	* gcc/cp/decl.c (grokdeclarator): Likewise.
      	* gcc/cp/parser.c (cp_parser_simple_type_specifier): Set
      	decl_specs->int_n_alt if "__intN__" form is used.
      	* gcc/gimple-ssa-sprintf.c (build_intmax_type_nodes): Accept "__intN__"
      	format of "__intN" types for UINTMAX_TYPE.
      	* gcc/brig/brig-lang.c (brig_build_c_type_nodes): Accept "__intN__"
      	format of "__intN" types for SIZE_TYPE.
      	* gcc/lto/lto-lang.c (lto_build_c_type_nodes): Likewise.
      	* gcc/stor-layout.c (initialize_sizetypes): Accept "__intN__"
      	format of "__intN" types for SIZETYPE.
      	* gcc/tree.c (build_common_tree_nodes): Accept "__intN__"
      	format of "__intN" types for SIZE_TYPE and PTRDIFF_TYPE.
      	* gcc/doc/invoke.texi: Document that __intN__ disables pedantic
      	warnings.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.target/msp430/mlarge-pedwarns.c: New test.
      
      From-SVN: r272640
      Jozef Lawrynowicz committed
    • tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that base2_alias_set is… · a7e8a463
      tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that base2_alias_set is non-zero before doing TBAA based disambiguation.
      
      	* tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Check that
      	base2_alias_set is non-zero before doing TBAA based disambiguation.
      
      From-SVN: r272639
      Jan Hubicka committed
    • Properly sum costs in tree-vect-loop.c (PR tree-optimization/90973). · 1a3e38ae
      2019-06-25  Martin Liska  <mliska@suse.cz>
      
      	PR tree-optimization/90973
      	* tree-vect-loop.c (vect_get_known_peeling_cost): Sum retval
      	of prologue and epilogue.
      
      From-SVN: r272638
      Martin Liska committed
    • decl.c (gnat_to_gnu_entity): Remove superfluous test in previous change. · c2352415
      	* gcc-interface/decl.c (gnat_to_gnu_entity): Remove superfluous test
      	in previous change.
      	* gcc-interface/gigi.h (maybe_character_type): Fix formatting.
      	(maybe_character_value): Likewise.
      
      From-SVN: r272637
      Eric Botcazou committed
    • re PR sanitizer/90954 (ICE: combining undefined behavior sanitizer with openmp) · 361af3e4
      	PR sanitizer/90954
      	* c-omp.c (c_finish_omp_atomic): Allow tree_invariant_p in addition
      	to SAVE_EXPR in first operand of a COMPOUND_EXPR.
      
      	* c-c++-common/gomp/pr90954.c: New test.
      
      From-SVN: r272635
      Jakub Jelinek committed
    • pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN, [...]): Define to OpenMP 5.0 pragmas even for GCC 10.0+. · 32bab8b6
      	* include/pstl/pstl_config.h (_PSTL_PRAGMA_SIMD_SCAN,
      	_PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN, _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN):
      	Define to OpenMP 5.0 pragmas even for GCC 10.0+.
      	(_PSTL_UDS_PRESENT): Define to 1 for GCC 10.0+.
      
      From-SVN: r272634
      Jakub Jelinek committed
    • runtime: mark memequal and memclrNoHeapPointers nosplit · 81fadf1c
          
          They are wrappers of libc functions that use no stack. Mark them
          nosplit so the linker won't patch it to call __morestack_non_split.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183629
      
      From-SVN: r272633
      Ian Lance Taylor committed
    • Daily bump. · 33437116
      From-SVN: r272632
      GCC Administrator committed
  2. 24 Jun, 2019 13 commits
    • ipa-utils.h (type_with_linkage_p): Verify that type is CXX_ODR_P. · f4af4019
      
      	* ipa-utils.h (type_with_linkage_p): Verify that type is
      	CXX_ODR_P.
      	(odr_type_p): Remove extra return.
      	* lto-streamer-out.c (hash_tree): Hash TYPE_CXX_ODR_P;
      	hash STRING_FLAG only for arrays and integers.
      	* tree-stremaer-in.c (unpack_ts_type_common_value_fields):
      	Update analogously.
      	* tree-streamer-out.c (pack_ts_type_common_value_fields):
      	Likewise.
      	* print-tree.c (print_node): Print cxx-odr-p
      	and string-flag.
      	* tree.c (need_assembler_name_p): Also check that type
      	is CXX_ODR_TYPE_P
      	(verify_type_variant): Update verification of SRING_FLAG;
      	also check CXX_ODR_P.
      	* tree.h (ARRAY_OR_INTEGER_TYPE_CHECK): New macro.
      	(TYPE_STRING_FLAG): Use it.
      	(TYPE_CXX_ODR_P): New macro.
      
      	* lto-common.c (compare_tree_sccs_1): Compare CXX_ODR_P;
      	compare STRING_FLAG only for arrays and integers.
      
      	* gcc-interface/decl.c (gnat_to_gnu_entity): Check that
      	type is array or integer prior checking string flag.
      	* gcc-interface/gigi.h (gnat_signed_type_for,
      	maybe_character_value): Likewise.
      
      	* c-common.c (braced_lists_to_strings): Check that
      	type is array or integer prior checking string flag.
      
      	* lex.c (cxx_make_type): Set TYPE_CXX_ODR_P.
      
      	* dwarf2out.c (gen_array_type_die): First check that type
      	is an array and then test string flag.
      
      	* trans-expr.c (gfc_conv_substring): Check that
      	type is array or integer prior checking string flag.
      	(gfc_conv_string_parameter): Likewise.
      	* trans-openmp.c (gfc_omp_scalar_p): Likewise.
      	* trans.c (gfc_build_array_ref): Likewise.
      
      From-SVN: r272628
      Jan Hubicka committed
    • [Darwin, PPC, testsuite] Skip tests for unimplemented functionality. · cd57f4d8
      The -mno-speculate-indirect-jumps functionality is not implemented for
      Darwin and, given that it's deprecated, is unlikely to be.
      
      2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/powerpc/safe-indirect-jump-1.c: Skip for Darwin.
      	* gcc.target/powerpc/safe-indirect-jump-7.c: Likewise.
      
      From-SVN: r272627
      Iain Sandoe committed
    • [Darwin, PPC, testsuite] Fix spec-barr-1.c for Darwin. · 4de1ded2
      We just needed to adjust the regex to accept Darwin's register names.
      
      2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/powerpc/spec-barr-1.c: Adjust scan assembler regex
      	to recognise Darwin's register names.
      
      From-SVN: r272626
      Iain Sandoe committed
    • [Darwin, testsuite] Fix isystem-2.c. · 367e5f9e
      For the test to succeed there needs to be some header that is to be found in
      the 'expected' place i.e. <sysroot>/usr/include/.  It's important that it is
      not the name of a header for which fixincludes have been applied, since such
      headers will be found in the gcc include-fixed dir and, in general, reference
      additional headers.  The dummy sysroot will prevent the additional headers
      from being found, resulting in a failed test.  The fix is to use a header name
      that isn't expected to be present in a real sysroot.
      
      2019-06-24  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.dg/cpp/isysroot-1.c (main): Use <example.h> as the test header.
      	* gcc.dg/cpp/usr/include/stdio.h: Rename...
      	* gcc.dg/cpp/usr/include/example.h: ... to this.
      
      From-SVN: r272625
      Iain Sandoe committed
    • compiler: open code string equality · 609c7da9
          
          Open code string equality with builtin memcmp. This allows
          further optimizations in the backend.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183538
      
      From-SVN: r272624
      Ian Lance Taylor committed
    • re PR target/90972 (ICE in fold_convert_loc, at fold-const.c:2429) · d611cec3
      2019-06-24  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90972
      	* tree-vect-stmts.c (vect_init_vector): Handle CONSTANT_CLASS_P
      	in common code, dealing with STRING_CST properly.
      
      	* gcc.dg/torture/pr90972.c: New testcase.
      
      From-SVN: r272623
      Richard Biener committed
    • re PR tree-optimization/90930 (Excessive memory consumption) · bab9de71
      2019-06-24  Richard Biener  <rguenther@suse.de>
      
      	PR tree-optimization/90930
      	PR tree-optimization/90316
      	* tree-ssa-alias.c (walk_non_aliased_vuses): Add missing
      	decrement of limit.
      
      From-SVN: r272621
      Richard Biener committed
    • compiler: use builtin memcmp directly · 2b92d5c6
          
          Instead of going through a C function __go_memcmp, we can just
          use __builtin_memcmp directly. This allows more optimizations in
          the compiler backend.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183537
      
      From-SVN: r272620
      Ian Lance Taylor committed
    • utils.c (handle_nonnull_attribute): Quote attribute name. · 1e3d475e
      
      gcc/ada/ChangeLog:
      
      	* gcc-interface/utils.c (handle_nonnull_attribute): Quote attribute
      	name.
      
      gcc/c/ChangeLog:
      
      	* c-typeck.c (build_binary_op): Hyphenate floating-point.
      
      gcc/testsuite/ChangeLog:
      
      	* gcc.dg/Wfloat-equal-1.c: Adjust text of expected diagnostic.
      	* gcc.dg/misc-column.c: Ditto.
      
      gcc/ChangeLog:
      
      	* tree-pretty-print.h: Remove unnecessary punctuation characters
      	from a diagnostic.
      	* tree-ssa.c (release_defs_bitset): Correct preprocessor conditional.
      
      From-SVN: r272619
      Martin Sebor committed
    • Don't use a separate CLASSTYPE_AS_BASE if it's the same size. · c3337b44
      	* class.c (layout_class_type): Don't use a separate
      	CLASSTYPE_AS_BASE if it's the same size.
      
      From-SVN: r272618
      Jason Merrill committed
    • Fix std::midpoint for denormal values · a3c8d7fb
      	* include/std/numeric (midpoint(T, T)): Change implementation for
      	floating-point types to avoid incorrect rounding of denormals.
      	* testsuite/26_numerics/midpoint/floating.cc: Add check for correct
      	rounding with denormals.
      	* testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line numbers.
      	* testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
      
      From-SVN: r272616
      Jonathan Wakely committed
    • Define C11 macros such as FLT_DECIMAL_DIG for C++17 · ff164b60
      	* testsuite/18_support/headers/cfloat/values_c++17.cc: New test.
      
      From-SVN: r272615
      Jonathan Wakely committed
    • Daily bump. · efe8764f
      From-SVN: r272613
      GCC Administrator committed
  3. 23 Jun, 2019 10 commits
    • compiler: edit error messages to avoid -Wformat-diag warnings · 587bd425
          
          GCC recently introduced -Wformat-diag to scrutinize GCC error messages.
          It reports a number of warnings about gofrontend code, such as:
          
          ../../trunk/gcc/go/gofrontend/import.cc: In member function ‘Type* Import::type_for_index(int, const string&, size_t, bool*)’:
          ../../trunk/gcc/go/gofrontend/import.cc:1129:48: warning: unquoted operator ‘>=’ in format [-Wformat-diag]
           1129 |         "error in %s at %lu: bad type index %d >= %d",
                |                                                ^~
          
          ../../trunk/gcc/go/gofrontend/ast-dump.cc: In member function ‘void Ast_dump_context::dump(Gogo*, const char*)’:
          ../../trunk/gcc/go/gofrontend/ast-dump.cc:203:25: warning: unquoted option name ‘-fgo-dump-ast’ in format [-Wformat-diag]
            203 |     "cannot open %s:%m, -fgo-dump-ast ignored", dumpname.c_str());
                |                         ^~~~~~~~~~~~~
          
          ../../trunk/gcc/go/gofrontend/expressions.cc: In static member function ‘static Bexpression* Func_expression::get_code_pointer(Gogo*, Named_object*, Location)’:
          ../../trunk/gcc/go/gofrontend/expressions.cc:1350:29: warning: misspelled term ‘builtin function’ in format; use ‘built-in function’ instead [-Wformat-diag]
           1350 |     "invalid use of special builtin function %qs; must be called",
                |                             ^~~~~~~~~~~~~~~~
          
          ../../trunk/gcc/go/gofrontend/gogo.cc: In member function ‘void Gogo::add_linkname(const string&, bool, const string&, Location)’:
          ../../trunk/gcc/go/gofrontend/gogo.cc:2527:4: warning: unquoted sequence of 2 consecutive punctuation characters ‘//’ in format [-Wformat-diag]
           2527 |   ("%s is not a function; "
                |   ~^~~~~~~~~~~~~~~~~~~~~~~~
           2528 |    "//go:linkname is only supported for functions"),
                |    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          
          This CL edits error messages to avoid these warnings.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183497
      
      	* go.test/test/blank1.go: Update for diagnostic message changes.
      
      From-SVN: r272608
      Ian Lance Taylor committed
    • compiler: add go_debug and use it for debug messages · 26fcb396
          
          GCC recently added a new warning -Wformat-diag which does a lot of
          rigorous checks on GCC diagnostic messages.  This produces a number of
          unnecessary diagnostics on gofrontend diagnostic output, such as
          
          ../../trunk/gcc/go/gofrontend/escape.cc: In member function ‘virtual int Escape_analysis_assign::statement(Block*, size_t*, Statement*)’:
          ../../trunk/gcc/go/gofrontend/escape.cc:1336:33: warning: spurious leading punctuation sequence ‘[’ in format [-Wformat-diag]
           1336 |       go_inform(s->location(), "[%d] %s esc: %s",
                |                                 ^
          
          ../../trunk/gcc/go/gofrontend/escape.cc: In member function ‘void Escape_analysis_assign::call(Call_expression*)’:
          ../../trunk/gcc/go/gofrontend/escape.cc:1964:17: warning: unquoted operator ‘::’ in format [-Wformat-diag]
           1964 |         "esccall:: indirect call <- %s, untracked",
                |                 ^~
          
          ../../trunk/gcc/go/gofrontend/escape.cc:1964:34: warning: unbalanced punctuation character ‘<’ in format [-Wformat-diag]
           1964 |         "esccall:: indirect call <- %s, untracked",
                |                                  ^
          
          Avoid these messages by adding a new function go_debug that uses only
          printf formatting, not GCC diagnostic formatting, and change all the
          optimization debugging messages to use it.  None of the debugging
          messages used the GCC diagnostic formatting specifiers anyhow.
          
          Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183437
      
      From-SVN: r272607
      Ian Lance Taylor committed
    • [Darwin, PPC, testsuite] Fix builtins-2 for Darwin. · d7e96c46
      This cannot pass for current Darwin, since it requires VSX and we
      don't have any hardware supporting that.  Add a dg-requires clause
      for this.
      
      2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/powerpc/builtins-2.c: Require VSX hardware support.
      
      From-SVN: r272606
      Iain Sandoe committed
    • [Darwin, PPC, testsuite] Fix pr80125 testcase for Darwin. · 5fe35245
      Darwin (unlike most of the members of the PowerPC port family)
      defaults to signed chars, so the test was failing to compile with
      a "mismatched parameters" error.
      
      2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/powerpc/pr80125.c (foo): Use an unsigned char
      	vector explicitly for the vec_perm.
      
      From-SVN: r272605
      Iain Sandoe committed
    • [Darwin, PPC, testsuite] Fix builtins-1 testcase for Darwin. · fb007b0d
      This needs to account for Darwin's __USER_LABEL_PREFIX__.
      
      2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/powerpc/builtins-1.c: Account for Darwin's use of
      	__USER_LABEL_PREFIX__.
      
      From-SVN: r272604
      Iain Sandoe committed
    • [Darwin, PPC] Handle GCC target pragma. · deb9c4eb
      For compatibility with other members of the port.
      Note, that we do not handle the longcall attribute, since longcall
      is not required/used on current Darwin.
      
      2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/rs6000/darwin.h: Handle GCC target pragma.
      
      From-SVN: r272603
      Iain Sandoe committed
    • [Darwin, PPC] Emit uppercase versions of ppc defines. · 64ce6cc2
      Emit __PPC__ (32b) and __PPC64__ (64bit) as per the other members
      of the PowerPC port.
      
      2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* config/rs6000/darwin.h: (__PPC__, __PPC64__): New.
      
      From-SVN: r272602
      Iain Sandoe committed
    • [Darwin, PPC, testsuite] Fix pr71785 testcase for Darwin. · 63e6229c
      Firstly, we adjust the test conditions to use non-PIC code for Darwin.
      Secondly, we have to account for out-of-line GPR restores which gives
      a false positive on one of the scan-assembler-not.  Lastly, we make the
      test a bit more specific for Darwin - that it looks for absence of
      branches to local labels.
      
      2019-06-23  Iain Sandoe  <iain@sandoe.co.uk>
      
      	* gcc.target/powerpc/pr71785.c: For Darwin, make test non-PIC,
      	expect the out-of-line GPR restore, and test specifically for
      	absence of branches to local labels.
      
      From-SVN: r272601
      Iain Sandoe committed
    • Rename DEFAULT_ARG to DEFERRED_PARSE. · 7b49e3da
      From-SVN: r272600
      Marek Polacek committed
    • Daily bump. · 35e2848f
      From-SVN: r272599
      GCC Administrator committed
  4. 22 Jun, 2019 5 commits