Commit Graph

186632 Commits

Author SHA1 Message Date
Indu Bhagat
37e65643d3 testsuite/101269: fix testcase when used with -m32
PR testsuite/101269 - new test case gcc.dg/debug/btf/btf-datasec-1.c
fails with its introduction in r12-1852

BTF datasec records for .rodata/.data are expected for now for all targets.
For powerpc based targets, use -msdata=none when ilp32 is enabled.

2021-07-09  Indu Bhagat  <indu.bhagat@oracle.com>

gcc/testsuite/ChangeLog:

	PR testsuite/101269
	* gcc.dg/debug/btf/btf-datasec-1.c: Force -msdata=none with ilp32 for
	powerpc based targets.
2021-07-09 09:09:01 -07:00
Patrick Palka
2c699fd298 c++: requires-expr with dependent extra args [PR101181]
Here we're crashing ultimately because the mechanism for delaying
substitution into a requires-expression (and constexpr if and pack
expansions) doesn't expect to see dependent args.  But we end up
capturing dependent args here during substitution into the default
template argument as part of coerce_template_parms for the dependent
specialization p<T>.

This patch enables the commented out code in add_extra_args for handling
this situation.  This isn't needed for pack expansions (as the
accompanying comment points out), and it doesn't seem strictly necessary
for constexpr if either, but for requires-expressions delaying even
dependent substitution is important for ensuring we don't evaluate
requirements out of order.

It turns out we also need to make a copy of the arguments when capturing
them so that coerce_template_parms doesn't later add to them and form an
unexpected cycle (REQUIRES_EXPR_EXTRA_ARGS (t) would indirectly point to t).
We also need to make tsubst_template_args handle missing template
arguments, since the arguments we capture from coerce_template_parms
and are incomplete at that point.

	PR c++/101181

gcc/cp/ChangeLog:

	* constraint.cc (tsubst_requires_expr): Pass complain/in_decl to
	add_extra_args.
	* cp-tree.h (add_extra_args): Add complain/in_decl parameters.
	* pt.c (build_extra_args): Make a copy of args.
	(add_extra_args): Add complain/in_decl parameters.  Enable the
	code for handling the case where the extra arguments are
	dependent.
	(tsubst_pack_expansion): Pass complain/in_decl to
	add_extra_args.
	(tsubst_template_args): Handle missing template arguments.
	(tsubst_expr) <case IF_STMT>: Pass complain/in_decl to
	add_extra_args.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/concepts-requires26.C: New test.
	* g++.dg/cpp2a/lambda-uneval16.C: New test.
2021-07-09 10:20:25 -04:00
Patrick Palka
f53e66019d c++: find_template_parameters and TEMPLATE_DECLs [PR101247]
r12-1989 fixed the testcase in the PR, but unfortunately the fix is
buggy: it breaks the case where the common template between the
TEMPLATE_DECL t and ctx_parms is the innermost template (as in
concepts-memtmpl5.C below).  This can be fixed by instead passing the
TREE_TYPE of ctmpl to common_enclosing_class when ctmpl is a class
template.

But even after that's fixed, the analogous case where the innermost
template is a partial specialization is still broken (as in
concepts-memtmpl5a.C below), because ctmpl is always a primary template.

So this patch instead takes a diferent approach that doesn't rely on
ctx_parms at all: when looking for the template parameters of a
TEMPLATE_DECL that are shared with the current template context, just
walk its DECL_CONTEXT.  As long as the template is not overly general
(e.g. we didn't pass it through most_general_template), this should give
us exactly what we want, since if a TEMPLATE_DECL can be referred to
from some template context then the template parameters it uses must all
be in-scope and contained in its DECL_CONTEXT.  This effectively makes
us treat TEMPLATE_DECLs more similarly to other _DECLs (whose DECL_CONTEXT
we also walk).

	PR c++/101247

gcc/cp/ChangeLog:

	* pt.c (any_template_parm_r) <case TEMPLATE_DECL>: Just walk the
	DECL_CONTEXT.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/concepts-memtmpl4.C: Uncomment the commented out
	example, which we now handle correctly.
	* g++.dg/cpp2a/concepts-memtmpl5.C: New test.
	* g++.dg/cpp2a/concepts-memtmpl5a.C: New test.
2021-07-09 10:20:22 -04:00
Matheus Castanho
2e345e4ad6 libstdc++: Only use __gthread_yield if gthreads is available
libstdc++-v3/ChangeLog:

	* include/std/mutex (__lock_impl): Check
	_GLIBCXX_HAS_GTHREADS before using __gthread_yield.
2021-07-09 15:13:38 +01:00
Piotr Trojanek
7802ee7b01 [Ada] Fix style in expansion of attribute Put_Image
gcc/ada/

	* exp_put_image.adb (Make_Put_Image_Name): Fix style.
	(Image_Should_Call_Put_Image): Likewise.
	(Build_Image_Call): Likewise.
2021-07-09 12:35:32 +00:00
Ghjuvan Lacambre
d35d546a7f [Ada] par-ch6: do not mark subprogram as missing "is" if imported
gcc/ada/

	* par-ch6.adb (Contains_Import_Aspect): New function.
	(P_Subprogram): Acknowledge `Import` aspects.
2021-07-09 12:35:32 +00:00
Bob Duff
f377685e3d [Ada] Fix crash on type extensions with discriminants
gcc/ada/

	* exp_put_image.adb (Make_Component_Attributes): Use
	Implementation_Base_Type to get the parent type. Otherwise,
	Parent_Type_Decl is actually an internally generated subtype
	declaration, so we blow up on
	Type_Definition (Parent_Type_Decl).
2021-07-09 12:35:32 +00:00
Dmitriy Anisimkov
bb66a10215 [Ada] Add missed OS constant values
gcc/ada/

	* gsocket.h: Include net/if.h to get IF_NAMESIZE constant.
	* s-oscons-tmplt.c: Define IPV6_FLOWINFO for Linux.
2021-07-09 12:35:31 +00:00
Steve Baird
d206399a97 [Ada] Improve performance of Ada.Containers.Doubly_Linked_Lists.Generic_Sorting.Sort
gcc/ada/

	* libgnat/a-cdlili.adb: Reimplement
	Ada.Containers.Doubly_Linked_Lists.Generic_Sorting.Sort using
	Mergesort instead of the previous Quicksort variant.
2021-07-09 12:35:31 +00:00
Justin Squirek
66d43665bc [Ada] Crash on expansion of BIP construct in -gnatf mode
gcc/ada/

	* exp_ch6.adb (Is_Build_In_Place_Function_Call): Add check to
	verify the Selector_Name of Exp_Node has been analyzed before
	obtaining its entity.
2021-07-09 12:35:31 +00:00
Gary Dismukes
79b87fcf29 [Ada] Typo corrections and minor reformatting
gcc/ada/

	* libgnarl/s-osinte__vxworks.ads: Fix typo ("release" =>
	"releases") plus comment reformatting.
	* libgnat/s-os_lib.ads: In a comment, fix typo ("indended" =>
	"intended"), add a hyphen and semicolon, plus reformatting. In
	comment for subtype time_t, fix typo ("effect" => "affect"), add
	hyphens, plus reformatting.
	* libgnat/s-parame.ads, libgnat/s-parame__ae653.ads,
	libgnat/s-parame__hpux.ads: Remove period from one-line comment.
2021-07-09 12:35:31 +00:00
Steve Baird
e4de29f467 [Ada] Add -gnatX support for casing on discriminated values
gcc/ada/

	* exp_ch5.adb (Expand_General_Case_Statement): Add new function
	Else_Statements to handle the case of invalid data analogously
	to how it is handled when casing on a discrete value.
	* sem_case.adb (Has_Static_Discriminant_Constraint): A new
	Boolean-valued function.
	(Composite_Case_Ops.Scalar_Part_Count): Include discriminants
	when traversing components.
	(Composite_Case_Ops.Choice_Analysis.Traverse_Discrete_Parts):
	Include discriminants when traversing components; the component
	range for a constrained discriminant is a single value.
	(Composite_Case_Ops.Choice_Analysis.Parse_Choice): Eliminate
	Done variable and modify how Next_Part is computed so that it is
	always correct (as opposed to being incorrect when Done is
	True).  This includes changes in Update_Result (a local
	procedure).  Add new local procedure
	Update_Result_For_Box_Component and call it not just for box
	components but also for "missing" components (components
	associated with an inactive variant).
	(Check_Choices.Check_Composite_Case_Selector.Check_Component_Subtype):
	Instead of disallowing all discriminated component types, allow
	those that are unconstrained or statically constrained. Check
	discriminant subtypes along with other component subtypes.
	* doc/gnat_rm/implementation_defined_pragmas.rst: Update
	documentation to reflect current implementation status.
	* gnat_rm.texi: Regenerate.
2021-07-09 12:35:30 +00:00
Justin Squirek
765ca22b17 [Ada] Crash on inlined separate subprogram
gcc/ada/

	* sem_ch6.adb (Check_Pragma_Inline): Correctly use
	Corresponding_Spec_Of_Stub when dealing subprogram body stubs.
2021-07-09 12:35:30 +00:00
Doug Rupp
175c2f98ea [Ada] Declare time_t uniformly based on a system parameter
gcc/ada/

	* Makefile.rtl: Add translations for s-parame__posix2008.ads
	* libgnarl/s-linux.ads: Import System.Parameters.
	(time_t): Declare using System.Parameters.time_t_bits.
	* libgnarl/s-linux__alpha.ads: Likewise.
	* libgnarl/s-linux__android.ads: Likewise.
	* libgnarl/s-linux__hppa.ads: Likewise.
	* libgnarl/s-linux__mips.ads: Likewise.
	* libgnarl/s-linux__riscv.ads: Likewise.
	* libgnarl/s-linux__sparc.ads: Likewise.
	* libgnarl/s-linux__x32.ads: Likewise.
	* libgnarl/s-qnx.ads: Likewise.
	* libgnarl/s-osinte__aix.ads: Likewise.
	* libgnarl/s-osinte__android.ads: Likewise.
	* libgnarl/s-osinte__darwin.ads: Likewise.
	* libgnarl/s-osinte__dragonfly.ads: Likewise.
	* libgnarl/s-osinte__freebsd.ads: Likewise.
	* libgnarl/s-osinte__gnu.ads: Likewise.
	* libgnarl/s-osinte__hpux-dce.ads: Likewise.
	* libgnarl/s-osinte__hpux.ads: Likewise.
	* libgnarl/s-osinte__kfreebsd-gnu.ads: Likewise.
	* libgnarl/s-osinte__lynxos178e.ads: Likewise.
	* libgnarl/s-osinte__qnx.ads: Likewise.
	* libgnarl/s-osinte__rtems.ads: Likewise.
	* libgnarl/s-osinte__solaris.ads: Likewise.
	* libgnarl/s-osinte__vxworks.ads: Likewise.
	* libgnat/g-sothco.ads: Likewise.
	* libgnat/s-osprim__darwin.adb: Likewise.
	* libgnat/s-osprim__posix.adb: Likewise.
	* libgnat/s-osprim__posix2008.adb: Likewise.
	* libgnat/s-osprim__rtems.adb: Likewise.
	* libgnat/s-osprim__x32.adb: Likewise.
	* libgnarl/s-osinte__linux.ads: use type System.Linux.time_t.
	* libgnat/s-os_lib.ads (time_t): Declare as subtype of
	Long_Long_Integer.
	* libgnat/s-parame.ads (time_t_bits): New constant.
	* libgnat/s-parame__ae653.ads (time_t_bits): Likewise.
	* libgnat/s-parame__hpux.ads (time_t_bits): Likewise.
	* libgnat/s-parame__vxworks.ads (time_t_bits): Likewise.
	* libgnat/s-parame__posix2008.ads: New file for 64 bit time_t.
2021-07-09 12:35:30 +00:00
Bob Duff
fbc72d0b4a [Ada] Add source file name to gnat bug box
gcc/ada/

	* comperr.adb (Compiler_Abort): Print source file name.
2021-07-09 12:35:29 +00:00
Joffrey Huguet
021cf768fb [Ada] Fix layout of contracts
gcc/ada/

	* libgnat/a-strunb.ads, libgnat/a-strunb__shared.ads: Fix layout
	in contracts.
2021-07-09 12:35:29 +00:00
Eric Botcazou
2390451ede [Ada] Fix invalid JSON for derived variant record with -gnatRj
gcc/ada/

	* repinfo.ads (JSON output format): Document adjusted key name.
	* repinfo.adb (List_Record_Layout): Use Original_Record_Component
	if the normalized position of the component is not known.
	(List_Structural_Record_Layout): Rename Outer_Ent parameter into
	Ext_End and add Ext_Level parameter. In an extension, if the parent
	subtype has static discriminants, call List_Record_Layout on it.
	Output "parent_" prefixes before "variant" according to Ext_Level.
	Adjust recursive calls throughout the procedure.
2021-07-09 12:35:29 +00:00
Piotr Trojanek
06fd120d19 [Ada] Fix typo in comment related to derived discriminated types
gcc/ada/

	* exp_util.ads (Map_Types): Fix typo.
2021-07-09 12:35:28 +00:00
Fedor Rybin
90635a37c2 [Ada] Fix index range violations in krunch
gcc/ada/

	* krunch.adb: Add safeguards against index range violations.
2021-07-09 12:35:28 +00:00
Arnaud Charlet
e4a6acd67e [Ada] Code cleanups in a-strfix.adb
gcc/ada/

	* libgnat/a-strfix.adb: Take advantage of extended returns.
2021-07-09 12:35:28 +00:00
Eric Botcazou
2a847e8c8f [Ada] Add paragraph about representation changes and Scalar_Storage_Order
gcc/ada/

	* doc/gnat_rm/implementation_defined_attributes.rst
	(Scalar_Storage_Order): Add paragraph about representation
	changes.
	* gnat_rm.texi: Regenerate.
2021-07-09 12:35:28 +00:00
Frederic Konrad
f1b4b3d75c [Ada] aarch64-rtems6: use wraplf variant for a-nallfl
gcc/ada/

	* Makefile.rtl (LIBGNAT_TARGET_PAIRS) <aarch64*-*-rtems*>: Use
	the wraplf variant of Aux_Long_Long_Float.
2021-07-09 12:35:27 +00:00
Piotr Trojanek
1f72ec808b [Ada] Initialize local variables related to static expression functions
gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): Initialize Orig_N
	and Typ variables.
2021-07-09 12:35:27 +00:00
Arnaud Charlet
e347e6c927 [Ada] Inconsistency between declaration and body of predicate functions
gcc/ada/

	* sem_ch13.adb (Resolve_Aspect_Expressions): Use the same
	processing for Predicate, Static_Predicate and
	Dynamic_Predicate. Do not build the predicate function spec.
	Update comments.
	(Resolve_Name): Only reset Entity when necessary to avoid
	spurious visibility errors.
	(Check_Aspect_At_End_Of_Declarations): Handle consistently all
	Predicate aspects.
	* sem_ch3.adb (Analyze_Subtype_Declaration): Fix handling of
	private types with predicates.
2021-07-09 12:35:27 +00:00
Justin Squirek
9b1647a50d [Ada] Incremental patch for restriction No_Dynamic_Accessibility_Checks
gcc/ada/

	* sem_util.ads (Type_Access_Level): Add new optional parameter
	Assoc_Ent.
	* sem_util.adb (Accessibility_Level): Treat access discriminants
	the same as components when the restriction
	No_Dynamic_Accessibility_Checks is enabled.
	(Deepest_Type_Access_Level): Remove exception for
	Debug_Flag_Underscore_B when returning the result of
	Type_Access_Level in the case where
	No_Dynamic_Accessibility_Checks is active.
	(Function_Call_Or_Allocator_Level): Correctly calculate the
	level of Expr based on its containing subprogram instead of
	using Current_Subprogram.
	* sem_res.adb (Valid_Conversion): Add actual for new parameter
	Assoc_Ent in call to Type_Access_Level, and add test of
	No_Dynamic_Accessibility_Checks_Enabled to ensure that static
	accessibility checks are performed for all anonymous access type
	conversions.
2021-07-09 12:35:26 +00:00
Eric Botcazou
d80c733187 [Ada] Update internal documentation of debugging information
gcc/ada/

	* exp_dbug.ads: Update documentation of various items.
2021-07-09 12:35:26 +00:00
Piotr Trojanek
81956c08f7 [Ada] Reorder preanalysis of static expression functions
gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): Reorder code.
2021-07-09 12:35:26 +00:00
Piotr Trojanek
e40f4ab463 [Ada] Decouple analysis of static expression functions from GNATprove
gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): Reorder code.
2021-07-09 12:35:25 +00:00
Piotr Trojanek
640ba4c1a3 [Ada] Avoid repeated computing of type of expression functions
gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): Add variable to
	avoid repeated calls to Etype.
2021-07-09 12:35:25 +00:00
Piotr Trojanek
e437dd45e7 [Ada] Fix comment related to analysis of expression functions
gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): Fix comment.
2021-07-09 12:35:25 +00:00
Piotr Trojanek
8a13a0017e [Ada] Avoid repeated calls in analysis of expression functions
gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): Use Orig_N variable
	instead of repeated calls to Original_Node.
2021-07-09 12:35:24 +00:00
Piotr Trojanek
8bab88ba7b [Ada] Refine types of local variables in analysis of expression functions
gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): Change types local
	variables from Entity_Id to Node_Id.
2021-07-09 12:35:24 +00:00
Piotr Trojanek
48096ca4ac [Ada] Remove an unnecessary local constant
gcc/ada/

	* sem_ch6.adb (Analyze_Expression_Function): A local Expr
	constant was shadowing a global constant with the same name and
	the same value.
2021-07-09 12:35:24 +00:00
Piotr Trojanek
7e12d491ce [Ada] Avoid unnecessary call in preanalysis without freezing
gcc/ada/

	* sem_res.adb (Preanalyze_And_Resolve): Only call
	Set_Must_Not_Freeze when it is necessary to restore the previous
	value.
2021-07-09 12:35:23 +00:00
Eric Botcazou
e37e175e7d Fix build failure on Windows with older binutils
This is the build failure on Windows with binutils for which GNU as accepts
the --gdwarf-5 switch but GNU ld generates broken binaries with DWARF 5.

We already have the HAVE_LD_BROKEN_PE_DWARF5 kludge to disable DWARF 5 in
this case but it only tames the DWARF version in the compiler, so the
driver still passes --gdwarf-5 when invoked on an assembly file with -g.

gcc/
	PR target/101377
	* gcc.c (ASM_DEBUG_DWARF_OPTION): Set again to --gdwarf2 in
	the case where HAVE_AS_WORKING_DWARF_N_FLAG is not defined
	and HAVE_LD_BROKEN_PE_DWARF5 is defined.
2021-07-09 12:13:39 +02:00
Uros Bizjak
10722fb36d i386: Fix *udivmodsi4_pow2_zext_? patterns
In addition to the obvious cut-n-pasto where *udivmodsi4_pow2_zext_2
never matches, limit the range of the immediate operand to prevent
out of range immediate operand of AND instruction.

Found by inspection, the patterns rarely match (if at all), since
tree optimizers do the transformation before RTL is generated. But
according to the comment above *udivmod<mode>4_pow2, the constant can
materialize after expansion, so leave these patterns around for now.

2021-07-09  Uroš Bizjak  <ubizjak@gmail.com>

gcc/
	* config/i386/i386.md (*udivmodsi4_pow2_zext_1): Limit the
	log2 range of operands[3] to [1,31].
	(*udivmodsi4_pow2_zext_2): Ditto.  Correct insn RTX pattern.
2021-07-09 11:46:33 +02:00
Sergei Trofimovich
840fabd8e0 docs: don't split @smallexample in multiple @groups
Noticed multiple groups split in HTML documentation where example
was written in two columns:

                                                   ""
                                                   "
  (define_expand "addsi3"                          {
    [(match_operand:SI 0 "register_operand" "")      handle_add (...
     (match_operand:SI 1 "register_operand" "")      DONE;
     (match_operand:SI 2 "register_operand" "")]   }")

The change uses single @group/@endgroup to prevent such break.

gcc/ChangeLog:

	* doc/md.texi: Don't split @smallexample in multiple @groups.
2021-07-09 08:49:49 +01:00
Sergei Trofimovich
b5405babd8 docs: add missing 'see' word
gcc/ChangeLog:

	* doc/md.texi: Add missing 'see' word.
2021-07-09 08:49:44 +01:00
Andrew Pinski
5f2d3ff4e5 Improve early simplify and match for phiopt
Previously the idea was gimple_simplify_phiopt would call
resimplify with a NULL sequence but that sometimes fails
even if there was only one statement produced. The cases
where it fails is when there are two simplifications happen.
In the case of the min/max production, the first simplifcation
produces:
(convert (min @1 @2))
And then the convert is removed by a second one. The Min statement
will be in the sequence while the op will be a SSA name. This was
rejected before as could not produce something in the sequence.
So this patch changes the way resimplify is called to always passing
a pointer to the sequence and then decide based on if op is a
SSA_NAME or not.

OK? Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

	* tree-ssa-phiopt.c (phiopt_early_allow): Change arguments
	to take sequence and gimple_match_op.  Accept the case where
	op is a SSA_NAME and one statement in the sequence.
	Also allow constants.
	(gimple_simplify_phiopt): Always pass a sequence to resimplify.
	Update call to phiopt_early_allow.  Discard the sequence if not
	used.
2021-07-09 00:17:46 -07:00
Xi Ruoyao
3b33b1136d
testsuite: mips: use noinline attribute instead of -fno-inline
mips.exp does not support -fno-inline, causing the tests return "ERROR:
Unrecognised option: -fno-inline for dg-options ... ".

Use noinline attribute like other mips target tests, to workaround it.

gcc/testsuite/

	* gcc.target/mips/cfgcleanup-jalr2.c: Remove -fno-inline and add
	  __attribute__((noinline)).
	* gcc.target/mips/cfgcleanup-jalr3.c: Likewise.
2021-07-09 14:32:04 +08:00
Xi Ruoyao
82625a42e6
mips: check MSA support for vector modes [PR100760,PR100761,PR100762]
Check if the vector mode is really supported by MSA in certain cases,
instead of testing ISA_HAS_MSA.  Simply testing ISA_HAS_MSA can cause
ICE when MSA is enabled besides other MIPS SIMD extensions (notably,
Loongson MMI).

gcc/

	PR target/100760
	PR target/100761
	PR target/100762
	* config/mips/mips.c (mips_const_insns): Use MSA_SUPPORTED_MODE_P
	instead of ISA_HAS_MSA.
	(mips_expand_vec_unpack): Likewise.
	(mips_expand_vector_init): Likewise.

gcc/testsuite/

	PR target/100760
	PR target/100761
	PR target/100762
	* gcc.target/mips/pr100760.c: New test.
	* gcc.target/mips/pr100761.c: New test.
	* gcc.target/mips/pr100762.c: New test.
2021-07-09 14:25:06 +08:00
Kewen Lin
062c762ef2 rs6000: Support [u]mod<mode>3 for vector modulo insns
This patch is to make Power10 newly introduced vector
modulo instructions exploited in vectorized loops, it
just simply renames existing define_insns as standard
pattern names.

gcc/ChangeLog:

	* config/rs6000/vsx.md (mods_<mode>): Rename to...
	(mod<mode>3): ... this.
	(modu_<mode>): Rename to...
	(umod<mode>3): ... this.
	* config/rs6000/rs6000-builtin.def (MODS_V2DI, MODS_V4SI, MODU_V2DI,
	MODU_V4SI): Adjust.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/mod-vectorize.c: New test.
2021-07-08 22:00:24 -05:00
Kewen Lin
df85baa568 test/rs6000: Add case to cover vector division
This patch is to add one test case to check if vectorizer
can exploit vector division instrutions newly introduced
by Power10.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/div-vectorize-1.c: New test.
2021-07-08 22:00:18 -05:00
Kewen Lin
c3d1aa891c test/rs6000: Add cases to cover vector multiply
This patch is to add test cases to check if vectorizer
can exploit vector multiply instrutions on Power, some
of them are supported since Power8, the others are newly
introduced by Power10.

gcc/testsuite/ChangeLog:

	* gcc.target/powerpc/mul-vectorize-1.c: New test.
	* gcc.target/powerpc/mul-vectorize-2.c: New test.
2021-07-08 21:59:50 -05:00
GCC Administrator
fdc4d2a516 Daily bump. 2021-07-09 00:16:27 +00:00
Martin Sebor
79d3378c7d Move warning suppression to the ultimate callee.
Resolves:
PR bootstrap/101372 - -Warray-bounds in gcc/cp/module.cc causing bootstrap failure

gcc/cp/ChangeLog:

	PR bootstrap/101372
	* module.cc (identifier): Suppress warning.
	(module_state::read_macro_maps): Remove warning suppression.
	(module_state::install_macros): Ditto.
2021-07-08 16:36:15 -06:00
Martin Sebor
68b938fada testsuite: Remove an xfail.
gcc/testsuite/ChangeLog:

	* gcc.dg/Wstringop-overflow-43.c: Remove an xfail.
2021-07-08 16:22:25 -06:00
Martin Sebor
c232f07b93 Adjust expected output for LP32 [PR100451].
gcc/testsuite/ChangeLog:

	PR testsuite/100451
	* g++.dg/warn/Warray-bounds-20.C: Adjust expected output for LP32.
2021-07-08 16:08:20 -06:00
Martin Sebor
c68cac900a Avoid including <new> to make cross-compiler testing easy.
gcc/testsuite/ChangeLog:

	* g++.dg/warn/Warray-bounds-11.C: Avoid including <new>.
	* g++.dg/warn/Warray-bounds-13.C: Same.
2021-07-08 16:03:19 -06:00
Marek Polacek
dee00bf689 c++: Fix noexcept with unevaluated operand [PR101087]
It sounds plausible that this assert

  int f();
  static_assert(noexcept(sizeof(f())));

should pass: sizeof produces a std::size_t and its operand is not
evaluated, so it can't throw.  noexcept should only evaluate to
false for potentially evaluated operands.  Therefore I think that
check_noexcept_r shouldn't walk into operands of sizeof/decltype/
alignof/typeof.

	PR c++/101087

gcc/cp/ChangeLog:

	* cp-tree.h (unevaluated_p): New.
	* except.c (check_noexcept_r): Use it.  Don't walk into
	unevaluated operands.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp0x/noexcept70.C: New test.
2021-07-08 17:38:49 -04:00