Age | Commit message (Collapse) | Author | Files | Lines |
|
gcc/ada/
* sem_aggr.adb (Resolve_Container_Aggregate): Add semantic
checks for indexed aggregates, including component associations
and iterated component associations.
* exp_aggr.adb (Expand_Iterated_Component): New subprogram,
subsidiary of Expand_Container_Aggreggate, used for positional,
named, and indexed aggregates.
(Aggregate_Size): New subprogram to precompute the size of an
indexed aggregate prior to call to allocate it.
(Expand_Range_Component): New subprogram so generate loop for a
component association given by a range or a subtype name in an
indexed aggregate.
|
|
gcc/ada/
* bindo-diagnostics.adb (Output_Invocation_Related_Suggestions):
Use Cumulative_Restrictions.Set, because Restriction_Active only
works at compile time.
|
|
gcc/ada/
* gnatbind.adb (Gnatbind): For No_Tasks_Unassigned_To_CPU, check
that CPU has been set on the main subprogram.
(Restriction_Could_Be_Set): Don't print
No_Tasks_Unassigned_To_CPU if it would violate the
above-mentioned rule. Up to now, all restrictions were checked
by the compiler, with the binder just checking for consistency.
But the compiler can't know which subprogram is the main, so
it's impossible to check this one at compile time.
* restrict.ads, restrict.adb: Misc refactoring. Change Warning
to Warn, for consistency, since most already use Warn.
(Set_Restriction): New convenience routine.
* sem_ch13.adb (Attribute_CPU): Check
No_Tasks_Unassigned_To_CPU.
* sem_prag.adb (Pragma_CPU): Check No_Tasks_Unassigned_To_CPU.
Misc refactoring.
* tbuild.ads, tbuild.adb (Sel_Comp): New functions for building
selected components.
|
|
gcc/ada/
* impunit.adb (Non_Imp_File_Names_95): Remove duplicate entry.
|
|
gcc/ada/
* Makefile.rtl: replace a-numaux__x86.ads by
a-numaux__libc-x86.ads and a-numaux__x86.adb by
a-numaux__dummy.adb.
* libgnat/a-numaux__x86.ads, libgnat/a-numaux__x86.adb: Removed.
* libgnat/a-numaux__dummy.adb: New.
|
|
gcc/ada/
* sem_ch12.adb (Load_Parent_Of_Generic): If an ancestor is an
instance whose source appears within a formal package of the
current unit, there is no body of the ancestor needed to
complete the current generic compilation.
|
|
gcc/ada/
* libgnat/s-thread__ae653.adb (taskVarAdd): Defunct, so remove.
(Current_ATSD): Make it a TLS variable.
(OK): Move to package scope.
(System.Storage_Elements): Import and Use.
|
|
gcc/ada/
* exp_ch9.adb (Expand_N_Accept_Statement): Set Parent of the
created block entity to the created block statement.
|
|
gcc/ada/
* scng.adb (Scan): Detect wide characters not in NFKC.
* libgnat/a-chahan.adb, libgnat/a-chahan.ads,
libgnat/a-wichha.adb, libgnat/a-wichha.ads,
libgnat/a-wichun.adb, libgnat/a-wichun.ads,
libgnat/a-zchhan.adb, libgnat/a-zchhan.ads,
libgnat/a-zchuni.adb, libgnat/a-zchuni.ads (Is_NFKC): New.
* libgnat/s-utf_32.ads, libgnat/s-utf_32.adb (Is_UTF_32_NFKC):
New.
|
|
gcc/ada/
* libgnat/s-rident.ads (Restriction_Id): Add
No_Tasks_Unassigned_To_CPU.
|
|
gcc/ada/
* exp_aggr.adb (Max_Aggregate_Size): Use the small size of 64
when copying is needed (for example, for the initialization of a
local variable, and for assignment statements). Use the larger
size when static allocation can be done without copying.
|
|
gcc/ada/
* libgnat/s-rident.ads (No_Dynamic_CPU_Assignment): New
restriction. Add it to all relevant profiles.
* sem_ch13.adb (Attribute_CPU): Check No_Dynamic_CPU_Assignment
restriction.
(Attribute_CPU, Attribute_Dispatching_Domain,
Attribute_Interrupt_Priority): Remove error checks -- these are
checked in the parser.
* sem_prag.adb (Pragma_CPU): Check No_Dynamic_CPU_Assignment
restriction. We've got a little violation of DRY here.
* sem.ads, sem_ch3.ads: Minor comment fix.
|
|
gcc/ada/
* sem_ch4.adb (Try_Container_Indexing): When the prefix type is
an access type, change it to the designated type, change the
prefix to an explicit dereference, and emit a ?d? warning for
the implicit dereference. Include a ??? comment questioning
whether this is the right context in which to perform the
implicit dereferencing.
|
|
gcc/ada/
* sem_ch13.adb (Validate_Literal_Aspect): Ensure that the
parameter is not aliased. Minor reformatting.
* sem_util.adb (Statically_Names_Object): Update comment.
|
|
gcc/ada/
* sem_case.adb (Build_Choice): Set Is_Static_Expression flag.
(Lit_Of): Update specification to mention Is_Static_Expression
flag.
* sem_ch13.adb (Membership_Entry): Check for N_Others_Choice.
|
|
gcc/ada/
* sem_ch6.adb (Null_Exclusions_Match): New function to check
that the null exclusions match, including in the case addressed
by this AI.
(Check_Conformance): Remove calls to Comes_From_Source
when calling Null_Exclusions_Match. These are not
needed, as indicated by an ancient "???" comment.
|
|
gcc/ada/
* exp_ch4.adb (Expand_N_Type_Conversion): Remove flawed test for
whether "statically deeper" accessibility rules apply to a given
target type and instead use the new routine
Statically_Deeper_Relation_Applies.
(Statically_Deeper_Relation_Applies): Created to centralize the
calculation of whether a target type within a conversion must
have static accessibility checks.
* sem_ch13.adb (Check_One_Function): Minor comment revision.
|
|
gcc/ada/
* fe.h (Is_OK_Static_Expression): Delete.
* sem_eval.ads (Is_OK_Static_Expression): Remove WARNING note.
|
|
gcc/ada/
* einfo.adb, einfo.ads (Is_Named_Access_Type): Created for
readability.
* sem_ch6.adb (Check_Return_Construct_Accessibility): Add
special cases for formals.
* sem_util.adb (Object_Access_Level): Add handling of access
attributes and named access types in the general case.
|
|
gcc/ada/
* sem_case.adb (Build_Choice): Simplify.
|
|
gcc/ada/
* frontend.adb: Disable Initialize_Scalars on runtime files.
|
|
gcc/ada/
* sem_ch3.adb (Analyze_Object_Declaration): Add
Comes_From_Source call.
|
|
gcc/ada/
* exp_attr.adb (Expand_Access_To_Protected_Op): Initialize
variable Sub to Empty to avoid false positive reported by
Codepeer.
|
|
gcc/ada/
* sem_ch8.adb (Note_Redundant_Use): Add missing warning tag.
Do not check for redundant use clauses in predefined units to avoid
misleading warnings that may occur as part of a rtsfind load.
|
|
gcc/ada/
* exp_attr.adb (Has_By_Protected_Procedure_Prefixed_View): New
subprogram.
(Expand_Access_To_Protected_Op): Adding support for prefixed
class-wide view with By_Protected_Procedure convention.
* sem_attr.adb (Get_Convention): New subprogram.
(Get_Kind): Adapted to use Get_Convention.
* sem_ch4.adb (Try_By_Protected_Procedure_Prefixed_View): New
subprogram.
(Analyze_Selected_Component): Invoke
Try_By_Protected_Procedure_Prefixed_View.
* sem_util.ads (Is_By_Protected_Procedure): New subprogram.
* sem_util.adb (Is_By_Protected_Procedure): New subprogram.
|
|
gcc/ada/
* libgnat/s-ststop.ads: Fix typo.
* libgnat/s-ststop.adb (Read, Write): Fix block number
computation to avoid overflows in case of large strings.
|
|
gcc/ada/
* libgnat/s-genbig.adb ("**"): Remove capacity limit check.
Improve code by using an extended return.
(Normalize): Perform capacity limit check here instead which is
the centralized place where (potentially large) big integers are
allocated.
|
|
gcc/ada/
* exp_ch4.adb (Expand_N_Type_Conversion): Handle the case of
applying an invariant check for a conversion to a class-wide
type whose root type has a type invariant, when the conversion
appears within the immediate scope of the type and the
expression is of a specific tagged type.
* sem_ch3.adb (Is_Private_Primitive): New function to determine
whether a primitive subprogram is a private operation.
(Check_Abstract_Overriding): Enforce the restriction imposed by
AI12-0042 of requiring overriding of an inherited nonabstract
private operation when the ancestor has a class-wide type
invariant and the ancestor's private operation is visible.
(Derive_Subprogram): Set Requires_Overriding on a subprogram
inherited from a visible private operation of an ancestor to
which a Type_Invariant'Class expression applies.
|
|
|
|
CMPXCHG instruction sets ZF flag if the values in the destination operand
and EAX register are equal; otherwise the ZF flag is cleared and value
from destination operand is loaded to EAX. Following assembly:
movl %esi, %eax
lock cmpxchgl %edx, (%rdi)
cmpl %esi, %eax
sete %al
can be optimized by removing the unneeded comparison, since set ZF flag
signals that no update to EAX happened.
2020-15-07 Uroš Bizjak <ubizjak@gmail.com>
gcc/ChangeLog:
PR target/95355
* config/i386/sync.md
(peephole2 to remove unneded compare after CMPXCHG): New pattern.
gcc/testsuite/ChangeLog:
PR target/95355
* gcc.target/i386/pr96189.c: New test.
|
|
I've missed
+FAIL: libgomp.c/loop-21.c execution test
during testing of the recent patch. The problem is that while
for the number of iterations computation it doesn't matter if we compute
min_inner_iterations as (m2 * first + n2 + (adjusted step) + m1 * first + n1) / step
or (m2 * last + n2 + (adjusted step) + m1 * last + n1) / step provided that
in the second case we use as factor (m1 - m2) * ostep / step rather than
(m2 - m1) * ostep / step, for the logical to actual iterator values computation
it does matter and in my hand written C implementations of all the cases (outer
vs. inner loop with increasing vs. decreasing iterator) I'm using the same computation
and it worked well for all the pseudo-random iterators testing it was doing.
It also means min_inner_iterations is misnamed, because it is not really
minimum number of inner iterations, whether the first or last outer iteration
results in the smaller or larger value of this can be (sometimes) only
determined at runtime.
So this patch also renames it to first_inner_iterations.
2020-07-15 Jakub Jelinek <jakub@redhat.com>
PR libgomp/96198
* omp-general.h (struct omp_for_data): Rename min_inner_iterations
member to first_inner_iterations, adjust comment.
* omp-general.c (omp_extract_for_data): Adjust for the above change.
Always use n1first and n2first to compute it, rather than depending
on single_nonrect_cond_code. Similarly, always compute factor
as (m2 - m1) * outer_step / inner_step rather than sometimes m1 - m2
depending on single_nonrect_cond_code.
* omp-expand.c (expand_omp_for_init_vars): Rename min_inner_iterations
to first_inner_iterations and min_inner_iterationsd to
first_inner_iterationsd.
|
|
cp_parser_declaration copies tokens to local variables, before inspecting
(some of) their fields. There's no need. Just point at them in the token
buffer -- they don't move. Also, we never look at the second token if the
first is EOF, so no need for some kind of dummy value in that case.
gcc/cp/
* parser.c (cp_parser_declaration): Avoid copying tokens.
(cp_parser_block_declaration): RAII token pointer.
|
|
gcc/ada/
* sem_util.adb (Find_Overlaid_Entity): Fix style in comment.
(Note_Possible_Modification): Simplify repeated calls to Ekind.
|
|
gcc/ada/
* exp_aggr.adb (Flatten): Adjust description.
(Convert_To_Positional): Remove obsolete ??? comment and use
Compile_Time_Known_Value in the final test.
|
|
gcc/ada/
* par-ch4.adb (P_Iterated_Component_Association): Extended to
recognzize the similar Iterated_Element_Association. This node
is only generated when an explicit Key_Expression is given.
Otherwise the distinction between the two iterated forms is done
during semantic analysis.
* sinfo.ads: New node N_Iterated_Element_Association, for
Ada202x container aggregates. New field Key_Expression.
* sinfo.adb: Subprograms for new node and newn field.
* sem_aggr.adb (Resolve_Iterated_Component_Association): Handle
the case where the Iteration_Scheme is an
Iterator_Specification.
* exp_aggr.adb (Wxpand_Iterated_Component): Handle a component
with an Iterated_Component_Association, generate proper loop
using given Iterator_Specification.
* exp_util.adb (Insert_Axtions): Handle new node as other
aggregate components.
* sem.adb, sprint.adb: Handle new node.
* tbuild.adb (Make_Implicit_Loop_Statement): Handle properly a
loop with an Iterator_ specification.
|
|
gcc/ada/
* libgnat/s-stposu.adb (Allocate_Any_Controlled): Fix logic in
lock/unlock.
|
|
gcc/ada/
* sem_util.adb (Is_Object_Reference): Return True on
N_Target_Name.
|
|
gcc/ada/
* sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Add proper
handling of Aspect_Predicate_Failure, consistent with
Check_Aspect_At_Freeze_Point.
|
|
gcc/ada/
* sem_ch13.adb (Check_Aspect_Too_Late): Mention -gnat2020 switch
in error message.
|
|
gcc/ada/
* einfo.ads (Delayed Freezing and Elaboration): Adjust description.
* freeze.adb (Freeze_Object_Declaration): Likewise.
* sem_ch3.adb (Delayed_Aspect_Present): Likewise. Do not return
true for Alignment.
* sem_ch13.adb (Analyze_Aspect_Specifications): Do not always delay
for Alignment. Moreover, for Alignment and various Size aspects,
do not delay if the expression is an attribute whose prefix is the
Standard package.
|
|
gcc/ada/
* exp_ch6.adb (Requires_Atomic_Or_Volatile_Copy): Return false
inside an initialization procedure.
|
|
gcc/ada/
* sem_util.adb (Is_Renaming): Add ekind checks.
|
|
gcc/ada/
* doc/gnat_ugn/gnat_utility_programs.rst: Remove doc on obsolete
tools.
* gnat_ugn.texi: Regenerate.
|
|
gcc/ada/
* sem_res.adb (Resolve_Type_Conversion): Protect against null
entity. Add proper tag for -gnatwr warning.
|
|
gcc/ada/
* sem_ch6.adb (Analyze_Procedure_Call): Detect use of operators
in a procedure call.
* sem_util.adb: Minor edit.
|
|
gcc/ada/
* exp_spark.adb (Expand_SPARK_Delta_Or_Update): Apply scalar
range checks against the base type of an index type, not against
the index type itself.
|
|
gcc/ada/
* einfo.ads (Delayed Freezing and Elaboration): Minor tweaks.
Document the discrepancy between the aspect and the non-aspect
cases for alignment settings in object declarations.
|
|
gcc/ada/
* exp_ch3.adb (Freeze_Type): Remove warning in expander,
replaced by a corresponding error in sem_ch13.adb. Replace
RTE_Available by RTU_Loaded to avoid adding unnecessary
dependencies.
* sem_ch13.adb (Associate_Storage_Pool): New procedure.
(Analyze_Attribute_Definition_Clause
[Attribute_Simple_Storage_Pool| Attribute_Storage_Pool]): Call
Associate_Storage_Pool to add proper legality checks on
subpools.
|
|
gcc/ada/
* libgnat/a-cbdlli.adb, libgnat/a-cbdlli.ads,
libgnat/a-cbhama.adb, libgnat/a-cbhama.ads,
libgnat/a-cbhase.adb, libgnat/a-cbhase.ads,
libgnat/a-cbmutr.adb, libgnat/a-cbmutr.ads,
libgnat/a-cborma.adb, libgnat/a-cborma.ads,
libgnat/a-cborse.adb, libgnat/a-cborse.ads,
libgnat/a-cbprqu.adb, libgnat/a-cbprqu.ads,
libgnat/a-cbsyqu.adb, libgnat/a-cbsyqu.ads,
libgnat/a-cdlili.adb, libgnat/a-cdlili.ads,
libgnat/a-cidlli.adb, libgnat/a-cidlli.ads,
libgnat/a-cihama.adb, libgnat/a-cihama.ads,
libgnat/a-cihase.adb, libgnat/a-cihase.ads,
libgnat/a-cimutr.adb, libgnat/a-cimutr.ads,
libgnat/a-ciorma.adb, libgnat/a-ciorma.ads,
libgnat/a-ciormu.adb, libgnat/a-ciormu.ads,
libgnat/a-ciorse.adb, libgnat/a-ciorse.ads,
libgnat/a-cohama.adb, libgnat/a-cohama.ads,
libgnat/a-cohase.adb, libgnat/a-cohase.ads,
libgnat/a-coinve.adb, libgnat/a-coinve.ads,
libgnat/a-comutr.adb, libgnat/a-comutr.ads,
libgnat/a-convec.adb, libgnat/a-convec.ads,
libgnat/a-coorma.adb, libgnat/a-coorma.ads,
libgnat/a-coormu.adb, libgnat/a-coormu.ads,
libgnat/a-coorse.adb, libgnat/a-coorse.ads: Add SPARK_Mode =>
Off.
|
|
gcc/ada/
* sem_ch3.adb (Delayed_Aspect_Present): Fix oversight in loop.
* freeze.adb (Freeze_Object_Declaration): Use Declaration_Node
instead of Parent for the sake of consistency.
|