Commit Graph

166999 Commits

Author SHA1 Message Date
H.J. Lu
23c4471ee5 i386: Set ix86_fpmath to FPMATH_387 without SSE
ix86_fpmath should be set to combination of FPMATH_387 and FPMATH_SSE.
When SSE is disabled, it should be set to FPMATH_387 and 387 codegen is
also controlled by -msoft-float.

gcc/

	PR target/89397
	* config/i386/i386.c (ix86_option_override_internal): Set
	opts->x_ix86_fpmath to FPMATH_387 when SSE is disabled.

gcc/testsuite/

	PR target/89397
	* gcc.target/i386/pr89397.c: New test.

From-SVN: r269017
2019-02-19 06:19:33 -08:00
Chung-Lin Tang
19695f4d99 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
2019-02-19 14:10:15 +00:00
Richard Biener
83fce9004a 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
2019-02-19 12:46:48 +00:00
Iain Buclaw
be200c5c41 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
2019-02-19 12:38:48 +00:00
Eric Botcazou
6138fed0be 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
2019-02-19 09:25:39 +00:00
Rainer Orth
1d67913472 Fix libphobos linking on Solaris 11
* m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_NET): New macro.
	* configure.ac: Invoke it.
	* configure: Regenerate.

From-SVN: r269012
2019-02-19 09:24:50 +00:00
Jakub Jelinek
0db1a7c2e9 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
2019-02-19 09:57:24 +01:00
Jakub Jelinek
d5fe39d47c 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
2019-02-19 09:43:23 +01:00
Jakub Jelinek
50aaebab94 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
2019-02-19 09:40:07 +01:00
Jakub Jelinek
883c07964f 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
2019-02-19 09:38:54 +01:00
Jonathan Wakely
102a4fe17e 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
2019-02-19 02:55:12 +00:00
Tom Honermann
46ca1dd73c 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
2019-02-19 02:55:05 +00:00
Tom Honermann
c124af936b 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
2019-02-19 02:54:42 +00:00
Jason Merrill
e8b3c1bc3b 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
2019-02-18 20:01:50 -05:00
GCC Administrator
44db22fc66 Daily bump.
From-SVN: r269002
2019-02-19 00:16:16 +00:00
Johannes Pfau
36d7f1518f 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
2019-02-18 23:29:39 +00:00
Joseph Myers
0232a2191b * fr.po: Update.
From-SVN: r268998
2019-02-18 23:16:00 +00:00
Jason Merrill
802813eab9 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
2019-02-18 16:35:48 -05:00
Sharon Dvir
ab7b72e100 README: Fix typos.
2019-02-18  Sharon Dvir  <unapologtic@gmail.com>

gcc/testsuite/
	* README: Fix typos.

From-SVN: r268996
2019-02-18 21:10:57 +00:00
Rainer Orth
c22e84c2d0 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
2019-02-18 20:25:55 +00:00
Jason Merrill
2d9273ca25 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
2019-02-18 14:34:02 -05:00
Martin Sebor
84fdd8f463 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
2019-02-18 11:37:55 -07:00
Thomas Koenig
378f53c752 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
2019-02-18 18:28:58 +00:00
Martin Sebor
7a247605d8 invoke.texi (-Wreturn-type): Correct and expand.
gcc/ChangeLog:

	* doc/invoke.texi (-Wreturn-type): Correct and expand.

From-SVN: r268991
2019-02-18 10:44:11 -07:00
Martin Sebor
e2ebb05cd4 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
2019-02-18 09:31:17 -07:00
Wilco Dijkstra
eb8c4926c5 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
2019-02-18 14:09:17 +00:00
Wilco Dijkstra
e99589e204 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
2019-02-18 14:06:49 +00:00
Rainer Orth
cc2cc3bef3 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
2019-02-18 13:53:51 +00:00
Richard Biener
c41491973b 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
2019-02-18 12:56:15 +00:00
Jakub Jelinek
022049403b 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
2019-02-18 13:52:36 +01:00
Jakub Jelinek
290dfd9bc7 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
2019-02-18 12:20:43 +01:00
Jakub Jelinek
a10e76edce 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
2019-02-18 12:16:33 +01:00
Jakub Jelinek
14653c37cf * 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
2019-02-18 11:08:04 +01:00
Martin Liska
a5f87af7ed 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
2019-02-18 09:46:19 +00:00
Martin Jambor
469b4adb4f [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
2019-02-18 09:59:04 +01:00
Martin Liska
db30281f0b 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
2019-02-18 08:21:23 +00:00
Martin Liska
e8cecccc2e 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
2019-02-18 08:19:47 +00:00
GCC Administrator
d3cbcb2338 Daily bump.
From-SVN: r268977
2019-02-18 00:17:08 +00:00
Harald Anlauf
0f7cec0982 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
2019-02-17 21:19:20 +00:00
Harald Anlauf
e6ca33ba57 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
2019-02-17 21:14:14 +00:00
Marek Polacek
dc20515ee5 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
2019-02-17 17:53:54 +00:00
Marek Polacek
35d7b5284e 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
2019-02-17 17:25:27 +00:00
Marek Polacek
feb0dcfede * g++.old-deja/g++.robertl/eb82.C: Tweak dg-error.
From-SVN: r268970
2019-02-17 16:55:37 +00:00
Marek Polacek
1f6857ba56 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
2019-02-17 16:52:40 +00:00
Alan Modra
b43e6340c8 [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
2019-02-17 13:31:41 +10:30
GCC Administrator
b8cc38153b Daily bump.
From-SVN: r268967
2019-02-17 00:16:28 +00:00
H.J. Lu
2f3d266045 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
2019-02-16 14:16:04 -08:00
H.J. Lu
49be11f5c9 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
2019-02-16 12:29:24 -08:00
Jakub Jelinek
843192c0eb 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
2019-02-16 19:46:04 +01:00
David Malcolm
3fe53000bb 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
2019-02-16 16:17:17 +00:00