Commit Graph

193715 Commits

Author SHA1 Message Date
Gaius Mulley
622a723be0 Merge branch 'master' into devel/m2link. 2022-05-30 14:42:14 +01:00
Jan Beulich
c892984040 x86: correct bmi2_umul<mode><dwi>3_1's MEM_P() uses
It's pretty clear that the operand numbers in the MEM_P() checks are
off by one, perhaps due to a copy-and-paste oversight (unlike in most
other places here we're dealing with two outputs).

gcc/

	* config/i386/i386.md (bmi2_umul<mode><dwi>3_1): Correct MEM_P()
	arguments.
2022-05-30 11:29:59 +02:00
Ghjuvan Lacambre
1b88c61e37 [Ada] Fix spurious options being inserted in -fdiagnostics-format=json output
Without this patch, gnat would use `-gnatw?` as the default option for
some of the default warnings.

gcc/ada/

	* erroutc.adb (Get_Warning_Option): Don't consider `?` as a
	valid option switch.
2022-05-30 08:29:05 +00:00
Ghjuvan Lacambre
a4db870e1b [Ada] Add "option" field to GNAT's -fdiagnostics-format=json output
This enables better integration with tools that handle GNAT's output.

gcc/ada/

	* erroutc.ads (Get_Warning_Option): New function returning the
	option responsible for a warning if it exists.
	* erroutc.adb (Get_Warning_Option): Likewise.
	(Get_Warning_Tag): Rely on Get_Warning_Option when possible.
	* errout.adb (Output_JSON_Message): Emit option field.
2022-05-30 08:29:05 +00:00
Julien Bortolussi
8244b80342 [Ada] Remove contract duplication in formal doubly linked lists
Remove a minor duplication in Post of a function of formal doubly linked
lists.

gcc/ada/

	* libgnat/a-cfdlli.ads (Insert): Remove the duplication.
2022-05-30 08:29:05 +00:00
Piotr Trojanek
576b777891 [Ada] Fix expansion of structural subprogram variants
When implementing structural subprogram variants we ignored them in
expansion of the pragma itself, but not in expansion of a recursive
subprogram call. Now fixed.

gcc/ada/

	* exp_ch6.adb (Check_Subprogram_Variant): Ignore structural
	variants.
2022-05-30 08:29:04 +00:00
Piotr Trojanek
263cb16b76 [Ada] Simplify construction of a path to file
Code cleanup; semantics is unaffected.

gcc/ada/

	* osint.adb (Locate_File): Change variable to constant and
	initialize it by concatenation of directory, file name and NUL.
2022-05-30 08:29:04 +00:00
Piotr Trojanek
0f29dfcec2 [Ada] Remove repeated description of support for Address clauses
The GNAT behaviour regarding the Ada RM requirement to support Address
clauses for imported subprograms was documented twice: in section about
packed types (which was a mistake) and in section about address clauses
(where it belongs).

Cleanup related to the use of packed arrays for bitset operations to
detect uses of uninitialized scalars in GNAT.

gcc/ada/

	* doc/gnat_rm/implementation_advice.rst (Packed Types): Remove
	duplicated and wrongly placed paragraph.
	* gnat_rm.texi: Regenerate.
2022-05-30 08:29:04 +00:00
Ghjuvan Lacambre
9baae5692b [Ada] Add insertion character to Ineffective_Inline_Warnings messages
This enables tools that ingest GNAT's output to properly classify these
messages.

gcc/ada/

	* inline.adb (Check_Package_Body_For_Inlining): Add insertion
	character.
2022-05-30 08:29:04 +00:00
Ghjuvan Lacambre
94cf3d1f78 [Ada] Add insertion character for overlay modification warnings
This enables tools that ingest GNAT's output to properly classify these
messages.

gcc/ada/

	* freeze.adb (Warn_Overlay): Add 'o' insertion character.
	* sem_ch13.adb (Analyze_Attribute_Definition_Clause): Likewise.
	* sem_util.adb (Note_Possible_Modifications): Likewise.
2022-05-30 08:29:04 +00:00
Ghjuvan Lacambre
67481ef527 [Ada] Fix Warn_On_All_Unread_Out_Parameters not being properly tagged
This caused tools ingesting GNAT's output to mislabel these messages.

gcc/ada/

	* sem_warn.adb (Warn_On_Useless_Assignment): Fix insertion
	character.
2022-05-30 08:29:04 +00:00
Ghjuvan Lacambre
f925b56959 [Ada] Fix Warn_On_Late_Primitives messages not being properly tagged
This caused tools ingesting GNAT's output to mislabel these messages.

gcc/ada/

	* sem_disp.adb (Warn_On_Late_Primitive_After_Private_Extension):
	Fix insertion character.
2022-05-30 08:29:03 +00:00
Ghjuvan Lacambre
8337af4f9d [Ada] Fix -gnatw.f warnings not having the right insertion characters
This caused these warnings not to be tagged with the switch causing
them, which is an issue for tools ingesting GNAT's output.

gcc/ada/

	* sem_elab.adb (Process_Conditional_ABE_Access_Taken): Add '.f'
	insertion characters.
2022-05-30 08:29:03 +00:00
Piotr Trojanek
b341b8130f [Ada] Deconstruct deferred references
While cleaning up and modifying code for unreferenced warnings we
removed all calls to Defer_Reference, which was the only routine that
populated the Deferred_References table. Consequently, all the code
related to this table became dead.

gcc/ada/

	* lib-xref.ads (Deferred_Reference_Entry, Defer_Reference,
	Process_Deferred_References, Has_Deferred_Reference): Remove
	client API.
	* lib-xref.adb (Deferred_References, Defer_Reference,
	Has_Deferred_Reference, Process_Deferred_References): Remove
	implementation.
	* frontend.adb, sem_ch11.adb, sem_ch5.adb, sem_res.adb,
	sem_util.adb, sem_warn.adb: Remove uses of Deferred_References.
2022-05-30 08:29:03 +00:00
Bob Duff
6a91be2957 [Ada] Avoid creating a finalization wrapper block for functions
This patch fixes a bug whereby if a function body has local objects that
are finalizable, and has a return statement that requires generation of
transient finalizable temps, and there are dynamic-sized objects
requiring pushing/popping the (primary) stack at run time, and the
function body has exception handlers, then incorrect code is
generated. In particular, the transient objects are finalized after they
have been deallocated. This can cause seg faults, corrupted heap, and
the like.

Note that if there are no dynamic-sized objects, then the bug does
not occur, because the back end allocates objects of compile-time-known
size based on where they are referenced, rather than which local
block they are declared in.

This patch relies on the fact that an At_End handler and regular
exception handlers CAN coexist in the same handled statement sequence,
which was not true some years ago.

gcc/ada/

	* exp_ch7.adb (Wrap_HSS_In_Block): Do not create a new block in
	the case of function bodies. We include all subprogram bodies,
	because it's harmless for procedures. We cannot easily avoid
	creating this block in ALL cases, because some transformations
	of (e.g.) task bodies end up moving some code such that the
	wrong exception handlers apply to that code.
	(Build_Finalizer_Call): Remove code for creating a new block.
	This was unreachable code, given that Wrap_HSS_In_Block has
	already done that, but with the above change to
	Wrap_HSS_In_Block, this code becomes reachable, and triggers
	essentially the same bug.
	* exp_ch7.ads: Adjust comment.
2022-05-30 08:29:03 +00:00
Justin Squirek
507ed659e0 [Ada] Incorrect unreferenced warnings on null subprograms and formals with aspects
This patch corrects an error in the compiler whereby spurious
unreferenced warnings are generated on formal parameters of null generic
subprograms.

These changes also fix the parsing of aspects on formal parameters such
that the aspects now get properly set for all formal parameters in a
parameter list.

gcc/ada/

	* par-ch6.adb (P_Formal_Part): Set Aspect_Specifications on all
	formals instead of just the last in a formal id list.
	* sem_ch6.adb (Analyze_Null_Procedure): Mark expanded null
	generic procedures as trivial in order to avoid spurious
	unreferenced warnings.
2022-05-30 08:29:03 +00:00
Romain Beguet
f55e8fd165 [Ada] Fix illegal Ada in s-dwalin.adb
Both the `System.Mmap` and `System.Object_Reader` packages are defining
entities named `Offset` and they are both `use`d at the top of
s-dwalin.adb.

Therefore, the references to `Offset` throughout this file are
ambiguous, and GNAT is supposed to complain. Since it does not for the
moment, we fix the ambiguity by declaring a subtype `Offset` at the top
of the file simply renames `System.Object_Reader.Offset`.

gcc/ada/

	* libgnat/s-dwalin.adb: Add a subtype declaration to fix the
	ambiguity.
2022-05-30 08:29:03 +00:00
Steve Baird
ebddfe50d8 [Ada] Incorrect determination of whether an expression is predicate-static
The expression given in a Static_Predicate aspect specification is
required to be predicate-static. The implementation of this compile-time
check was incorrect in some cases. There were problems in both
directions: expressions that are not predicate-static were incorrectly
treated as though they were and vice versa. This led to both accepting
invalid code and to rejecting valid code.

gcc/ada/

	* sem_ch13.adb (Is_Predicate_Static): Do not generate warnings
	about subexpressions of enclosing expressions. Generate warnings
	for predicates that are known to be always true or always false,
	except in the case where the predicate is expressed as a Boolean
	literal. Deal with non-predicate-static expressions that have
	been transformed into predicate-static expressions.  Add missing
	Is_Type_Ref call to N_Membership_Test case.
2022-05-30 08:29:03 +00:00
Eric Botcazou
567bf44932 [Ada] Fix expansion of aggregate for discriminated limited extension
The presence of the discriminants prevents the values associated with the
components of the parent type from being put into the sub-aggregate built
for the _Parent component.

gcc/ada/

	* exp_aggr.adb (Expand_Record_Aggregate.Build_Back_End_Aggregate):
	Skip the discriminants at the start of the component list before
	looking for the components inherited from the parent in the case
	of a tagged extension.
2022-05-30 08:29:02 +00:00
Eric Botcazou
878ded4f9a [Ada] Do not freeze specifically for dispatch tables
The left-overs of the old freezing code in Make_DT are now redundant since
the semantic analyzer performs the same task for the 'Access attribute.

gcc/ada/

	* exp_disp.adb (Make_DT): Remove remaining freezing code.
2022-05-30 08:29:02 +00:00
Eric Botcazou
79b7ab68bc [Ada] Do not analyze expression functions for dispatch tables
There is no need to analyze expression functions that are primitives of a
tagged type for its dispatch table because they will be analyzed at the end
of the current scope.

gcc/ada/

	* sem_attr.adb (Resolve_Attribute) <Attribute_Access>: Don't analyze
	the body of an expression function in the case of a dispatch table.
2022-05-30 08:29:02 +00:00
Arnaud Charlet
764169055b [Ada] Introduce Opt.CCG_Mode
To handle code common to the old and the new CCG code generator.

gcc/ada/

	* gnat1drv.adb, opt.ads, sem_ch7.adb: Introduce CCG_Mode.
2022-05-30 08:29:02 +00:00
Yannick Moy
40e01041b3 [Ada] Update proofs of double arithmetic unit after prover changes
Changes in GNATprove (translation to Why3 and provers) result in proofs
being much less automatic, and requiring ghost code to detail
intermediate steps. In some cases, it is better to use the new By
mechanism to prove assertions in steps, as this avoids polluting the
proof context for other proofs. For that reason, add units s-spark.ads
and s-spcuop.ads/b to the runtime sources.

gcc/ada/

	* Makefile.rtl: Add new units.
	* libgnat/s-aridou.adb (Scaled_Divide): Add ghost code for provers.
	* libgnat/s-spcuop.adb: New unit for ghost cut operations.
	* libgnat/s-spcuop.ads: New unit for ghost cut operations.
	* libgnat/s-spark.ads: New unit.
2022-05-30 08:29:02 +00:00
Alexandre Oliva
33dec214f0 [Ada] Tweaks to hardening docs
Mention when security hardening features are available in other
languages.

Expand the strub documentation a little, for clarity and completeness.

Add missing 'aliased' and attribute to variables in strub example.

gcc/ada/

	* doc/gnat_rm/security_hardening_features.rst: Mention
	availability in other languages when applicable.
	(Stack Scrubbing): Associate the attribute with types, expand
	some comments, fix the example involving access to variables.
	* gnat_rm.texi: Regenerate.
2022-05-30 08:29:02 +00:00
Piotr Trojanek
4609660b77 [Ada] Fix typo in comment for functional sets
Minor fix in a recently added comment.

gcc/ada/

	* libgnat/a-cofuse.ads (Empty_Set): Fix typo in comment.
2022-05-30 08:29:01 +00:00
Eric Botcazou
fabf93dc1a [Ada] Restore hiding of predefined "=" operator through class-wide type
The previous change introduced a backward incompatibility in the handling
of a user-defined "=" operator for a class-wide type of a tagged type: it
would previously hide the predefined "=" operator of the tagged type in
the private case, but it no longer does in this case, while it still does
in the nonprivate case.

This hiding is a non-portability, but is fundamentally what the compiler
implements, instead of the RM rule which requires homographs.  The reason
lies in the implementation of the "=" operator in GNAT: internally, there
is not a "=" predefined operator for every nonlimited type, but instead
there is a single, universal "=" predefined operator for all the nonlimited
types.  The consequence is that the hiding rule implemented in GNAT for "="
is effectively that a user-declared symmetrical "=" operator returning
boolean hides the predefined "=" operator of any type that is covered by
the user-declared operator.

Whether it is desirable to implement the exact RM rule in GNAT is to be
discussed, but existing code relies on the non-portability and would thus
need to be changed.

gcc/ada/

	* sem_ch6.adb (New_Overloaded_Entity): Deal specifically with the
	overriding of the "=" operator for tagged types.
2022-05-30 08:29:01 +00:00
Eric Botcazou
3e93d2926a [Ada] Do not freeze profiles for dispatch tables
When static dispatch tables are built for library-level tagged types, the
primitives (the subprogram themselves) are frozen; that's necessary because
their address is taken.  However, their profile, i.e. all the types present
therein, is also frozen, which is not necessary after AI05-019 and is also
inconsistent with the handling of attribute references.

The change also removes a couple of pragma Inline on subprograms that are
too large for inlining to bring any benefit.

gcc/ada/

	* exp_ch3.adb (Expand_N_Object_Declaration): Adjust call to Make_DT.
	* exp_disp.ads (Building_Static_DT): Remove pragma Inline.
	(Building_Static_Secondary_DT): Likewise.
	(Convert_Tag_To_Interface): Likewise.
	(Make_DT): Remove second parameter.
	* exp_disp.adb (Make_DT): Likewise.
	(Check_Premature_Freezing): Delete.
	Pass Do_Freeze_Profile as False in call to Freeze_Entity.
	* freeze.ads (Freezing_Library_Level_Tagged_Type): Delete.
	* freeze.adb (Freeze_Profile): Remove obsolete code.
	(Freeze_Entity): Tweak comment.
2022-05-30 08:29:01 +00:00
Yannick Moy
1ea22318ca [Ada] Adapt proof of runtime unit s-arit32
After changes in GNATprove, adapt proof. Simply move an assertion up
before it is first needed here.

gcc/ada/

	* libgnat/s-arit32.adb (Scaled_Divide32): Move assertion up.
2022-05-30 08:29:01 +00:00
Yannick Moy
5b7630f2f2 [Ada] PR ada/105303 Fix use of Assertion_Policy in internal generics unit
The internal unit System.Generic_Array_Operations defines only generic
subprograms. Thus, pragma Assertion_Policy inside the spec has no
effect, as each instantiation is only subject to the assertion policy at
the program point of the instantiation. Remove this confusing pragma,
and add the pragma inside each generic body making use of additional
assertions or ghost code, so that running time of instantiations is not
impacted by assertions meant for formal verification.

gcc/ada/

	PR ada/105303
	* libgnat/s-gearop.adb: Add pragma Assertion_Policy in generic
	bodies making use of additional assertions or ghost code.
	* libgnat/s-gearop.ads: Remove confusing Assertion_Policy.
2022-05-30 08:29:01 +00:00
Steve Baird
55c19dda8c [Ada] Delete no-longer-used Convert_To_Return_False flag
As a result of other recent changes, the Convert_To_Return_False flag
is never set. The flag can be therefore be deleted.

gcc/ada/

	* exp_ch11.adb (Expand_N_Raise_Expression): Remove
	Convert_To_Return_False test.
	* gen_il-fields.ads: Remove Convert_To_Return_False field.
	* gen_il-gen-gen_nodes.adb: Remove use of
	Convert_To_Return_False field.
	* sinfo.ads: Remove comment describing Convert_To_Return_False
	flag.
2022-05-30 08:29:01 +00:00
Julien Bortolussi
efaee961d9 [Ada] Add empty constructors to the functional containers
This patch adds empty constructors to the functional containers so that
we can use them in expression functions.

gcc/ada/

	* libgnat/a-cofuma.ads, libgnat/a-cofuma.adb,
	libgnat/a-cofuse.ads, libgnat/a-cofuse.adb,
	libgnat/a-cofuve.ads, libgnat/a-cofuve.adb: Add empty
	constructors.
2022-05-30 08:29:01 +00:00
Ghjuvan Lacambre
96b2e17066 [Ada] Fix new CUDA kernel registration scheme
Removal of the previous kernel registration scheme unearthed mistakes in
the new one, which were:
- The new kernel registration code relied on the binder expansion phase,
  which didn't happen because the registration code was already
  generated by the binder.
- The kernel handle passed to CUDA_Register_Function was the first eight
  bytes of the code of the host-side procedure representing the kernel
  rather than its address.

gcc/ada/

	* bindgen.adb (Gen_CUDA_Init): Remove code generating CUDA
	definitions.
	(Gen_CUDA_Defs): New function, generating definitions
	initialized by Gen_CUDA_Init.
	(Gen_Output_File_Ada): Call Gen_CUDA_Defs instead of
	Gen_CUDA_Init.
	(Gen_Adainit): Call Gen_CUDA_Init.
2022-05-30 08:29:00 +00:00
Prathamesh Kulkarni
b4e04a78bb [ARM] Fix prototype for vec_perm_const hook.
gcc/ChangeLog:

	* config/arm/arm.cc (arm_vectorize_vec_perm_const): Adjust prototype.
2022-05-30 13:23:50 +05:30
Vineet Gupta
7915f65513 RISC-V/testsuite: constraint some of tests to hard_float
Commit 9ddd44b586 ("RISC-V: Provide `fmin'/`fmax' RTL pattern") added
tests which check for hard float instructions which obviously fails on
soft-float ABI builds.

And my recent commit b646d7d279 ("RISC-V: Inhibit FP <--> int register
moves via tune param") is guilty of same crime.

So constraint with "dg-require-effective-target hard_float"

This reduces bunch of new RV failures.

|               ========= Summary of gcc testsuite =========
|                            | # of unexpected case / # of unique unexpected case
|                            |          gcc |          g++ |     gfortran |
|   rv64imac/   lp64/ medlow |  134 /    22 |    0 /     0 |            - |  BEFORE
|   rv64imac/   lp64/ medlow |   22 /     9 |    0 /     0 |            - |  AFTER
|

gcc/testsuite/Changelog:
	* gcc.target/riscv/fmax.c: Add dg-require-effective-target hard_float.
	* gcc.target/riscv/fmaxf.c: Ditto.
	* gcc.target/riscv/fmin.c: Ditto.
	* gcc.target/riscv/fminf.c: Ditto.
	* gcc.target/riscv/smax-ieee.c: Ditto.
	* gcc.target/riscv/smax.c: Ditto.
	* gcc.target/riscv/smaxf-ieee.c: Ditto.
	* gcc.target/riscv/smaxf.c: Ditto.
	* gcc.target/riscv/smin-ieee.c: Ditto.
	* gcc.target/riscv/smin.c: Ditto.
	* gcc.target/riscv/sminf-ieee.c: Ditto.
	* gcc.target/riscv/sminf.c: Ditto.
	* gcc.target/riscv/pr105666.c: Ditto.

Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
2022-05-30 10:09:04 +08:00
GCC Administrator
05f220c205 Daily bump. 2022-05-30 00:16:21 +00:00
Jakub Jelinek
58a40e76eb libcpp: Ignore CPP_PADDING tokens in _cpp_parse_expr [PR105732]
The first part of the following testcase (m1-m3 macros and its use)
regressed with my PR89971 fix, but as the m1,m4-m5 and its use part shows,
the problem isn't new, we can emit a CPP_PADDING token to avoid it from
being adjacent to whatever comes after the __VA_OPT__ (in this case there
is nothing afterwards, true).

In most cases these CPP_PADDING tokens don't matter, all other
callers of cpp_get_token_with_location either ignore CPP_PADDING tokens
completely (e.g. c_lex_with_flags) or they just remember them and
take them into account when printing stuff whether there should be
added whitespace or not (scan_translation_unit + token_streamer::stream).
So, I think we should just ignore CPP_PADDING tokens the same way in
_cpp_parse_expr.

2022-05-27  Jakub Jelinek  <jakub@redhat.com>

	PR preprocessor/105732
	* expr.cc (_cpp_parse_expr): Handle CPP_PADDING by just another
	token.

	* c-c++-common/cpp/va-opt-10.c: New test.
2022-05-29 21:57:51 +02:00
Iain Sandoe
794737976b Darwin: Fix empty g++ command lines [PR105599].
An empty g++ command line should produce a diagnostic that there are no
inputs.  The PR is that currently Darwin produces a dignostic about missing
link items instead - this is because (errnoeously), for this driver, we are
creating a link job for empty command lines.

The problem occurs in four stages:

 The g++ driver appends -shared-libgcc to the command line.

 The Darwin driver_init code in the backend does not see this (it sees an
 empty command line).

 When the back end driver code driver sees an empty command line, it does not
 add any supplementary flags (e.g. asm-macosx-version-min) - precisely to
 avoid anything being claimed as an input_file and therefore triggering a link
 line.

 Since we do not have a value for asm-macosx-version-min when processing the
 driver specs, we unconditionally inject 'multiply_defined suppress' which is
 used with shared libgcc (but only intended on very old Darwin).  This then
 causes the generation of a link job.

The solution, for the present, is to move version-specific link params to the
LINK_SPEC so that they are only processed when a link job has already been
decided.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

	PR target/105599

gcc/ChangeLog:

	* config/darwin.h: Move versions-specific handling of multiply_defined
	from SUBTARGET_DRIVER_SELF_SPECS to LINK_SPEC.
2022-05-29 19:27:14 +01:00
Eric Gallager
da5f0cc2f5 sourcebuild.texi: Document toplevel directories
Fixes PR82383

gcc/ChangeLog:

	PR other/82383
	* doc/sourcebuild.texi: Add entries for the c++tools,
	gotools, libbacktrace, libcc1, libcody, liboffloadmic,
	and libsanitizer directories. Remove entry for boehm-gc.
	Fix alphabetization for libquadmath.
2022-05-29 00:57:05 -04:00
GCC Administrator
37b3b5dabd Daily bump. 2022-05-29 00:16:31 +00:00
Joel Holdsworth
919822adc9 [PATCH 1/2] avr: Added AVR-DA and DB MCU series
gcc/
	* config/avr/avr-mcus.def: Add device definitions.
	* doc/avr-mmcu.texi: Corresponding changes.
	* config/avr/gen-avr-mmcu-texi.cc: Added support for avr
	device prefix.
	* config/avr/gen-avr-mmcu-specs.cc: Prevent -mmcu=avr* flags
	from leaking into cc1.

Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com>
2022-05-28 13:17:39 -06:00
Tobias Burnus
e3803f9cbb OpenMP/Fortran: Add support for enter clause on declare target
Fortran version to C/C++ commit r13-797-g0ccba4ed8571c18c7015413441e971

gcc/fortran/ChangeLog:

	* dump-parse-tree.cc (show_omp_clauses): Handle OMP_LIST_ENTER.
	* gfortran.h: Add OMP_LIST_ENTER.
	* openmp.cc (enum omp_mask2, OMP_DECLARE_TARGET_CLAUSES): Add
	OMP_CLAUSE_ENTER.
	(gfc_match_omp_clauses, gfc_match_omp_declare_target,
	resolve_omp_clauses): Handle 'enter' clause.

libgomp/ChangeLog:

	* libgomp.texi (OpenMP 5.2): Mark 'enter' clause as supported.
	* testsuite/libgomp.fortran/declare-target-1.f90: Extend to test
	explicit 'to' and 'enter' clause.
	* testsuite/libgomp.fortran/declare-target-2.f90: Update accordingly.

gcc/testsuite/ChangeLog:

	* gfortran.dg/gomp/declare-target-2.f90: Add 'enter' clause test.
	* gfortran.dg/gomp/declare-target-4.f90: Likewise.
2022-05-28 20:42:38 +02:00
Vladimir Makarov
ce1580252e Fix ICE on sh
gcc/
	PR target/103722
	* config/sh/sh.cc (sh_register_move_cost): Avoid cost "2" (which
	is special) for various scenarios.
2022-05-28 12:14:39 -06:00
Bruce Korb
ad8f6e2392 Vim swap files not ignored
ChangeLog:

	* .gitignore: Ignore vim swap files
2022-05-28 09:38:29 -06:00
Ian Lance Taylor
f535f9d7b0 libbacktrace: update README
PR libbacktrace/105721
	* README: Update.
2022-05-28 07:59:16 -07:00
Iain Sandoe
65aebf1987 Darwin: Amend REAL_LIBGCC_SPEC comment [NFC].
This comment had got out of sync with reality, partly due to merging
of patches.  Updated to reflect the current implementation.

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>

gcc/ChangeLog:

	* config/darwin.h (REAL_LIBGCC_SPEC): Update the comment block
	describing this macro.
2022-05-28 11:55:00 +01:00
Alexandre Oliva
163fa9a648 Rename OSCONS_CC to GCC_FOR_ADA_RTS
Several gnatlib* targets perform, with a subshell and sed, the same
GCC_FOR_TARGET pathname transformation that OSCONS_CC performs with
make subst macros.  Rename OSCONS_CC to a more general name, and use
it for gnatlib as well.


for  gcc/ada/ChangeLog

	* gcc-interface/Makefile.in (OSCONS_CC): Rename to...
	(GCC_FOR_ADA_RTS): ... this.  Adjust users.
	(gnatlib): Pass it down as CC.
	(gnatlib-shared-default): Likewise.
	(gnatlib-shared-win32, gnatlib-shared-darwin): Likewise.
2022-05-28 03:50:17 -03:00
Jakub Jelinek
42fd2cd932 libgomp: Don't define GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC for _aligned_malloc [PR105745]
since apparently _aligned_malloc requires freeing with _aligned_free and:
 /* Defined if gomp_aligned_alloc doesn't use fallback version
    and free can be used instead of gomp_aligned_free.  */
 #define GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC 1
so the second condition isn't satisfied.  For uses inside of the OpenMP
allocators we can still use _aligned_malloc but we need to call _aligned_free
in gomp_aligned_free.

2022-05-28  Jakub Jelinek  <jakub@redhat.com>

	PR libgomp/105745
	* libgomp.h (GOMP_HAVE_EFFICIENT_ALIGNED_ALLOC): Don't define for
	defined(HAVE__ALIGNED_MALLOC) case.
	* alloc.c (gomp_aligned_alloc): Move defined(HAVE__ALIGNED_MALLOC)
	handling as last option before fallback instead of first.
	(gomp_aligned_free): For defined(HAVE__ALIGNED_MALLOC) call
	_aligned_free.
2022-05-28 08:30:47 +02:00
Jakub Jelinek
931249276a openmp: Adjust diagnostics about same variable in link and to/enter clauses
On Fri, May 27, 2022 at 04:52:17PM +0200, Tobias Burnus wrote:
> The 'TO'/'ENTER' usage is first stored in a linked list – and
> then as attribute to the symbol. I am not sure how to handle it best.

This reminds me I've left the C/C++ FE diagnostics about mixing link and
to/enter on the same variable in separate directives as is, so it always
talked about mixing link and to clauses.

This patch adjusts it, so that if link is first, it talks about the
clause actually used and if link is later, uses to or enter together
in the wording.

2022-05-28  Jakub Jelinek  <jakub@redhat.com>

gcc/c/
	* c-parser.cc (c_parser_omp_declare_target): If OMP_CLAUSE_LINK was
	seen first, use "%<to%>" or "%<enter%>" depending on
	OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
	"%<to%> or %<enter%>" wording.
gcc/cp/
	* parser.cc (handle_omp_declare_target_clause): If OMP_CLAUSE_LINK was
	seen first, use "%<to%>" or "%<enter%>" depending on
	OMP_CLAUSE_ENTER_TO of the current clause, otherwise use
	"%<to%> or %<enter%>" wording.
gcc/testsuite/
	* c-c++-common/gomp/declare-target-2.c: Add further tests for mixing of
	link and to/enter clauses on separate directives.
2022-05-28 08:30:15 +02:00
Jason Merrill
221acd67ca c++: lambda in concept [PR105652]
We currently check satisfaction in the context of the constrained
declaration (which may be wrong, see PR104111).  When checking C<int>
for S<int>, we currently substitute into the lambda in the context of
S<T> (rather than S<int>, which seems wrong if the above isn't wrong), so
the new closure type thinks its context is S<T>, which confuses debug
output.  For the moment, let's work around all of this by overriding the
context of the closure.

	PR c++/105652

gcc/cp/ChangeLog:

	* pt.cc (tsubst_lambda_expr): Don't let a namespace-scope lambda
	instantiate into a class-scope lambda.

gcc/testsuite/ChangeLog:

	* g++.dg/cpp2a/concepts-lambda20.C: New test.
2022-05-27 23:43:54 -04:00
GCC Administrator
d9176e643f Daily bump. 2022-05-28 00:16:40 +00:00