Commit Graph

102 Commits

Author SHA1 Message Date
GCC Administrator
c8f19fab4d Daily bump. 2024-09-21 00:16:55 +00:00
GCC Administrator
b5490afe3a Daily bump. 2024-03-17 00:17:21 +00:00
GCC Administrator
b05f474c8f Daily bump. 2024-03-01 00:16:41 +00:00
GCC Administrator
2523654a54 Daily bump. 2024-02-10 00:17:14 +00:00
GCC Administrator
73ce73fcad Daily bump. 2024-01-10 00:18:30 +00:00
GCC Administrator
ae9e48e5c0 Daily bump. 2023-12-07 00:17:06 +00:00
GCC Administrator
5cb13173e8 Daily bump. 2023-11-17 00:17:33 +00:00
GCC Administrator
3b6327461d Daily bump. 2023-10-23 00:16:43 +00:00
GCC Administrator
886afed635 Daily bump. 2023-08-12 00:17:36 +00:00
GCC Administrator
4b92dba78d Daily bump. 2023-08-08 00:17:37 +00:00
GCC Administrator
b27760769c Daily bump. 2023-05-19 00:17:43 +00:00
GCC Administrator
74e904bdca Daily bump. 2022-11-02 00:17:38 +00:00
GCC Administrator
781f477a13 Daily bump. 2022-10-13 00:17:37 +00:00
GCC Administrator
ab332cd78d Daily bump. 2022-10-12 00:17:24 +00:00
GCC Administrator
9d3dd21856 Daily bump. 2022-06-28 00:16:58 +00:00
GCC Administrator
3164de6ac1 Daily bump. 2022-06-02 00:16:32 +00:00
GCC Administrator
774269aa4b Daily bump. 2021-12-17 00:16:20 +00:00
GCC Administrator
8a89c39be0 Daily bump. 2021-12-16 00:16:28 +00:00
GCC Administrator
2d14d64bf2 Daily bump. 2021-08-18 00:16:48 +00:00
GCC Administrator
c8abc2058e Daily bump. 2021-06-29 00:16:42 +00:00
GCC Administrator
449480114a Daily bump. 2021-05-06 00:16:37 +00:00
GCC Administrator
e690396da7 Daily bump. 2021-05-04 00:16:53 +00:00
GCC Administrator
651b8a50a6 Daily bump. 2021-01-06 00:16:55 +00:00
GCC Administrator
b1a2242e24 Daily bump. 2020-12-19 00:16:31 +00:00
GCC Administrator
6e1edf48eb Daily bump. 2020-12-06 00:16:44 +00:00
GCC Administrator
a9625c50dd Daily bump. 2020-11-30 00:16:27 +00:00
GCC Administrator
0f5f9ed5e5 Daily bump. 2020-11-12 00:16:39 +00:00
GCC Administrator
bb6226419f Daily bump. 2020-11-11 00:16:36 +00:00
GCC Administrator
44cab2d8fd Daily bump. 2020-11-07 00:16:39 +00:00
GCC Administrator
b2698c21f2 Daily bump. 2020-10-15 00:16:34 +00:00
GCC Administrator
6caec77e3b Daily bump. 2020-10-08 00:16:30 +00:00
GCC Administrator
b0b9b8f02a Daily bump. 2020-10-03 00:16:25 +00:00
GCC Administrator
cdd8f031c7 Daily bump. 2020-09-26 00:16:25 +00:00
GCC Administrator
a2b7397b50 Daily bump. 2020-09-25 00:16:27 +00:00
GCC Administrator
fdcc0283c6 Daily bump. 2020-09-11 00:16:28 +00:00
GCC Administrator
661ee09b8b Daily bump. 2020-08-15 00:16:22 +00:00
GCC Administrator
b3cb56060b Daily bump. 2020-08-14 00:16:24 +00:00
GCC Administrator
d48cca8f21 Daily bump. 2020-07-31 00:16:26 +00:00
GCC Administrator
46fbb6c682 Daily bump. 2020-07-01 00:16:26 +00:00
GCC Administrator
885ef72f27 Daily bump. 2020-05-30 00:16:27 +00:00
H.J. Lu
8d286dd118 x86: Default CET run-time support to auto
CET has been added since GCC 8.  This patch defaults CET run-time support
to auto.  It enables CET run-time support if asssembler supports CET
instructions and multi-byte NOPs are enabled via SSE2.

config/

	* cet.m4 (GCC_CET_FLAGS): Change default to auto.

gcc/

	* configure: Regenerated.

libatomic/

	* configure: Regenerated.

libbacktrace/

	* configure: Regenerated.

libcc1/

	* configure: Regenerated.

libcpp/

	* configure: Regenerated.

libdecnumber/

	* configure: Regenerated.

libgcc/

	* configure: Regenerated.

libgfortran/

	* configure: Regenerated.

libgomp/

	* configure: Regenerated.

libitm/

	* configure: Regenerated.

libobjc/

	* configure: Regenerated.

libquadmath/

	* configure: Regenerated.

libsanitizer/

	* configure: Regenerated.

libssp/

	* configure: Regenerated.

libstdc++-v3/

	* configure: Regenerated.

libvtv/

	* configure: Regenerated.

zlib/

	* configure: Regenerated.
2020-05-14 09:05:02 -07:00
H.J. Lu
af3bef0ea2 libcc1: Enable Intel CET on Intel CET enabled host
Since on Intel CET enabled host, dlopen in Intel CET enabled applications
fails on shared libraries which aren't Intel CET enabled, enable Intel
CET in libcc1 on Intel CET enabled host.

	* Makefile.am (AM_CXXFLAGS): Add $(CET_HOST_FLAGS).
	* configure.ac: Add GCC_CET_HOST_FLAGS(CET_HOST_FLAGS) and
	AC_SUBST(CET_HOST_FLAGS).
	* Makefile.in: Regenerated.
	* aclocal.m4: Likewise.
	* configure: Likewise.
2020-05-12 09:12:37 -07:00
Patrick Palka
a6ee556c76 c++: Fix return type deduction with an abbreviated function template
This patch fixes two issues with return type deduction in the presence of an
abbreviated function template.

The first issue (PR 69448) is that if a placeholder auto return type contains
any modifiers such as & or *, then the abbreviated function template
compensation in splice_late_return_type does not get performed for the
underlying auto node, leading to incorrect return type deduction.  This happens
because splice_late_return_type does not consider that a placeholder auto return
type might have modifiers.  To fix this it seems we need to look through
modifiers in the return type to obtain the location of the underlying auto node
in order to replace it with the adjusted auto node.  To that end this patch
refactors the utility function find_type_usage to return a pointer to the
matched tree, and uses it to find and replace the underlying auto node.

The second issue (PR 80471) is that the AUTO_IS_DECLTYPE flag is not being
preserved in splice_late_return_type when compensating for an abbreviated
function template, leading to us treating a decltype(auto) return type as if it
was an auto return type.  Fixed by making make_auto_1 set the AUTO_IS_DECLTYPE
flag whenever we're building a decltype(auto) node and adjusting callers
appropriately.  The test for PR 80471 is adjusted to expect the correct
behavior.

gcc/cp/ChangeLog:

	PR c++/69448
	PR c++/80471
	* type-utils.h (find_type_usage): Refactor to take a tree * and to
	return a tree *, and update documentation accordingly.
	* pt.c (make_auto_1): Set AUTO_IS_DECLTYPE when building a
	decltype(auto) node.
	(make_constrained_decltype_auto): No need to explicitly set
	AUTO_IS_DECLTYPE anymore.
	(splice_late_return_type): Use find_type_usage to find and
	replace a possibly nested auto node instead of using is_auto.
	Check test for is_auto into an assert when deciding whether
	to late_return_type.
	(type_uses_auto): Adjust the call to find_type_usage.
	* parser.c (cp_parser_decltype): No need to explicitly set
	AUTO_IS_DECLTYPE anymore.

libcc1/ChangeLog:

	PR c++/69448
	PR c++/80471
	* libcp1plugin.cc (plugin_get_expr_type): No need to explicitly set
	AUTO_IS_DECLTYPE anymore.

gcc/testsuite/ChangeLog:

	PR c++/69448
	PR c++/80471
	* g++.dg/concepts/abbrev3.C: New test.
	* g++.dg/cpp2a/concepts-pr80471.C: Adjust a static_assert to expect the
	correct behavior.
	* g++.dg/cpp0x/auto9.C: Adjust a dg-error directive.
2020-02-10 20:43:53 -05:00
Paolo Carlini
87d3f828de init.c (build_new): Add location_t parameter and use it throughout.
/gcc/cp
2020-01-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* init.c (build_new): Add location_t parameter and use it throughout.
	(build_raw_new_expr): Likewise.
	* parser.c (cp_parser_new_expression): Pass the combined_loc.
	* pt.c (tsubst_copy_and_build): Adjust call.
	* cp-tree.h: Update declarations.

/libcc1
2020-01-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* libcp1plugin.cc (plugin_build_new_expr): Update build_new call.

/gcc/testsuite
2020-01-07  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.old-deja/g++.bugs/900208_03.C: Check locations too.
	* g++.old-deja/g++.bugs/900519_06.C: Likewise.

From-SVN: r279963
2020-01-07 17:58:18 +00:00
Jakub Jelinek
8d9254fc8a Update copyright years.
From-SVN: r279813
2020-01-01 12:51:42 +01:00
Paolo Carlini
04e4997a56 decl2.c (delete_sanity): Add location_t parameter and use it throughout.
/gcc/cp
2019-12-30  Paolo Carlini  <paolo.carlini@oracle.com>

	* decl2.c (delete_sanity): Add location_t parameter and use
	it throughout.
	* init.c (build_vec_delete_1): Likewise.
	(build_delete): Likewise.
	(build_vec_delete): Likewise.
	(perform_target_ctor): Adjust call.
	(perform_member_init): Likewise.
	(build_vec_init): Likewise.
	* decl.c (cxx_maybe_build_cleanup): Likewise.
	* pt.c (tsubst_copy_and_build): Likewise.
	* parser.c (cp_parser_delete_expression): Likewise, pass the
	combined_loc.
	* cp-tree.h: Update declarations.

/libcc1
2019-12-30  Paolo Carlini  <paolo.carlini@oracle.com>

	* libcp1plugin.cc (plugin_build_unary_expr): Update delete_sanity
	call.

/gcc/testsuite
2019-12-30  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/init/delete1.C: Check locations too.
	* g++.dg/ipa/pr85607.C: Likewise.
	* g++.dg/warn/Wdelete-incomplete-1.C: Likewise.
	* g++.dg/warn/delete-non-virtual-dtor.C: Likewise.
	* g++.dg/warn/incomplete1.C: Likewise.

From-SVN: r279768
2019-12-30 13:23:40 +00:00
Paolo Carlini
d3769410c6 typeck.c (cxx_sizeof_or_alignof_type): Add location_t parameter and use it throughout.
/gcc/cp
2019-12-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck.c (cxx_sizeof_or_alignof_type): Add location_t parameter
	and use it throughout.
	(cxx_sizeof_expr): Likewise.
	(cxx_alignof_expr): Likewise.
	(cxx_sizeof_or_alignof_expr): Likewise.
	(cxx_alignas_expr): Update call.
	* decl.c (fold_sizeof_expr): Likewise.
	* pt.c (tsubst_copy): Likewise.
	(tsubst_copy_and_build): Likewise.
	* except.c (build_throw): Add location_t parameter and use it.
	(expand_end_catch_block): Update call.
	* parser.c (cp_parser_unary_expression): Update
	cxx_sizeof_or_alignof_type and cxx_sizeof_or_alignof_expr calls,
	pass the compound location.
	(cp_parser_throw_expression): Likewise pass the combined location
	to build_throw.
	* cp-tree.h: Update declarations.

	* semantics.c (finish_handler_parms): Use DECL_SOURCE_LOCATION.
	* decl2.c (check_classfn): Likewise.

	* except.c (is_admissible_throw_operand_or_catch_parameter):
	Exploit cp_expr_loc_or_input_loc in one place.

	* except.c (create_try_catch_expr): Remove, unused.

/libcc1
2019-12-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* libcp1plugin.cc (plugin_build_unary_expr): Update build_throw
	and cxx_sizeof_or_alignof_expr calls.
	(plugin_build_unary_type_expr): Likewise for
	cxx_sizeof_or_alignof_type.

/gcc/testsuite
2019-12-18  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/diagnostic/alignof2.C: New.
	* g++.dg/diagnostic/alignof3.C: Likewise.
	* g++.dg/diagnostic/incomplete-type-1.C: Likewise.
	* g++.dg/warn/Wcatch-value-3b.C: Likewise.
	* g++.dg/cpp0x/alignof3.C: Check location(s) too.
	* g++.dg/cpp1z/decomp-bitfield1.C: Likewise.
	* g++.dg/cpp1z/has-unique-obj-representations2.C: Likewise.
	* g++.dg/expr/sizeof3.C: Likewise.
	* g++.dg/ext/flexary6.C: Likewise.
	* g++.dg/ext/vla4.C: Likewise.
	* g++.dg/template/sizeof11.C: Likewise.
	* g++.dg/warn/Wcatch-value-1.C: Likewise.
	* g++.dg/warn/Wcatch-value-2.C: Likewise.
	* g++.dg/warn/Wcatch-value-3.C: Likewise.
	* g++.old-deja/g++.brendan/sizeof1.C: Likewise.
	* g++.old-deja/g++.brendan/sizeof3.C: Likewise.
	* g++.old-deja/g++.brendan/sizeof4.C: Likewise.
	* g++.old-deja/g++.eh/ctor1.C: Likewise.
	* g++.old-deja/g++.jason/ambig1.C: Likewise.
	* g++.old-deja/g++.other/sizeof4.C: Likewise.

From-SVN: r279543
2019-12-18 19:23:01 +00:00
Paolo Carlini
ca6932ad0c typeck.c (check_for_casting_away_constness): Add location_t parameter and use it.
gcc/cp
2019-12-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck.c (check_for_casting_away_constness): Add location_t
	parameter and use it.
	(maybe_warn_about_useless_cast): Likewise.
	(maybe_warn_about_cast_ignoring_quals): Likewise.
	(build_static_cast_1): Likewise.
	(build_static_cast): Likewise; sets the location of the returned tree.
	(build_reinterpret_cast_1): Likewise.
	(build_reinterpret_cast): Likewise; sets the location of the returned
	tree.
	(build_const_cast_1): Likewise.
	(build_const_cast): Likewise; sets the location of the returned tree.
	(cp_build_c_cast): Likewise.
	(build_c_cast): Adjust.
	(build_ptrmemfunc): Adjust calls.
	(cp_build_unary_op): Pass the location to invert_truthvalue_loc.
	* rtti.c (build_dynamic_cast_1): Add location_t parameter and
	use it.
	(build_dynamic_cast): Likewise.
	* cp-tree.h: Adjust declarations.
	* parser.c (cp_parser_postfix_expression): Pass cp_cast_loc to
	the various build_*_cast functions.
	(get_cast_suggestion): Adjust calls.
	(cp_parser_builtin_offsetof): Likewise.
	* decl.c (reshape_init): Adjust call.
	* method.c (forward_parm): Likewise.
	(build_comparison_op): Likewise.
	* pt.c (tsubst_copy_and_build): Likewise.
	* semantics.c (finish_omp_reduction_clause): Likewise.
	(cp_omp_finish_iterators): Likewise.
	* tree.c (cp_stabilize_reference): Likewise.
	(move): Likewise.
	* typeck2.c (build_functional_cast): Likewise.

	* typeck2.c (build_functional_cast_1): New.
	(build_functional_cast_1): Calls the latter and sets the location
	of the returned tree.

/libcc1
2019-12-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* libcp1plugin.cc (plugin_build_cast_expr): Adjust build_cast
	declaration.

gcc/testsuite
2019-12-09  Paolo Carlini  <paolo.carlini@oracle.com>

	* c-c++-common/Wcast-align.c: Check location(s) too.
	* c-c++-common/Wcast-function-type.c: Likewise.
	* c-c++-common/Wint-to-pointer-cast-1.c: Likewise.
	* c-c++-common/Wint-to-pointer-cast-2.c: Likewise.
	* c-c++-common/Wint-to-pointer-cast-3.c: Likewise.
	* g++.dg/Wcast-function-type.C: Likewise.
	* g++.dg/addr_builtin-1.C: Likewise.
	* g++.dg/conversion/const2.C: Likewise.
	* g++.dg/conversion/dynamic1.C: Likewise.
	* g++.dg/conversion/ptrmem2.C: Likewise.
	* g++.dg/conversion/ptrmem3.C: Likewise.
	* g++.dg/conversion/qual3.C: Likewise.
	* g++.dg/conversion/reinterpret3.C: Likewise.
	* g++.dg/cpp0x/constexpr-cast.C: Likewise.
	* g++.dg/cpp0x/lambda/lambda-conv11.C: Likewise.
	* g++.dg/cpp0x/nullptr04.C: Likewise.
	* g++.dg/cpp0x/reinterpret_cast2.C: Likewise.
	* g++.dg/cpp0x/rv-cast2.C: Likewise.
	* g++.dg/cpp1y/lambda-conv1.C: Likewise.
	* g++.dg/cpp1z/noexcept-type7.C: Likewise.
	* g++.dg/cpp2a/array-conv9.C: Likewise.
	* g++.dg/expr/cast11.C: Likewise.
	* g++.dg/expr/static_cast8.C: Likewise.
	* g++.dg/ext/vector6.C: Likewise.
	* g++.dg/other/conversion1.C: Likewise.
	* g++.dg/parse/pr26997.C: Likewise.
	* g++.dg/rtti/no-rtti.C: Likewise.
	* g++.dg/tc1/dr137.C: Likewise.
	* g++.dg/template/cast4.C: Likewise.
	* g++.dg/warn/Wcast-qual1.C: Likewise.
	* g++.dg/warn/Wcast-qual2.C: Likewise.
	* g++.dg/warn/Wconditionally-supported-1.C: Likewise.
	* g++.dg/warn/Wuseless-cast.C: Likewise.
	* g++.dg/warn/pr35711.C: Likewise.
	* g++.old-deja/g++.bugs/900227_01.C: Likewise.
	* g++.old-deja/g++.bugs/900404_07.C: Likewise.
	* g++.old-deja/g++.jason/overload1.C: Likewise.
	* g++.old-deja/g++.jason/rfg26.C: Likewise.
	* g++.old-deja/g++.jason/rvalue3.C: Likewise.
	* g++.old-deja/g++.jason/warning2.C: Likewise.
	* g++.old-deja/g++.mike/dyncast4.C: Likewise.
	* g++.old-deja/g++.mike/dyncast6.C: Likewise.
	* g++.old-deja/g++.mike/p11482.C: Likewise.
	* g++.old-deja/g++.mike/p2573.C: Likewise.
	* g++.old-deja/g++.mike/p2855.C: Likewise.
	* g++.old-deja/g++.mike/p7476.C: Likewise.
	* g++.old-deja/g++.mike/p8039.C: Likewise.
	* g++.old-deja/g++.other/cast2.C: Likewise.
	* g++.old-deja/g++.other/cast3.C: Likewise.
	* g++.old-deja/g++.other/dcast1.C: Likewise.
	* g++.old-deja/g++.other/dcast2.C: Likewise.

From-SVN: r279138
2019-12-09 20:28:39 +00:00
Paolo Carlini
ad774d0d63 typeck2.c (build_functional_cast): Add location_t parameter and use it.
/gcc/cp
2019-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck2.c (build_functional_cast): Add location_t parameter
	and use it.
	* cp-tree.h: Update declaration.
	* parser.c (cp_parser_functional_cast): Adjust call.
	* call.c (build_op_delete_call): Likewise.
	(build_new_method_call_1): Likewise.
	* decl.c (check_initializer): Likewise.
	* pt.c (tsubst_copy_and_build): Likewise.
	* semantics.c (finish_compound_literal): Likewise.

/libcc1
2019-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* libcp1plugin.cc (plugin_build_expression_list_expr): Adjust
	build_functional_cast call.

/testsuite
2019-12-05  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/diagnostic/functional-cast-to-array-type-1.C: New.
	* g++.dg/cpp0x/auto25.C: Check location(s) too.
	* g++.dg/cpp0x/auto28.C: Likewise.
	* g++.dg/init/reference2.C: Likewise.
	* g++.dg/parse/template2.C: Likewise.
	* g++.dg/template/error8.C: Likewise.
	* g++.old-deja/g++.ns/crash3.C: Likewise.
	* g++.old-deja/g++.ns/template7.C: Likewise.
	* g++.old-deja/g++.pt/crash8.C: Likewise.

From-SVN: r278987
2019-12-05 08:59:24 +00:00
Paolo Carlini
3554d8ffc5 typeck.c (cp_build_indirect_ref_1): Add location_t parameter and use it in error messages.
/gcc
2019-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* typeck.c (cp_build_indirect_ref_1): Add location_t parameter
	and use it in error messages.
	(build_x_indirect_ref): Adjust call.
	(build_indirect_ref): Likewise.
	(cp_build_fold_indirect_ref): Likewise.
	(cp_build_array_ref): Likewise.
	* call.c (build_new_op_1): Likewise.
	* semantics.c (finish_omp_clauses): Likewise.
	(finish_omp_depobj): Likewise.
	* typeck2.c (build_x_arrow): Likewise.
	* cp-tree.h (cp_build_indirect_ref): Update declaration.

	* call.c (build_new_op_1): Use location argument in warning_at.

	* typeck.c (cp_build_modify_expr): Consistently use the
	location_t argument.

/libcc1
2019-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* libcp1plugin.cc (plugin_pragma_push_user_expression): Update
	cp_build_indirect_ref call.

/gcc/testsuite
2019-11-25  Paolo Carlini  <paolo.carlini@oracle.com>

	* g++.dg/diagnostic/base-operand-non-pointer-1.C: New.
	* g++.dg/pr53055.C: Check location too.
	* g++.old-deja/g++.bugs/900213_02.C: Likewise.
	* g++.old-deja/g++.bugs/900215_02.C: Likewise.
	* g++.old-deja/g++.other/badarrow.C: Likewise.
	* g++.old-deja/g++.other/deref1.C: Likewise.

	* g++.dg/warn/Wenum-compare.C: Check location too.

	* g++.dg/cpp0x/initlist26.C: Check location too.
	* g++.dg/cpp0x/initlist28.C: Likewise.
	* g++.dg/cpp0x/initlist29.C: Likewise.
	* g++.dg/cpp0x/initlist33.C: Likewise.
	* g++.dg/expr/string-2.C: Likewise.
	* g++.dg/other/ptrmem5.C: Likewise.
	* g++.old-deja/g++.benjamin/14664-1.C: Likewise.
	* g++.old-deja/g++.benjamin/14664-2.C: Likewise.
	* g++.old-deja/g++.brendan/init12.C: Likewise.
	* g++.old-deja/g++.bugs/900324_04.C: Likewise.
	* g++.old-deja/g++.ext/array1.C: Likewise.
	* g++.old-deja/g++.jason/rfg17.C: Likewise.

From-SVN: r278685
2019-11-25 13:49:50 +00:00