Chung-Lin Tang [Tue, 19 Feb 2019 14:10:15 +0000 (14:10 +0000)]
re PR c/87924 (OpenACC wait clauses without async-arguments)
2019-02-19 Chung-Lin Tang <cltang@codesourcery.com>
PR c/87924
gcc/c/
* c-parser.c (c_parser_oacc_clause_wait): Add representation of wait
clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
gcc/cp/
* parser.c (cp_parser_oacc_clause_wait): Add representation of wait
clause without argument as 'wait (GOMP_ASYNC_NOVAL)', adjust comments.
gcc/fortran/
* openmp.c (gfc_match_omp_clauses): Add representation of wait clause
without argument as 'wait (GOMP_ASYNC_NOVAL)'.
libgomp/
* oacc-parallel.c (GOACC_parallel_keyed): Remove condition on call to
goacc_wait().
(goacc_wait): Handle ACC_ASYNC_NOVAL case, remove goacc_thread() call
and related adjustment.
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>
From-SVN: r269016
Richard Biener [Tue, 19 Feb 2019 12:46:48 +0000 (12:46 +0000)]
re PR tree-optimization/88074 (g++ hangs on math expression)
2019-02-19 Richard Biener <rguenther@suse.de>
PR middle-end/88074
* toplev.c (do_compile): Initialize mpfr's exponent range
based on available float modes.
* gcc.dg/pr88074.c: New testcase.
From-SVN: r269015
Iain Buclaw [Tue, 19 Feb 2019 12:38:48 +0000 (12:38 +0000)]
Fix libphobos.shared/load.d compile failure on Solaris
2019-02-19 Iain Buclaw <ibuclaw@gdcproject.org>
* testsuite/libphobos.shared/load.d: Import core.sys.posix.dlfcn.
[DragonFlyBSD, FreeBSD, linux, NetBSD, OSX, Solaris]: Import only
RTLD_NOLOAD from core.sys.*.dlfcn.
Assert RTLD_NOLOAD is available.
From-SVN: r269014
Eric Botcazou [Tue, 19 Feb 2019 09:25:39 +0000 (09:25 +0000)]
rtlanal.c (get_initial_register_offset): Fall back to the estimate as long as the epilogue isn't completed.
* rtlanal.c (get_initial_register_offset): Fall back to the estimate
as long as the epilogue isn't completed.
From-SVN: r269013
Rainer Orth [Tue, 19 Feb 2019 09:24:50 +0000 (09:24 +0000)]
Fix libphobos linking on Solaris 11
* m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_NET): New macro.
* configure.ac: Invoke it.
* configure: Regenerate.
From-SVN: r269012
Jakub Jelinek [Tue, 19 Feb 2019 08:57:24 +0000 (09:57 +0100)]
re PR middle-end/89303 (memory leak with shared_ptr and enable_shared_from_this)
PR middle-end/89303
* g++.dg/torture/pr89303.C: Move everything from std namespace to my
namespace.
From-SVN: r269010
Jakub Jelinek [Tue, 19 Feb 2019 08:43:23 +0000 (09:43 +0100)]
re PR c++/89387 (ICE in maybe_generic_this_capture at gcc/cp/lambda.c:945 since r268851)
PR c++/89387
* lambda.c (maybe_generic_this_capture): Don't check
DECL_NONSTATIC_MEMBER_FUNCTION_P on USING_DECLs.
* g++.dg/cpp0x/lambda/lambda-89387.C: New test.
From-SVN: r269009
Jakub Jelinek [Tue, 19 Feb 2019 08:40:07 +0000 (09:40 +0100)]
re PR c++/89391 (ICE in build_target_expr_with_type, at cp/tree.c:795)
PR c++/89391
* typeck.c (build_reinterpret_cast_1): Don't handle void to
&& conversion go through build_target_expr_with_type.
* g++.dg/cpp0x/reinterpret_cast2.C: New test.
From-SVN: r269008
Jakub Jelinek [Tue, 19 Feb 2019 08:38:54 +0000 (09:38 +0100)]
re PR c++/89390 (ICE in get_string, at spellcheck-tree.h:46)
PR c++/89390
* error.c (qualified_name_lookup_error): Only call
suggest_alternative_in_scoped_enum if name is IDENTIFIER_NODE.
* g++.dg/diagnostic/pr89390.C: New test.
From-SVN: r269007
Jonathan Wakely [Tue, 19 Feb 2019 02:55:12 +0000 (02:55 +0000)]
Adjust C++11/C++14 tests to work with -fchar8_t
* testsuite/21_strings/basic_string/literals/types.cc
[_GLIBCXX_USE_CHAR8_T]: Adjust expected string type for u8 literal.
* testsuite/21_strings/basic_string/literals/values.cc
[_GLIBCXX_USE_CHAR8_T]: Likewise.
* testsuite/22_locale/codecvt/char16_t.cc: Adjust for u8 literals
potentially having different type.
* testsuite/22_locale/codecvt/char32_t.cc: Likewise.
* testsuite/22_locale/codecvt/codecvt_utf8/79980.cc: Cast u8 literal
to char.
* testsuite/22_locale/codecvt/codecvt_utf8/wchar_t/1.cc: Likewise.
* testsuite/22_locale/codecvt/utf8.cc: Likewise.
* testsuite/22_locale/conversions/string/2.cc: Remove u8 prefix from
string literals only using basic character set.
* testsuite/22_locale/conversions/string/3.cc: Likewise. Cast other
u8 literals to char.
* testsuite/29_atomics/headers/atomic/macros.cc [_GLIBCXX_USE_CHAR8_T]:
Test ATOMIC_CHAR8_T_LOCK_FREE.
Add missing #error to ATOMIC_CHAR16_T_LOCK_FREE test.
* testsuite/29_atomics/headers/atomic/types_std_c++0x.cc
[_GLIBCXX_USE_CHAR8_T]: Check for std::atomic_char8_t.
* testsuite/experimental/string_view/literals/types.cc
[_GLIBCXX_USE_CHAR8_T]: Adjust expected string_view type for u8
literal.
* testsuite/experimental/string_view/literals/values.cc
[_GLIBCXX_USE_CHAR8_T]: Likewise.
From-SVN: r269006
Tom Honermann [Tue, 19 Feb 2019 02:55:05 +0000 (02:55 +0000)]
P0482R5 char8_t: New standard library tests
2019-02-19 Tom Honermann <tom@honermann.net>
* testsuite/18_support/numeric_limits/char8_t.cc: New test cloned
from char16_32_t.cc; validates numeric_limits<char8_t>.
* testsuite/21_strings/basic_string/literals/types-char8_t.cc: New
test cloned from types.cc; validates operator""s for char8_t
returns u8string.
* testsuite/21_strings/basic_string/literals/values-char8_t.cc: New
test cloned from values.cc; validates construction and comparison
of u8string values.
* testsuite/21_strings/basic_string/requirements/
/explicit_instantiation/char8_t/1.cc: New test cloned from
char16_t/1.cc; validates explicit instantiation of
basic_string<char8_t>.
* testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
New test cloned from types.cc; validates operator""sv for char8_t
returns u8string_view.
* testsuite/21_strings/basic_string_view/literals/
values-char8_t.cc: New test cloned from values.cc; validates
construction and comparison of u8string_view values.
* testsuite/21_strings/basic_string_view/requirements/
explicit_instantiation/char8_t/1.cc: New test cloned from
char16_t/1.cc; validates explicit instantiation of
basic_string_view<char8_t>.
* testsuite/21_strings/char_traits/requirements/char8_t/65049.cc:
New test cloned from char16_t/65049.cc; validates that
char_traits<char8_t> is not vulnerable to the concerns in PR65049.
* testsuite/21_strings/char_traits/requirements/char8_t/
typedefs.cc: New test cloned from char16_t/typedefs.cc; validates
that char_traits<char8_t> member typedefs are present and correct.
* testsuite/21_strings/char_traits/requirements/
explicit_instantiation/char8_t/1.cc: New test cloned from
char16_t/1.cc; validates explicit instantiation of
char_traits<char8_t>.
* testsuite/22_locale/codecvt/char16_t-char8_t.cc: New test cloned
from char16_t.cc: validates
codecvt<char16_t, char8_t, mbstate_t>.
* testsuite/22_locale/codecvt/char32_t-char8_t.cc: New test cloned
from char32_t.cc: validates
codecvt<char32_t, char8_t, mbstate_t>.
* testsuite/22_locale/codecvt/utf8-char8_t.cc: New test cloned from
utf8.cc; validates codecvt<char16_t, char8_t, std::mbstate_t> and
codecvt<char32_t, char8_t, std::mbstate_t>.
* testsuite/27_io/filesystem/path/native/string-char8_t.cc: New
test cloned from string.cc; validates filesystem::path construction
from char8_t input.
* testsuite/experimental/feat-char8_t.cc: New test; validates that
the __cpp_lib_char8_t feature test macro is defined with the
correct value.
* testsuite/experimental/filesystem/path/native/string-char8_t.cc:
New test cloned from string.cc; validates filesystem::path
construction from char8_t input.
* testsuite/experimental/string_view/literals/types-char8_t.cc: New
test cloned from types.cc; validates operator""sv for char8_t
returns u8string_view.
* testsuite/experimental/string_view/literals/values-char8_t.cc:
New test cloned from values.cc; validates construction and
comparison of u8string_view values.
* testsuite/experimental/string_view/requirements/
explicit_instantiation/char8_t/1.cc: New test cloned from
char16_t/1.cc; validates explicit instantiation of
basic_string_view<char8_t>.
* testsuite/ext/char8_t/atomic-1.cc: New test; validates that
ATOMIC_CHAR8_T_LOCK_FREE is not defined if char8_t support is not
enabled.
From-SVN: r269005
Tom Honermann [Tue, 19 Feb 2019 02:54:42 +0000 (02:54 +0000)]
P0482R5 char8_t: Standard library support
gcc/cp:
2019-02-19 Tom Honermann <tom@honermann.net>
* name-lookup.c (get_std_name_hint): Added u8string as a name hint.
libstdc++:
2019-02-19 Tom Honermann <tom@honermann.net>
P0482R5 char8_t: Standard library support
* config/abi/pre/gnu-versioned-namespace.ver (CXXABI_2.0): Add
typeinfo symbols for char8_t.
* config/abi/pre/gnu.ver: Add CXXABI_1.3.12.
(GLIBCXX_3.4.26): Add symbols for specializations of
numeric_limits and codecvt that involve char8_t.
(CXXABI_1.3.12): Add typeinfo symbols for char8_t.
* include/bits/atomic_base.h: Add atomic_char8_t.
* include/bits/basic_string.h: Add std::hash<u8string> and
operator""s(const char8_t*, size_t).
* include/bits/c++config: Define _GLIBCXX_USE_CHAR8_T and
__cpp_lib_char8_t.
* include/bits/char_traits.h: Add char_traits<char8_t>.
* include/bits/codecvt.h: Add
codecvt<char16_t, char8_t, mbstate_t>,
codecvt<char32_t, char8_t, mbstate_t>,
codecvt_byname<char16_t, char8_t, mbstate_t>, and
codecvt_byname<char32_t, char8_t, mbstate_t>.
* include/bits/cpp_type_traits.h: Add __is_integer<char8_t> to
recognize char8_t as an integral type.
* include/bits/fs_path.h: (path::__is_encoded_char): Recognize
char8_t.
(path::u8string): Return std::u8string when char8_t support is
enabled.
(path::generic_u8string): Likewise.
(path::_S_convert): Handle conversion from char8_t input.
(path::_S_str_convert): Likewise.
* include/bits/functional_hash.h: Add hash<char8_t>.
* include/bits/locale_conv.h (__str_codecvt_out): Add overloads for
char8_t.
* include/bits/locale_facets.h (_GLIBCXX_NUM_UNICODE_FACETS): Bump
for new char8_t specializations.
* include/bits/localefwd.h: Add missing declarations of
codecvt<char16_t, char, mbstate_t> and
codecvt<char32_t, char, mbstate_t>. Add char8_t declarations
codecvt<char16_t, char8_t, mbstate_t> and
codecvt<char32_t, char8_t, mbstate_t>.
* include/bits/postypes.h: Add u8streampos
* include/bits/stringfwd.h: Add declarations of
char_traits<char8_t> and u8string.
* include/c_global/cstddef: Add __byte_operand<char8_t>.
* include/experimental/bits/fs_path.h (path::__is_encoded_char):
Recognize char8_t.
(path::u8string): Return std::u8string when char8_t support is
enabled.
(path::generic_u8string): Likewise.
(path::_S_convert): Handle conversion from char8_t input.
(path::_S_str_convert): Likewise.
* include/experimental/string: Add u8string.
* include/experimental/string_view: Add u8string_view,
hash<experimental::u8string_view>, and
operator""sv(const char8_t*, size_t).
* include/std/atomic: Add atomic<char8_t> and atomic_char8_t.
* include/std/charconv (__is_int_to_chars_type): Recognize char8_t
as a character type.
* include/std/limits: Add numeric_limits<char8_t>.
* include/std/string_view: Add u8string_view,
hash<experimental::u8string_view>, and
operator""sv(const char8_t*, size_t).
* include/std/type_traits: Add __is_integral_helper<char8_t>,
__make_unsigned<char8_t>, and __make_signed<char8_t>.
* libsupc++/atomic_lockfree_defines.h: Define
ATOMIC_CHAR8_T_LOCK_FREE.
* src/c++11/Makefile.am: Compile with -fchar8_t when compiling
codecvt.cc and limits.cc so that char8_t specializations of
numeric_limits and codecvt and emitted.
* src/c++11/Makefile.in: Likewise.
* src/c++11/codecvt.cc: Define members of
codecvt<char16_t, char8_t, mbstate_t>,
codecvt<char32_t, char8_t, mbstate_t>,
codecvt_byname<char16_t, char8_t, mbstate_t>, and
codecvt_byname<char32_t, char8_t, mbstate_t>.
* src/c++11/limits.cc: Define members of
numeric_limits<char8_t>.
* src/c++98/Makefile.am: Compile with -fchar8_t when compiling
locale_init.cc and localename.cc.
* src/c++98/Makefile.in: Likewise.
* src/c++98/locale_init.cc: Add initialization for the
codecvt<char16_t, char8_t, mbstate_t> and
codecvt<char32_t, char8_t, mbstate_t> facets.
* src/c++98/localename.cc: Likewise.
* testsuite/util/testsuite_abi.cc: Validate ABI bump.
From-SVN: r269004
Jason Merrill [Tue, 19 Feb 2019 01:01:50 +0000 (20:01 -0500)]
PR c++/89336 - multiple stores in constexpr stmt.
If we evaluate the RHS in the context of the LHS, that evaluation might
change the LHS in ways that mess with being able to store the value later.
So for assignment or scalar values, evaluate the RHS first.
* constexpr.c (cxx_eval_store_expression): Preevaluate scalar or
assigned value.
From-SVN: r269003
GCC Administrator [Tue, 19 Feb 2019 00:16:16 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r269002
Johannes Pfau [Mon, 18 Feb 2019 23:29:39 +0000 (23:29 +0000)]
libphobos: Detect if qsort_r is available
Merges upstream druntime
bbfb58e8.
libphobos/ChangeLog:
2019-02-19 Johannes Pfau <johannespfau@gmail.com>
PR d/88127
* m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_CLIB): Add new macro.
* configure.ac: Use DRUNTIME_LIBRARIES_CLIB.
* configure: Regenerate
* Makefile.in: Regenerate
* libdruntime/gcc/config.d.in: Add Have_Qsort_R.
* libdruntime/Makefile.in: Regenerate.
* src/Makefile.in: Regenerate.
* testsuite/Makefile.in: Regenerate.
From-SVN: r268999
Joseph Myers [Mon, 18 Feb 2019 23:16:00 +0000 (23:16 +0000)]
* fr.po: Update.
From-SVN: r268998
Jason Merrill [Mon, 18 Feb 2019 21:35:48 +0000 (16:35 -0500)]
Improve diagnostic for redundant template arguments in declaration.
* pt.c (check_explicit_specialization): If the declarator is a
template-id, only check whether the arguments are dependent.
From-SVN: r268997
Sharon Dvir [Mon, 18 Feb 2019 21:10:57 +0000 (21:10 +0000)]
README: Fix typos.
2019-02-18 Sharon Dvir <unapologtic@gmail.com>
gcc/testsuite/
* README: Fix typos.
From-SVN: r268996
Rainer Orth [Mon, 18 Feb 2019 20:25:55 +0000 (20:25 +0000)]
Fix g++.dg/torture/pr89303.C with Solaris ld
* g++.dg/torture/pr89303.C (bad_weak_ptr): Rename to
bad_weak_ptr_.
From-SVN: r268995
Jason Merrill [Mon, 18 Feb 2019 19:34:02 +0000 (14:34 -0500)]
Improve duplicate [[likely]] diagnostic.
* parser.c (cp_parser_statement): Make attrs_loc a range. Pass it
to process_stmt_hotness_attribute.
* cp-gimplify.c (process_stmt_hotness_attribute): Take attrs_loc.
(genericize_if_stmt): Use likely/unlikely instead of predictor_name.
From-SVN: r268994
Martin Sebor [Mon, 18 Feb 2019 18:37:55 +0000 (18:37 +0000)]
cpp.texi (Conditional syntax): Add __has_attribute, __has_cpp_attribute, and __has_include.
gcc/ChangeLog:
* doc/cpp.texi (Conditional syntax): Add __has_attribute,
__has_cpp_attribute, and __has_include.
From-SVN: r268993
Thomas Koenig [Mon, 18 Feb 2019 18:28:58 +0000 (18:28 +0000)]
re PR fortran/87689 (PowerPC64 ELFv2 function parameter passing violation)
2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87689
* trans-decl.c (gfc_get_extern_function_decl): Add argument
actual_args and pass it through to gfc_get_function_type.
* trans-expr.c (conv_function_val): Add argument actual_args
and pass it on to gfc_get_extern_function_decl.
(conv_procedure_call): Pass actual arguments to conv_function_val.
* trans-types.c (get_formal_from_actual_arglist): New function.
(gfc_get_function_type): Add argument actual_args. Generate
formal args from actual args if necessary.
* trans-types.h (gfc_get_function_type): Add optional argument.
* trans.h (gfc_get_extern_function_decl): Add optional argument.
2019-02-18 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/87689
* gfortran.dg/lto/
20091028-1_0.f90: Add -Wno-lto-type-mismatch to
options.
* gfortran.dg/lto/
20091028-2_0.f90: Likewise.
* gfortran.dg/lto/pr87689_0.f: New file.
* gfortran.dg/lto/pr87689_1.f: New file.
From-SVN: r268992
Martin Sebor [Mon, 18 Feb 2019 17:44:11 +0000 (17:44 +0000)]
invoke.texi (-Wreturn-type): Correct and expand.
gcc/ChangeLog:
* doc/invoke.texi (-Wreturn-type): Correct and expand.
From-SVN: r268991
Martin Sebor [Mon, 18 Feb 2019 16:31:17 +0000 (16:31 +0000)]
PR middle-end/89294 - ICE in valid_constant_size_p
gcc/c-family/ChangeLog:
PR middle-end/89294
* c-common.c (invalid_array_size_error): Handle cst_size_not_constant.
gcc/ChangeLog:
PR middle-end/89294
* tree.c (valid_constant_size_p): Avoid assuming size is a constant
expression.
* tree.h (cst_size_error): Add the cst_size_not_constant enumerator.
From-SVN: r268990
Wilco Dijkstra [Mon, 18 Feb 2019 14:09:17 +0000 (14:09 +0000)]
Fix libstdc++ filesystem tests
Some recently added libstdc++ filesystem tests are missing a
dg-require-filesystem-ts.
Committed as obvious.
libstdc++/testsuite/
* 27_io/filesystem/operations/all.cc: Add dg-require-filesystem-ts.
* 27_io/filesystem/operations/resize_file.cc: Likewise.
* 27_io/filesystem/path/generation/normal2.cc: Likewise.
From-SVN: r268989
Wilco Dijkstra [Mon, 18 Feb 2019 14:06:49 +0000 (14:06 +0000)]
Fix test pr88680.C
Fix pr88680.C failures due to short enums on arm-none-eabi.
Committed as obvious.
gcc/testsuite/
* g++.dg/wrappers/pr88680.C: Add -fno-short-enums.
From-SVN: r268988
Rainer Orth [Mon, 18 Feb 2019 13:53:51 +0000 (13:53 +0000)]
Tabify all D *.exp files
libphobos:
* testsuite/lib/libphobos-dg.exp: Tabify.
* testsuite/lib/libphobos.exp: Likewise.
* testsuite/libphobos.cycles/cycles.exp: Likewise.
* testsuite/libphobos.shared/shared.exp: Likewise.
* testsuite/libphobos.unittests/unittests.exp: Likewise.
gcc/testsuite:
* gdc.dg/dg.exp: Tabify.
* gdc.dg/lto/lto.exp: Likewise.
* gdc.test/gdc-test.exp: Likewise.
* lib/gdc-dg.exp: Likewise.
* lib/gdc.exp: Likewise.
From-SVN: r268987
Richard Biener [Mon, 18 Feb 2019 12:56:15 +0000 (12:56 +0000)]
re PR tree-optimization/89296 (tree copy-header masking uninitialized warning)
2019-02-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/89296
* tree-ssa-loop-ch.c (ch_base::copy_headers): Restrict setting
of no-warning flag to cases that might emit the bogus warning.
* gcc.dg/uninit-pr89296.c: New testcase.
From-SVN: r268986
Jakub Jelinek [Mon, 18 Feb 2019 12:52:36 +0000 (13:52 +0100)]
re PR bootstrap/88714 (bootstrap comparison failure on armv7l since r265398)
PR bootstrap/88714
* config/arm/arm.md (*arm_movdi, *movdf_soft_insn): Use "r" instead of
"q" constraint.
* config/arm/vfp.md (*movdi_vfp): Likewise.
* config/arm/ldrdstrd.md (*arm_ldrd, *arm_strd): Use "r" instead of
"q" constraint for operands[0].
From-SVN: r268985
Jakub Jelinek [Mon, 18 Feb 2019 11:20:43 +0000 (12:20 +0100)]
re PR target/89369 (pseudo-RNG miscompiled on s390x-linux with -O2 -march=zEC12 -mtune=z13 starting with r266203)
PR target/89369
* config/s390/s390.md (*r<noxa>sbg_<mode>_srl_bitmask,
*r<noxa>sbg_<mode>_sll, *r<noxa>sbg_<mode>_srl): Don't construct
pattern in a temporary buffer.
(*r<noxa>sbg_sidi_srl): Likewise. Always use 32 as I3 rather
than 64-operands[2].
* gcc.c-torture/execute/pr89369.c: New test.
* gcc.target/s390/md/rXsbg_mode_sXl.c (rosbg_si_srl,
rxsbg_si_srl): Expect last 3 operands 32,63,62 rather than
34,63,62.
From-SVN: r268984
Jakub Jelinek [Mon, 18 Feb 2019 11:16:33 +0000 (12:16 +0100)]
re PR target/89361 (s390 broken without S390_USE_TARGET_ATTRIBUTE, likely since r257489)
PR target/89361
* config/s390/s390.c (s390_indirect_branch_attrvalue,
s390_indirect_branch_settings): Define unconditionally.
(s390_set_current_function): Likewise, but guard the whole body except
the s390_indirect_branch_settings call with
#if S390_USE_TARGET_ATTRIBUTE.
(TARGET_SET_CURRENT_FUNCTION): Redefine unconditionally.
From-SVN: r268983
Jakub Jelinek [Mon, 18 Feb 2019 10:08:04 +0000 (11:08 +0100)]
* config/s390/s390.md (*<risbg_n>_ior_and_sr_ze,
*<risbg_n>_<mode>_ior_and_lshiftrt, *<risbg_n>_sidi_ior_and_lshiftrt):
Use HOST_WIDE_INT_M1U instead of ~(0ULL).
(*<risbg_n>_and_subregdi_rotr, *<risbg_n>_and_subregdi_rotl): Use
HOST_WIDE_INT_1U instead of 1ULL.
(*pre_z10_extzv<mode>, *pre_z10_extv<mode>): Change mask type from int
to unsigned HOST_WIDE_INT, use HOST_WIDE_INT_1U instead of 1ul.
(*insv<mode><clobbercc_or_nocc>_appendbitsleft,
z = (x << c) | (y >> d) splitters): Use HOST_WIDE_INT_1U
instead of 1UL.
(*insv<mode>_mem_reg, *insvdi_mem_reghigh): Use HOST_WIDE_INT_1U
instead of 1ul.
From-SVN: r268982
Martin Liska [Mon, 18 Feb 2019 09:46:19 +0000 (10:46 +0100)]
Use 1UL constant in order to not overflow (PR c++/89383).
2019-02-18 Martin Liska <mliska@suse.cz>
PR c++/89383
* line-map.c (linemap_line_start): Use 1UL in order
to not overflow.
From-SVN: r268981
Martin Jambor [Mon, 18 Feb 2019 08:59:04 +0000 (09:59 +0100)]
[PR 89209] Avoid segfault in a peculiar corner case in SRA
2019-02-18 Martin Jambor <mjambor@suse.cz>
PR tree-optimization/89209
* tree-sra.c (create_access_replacement): New optional parameter
reg_tree. Use it as a type if non-NULL and access type is not of
a register type.
(get_repl_default_def_ssa_name): New parameter REG_TYPE, pass it
to create_access_replacement.
(sra_modify_assign): Pass LHS type to get_repl_default_def_ssa_name.
Check lacc is non-NULL before attempting to re-create it on the RHS.
testsuite/
* gcc.dg/tree-ssa/pr89209.c: New test.
From-SVN: r268980
Martin Liska [Mon, 18 Feb 2019 08:21:23 +0000 (09:21 +0100)]
Come up with fast {function,call}_summary classes (PR ipa/89306).
2019-02-18 Martin Liska <mliska@suse.cz>
PR ipa/89306
* cgraph.c (symbol_table::create_edge): Set m_summary_id to -1
by default.
(symbol_table::free_edge): Recycle m_summary_id.
* cgraph.h (get_summary_id): New.
(symbol_table::release_symbol): Set m_summary_id to -1
by default.
(symbol_table::allocate_cgraph_symbol): Recycle m_summary_id.
* ipa-fnsummary.c (ipa_fn_summary_t): Switch from
function_summary to fast_function_summary.
* ipa-fnsummary.h (ipa_fn_summary_t): Likewise.
* ipa-pure-const.c (class funct_state_summary_t):
Switch from function_summary to fast_function_summary.
* ipa-reference.c (class ipa_ref_var_info_summary_t): Likewise.
(class ipa_ref_opt_summary_t): Switch from function_summary
to fast_function_summary.
* symbol-summary.h (class function_summary_base): New class
that is created from base of former function_summary.
(function_summary_base::unregister_hooks): New.
(class function_summary): Inherit from function_summary_base.
(class call_summary_base): New class
that is created from base of former call_summary.
(class call_summary): Inherit from call_summary_base.
(struct is_same): New.
(class fast_function_summary): New summary class.
(class fast_call_summary): New summary class.
* vec.h (vec_safe_grow_cleared): New function.
From-SVN: r268979
Martin Liska [Mon, 18 Feb 2019 08:19:47 +0000 (09:19 +0100)]
Support if statement in !GCC$ builtin directive.
2019-02-18 Martin Liska <mliska@suse.cz>
* config/i386/i386.c (ix86_get_multilib_abi_name): New function.
(TARGET_GET_MULTILIB_ABI_NAME): New macro defined.
* doc/tm.texi: Document new target hook.
* doc/tm.texi.in: Likewise.
* target.def: Add new target macro.
* gcc.c (find_fortran_preinclude_file): Do not search multilib
suffixes.
2019-02-18 Martin Liska <mliska@suse.cz>
* decl.c (gfc_match_gcc_builtin): Add support for filtering
of builtin directive based on multilib ABI name.
2019-02-18 Martin Liska <mliska@suse.cz>
* gfortran.dg/simd-builtins-7.f90: New test.
* gfortran.dg/simd-builtins-7.h: New test.
From-SVN: r268978
GCC Administrator [Mon, 18 Feb 2019 00:17:08 +0000 (00:17 +0000)]
Daily bump.
From-SVN: r268977
Harald Anlauf [Sun, 17 Feb 2019 21:19:20 +0000 (21:19 +0000)]
re PR fortran/88299 ([F18] COMMON in a legacy module produces bogus warnings in dependent code)
2019-02-17 Harald Anlauf <anlauf@gmx.de>
PR fortran/88299
* resolve.c (resolve_common_blocks,resolve_common_vars): Move
check for obsolent COMMON feature in F2018 to better place.
PR fortran/88299
* gfortran.dg/pr88299.f90: New test.
From-SVN: r268974
Harald Anlauf [Sun, 17 Feb 2019 21:14:14 +0000 (21:14 +0000)]
re PR fortran/89077 (ICE using * as len specifier for character parameter)
2019-02-17 Harald Anlauf <anlauf@gmx.de>
PR fortran/89077
* decl.c (gfc_set_constant_character_len): Clear original string
representation after padding has been performed to target length.
PR fortran/89077
* gfortran.dg/transfer_simplify_12.f90: New test.
From-SVN: r268973
Marek Polacek [Sun, 17 Feb 2019 17:53:54 +0000 (17:53 +0000)]
re PR c++/89356 (sorry, unimplemented: mangling implicit_conv_expr in nodejs8 package since r268321)
PR c++/89356
* g++.dg/abi/mangle68.C: New test.
* g++.dg/cpp0x/decltype69.C: New test.
From-SVN: r268972
Marek Polacek [Sun, 17 Feb 2019 17:25:27 +0000 (17:25 +0000)]
re PR c++/89315 (Cannot convert to std::initializer_list - fails with gcc9 works with gcc8)
PR c++/89315
* g++.dg/cpp0x/initlist114.C: New test.
From-SVN: r268971
Marek Polacek [Sun, 17 Feb 2019 16:55:37 +0000 (16:55 +0000)]
* g++.old-deja/g++.robertl/eb82.C: Tweak dg-error.
From-SVN: r268970
Marek Polacek [Sun, 17 Feb 2019 16:52:40 +0000 (16:52 +0000)]
PR c++/89217 - ICE with list-initialization in range-based for loop.
* constexpr.c (unshare_constructor): No longer static.
* cp-tree.h (unshare_constructor): Declare.
* semantics.c (finish_compound_literal): When dealing with a
non-dependent expression in a template, return the original
expression. Pass LOOKUP_NO_NARROWING to digest_init_flags.
* g++.dg/cpp0x/range-for37.C: New test.
From-SVN: r268969
Alan Modra [Sun, 17 Feb 2019 03:01:41 +0000 (13:31 +1030)]
[RS6000] Fix <bd>_<mode> and <bd>tf_<mode> splitters
This patch fixes a bug that can result in "insn does not satisfy its
constraints" if these splitters fire due to not getting ctr for the
jump insn. Since the jump insn can have any of r,m,d,wi,c,l as the
decremented count output, it's not sufficient to check for
gpc_reg_operand (which matches VSX regs for example). Seen after
correcting register_move_cost when the cost of gpr <-> vsx is much
lower. Since this is a prerequisite to fixing PR89271, I'm mentioning
that PR in the ChangeLog.
The <bd>tf_<mode> split had a further bug in that it wouldn't match
if the count output was m,d,wi, or l.
PR target/89271
* config/rs6000/rs6000.md (<bd>_<mode> split): Check for an int
output reg on add insn.
(<bd>tf_<mode> split): Likewise. Match predicates with insn.
From-SVN: r268968
GCC Administrator [Sun, 17 Feb 2019 00:16:28 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r268967
H.J. Lu [Sat, 16 Feb 2019 22:16:04 +0000 (22:16 +0000)]
i386: Add ssse3_pmulhrswv4hi3 expander
There is no V4HI pmulhrsw in AVX512BW and V4HI/V8HI pmulhrsw don't require
AVX2.
PR target/89372
* config/i386/sse.md (ssedoublemode): Remove V4HI.
(PMULHRSW): Likewise.
(<ssse3_avx2>_pmulhrsw<mode>3): Require TARGET_SSSE3, not
TARGET_AVX2.
(ssse3_pmulhrswv4hi3): New expander.
From-SVN: r268964
H.J. Lu [Sat, 16 Feb 2019 20:29:24 +0000 (20:29 +0000)]
i386: Correct *vec_extractv2si_zext_mem
The second and third alternatives in *vec_extractv2si_zext_mem don't
require MMX. But the second one requires SSE2.
* config/i386/mmx.md (*vec_extractv2si_zext_mem): Doesn't require
MMX. Add isa attribute.
From-SVN: r268963
Jakub Jelinek [Sat, 16 Feb 2019 18:46:04 +0000 (19:46 +0100)]
re PR tree-optimization/88074 (g++ hangs on math expression)
PR middle-end/88074
* simplify.c (simplify_transformation_to_array): Run post_op
immediately after processing corresponding row, rather than at the
end.
(norm2_scale): New variable.
(add_squared): Rename to ...
(norm2_add_squared): ... this. Scale down operand and/or result
if needed.
(do_sqrt): Rename to ...
(norm2_do_sqrt): ... this. Handle the result == e case. Scale up
result and clear norm2_scale.
(gfc_simplify_norm2): Clear norm2_scale. Change add_squared to
norm2_add_squared and &do_sqrt to norm2_do_sqrt. Scale up result
and clear norm2_scale again.
From-SVN: r268962
David Malcolm [Sat, 16 Feb 2019 16:17:17 +0000 (16:17 +0000)]
Fix excess warnings from -Wtype-limits with location wrappers (PR c++/88680)
PR c++/88680 reports excess warnings from -Wtype-limits after the C++
FE's use of location wrappers was extended in r267272 for cases such as:
const unsigned n = 8;
static_assert (n >= 0 && n % 2 == 0, "");
t.C:3:18: warning: comparison of unsigned expression >= 0 is always true
[-Wtype-limits]
3 | static_assert (n >= 0 && n % 2 == 0, "");
| ~~^~~~
The root cause is that the location wrapper around "n" breaks the
suppression of the warning for the "if OP0 is a constant that is >= 0"
case.
This patch fixes it by calling fold_for_warn on OP0, extracting the
constant.
gcc/c-family/ChangeLog:
PR c++/88680
* c-common.c (shorten_compare): Call fold_for_warn on op0 when
implementing -Wtype-limits.
gcc/testsuite/ChangeLog:
PR c++/88680
* g++.dg/wrappers/pr88680.C: New test.
From-SVN: r268961
Thomas Koenig [Sat, 16 Feb 2019 16:12:51 +0000 (16:12 +0000)]
re PR fortran/71066 (ICE in set_loop_bounds, at fortran/trans-array.c:4680)
2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71066
* trans-decl.c (generate_coarray_sym_init): For an array
constructor in a DATA statement of a coarray variable, set the
rank to 1 to avoid confusion later on. If the constructor
contains only one value, use that for initiailizig.
2019-02-17 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/71066
* gfortran.dg/coarray_data_1.f90: New test.
From-SVN: r268960
Eric Botcazou [Sat, 16 Feb 2019 14:40:53 +0000 (14:40 +0000)]
patchable_function_entry-decl.c: Add -fno-pie on SPARC.
* c-c++-common/patchable_function_entry-decl.c: Add -fno-pie on SPARC.
* c-c++-common/patchable_function_entry-default.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.
From-SVN: r268958
Jakub Jelinek [Sat, 16 Feb 2019 11:20:33 +0000 (12:20 +0100)]
re PR rtl-optimization/66152 (suboptimal load bytes to stack)
PR rtl-optimization/66152
* builtins.h (c_readstr): Declare.
* builtins.c (c_readstr): Remove forward declaration. Add
null_terminated_p argument, if false, read all bytes from the
string instead of stopping after '\0'.
* expr.c (string_cst_read_str): New function.
(store_expr): Use string_cst_read_str instead of
builtin_strncpy_read_str. Try to store by pieces the whole
exp_len first, and only if that fails, split it up into
store by pieces followed by clear_storage. Formatting fix.
* gcc.target/i386/pr66152.c: New test.
From-SVN: r268957
Jakub Jelinek [Sat, 16 Feb 2019 10:05:16 +0000 (11:05 +0100)]
i386.md (*movqi_internal): Remove static from buf variable.
* config/i386/i386.md (*movqi_internal): Remove static from
buf variable. Use output_asm_insn (buf, operands); return "";
instead of return buf;.
* config/i386/sse.md (<sse>_andnot<mode>3<mask_name>,
*<code><mode>3<mask_name>, *andnot<mode>3, *andnottf3, *<code><mode>3,
*<code>tf3, <mask_codefor><code><mode>3<mask_name>): Likewise.
From-SVN: r268956
GCC Administrator [Sat, 16 Feb 2019 00:16:34 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r268955
Cherry Zhang [Fri, 15 Feb 2019 23:22:29 +0000 (23:22 +0000)]
compiler,runtime: use __builtin_dwarf_cfa for getcallersp
Currently, the compiler lowers runtime.getcallersp to
__builtin_frame_address(1). In the C side of the runtime,
getcallersp is defined as __builtin_frame_address(0). They don't
match. Further, neither of them actually returns the caller's SP.
On AMD64, __builtin_frame_address(0) just returns the frame
pointer. __builtin_frame_address(1) returns the memory content
where the frame pointer points to, which is typically the
caller's frame pointer but can also be garbage if the frame
pointer is not enabled.
This CL changes it to use __builtin_dwarf_cfa(), which returns
the caller's SP at the call site. This matches the SP we get
from unwinding the stack.
Currently getcallersp is not used for anything real. It will be
used for precise stack scan (a new version of CL 159098).
Reviewed-on: https://go-review.googlesource.com/c/162905
* go-gcc.cc (Gcc_backend::Gcc_backend): Define __builtin_dwarf_cfa
instead of __builtin_frame_address.
From-SVN: r268952
Eric Botcazou [Fri, 15 Feb 2019 23:16:25 +0000 (23:16 +0000)]
asan_oob_test.cc: Skip OOB_int on SPARC.
* g++.dg/asan/asan_oob_test.cc: Skip OOB_int on SPARC.
* g++.dg/asan/function-argument-3.C: Tweak for 32-bit SPARC.
From-SVN: r268951
Eric Botcazou [Fri, 15 Feb 2019 23:08:49 +0000 (23:08 +0000)]
linux.h (ASAN_CC1_SPEC): Define.
* config/sparc/linux.h (ASAN_CC1_SPEC): Define.
(CC1_SPEC): Use GNU_USER_TARGET_CC1_SPEC and ASAN_CC1_SPEC.
* config/sparc/linux64.h (ASAN_CC1_SPEC): Likewise.
(CC1_SPEC): Likewise.
* config/sparc/sparc.c (sparc_asan_shadow_offset): Adjust for 64-bit.
From-SVN: r268950
Eric Botcazou [Fri, 15 Feb 2019 21:40:24 +0000 (21:40 +0000)]
asan.c (asan_emit_stack_protection): Use full-sized mask to align the base address on 64-bit strict-alignment platforms.
* asan.c (asan_emit_stack_protection): Use full-sized mask to align
the base address on 64-bit strict-alignment platforms.
From-SVN: r268949
Ian Lance Taylor [Fri, 15 Feb 2019 21:04:58 +0000 (21:04 +0000)]
re PR go/89368 (ICE in go/gofrontend/expressions.cc:4669 after r268923)
PR go/89368
compiler: write barrier check nil-check policy tweak
Tweak the recipe for generating writeBarrier loads to insure that the
dereference expr is marked as not requiring a nil check (not needed
for gccgo, but needed for gollvm).
Fixes https://gcc.gnu.org/PR89368
Reviewed-on: https://go-review.googlesource.com/c/162904
From-SVN: r268948
H.J. Lu [Fri, 15 Feb 2019 20:47:31 +0000 (20:47 +0000)]
i386: Fix ')' in VALID_MMX_REG_MODE
Replace "(MODE == V1DImode)" with "(MODE) == V1DImode".
* config/i386/i386.h (VALID_MMX_REG_MODE): Correct the misplaced
')'.
From-SVN: r268947
Uros Bizjak [Fri, 15 Feb 2019 18:02:50 +0000 (19:02 +0100)]
darwin.h (TARGET_FPMATH_DEFAULT_P): New define.
* config/i386/darwin.h (TARGET_FPMATH_DEFAULT_P): New define.
From-SVN: r268944
Tamar Christina [Fri, 15 Feb 2019 17:17:17 +0000 (17:17 +0000)]
Arm: Remove alternative from neon_softfp_fp16 directive.
There's a bit of a disconnect between the feature flags that don't test the fpu
and ones that do when the test itself also forces an architecture. The forcing
of the architecture would change the defaults and without explicitly giving the
correct fpu again the test would fail.
I don't see a good way to solve this problem, really the feature tests should
ideally contain the extra options the test adds too, but for this specific case
it can be solved by always testing the fpu explicitly.
Committed under the GCC obvious
gcc/testsuite/ChangeLog:
* lib/target-supports.exp
(check_effective_target_arm_neon_softfp_fp16_ok_nocache): Drop non-fpu
checking alternative.
From-SVN: r268943
Aaron Sawdey [Fri, 15 Feb 2019 15:41:25 +0000 (15:41 +0000)]
re PR rtl-optimization/88308 (ICE in maybe_record_trace_start, at dwarf2cfi.c:2309)
2019-02-15 Aaron Sawdey <acsawdey@linux.ibm.com>
PR rtl-optimization/88308
* shrink-wrap.c (move_insn_for_shrink_wrap): Fix LABEL_NUSES counts
on copied instruction.
From-SVN: r268942
Ian Lance Taylor [Fri, 15 Feb 2019 14:51:10 +0000 (14:51 +0000)]
re PR go/89123 (Too many go test failures on s390x-linux)
PR go/89123
internal/cpu, runtime: add S/390 CPU capability support
Patch by Robin Dapp.
Updates https://gcc.gnu.org/PR89123
Reviewed-on: https://go-review.googlesource.com/c/162887
From-SVN: r268941
Ian Lance Taylor [Fri, 15 Feb 2019 14:25:12 +0000 (14:25 +0000)]
runtime: include <syscall.h> and <sys/syscall.h> if available
Fixes Solaris build.
Reviewed-on: https://go-review.googlesource.com/c/162885
From-SVN: r268940
Ian Lance Taylor [Fri, 15 Feb 2019 13:54:45 +0000 (13:54 +0000)]
runtime: add type cast for non-split-stack calls to scanstackblock
Reviewed-on: https://go-review.googlesource.com/c/162884
From-SVN: r268939
Eric Botcazou [Fri, 15 Feb 2019 10:55:50 +0000 (10:55 +0000)]
* gcc.target/sparc/struct-ret-check-1.c: Add -fno-pie option.
From-SVN: r268934
Eric Botcazou [Fri, 15 Feb 2019 10:50:27 +0000 (10:50 +0000)]
patchable_function_entry-decl.c: Do not run on Visium.
* c-c++-common/patchable_function_entry-decl.c: Do not run on Visium.
* c-c++-common/patchable_function_entry-default.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.
* gcc.dg/tree-ssa/pr84859.c: Add -ftree-cselim switch.
From-SVN: r268932
Eric Botcazou [Fri, 15 Feb 2019 10:40:34 +0000 (10:40 +0000)]
lib2funcs.c (__set_trampoline_parity): Replace TRAMPOLINE_SIZE with __LIBGCC_TRAMPOLINE_SIZE__.
libgcc/
* config/visium/lib2funcs.c (__set_trampoline_parity): Replace
TRAMPOLINE_SIZE with __LIBGCC_TRAMPOLINE_SIZE__.
gcc/
* final.c (insn_current_reference_address): Replace test on JUMP_P
with test on jump_to_label_p.
* config/visium/visium-passes.def: New file.
* config/visium/t-visium (PASSES_EXTRA): Define.
* config/visium/visium-protos.h (make_pass_visium_reorg): Declare.
* config/visium/visium.h (TRAMPOLINE_SIZE): Adjust.
(TRAMPOLINE_ALIGNMENT): Define.
* config/visium/visium.c (visium_option_override): Do not register
the machine-specific reorg pass here.
(visium_trampoline_init): Align the BRA insn on a 64-bit boundary
for the GR6.
(output_branch): Adjust threshold for long branch instruction.
* config/visium/visium.md (cpu): Move around.
(length): Adjust for the GR6.
From-SVN: r268931
Jakub Jelinek [Fri, 15 Feb 2019 07:52:50 +0000 (08:52 +0100)]
re PR other/69006 (Extraneous newline emitted between error messages in GCC 6)
PR other/69006
PR testsuite/88920
* lib/gcc-dg.exp: If llvm_binutils effective target, set
allow_blank_lines to 2 during initialization.
(dg-allow-blank-lines-in-output): Set allow_blank_lines to 1 only if
it was previously zero.
(gcc-dg-prune): Don't check for llvm_binutils effective target here.
Clear allow_blank_lines afterwards whenever it was 1.
* gdc.test/gdc-test.exp (dmd2dg): Don't call
dg-allow-blank-lines-in-output here.
(gdc-do-test): Set allow_blank_lines to 3 if it is 0 before running
the tests and restore it back at the end.
From-SVN: r268930
Jakub Jelinek [Fri, 15 Feb 2019 07:51:38 +0000 (08:51 +0100)]
opts-1.c: New test.
* c-c++-common/ubsan/opts-1.c: New test.
* c-c++-common/ubsan/opts-2.c: New test.
* c-c++-common/ubsan/opts-3.c: New test.
* c-c++-common/ubsan/opts-4.c: New test.
From-SVN: r268929
Richard Biener [Fri, 15 Feb 2019 07:39:45 +0000 (07:39 +0000)]
re PR tree-optimization/89278 (ICE in gimplify_modify_expr, at gimplify.c:5821)
PR tree-optimization/89278
* tree-loop-distribution.c: Include tree-eh.h.
(generate_memset_builtin, generate_memcpy_builtin): Call
rewrite_to_non_trapping_overflow on builtin->size before passing it
to force_gimple_operand_gsi.
* gcc.dg/pr89278.c: New test.
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>
From-SVN: r268927
Jakub Jelinek [Fri, 15 Feb 2019 07:38:09 +0000 (08:38 +0100)]
re PR c/89340 (ICE in function_and_variable_visibility, at ipa-visibility.c:707)
PR c/89340
* c-decl.c (start_function): Clear TREE_PUBLIC on nested functions
before c_decl_attributes rather than after it.
* gcc.dg/pr89340.c: New test.
* gcc.dg/torture/pr57036-2.c (jpgDecode_convert): Expect a warning
that leaf attribute on nested function is useless.
From-SVN: r268926
Jakub Jelinek [Fri, 15 Feb 2019 07:17:24 +0000 (08:17 +0100)]
re PR other/89342 (ICE in maybe_default_option, at opts.c:347)
PR other/89342
* optc-save-gen.awk: Handle optimize_fast like optimize_size or
optimize_debug.
* opth-gen.awk: Likewise.
* gcc.dg/pr89342.c: New test.
From-SVN: r268924
Ian Lance Taylor [Fri, 15 Feb 2019 01:57:51 +0000 (01:57 +0000)]
compiler, runtime: harmonize types referenced by both C and Go
Compiling with LTO revealed a number of cases in the runtime and
standard library where C and Go disagreed about the type of an object or
function (or where Go and code generated by the compiler disagreed). In
all cases the underlying representation was the same (e.g., uintptr vs.
void*), so this wasn't causing actual problems, but it did result in a
number of annoying warnings when compiling with LTO.
Reviewed-on: https://go-review.googlesource.com/c/160700
From-SVN: r268923
Ian Lance Taylor [Fri, 15 Feb 2019 00:36:50 +0000 (00:36 +0000)]
re PR go/89168 (FAIL: cmd/go/internal/load)
PR go/89168
libgo: change gotest to run examples with output
Change the gotest script to act like "go test" and run examples that
have "output" comments. This is not done with full generality, but
just enough to run the libgo tests. Other packages should be tested
with "go test" as usual.
While we're here clean up some old bits of gotest, and only run
TestXXX functions that are actually in *_test.go files. The latter
change should fix https://gcc.gnu.org/PR89168.
Reviewed-on: https://go-review.googlesource.com/c/162139
From-SVN: r268922
Ian Lance Taylor [Fri, 15 Feb 2019 00:29:41 +0000 (00:29 +0000)]
go-backend.c (go_imported_unsafe): Update optimization_default_node.
* go-backend.c (go_imported_unsafe): Update
optimization_default_node.
From-SVN: r268921
GCC Administrator [Fri, 15 Feb 2019 00:16:44 +0000 (00:16 +0000)]
Daily bump.
From-SVN: r268920
Uros Bizjak [Thu, 14 Feb 2019 23:54:25 +0000 (00:54 +0100)]
i386.h (TARGET_SUBTARGET64_ISA_DEFAULT): Enable MMX, SSE and SSE2 by default.
* config/i386/i386.h (TARGET_SUBTARGET64_ISA_DEFAULT):
Enable MMX, SSE and SSE2 by default.
* config/i386/i386.c (ix86_option_override_internal): Do not
explicitly set MMX, SSE and SSE2 flags for TARGET_64BIT here.
From-SVN: r268917
Jakub Jelinek [Thu, 14 Feb 2019 23:10:47 +0000 (00:10 +0100)]
re PR rtl-optimization/89354 (Combine pass yields wrong code with -O2 and -msse2 for 32bit target)
PR rtl-optimization/89354
* combine.c (make_extraction): Punt if extraction_mode is narrower
than len bits.
* gcc.dg/pr89354.c: New test.
From-SVN: r268913
Uros Bizjak [Thu, 14 Feb 2019 21:54:36 +0000 (22:54 +0100)]
ssse3-pabsb.c: Re-enable 64-bit form on AVX targets.
* gcc.target/i386/ssse3-pabsb.c: Re-enable 64-bit form on AVX targets.
* gcc.target/i386/ssse3-pabsd.c: Ditto.
* gcc.target/i386/ssse3-pabsw.c: Ditto.
* gcc.target/i386/ssse3-palignr.c: Ditto.
* gcc.target/i386/ssse3-phaddd.c: Ditto.
* gcc.target/i386/ssse3-phaddsw.c: Ditto.
* gcc.target/i386/ssse3-phaddw.c: Ditto.
* gcc.target/i386/ssse3-phsubd.c: Ditto.
* gcc.target/i386/ssse3-phsubsw.c: Ditto.
* gcc.target/i386/ssse3-phsubw.c: Ditto.
* gcc.target/i386/ssse3-pmaddubsw.c: Ditto.
* gcc.target/i386/ssse3-pmulhrsw.c: Ditto.
* gcc.target/i386/ssse3-pshufb.c: Ditto.
* gcc.target/i386/ssse3-psignb.c: Ditto.
* gcc.target/i386/ssse3-psignd.c: Ditto.
* gcc.target/i386/ssse3-psignw.c: Ditto.
From-SVN: r268907
Janne Blomqvist [Thu, 14 Feb 2019 21:33:29 +0000 (23:33 +0200)]
PR 81552 Improve and document -flag-init-integer
Make the option handling code parse the -flag-init-integer value as a
C long type, allowing a larger range on systems where long is a larger
type than int. Document the behavior.
Regtested on x86_64-pc-linux-gnu, committed as obvious.
2019-02-14 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/81552
* gfortran.h (gfc_option_t): Make flag_init_integer_value a long.
* options.c (gfc_handle_option): Use strtol instead of atoi.
* invoke.texi: Document -finit-integer behavior in more detail
From-SVN: r268906
Maya Rashish [Thu, 14 Feb 2019 21:25:39 +0000 (21:25 +0000)]
Add netbsd support for D compiler and runtime
Merges upstream druntime
fb4bda91.
2019-02-14 Maya Rashish <coypu@sdf.org>
gcc/ChangeLog:
* config.gcc (*-*-netbsd*): Add netbsd-d.o
* config/netbsd-d.c: New file.
* config/t-netbsd: Add netbsd-d.o
gcc/d/ChangeLog:
* d-system.h: NetBSD is POSIX.
libphobos/ChangeLog:
* configure.tgt: Add netbsd/x86 as supported target.
From-SVN: r268905
Ian Lance Taylor [Thu, 14 Feb 2019 21:07:13 +0000 (21:07 +0000)]
re PR go/89321 (cross build with riscv64 gccgo compilation failed due to assert in constructor_expression)
PR go/89321
compiler: copy has_padding field from converted struct
Test case is https://golang.org/cl/162617.
Fixes https://gcc.gnu.org/PR89321
Reviewed-on: https://go-review.googlesource.com/c/162618
From-SVN: r268904
Steve Ellcey [Thu, 14 Feb 2019 21:05:48 +0000 (21:05 +0000)]
pcs_attribute.c: New test.
2018-02-14 Steve Ellcey <sellcey@marvell.com>
* gcc.target/aarch64/pcs_attribute.c: New test.
From-SVN: r268903
Steve Ellcey [Thu, 14 Feb 2019 21:04:12 +0000 (21:04 +0000)]
aarch64.c (aarch64_attribute_table): Change affects_type_identity to true for aarch64_vector_pcs.
2018-02-14 Steve Ellcey <sellcey@marvell.com>
* config/aarch64/aarch64.c (aarch64_attribute_table): Change
affects_type_identity to true for aarch64_vector_pcs.
(aarch64_comp_type_attributes): New function.
(TARGET_COMP_TYPE_ATTRIBUTES): New macro.
From-SVN: r268902
Joseph Myers [Thu, 14 Feb 2019 20:50:51 +0000 (20:50 +0000)]
* da.po: Update.
From-SVN: r268901
Joseph Myers [Thu, 14 Feb 2019 20:49:37 +0000 (20:49 +0000)]
* da.po: Update.
From-SVN: r268900
Harald Anlauf [Thu, 14 Feb 2019 20:24:54 +0000 (20:24 +0000)]
re PR fortran/88248 ([F18] Bogus warning about obsolescent feature: Labeled DO statement)
2019-02-14 Harald Anlauf <anlauf@gmx.de>
PR fortran/88248
* symbol.c: Move check for labeled DO statement from
gfc_define_st_label to gfc_reference_st_label.
PR fortran/88248
* gfortran.dg/pr88248.f90: New test.
* gfortran.dg/f2018_obs.f90: Updated test.
From-SVN: r268895
Ian Lance Taylor [Thu, 14 Feb 2019 19:26:20 +0000 (19:26 +0000)]
compiler: check duplicate string keys in map composite literals
Updates golang/go#28104
Reviewed-on: https://go-review.googlesource.com/c/161357
From-SVN: r268891
Tamar Christina [Thu, 14 Feb 2019 18:29:06 +0000 (18:29 +0000)]
Arm: Fix testism in pr88850 testcase.
gcc/testsuite/ChangeLog:
* gcc.target/arm/pr88850.c: change options to additional option.
From-SVN: r268887
Rainer Orth [Thu, 14 Feb 2019 17:47:49 +0000 (17:47 +0000)]
Provide __start_minfo/__stop_minfo for linkers that don't (PR d/87864)
libphobos:
PR d/87864
* configure.ac (DRTSTUFF_SPEC): New variable.
Substitute it.
* libdruntime/m4/druntime/os.m4 (DRUNTIME_OS_MINFO_BRACKETING):
New automake conditional.
* configure: Regenerate.
* libdruntime/gcc/drtstuff.c: New file.
* libdruntime/Makefile.am [!DRUNTIME_OS_MINFO_BRACKETING]
(DRTSTUFF, toolexeclib_DATA): New variables.
(gcc/drtbegin.lo, gcc/drtend.lo): New rules.
(libgdruntime_la_LDFLAGS): Use -Wc instead of -Xcompiler.
Add -dstartfiles -B../src -Bgcc.
(libgdruntime_la_DEPENDENCIES): New variable.
(unittest_static_LDFLAGS): Use -Wc instead of -Xcompiler.
(libgdruntime_t_la_LDFLAGS): Likewise.
(unittest_LDFLAGS): Likewise.
* src/Makefile.am (libgphobos_la_LDFLAGS): Use -Wc instead of
-Xcompiler.
Add -dstartfiles -B../libdruntime/gcc.
(unittest_static_LDFLAGS): Use -Wc instead of -Xcompiler.
(libgphobos_t_la_LDFLAGS): Likewise.
(unittest_LDFLAGS): Likewise.
* libdruntime/Makefile.in, src/Makefile.in: Regenerate.
* Makefile.in, testsuite/Makefile.in: Regenerate.
* libdruntime/rt/sections_elf_shared.d (Minfo_Bracketing): Don't
assert.
* libdruntime/gcc/config.d.in (Minfo_Bracketing): Remove.
* src/drtstuff.spec: New file.
* src/libgphobos.spec.in (DRTSTUFF_SPEC): Substitute.
(*lib): Only pass SPEC_PHOBOS_DEPS without -debuglib, -defaultlib,
-nophoboslib.
* testsuite/testsuite_flags.in <--gdcldflags> (GDCLDFLAGS): Add
-B${BUILD_DIR}/libdruntime/gcc.
gcc/d:
PR d/87864
* lang.opt (dstartfiles): New option.
* d-spec.cc (need_spec): New variable.
(lang_specific_driver) <OPT_dstartfiles>: Enable need_spec.
(lang_specific_pre_link): Also load libgphobos.spec if need_spec.
gcc/testsuite:
PR d/87864
* lib/gdc.exp (gdc_link_flags): Add path to drtbegin.o/drtend.o if
present.
From-SVN: r268886
Jonathan Wakely [Thu, 14 Feb 2019 17:46:26 +0000 (17:46 +0000)]
Update libstdc++ documentation for C++2a implementation status
* doc/xml/manual/status_cxx2020.xml: Update P0887R1 status.
* doc/html/*: Regenerate.
From-SVN: r268885
Tamar Christina [Thu, 14 Feb 2019 17:17:20 +0000 (17:17 +0000)]
Arm: Add HF modes to ANY iterators
The iterator ANY64 are used in various general split patterns and is supposed
to contain all 64 bit modes.
For some reason the pattern has HI but not HF. This adds HF so that general
64 bit splits are generated for these modes as well. These are required
by various split patterns that expect them to be there.
gcc/ChangeLog:
PR target/88850
* config/arm/iterators.md (ANY64): Add V4HF.
gcc/testsuite/ChangeLog:
PR target/88850
* gcc.target/arm/pr88850-2.c: New test.
* lib/target-supports.exp
(check_effective_target_arm_neon_softfp_fp16_ok_nocache,
check_effective_target_arm_neon_softfp_fp16_ok,
add_options_for_arm_neon_softfp_fp16): New.
From-SVN: r268884
Jonathan Wakely [Thu, 14 Feb 2019 15:12:57 +0000 (15:12 +0000)]
Update libstdc++ documentation for implementation status
* doc/xml/manual/status_cxx2017.xml: Add P0063R3 to status table.
* doc/html/*: Regenerate.
From-SVN: r268883
Jonathan Wakely [Thu, 14 Feb 2019 15:08:33 +0000 (15:08 +0000)]
DR 2586 fix value category in uses-allocator checks
Because uses-allocator construction is invariably done with a const
lvalue the __uses_alloc helper should use a const lvalue for the
is_constructible checks. Otherwise, it can detect that the type can be
constructed from an rvalue, and then an error happens when a const
lvalue is passed to the constructor instead.
Prior to LWG DR 2586 scoped_allocator_adaptor incorrectly used an rvalue
type in the is_constructible check and then used a non-const lvalue for
the actual construction. The other components using uses-allocator
construction (tuple and polymorphic_allocator) have always done so with
a const lvalue allocator, although the use of __use_alloc in our
implementation meant they behaved the same as scoped_allocator_adaptor
and incorrectly used rvalues for the is_constructible checks.
In C++20 the P0591R4 changes mean that all uses-allocator construction
is defined in terms of the new uses_allocator_construction_args
functions, which always use a const lvalue allocator.
The changes in this patch ensure that the __use_alloc helper correctly
matches the requirements in the standard, consistently using a const
lvalue allocator for the is_constructible checks and the actual
constructor arguments.
* doc/xml/manual/intro.xml: Document LWG 2586 status.
* include/bits/uses_allocator.h (__uses_alloc): Use const lvalue
allocator type in is_constructible checks.
* testsuite/20_util/scoped_allocator/69293_neg.cc: Adjust dg-error.
* testsuite/20_util/scoped_allocator/dr2586.cc: New test.
* testsuite/20_util/tuple/cons/allocators.cc: Add test using
problematic type from LWG 2586 discussion.
* testsuite/20_util/uses_allocator/69293_neg.cc: Adjust dg-error.
* testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
From-SVN: r268882
Matthew Malcomson [Thu, 14 Feb 2019 14:51:46 +0000 (14:51 +0000)]
When this testcase was introduced it failed to account for the possibility of...
When this testcase was introduced it failed to account for the possibility of
targets that do not support arm mode or that do not support the ldrd/strd
instructions.
This patch accounts for both of these by adding some
dg-require-effective-target lines to the testcase.
This patch also adds a new effective-target procedure to check a target
supports ldrd/strd.
This patch also adds a new effective-target procedure to check a target
supports arm ldrd/strd.
The check uses the 'r' constraint to ensure SP is not used so that it will work
for thumb mode code generation as well as arm mode.
Tested by running this testcase with cross compilers using "-march=armv5t",
"-mcpu=cortex-m3", "-mcpu-arm7tdmi", "-mcpu=cortex-a9 -march=armv5t" for both
arm-none-eabi and arm-none-linux-gnueabihf.
Also ran this testcase with `make check` natively.
gcc/testsuite/ChangeLog:
2019-02-14 Matthew Malcomson <matthew.malcomson@arm.com>
* gcc.dg/rtl/arm/ldrd-peepholes.c: Restrict testcase.
* lib/target-supports.exp: Add procedure to check for ldrd.
From-SVN: r268881
Jan Hubicka [Thu, 14 Feb 2019 14:49:03 +0000 (14:49 +0000)]
re PR lto/88677 (Divergence in -O2 and -O2 -flto early opts)
PR lto/88677
Fix PR number.
From-SVN: r268880
Jonathan Wakely [Thu, 14 Feb 2019 14:10:25 +0000 (14:10 +0000)]
Add std::timespec and std::timespec_get for C++17
* configure.ac: Check for C11 timespec_get function.
* crossconfig.m4 (freebsd, linux, gnu, cygwin, solaris, netbsd)
(openbsd): Likewise
* config.h.in: Regenerate.
* configure: Regenerate.
* include/c_global/ctime (timespec, timespec_get): Add to namespace
std for C++17 and up.
From-SVN: r268879
Jonathan Wakely [Thu, 14 Feb 2019 14:10:19 +0000 (14:10 +0000)]
LWG 2537 fix priority_queue constructors to establish invariant
This change is safe to make now (in stage 4), because the constructors
are currently incorrect and unusable (unless the supplied container
already contains a heap, in which case the new make_heap calls are
redundant but harmless).
* doc/xml/manual/intro.xml: Document LWG 2537 status.
* include/bits/stl_queue.h
(priority_queue(const Compare&, const Container&, const Alloc&))
(priority_queue(const Compare&, Container&&, const Alloc&)): Call
make_heap.
* testsuite/23_containers/priority_queue/dr2537.cc: New test.
From-SVN: r268878