Age | Commit message (Collapse) | Author | Files | Lines |
|
Adjust previous patch to improve the support for AI05-0151-1/08.
gcc/ada/ChangeLog:
* exp_attr.adb (Rewrite_Attribute_Proc_Call): Add new parameter
to calls to Create_Extra_Formals.
(Expand_N_Attribute_Reference): Ditto.
* exp_ch3.adb (Expand_Freeze_Record_Type): Ditto.
* exp_ch6.adb (Expand_Call_Helper): Ditto.
* exp_disp.adb (Expand_Dispatching_Call): Ditto.
* freeze.adb (Check_Itype): Ditto.
(Freeze_Expression): Ditto.
* sem_ch6.adb (Analyze_Subprogram_Body_Helper): Ditto.
(Create_Extra_Formals): Add new formal, and use it to determine
if the creation of the extra formals can be deferred. Add the
new parameter to calls to Create_Extra_Formals.
(Is_Unsupported_Extra_Actuals_Call): Adjust the code to improve
its performance when the result is known.
(Is_Unsupported_Extra_Formals_Entity): Ditto. Add new formal
* sem_ch6.ads (Create_Extra_Formals): Add new formal.
(Is_Unsupported_Extra_Formals_Entity): Ditto.
|
|
When both a missing index and an out of bounds error are present then
we should also mention the error on out of bounds index as it suggests
removing the index that is out of bounds rather than suggesting adding
indices that are also out of bounds.
gcc/ada/ChangeLog:
* sem_aggr.adb (Resolve_Array_Aggregate): Indicate an out of
bounds index error also in the case of a missing index.
|
|
We do not emit an error on misplaced Strorage_Size error when
the aspect is not applied to a task (or an access type). We
instead create an attribute definition which is ignored most of the
time. Create a temporary pragma for the aspect specification to
emit the same misplaced aspect error as we do for pragmas.
gcc/ada/ChangeLog:
* sem_ch13.adb (Analyze_Aspect_Definitions): Create a temporary
pragma for the non-task and access type cases.
|
|
The initial value of fields of type Elist_Id is No_Elist, therefore the
statements this patch removes were useless.
gcc/ada/ChangeLog:
* sem_ch7.adb (New_Private_Type): Remove useless statements.
|
|
All Preelaborable_Initialization pragmas in the language-defined units are
replaced by the equivalent Preelaborable_Initialization aspect.
gcc/ada/ChangeLog:
* targparm.adb (Get_Target_Parameters): Address type declaration doesn't
ends anymore with a semicolon.
* libgnat/a-cdlili.ads: Replace Preelaborable_Initialization.
* libgnat/a-cidlli.ads: Likewise.
* libgnat/a-cihama.ads: Likewise.
* libgnat/a-cihase.ads: Likewise.
* libgnat/a-cimutr.ads: Likewise.
* libgnat/a-ciorma.ads: Likewise.
* libgnat/a-ciormu.ads: Likewise.
* libgnat/a-ciorse.ads: Likewise.
* libgnat/a-cohama.ads: Likewise.
* libgnat/a-cohase.ads: Likewise.
* libgnat/a-coinho.ads: Likewise.
* libgnat/a-coinho__shared.ads: Likewise.
* libgnat/a-coinve.ads: Likewise.
* libgnat/a-comutr.ads: Likewise.
* libgnat/a-convec.ads: Likewise.
* libgnat/a-coorma.ads: Likewise.
* libgnat/a-coormu.ads: Likewise.
* libgnat/a-coorse.ads: Likewise.
* libgnat/a-crdlli.ads: Likewise.
* libgnat/a-except.ads: Likewise.
* libgnat/a-finali.ads: Likewise.
* libgnat/a-ngcoty.ads: Likewise.
* libgnat/a-strbou.ads: Likewise.
* libgnat/a-stream.ads: Likewise.
* libgnat/a-strmap.ads: Likewise.
* libgnat/a-strunb.ads: Likewise.
* libgnat/a-strunb__shared.ads: Likewise.
* libgnat/a-ststio.ads: Likewise.
* libgnat/a-stwibo.ads: Likewise.
* libgnat/a-stwima.ads: Likewise.
* libgnat/a-stwiun.ads: Likewise.
* libgnat/a-stwiun__shared.ads: Likewise.
* libgnat/a-stzbou.ads: Likewise.
* libgnat/a-stzmap.ads: Likewise.
* libgnat/a-stzunb.ads: Likewise.
* libgnat/a-stzunb__shared.ads: Likewise.
* libgnat/a-tags.ads: Likewise.
* libgnat/i-cstrin.ads: Likewise.
* libgnat/s-stopoo.ads: Likewise.
* libgnat/s-stposu.ads: Likewise.
* libgnat/system-aix.ads: Likewise.
* libgnat/system-darwin-arm.ads: Likewise.
* libgnat/system-darwin-ppc.ads: Likewise.
* libgnat/system-darwin-x86.ads: Likewise.
* libgnat/system-djgpp.ads: Likewise.
* libgnat/system-dragonfly-x86_64.ads: Likewise.
* libgnat/system-freebsd.ads: Likewise.
* libgnat/system-gnu.ads: Likewise.
* libgnat/system-hpux-ia64.ads: Likewise.
* libgnat/system-hpux.ads: Likewise.
* libgnat/system-linux-alpha.ads: Likewise.
* libgnat/system-linux-arm.ads: Likewise.
* libgnat/system-linux-hppa.ads: Likewise.
* libgnat/system-linux-ia64.ads: Likewise.
* libgnat/system-linux-loongarch.ads: Likewise.
* libgnat/system-linux-m68k.ads: Likewise.
* libgnat/system-linux-mips.ads: Likewise.
* libgnat/system-linux-ppc.ads: Likewise.
* libgnat/system-linux-riscv.ads: Likewise.
* libgnat/system-linux-s390.ads: Likewise.
* libgnat/system-linux-sh4.ads: Likewise.
* libgnat/system-linux-sparc.ads: Likewise.
* libgnat/system-linux-x86.ads: Likewise.
* libgnat/system-lynxos178-ppc.ads: Likewise.
* libgnat/system-lynxos178-x86.ads: Likewise.
* libgnat/system-mingw.ads: Likewise.
* libgnat/system-qnx-arm.ads: Likewise.
* libgnat/system-rtems.ads: Likewise.
* libgnat/system-solaris-sparc.ads: Likewise.
* libgnat/system-solaris-x86.ads: Likewise.
* libgnat/system-vxworks-ppc-kernel.ads: Likewise.
* libgnat/system-vxworks-ppc-rtp-smp.ads: Likewise.
* libgnat/system-vxworks-ppc-rtp.ads: Likewise.
* libgnat/system-vxworks7-aarch64-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-aarch64.ads: Likewise.
* libgnat/system-vxworks7-arm-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-arm.ads: Likewise.
* libgnat/system-vxworks7-ppc-kernel.ads: Likewise.
* libgnat/system-vxworks7-ppc-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-ppc64-kernel.ads: Likewise.
* libgnat/system-vxworks7-ppc64-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-x86-kernel.ads: Likewise.
* libgnat/system-vxworks7-x86-rtp-smp.ads: Likewise.
* libgnat/system-vxworks7-x86_64-kernel.ads: Likewise.
* libgnat/system-vxworks7-x86_64-rtp-smp.ads: Likewise.
|
|
gcc/ada/ChangeLog:
* s-pack.adb.tmpl: Typo fix in comment.
|
|
Previously all assertion level pragmas were marked based on the
current scope. Additionally some pragmas were marked afterwards
based on the relevant entity e.g. Pre. This would lead to cases
where a pragma was marked as both ignored and checked ghost pragma.
Each pragma should get marked only once based on their individual
semantics.
gcc/ada/ChangeLog:
* sem_prag.adb (Analyze_Pragma): Set Mark_Ghost_Code individually
based on the semantics of each pragma.
|
|
gcc/ada/ChangeLog:
* ghost.adb (Mark_Ghost_Declaration_Or_Body): Mark ghost
entity explicitly as ignored or checked.
|
|
gcc/ada/ChangeLog:
* ghost.adb (Check_Ghost_Policy): ignore ghost policy changes
within instantiation statements.
|
|
gcc/ada/ChangeLog:
* ghost.adb (Check_Ghost_Policy): Use the policy in affect for
the identifier at the current moment instead of the region
around it when checking a policy change for a procedure call.
|
|
Declarations should take the ghost policy from the region if
they do not have an explicit ghost aspect/pragam themselves.
gcc/ada/ChangeLog:
* ghost.adb (Mark_And_Set_Ghost_Declaration): apply the
ghost policy and level from the declaration only if the declaration
has an explicit ghost aspect/pragma.
|
|
aspects
This patch fixes the identification of inherited subprograms as primitive
operations via the Is_Primitive flag. This is essential in the context of the
new legality check which makes sure that, if any subprogram denoted by a
nonoverridable aspect of a type T with formal or return of either type T or
access T, then all denoted subprograms should be primitive operations. Note
that all valid interpretations of a subprogram are denoted by the aspect under
evaluation, all of these needs to be primitive then.
This is a respin of eng/toolchain/gnat!2039
gcc/ada/ChangeLog:
* sem_ch13.adb (Check_Nonoverridable_Aspect_Subprograms): Add the new
legality check in Check_Nonoverridable_Aspect_Subprograms for
nonoverridable aspects to check whether the denoted subprograms satisfy
MR 13.1.1(18.4/6), otherwise we emit an error. Fix spacing.
* sem_ch6.adb (New_Overloaded_Entity): Set Is_Primitive flag
for inherited primitives, and filter out homonym candidates without a
function specification as parents.
|
|
Pragma Attach_Handler and Interrupt_Handler are only legal for procedures
declared in protected definition. When given for procedures declared in
protected body, they were wrongly accepted and triggered an odd error message
from expansion.
gcc/ada/ChangeLog:
* sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Refine test for
protected procedures; fix typo in comment.
|
|
These pragamas are already disabled if the relative ghost entity
is disabled.
gcc/ada/ChangeLog:
* ghost.adb (Is_OK_Pragma): mark the context of ignored ghost
pragmas as OK.
|
|
Unsuccessful preanalyze_and_resolve still marks identifiers as Any_Id.
Override that result if an identifier matched an assertion level.
gcc/ada/ChangeLog:
* ghost.adb (Assertion_Level_From_Arg): Ensure that assertion level
is stored as the entity for its reference.
(Enables_Ghostness): Derive the result from whether or not the
an argument indicated an assertion level.
* tbuild.adb (Make_Assertion_Level): ensure that assertion levels
have a standard scope.
|
|
When overflow checks are eliminated using System.Bignums package, we must
check if secondary stack that is necessary for this package is available.
gcc/ada/ChangeLog:
* checks.adb (Make_Bignum_Block): Check restriction No_Secondary_Stack.
|
|
When one of those levels is present then we should not look
for the policy in the policy stack but rather determine the
policy immidiately like we do in Check_Applicable_Policy.
gcc/ada/ChangeLog:
* sem_util.adb (Policy_In_Effect): Add special handling
for Runtime and Static values.
|
|
When optimizations are enabled, the runtime for delays is inlined and expanded.
If No_Tasking is set globally, for instance via a configuration file, then the
initialization of _Master, _Chain, and _Task_Name formals is skipped for task
entities. Later during expansion, these identifiers are expected but won't be
found, crashing the compiler. This patch fixes Init_Formals by removing the
check on Global_No_Tasking. If a No_Tasking restriction applies, then a
violation error will be raised when analyzing the task type.
gcc/ada/ChangeLog:
* exp_ch3.adb (Init_Formals): Remove the check on Global_No_Tasking.
* sem.adb: Fix typo.
|
|
The compiler fails when compiling a container aggregate with
an element association with a key choice that denotes a constant
object. The code for getting the value of the choice was only
accounting for the possibility of integer and enumeration literals,
and is corrected to handle static expressions generally.
gcc/ada/ChangeLog:
* exp_aggr.adb (Build_Container_Aggr_Code.To_Int): Replace existing
conditional expression with call to Expr_Value.
|
|
To standardize the comparisson between the levels of ghost
entities and levels of assertion pragmasTo standardize the comparisson
between the levels of ghost
entities and levels of assertion pragmas.
gcc/ada/ChangeLog:
* sem_ch13.adb (Analyze_Aspect_Specifications): add default
assertion level to assertion aspects.
* sem_prag.adb (Analyze_Pragma): Likewise.
|
|
As explained in the comments, the CodePeer_Mode AST isn't well-formed
for a GCC back-end, but is fine for a CodePeer one. The checks ensuring
that the AST is well-formed thus need to be disabled.
gcc/ada/ChangeLog:
* exp_ch6.adb (Check_BIP_Actuals, Process_Node): Disable checks.
|
|
This patch adds support for a new GNAT aspect/pragma for integer
type definitions to explicitly enforce the use of an unsigned
base type.
gcc/ada/ChangeLog:
* aspects.ads (Aspect_Unsigned_Base_Range): New aspect.
* checks.adb (Determine_Range): Handle types with unsigned base range aspect.
(Enable_Overflow_Check): ditto
(Apply_Arithmetic_Overflow_Strict): ditto
* debug.adb (d_o): Document new usage.
* einfo.ads (Has_Unsigned_Base_Range_Aspect): New flag.
* exp_attr.adb (Expand_N_Attribute_Reference): No action since
it has been already handled at this stage.
* exp_ch4.adb (Expand_N_Op_Add): Generate aritmetic overflow check on
unsigned base range type operands.
(Expand_N_Op_Subtract): ditto
(Expand_N_Op_Multiply): ditto
(Expand_N_Op_Minus): ditto
* gen_il-fields.ads (Has_Unsigned_Base_Range_Aspect): New flag.
* gen_il-gen-gen_entities.adb (Has_Unsigned_Base_Range_Aspect): New flag.
* gen_il-internals.adb (Has_Unsigned_Base_Range_Aspect): New flag.
* gnat1drv.adb (Adjust_Global_Switches): Handle -gnatd_o
* par-prag.adb (Pragma_Unsigned_Base_Range): No action since it will
be entirely handled by the semantic analyzer.
* rtsfind.ads (RE_Id): Add RE_Uns_[Add|Subtract|Multiply]_With_ Ovflo_Check
* sem_attr.ads (Attribute_Unsigned_Base_Range): Added to the set of
implementation defined attributes.
* sem_attr.adb (Analyze_Attribute): Analyze attribute Unsigned_Base_Range.
(Eval_Attribute): Evaluate attribute Unsigned_Base_Range.
* sem_ch13.adb (Analyze_One_Aspect): Defer checks for this aspect to
the analysis of the corresponding pragma.
* sem_ch3.ads (Unsigned_Base_Range_Type_Declaration): New subprogram.
* sem_ch3.adb (Build_Derived_Numeric_Type): Inherit flag
Has_Unsigned_Base_Range_Aspect.
(Unsigned_Base_Range_Type_Declaration): New subprogram.
(Has_Pragma_Unsigned_Base_Range): New subprogram.
* sem_prag.adb (Analyze_Pragma): Handle Pragma_Unsigned_Base_Range.
* snames.adb-tmpl (Get_Pragma_Id): Handle Name_Unsigned_Base_Range.
(Is_Pragma_Name): ditto.
* snames.ads-tmpl (Name_Unsigned_Base_Range): New name.
(Attribute_Unsigned_Base_Range): New attribute.
(Pragma_Unsigned_Base_Range): New pragma.
* libgnat/s-aridou.ads (Add_With_Ovflo_Check): New routine for Double_Uns.
(Subtract_With_Ovflo_Check): ditto.
(Multiply_With_Ovflo_Check): ditto.
* libgnat/s-aridou.adb (Add_With_Ovflo_Check): ditto.
(Subtract_With_Ovflo_Check): ditto.
(Multiply_With_Ovflo_Check): ditto.
* libgnat/s-arit64.ads (Uns_Add_With_Ovflo_Check64): New subprogram.
(Uns_Subtract_With_Ovflo_Check64): ditto.
(Uns_Multiply_With_Ovflo_Check64): ditto.
* libgnat/s-arit64.adb (Uns_Add_With_Ovflo_Check64): New subprogram.
(Uns_Subtract_With_Ovflo_Check64): ditto.
(Uns_Multiply_With_Ovflo_Check64): ditto.
* libgnat/s-arit128.ads (Uns_Add_With_Ovflo_Check128): New subprogram.
(Uns_Subtract_With_Ovflo_Check128): ditto.
(Uns_Multiply_With_Ovflo_Check128): ditto.
* libgnat/s-arit128.adb (Uns_Add_With_Ovflo_Check128): New subprogram.
(Uns_Subtract_With_Ovflo_Check128): ditto.
(Uns_Multiply_With_Ovflo_Check128): ditto.
* doc/gnat_rm/gnat_language_extensions.rst: Document unsigned
base range.
* gnat_rm.texi: Regenerate.
* gnat_ugn.texi: Regenerate.
|
|
Adds support for the new language feature that allows ghost enties and
assertion pragmas and aspects to be associated with a new entity called
assertion level.
Added support for a new pragma Assertion_Level that declares new
assertion levels. This pragma consists of the level name and assertion
levels it depends on.
pragma Assertion_Level (L1);
pragma Assertion_Level (L2);
pragma Assertion_Level (L3, Depends => [L1, L2]);
There are two special assertion levels that are considered to be
declared in the Standard package that have unique properties.
Assertion level Runtime is always considered to be Checked. Its
assertion policy cannot be changed and it is considered that all other
assertion levels depend on this level.
Assertion level Static is always considered to be Ignored. Its assertion
policy cannot be changed. All assertion levels that depend on this
level can also never be activated.
Aspect Ghost now supports the assertion level as a possible argument:
... with Ghost => Level;
All pragmas and aspects which were considered to be valid assertion
kinds for pragma Assertion_Policy now support assertion level
associations. The association consists of an assertion level and a set
of existing arguments. Note that you can have multiple assertion level
associations in a given pragma or aspect. e.g.
pragma Assert (Level1 => (Check => Expr1, Message => "Msg1",
Level2 => (Check => Expr2, Message => "Msg2"));
It is possible to set an explicit Assertion_Policy for those levels
which can control the policies for all entities associated with those
levels.
Setting the policy Check for a given level means also that policy Check
is set for all of the policies that it depends on. From the previous
example.
pragma Assertion_Policy (L3 => Check);
is equivalent to:
pragma Assertion_Policy (L1 => Check);
pragma Assertion_Policy (L2 => Check);
pragma Assertion_Policy (L3 => Check);
Setting the policy Ignore for a given level means that the policy Ignore
is also applied to all the levels that depend on it. e.g
pragma Assertion_Policy (L2 => Ignore);
is equivalent to:
pragma Assertion_Policy (L2 => Ignore);
pragma Assertion_Policy (L3 => Ignore);
Since now ghost regions can contain other ghost regions with a different
assertion policy then new rules needed to be added for those situations
to ensure valid compilation.
Additionally all rules where we checked for compatible assertion
policies have an additional check for a compatible assertion level dependencies.
Ghost entities A and B are considered assertion level dependent when
* A or B does not have an associated assertion level.
* Both A and B have an assertion level and either
* the level of A is or depends on the level of B.
* the level of B cannot be enabled (is or depends on Static)
gcc/ada/ChangeLog:
* atree.adb (Mark_New_Ghost_Node): Store the assertion level on the
entity.
* contracts.adb (Analyze_Package_Contract): Add support for multiple
pragma Initial_Condition orginating from multiple assertion levels.
* cstand.adb (Make_Assertion_Level_Definition): New function that
creates a new Assertion_Level and adds it to the Assertion_Levels
table.
(Create_Standard): Add definitions for assertion levels defined in
Standard.
(Print_Standard): Add assertion level pragmas do the output.
* exp_ch6.adb (Check_Subprogram_Variant): Add support for multiple
Subprogram_Variant pragmas created by assertion levels.
* einfo.ads: add info for the new nodes and attributes.
* exp_prag.adb (Consequence_Error): Fix error message string
corruption caused by another call to the internal strings during
the call to Make_Procedure_Call_Statement.
(Expand_Pragma_Initial_Condition): Ensure all ghost related
attributes are copied to the new pragma.
(Expand_Pragma_Loop_Variant): Likewise.
(Expand_Pragma_Subprogram_Variant). Likewise. Additionally
create a new Subprogram_Variant function for each pragma associated
with an assertion level.
* exp_util.adb (Add_DIC_Check): Ensure all ghost related attributes
are copied to the new pragma.
(Build_DIC_Procedure_Body): Add support for mutliple DIC pragmas
created from assertion levels.
* gen_il-fields.ads:
(Aspect_Ghost_Assertion_Level): New field.
(Original_Aspect): New field.
(Original_Pragma): New field.
(Pragma_Ghost_Assertion_Level): New field.
(Child_Levels): New field.
(Ghost_Assertion_Level): New field.
(Parent_Levels): New field.
* gen_il-gen-gen_entities.adb:
Add Ghost_Assertion_Level field for all entities
Add new E_Assertion_Level entity for storing assertion levels.
* gen_il-gen-gen_nodes.adb:
Add Aspect_Ghost_Assertion_Level for N_Aspect to store the
assertion level associated with the aspect.
Add Original_Aspect to store the original aspect where the aspect
that was transformed from an aspect with an assertion level
origninated from.
Add Pragma_Ghost_Assertion_Level and Original_Pragma to store
the same information for N_Prama nodes.
* gen_il-types.ads: Add new entity kind E_Assertion_Level
* ghost.adb (Assertion_Level_Error_Msg): Create constant for
error messages using the same main error message.
(Ghost_Policy_Error_Msg): Likewise.
(Assertion_Level_To_Name): New subprogram.
(Check_Valid_Ghost_Declaration): New subprogram.
(Get_Ghost_Aspect): New subprogram.
(Get_Ghost_Assertion_Level): New subprogram.
(Ghost_Policy_In_Effect): New subprogram.
(Install_Ghost_Region): New subprogram.
(Mark_And_Set_Ghost_Region): New subprogram.
(Mark_Ghost_Declaration_Or_Body): Add new argument for assertion
levels.
(Check_Ghost_Completion): Update ghost policy calculation with
assertion levels. Refactor error message.
(Is_OK_Statement): Add new checks for valid assertion policies and
assertion levels.
(Is_OK_Pragma): Refactor the calculation of valid ghost pragmas.
(Check_Ghost_Policy): Make the checks ghost region based.
(Check_Ghost_Context): Refactor the order of checks.
(Check_Ghost_Formal_Procedure_Or_Package): Relax the checks for
overriding procedures. Now only ignored subprograms cannot be
overridden by checked or non-ghost subprograms.
(Check_Ghost_Primitive): Relax conditions for primitve operations.
Now only checked primitive subprograms are considered invalid for
ignored tagged types. Add assertion level compatibility checks.
(Check_Ghost_Refinement): Relax conditions for ghost refinements.
Add assertion level compatibility checks for refinements.
(Install_Ghost_Region): Store the current region and the assertion
for that region in the ghost config.
(Enables_Ghostness): Refactor implementation to support assertion
levels.
(Is_Subject_To_Ghost): Simplify implementation.
(Mark_And_Set_Ghost_Assignment): Refactor implementation.
(Mark_And_Set_Ghost_Body): Add support for assertion levels.
(Mark_And_Set_Ghost_Completion): Likewise.
(Mark_And_Set_Ghost_Declaration): Likwise.
(Mark_And_Set_Ghost_Instantiation): Likwise.
(Mark_And_Set_Ghost_Procedure_Call): Refactor implementation.
(Mark_Ghost_Declaration_Or_Body): Add support for assertion levels.
(Set_Ghost_Mode): Likwise.
* ghost.ads (Assertion_Level_From_Arg): New subprogram.
(Install_Ghost_Region): Add argument Level for assertrion levels.
(Is_Assertion_Level_Dependent): New subprogram.
* lib-xref.ads: Add new mapping for E_Assertion_Level entities.
* opt.ads (Ghost_Config_Type): Add new members Ghost_Assertion_Mode
and Current_Region to the structure.
* par-prag.adb (Prag): Add new pragma name Assertion_Level.
* rtsfind.adb (Load_RTU): Update the arguments for the call to
Install_Ghost_Region.
* sem.adb (Do_Analyze): Likewise.
* sem_ch13.adb (Convert_Aspect_With_Assertion_Levels): New
subprogram.
(Make_Aitem_Pragma): Copy ghost mode attributes from the aspect to
the pragma.
(Analyze_Aspect_Specifications): Convert aspects that have an
assertion level association in the aspects without the association
and the original supported syntax and with the assertion level
stored on the aspect node.
Updated duplicate detection to avoid duplicates being called on
aspects with assertion levels that orginated from the same aspect.
* sem_prag.adb (Apply_Check_Policy): New subprogram.
(Get_Applicable_Policy): New subprogram.
(Mark_Is_Checked): New subprogram.
(Mark_Is_Disabled): New subprogram.
(Mark_Is_Ignored): New subprgram.
(Check_Arg_Is_One_Of): Remove versions that had a specific number
of arguments and replace them with a list one.
(Create_Pragma_Without_Assertion_Level): New subprogram.
(Assertion_Level_Pragma_Comes_From_Source): New subprogram.
(Analyze_Pragma): Replace aspects that have an assertion level
with aspects without them where the level is stored on the pragma
node.
(Abstract_State): Add support for assertion levels in ghost
Abstract_State pragmas.
(Assert): Update argument handling for Assert like pragmas.
(Assertion_Level): Add a new section to support the analysis of
pragma Assertion_Level.
(Assertion_Policy): Add support for setting the policy for assertion
levels.
(Check): Update argument handling. Update the assertion policy
application process.
(Check_Policy): Add support for assertion levels. Add check_policy
pragmas for assertion_level dependencis also to the stack of
known Check_Policy pragmas.
(Default_Initial_Condition): Reject the use of DIC with assertion
levels. Update duplication checks.
(Ghost): Add support for assertion levels. Fix issue where
assertion levels with Ghost => False were treated as ghost.
(Predicate): Update the policy handling of Ghost_Predicate.
(Analyze_Refined_State_In_Decl_Part): Create a new ghost region
for analyzing Refined_State.
(Check_Applicable_Policy): Refactor the implementation. Break it
down to Get_Applicable_Policy and Apply_Check_Policy.
(Check_Kind): Removed. Replaced by Get_Applicable_Policy and
Apply_Check_Policy.
(Initialize): Initialize the table storing all know assertion
levels.
* sem_prag.ads (Find_Assertion_Level): New subprogram.
(Insert_Assertion_Level): New subprogram.
(Check_Applicable_Policy): Add new argument Level.
(Check_Kind): Removed. Merged with Get_Applicable_Policy.
(Get_Assertion_Level): New subprogram.
(Is_Valid_Assertion_Level): New subprogram.
* sem_util.adb (Copy_Assertion_Policy_Attributes): New function
for copying the ghost related attributes from one pragma to
another.
(Copy_Subprogram_Spec): Additionally copy the level from the spec.
(Depends_On_Level): New function for checking if one level depends
on another level.
(From_Same_Aspect): New function for checking whether the aspects
orignate from the same original aspect.
(From_Same_Pragma): New function for checking whether the pragmas
originate from the same original aspect or pragma.
(Get_Subprogram_Entity): Avoid crash when being called when the
entity has not been set for the subprogram.
(Has_Assertion_Level_Argument): New function for checking whether
the aspect or a pragma has an argument that is using an assertion
level association.
(Policy_In_Effect): add an additional argument for the level that
should be checked along with the assertion name.
* sem_util.ads (Copy_Assertion_Policy_Attributes): New function.
(Depends_On_Level): Likewise.
(From_Same_Aspect): Likewise.
(From_Same_Pragma): Likewise.
(Has_Assertion_Level_Argument): Likewise.
(Is_Same_Or_Depends_On_Level): Likewise.
(Policy_In_Effect): Add new argument Level.
* sinfo.ads: Add documentation for all the new attributes that
were added to the nodes and entities.
* snames.ads-tmpl: Add new entries for Name_Assertion_Level,
Name_uDefault_Assertion_Level and Pragma_Assertion_Level.
* stand.ads: Add new entities for the predefined assertion levels.
(Standard_Level_Static): Definition for the predefined Static
level that is always ignored.
(Standard_Level_Runtime): Defintion for the predefined Runtime
level that is always checked.
(Standard_Level_Default): Definition for the implicit Default
level that is given for ghost entities that were not associated
with an assertion level (e.g. Ghost => True).
* tbuild.adb (Make_Assertion_Level): New function for constructin
an assertion level.
* tbuild.ads (Make_Assertion_Level): Likewise.
|
|
This works around a dblatex bug, where dblatex emits invalid TeX, by
placing a raw "#" in a \href.
Fixes: f6ff531d907d ("libstdc++: Update link to "Tunables" in Glibc manual")
libstdc++-v3/ChangeLog:
* doc/xml/manual/using_exceptions.xml: Replace "Tunables" link
with one that does not have an anchor.
* doc/html/manual/using_exceptions.html: Regenerate.
|
|
Signed-off-by: Matthias Kretz <m.kretz@gsi.de>
gcc/testsuite/ChangeLog:
PR c++/121801
* g++.dg/abi/pr121801.C: New test.
gcc/cp/ChangeLog:
PR c++/121801
* mangle.cc (write_real_cst): Handle 16-bit real and assert
that reals have 16 bits or a multiple of 32 bits.
|
|
Enable SSE4.1 ceil/floor/trunc for -Os to replace a function call with
roundss or roundsd by dropping the !flag_trapping_math check.
gcc/
PR target/121861
* config/i386/i386.cc (ix86_optab_supported_p): Drop
!flag_trapping_math check for floor_optab, ceil_optab and
btrunc_optab.
gcc/testsuite/
PR target/121861
* gcc.target/i386/pr121861-1a.c: New file.
* gcc.target/i386/pr121861-1b.c: Likewise.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
gcc/ChangeLog:
* config/i386/i386-expand.cc (expand_vec_perm_vpermil): Extend
to handle V8SImode.
* config/i386/i386.cc (avx_vpermilp_parallel): Extend to
handle vector integer modes with same vector size and same
component size.
* config/i386/sse.md
(<sse2_avx_avx512f>_vpermilp<mode><mask_name>): Ditto.
(V48_AVX): New mode iterator.
(ssefltmodesuffix): Extend for V16SI/V8DI/V16SF/V8DF.
gcc/testsuite/ChangeLog:
* gcc.target/i386/avx256_avoid_vec_perm-3.c: New test.
* gcc.target/i386/avx256_avoid_vec_perm-4.c: New test.
* gcc.target/i386/avx512bw-vpalignr-4.c: Adjust testcase.
* gcc.target/i386/avx512vl-vpalignr-4.c: Ditto.
|
|
SLP may take a broadcast as kind of vec_perm, the patch checks the
permutation index to exclude those false positive.
gcc/ChangeLog:
* config/i386/i386.cc (ix86_vector_costs::add_stmt_cost):
Check permutation index for vec_perm, don't count it if we
know it's not a cross-lane permutation.
gcc/testsuite/ChangeLog:
* gcc.target/i386/avx256_avoid_vec_perm.c: Adjust testcase.
* gcc.target/i386/avx256_avoid_vec_perm-2.c: New test.
* gcc.target/i386/avx256_avoid_vec_perm-5.c: New test.
|
|
|
|
This fixes:
FAIL: 17_intro/badnames.cc -std=gnu++26 (test for excess errors)
libstdc++-v3/ChangeLog:
* include/std/type_traits (constant_wrapper): Rename template
parameter to avoid BADNAME.
|
|
Set a tentative TLS model in grokvardecl and update TLS mode with the
default TLS access model after a TLS variable has been fully processed
if the default TLS access model is stronger.
gcc/c/
PR c/107419
* c-decl.cc (c_decl_attributes): Update TLS model with the
default TLS access model if the default TLS access model is
stronger.
(grokdeclarator): Set a tentative TLS model which will be
updated by c_decl_attributes later.
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
|
libstdc++-v3/ChangeLog:
PR libstdc++/120698
* doc/xml/manual/configure.xml: Do not claim that vtv is enabled
by default.
* doc/html/manual/configure.html: Regenerate.
|
|
This patch fixes Makefile.in to include mention of new syncbuf.lo.
libstdc++-v3/Changelog:
* src/c++20/Makefile.in: Mention syncbuf.lo.
|
|
This is about -fdump-ada-spec not generating the definition of the structure
for pointers to anonymous structure as structure elements.
gcc/c-family:
PR ada/121544
* c-ada-spec.cc (dump_ada_node) <POINTER_TYPE>: Dump the name of
anonymous tagged pointed-to types specially.
(dump_nested_type) <POINTER_TYPE>: Recurse on anonymous pointed-to
types declared in the same file.
Set TREE_VISITED on the underlying DECL of the field type, if any.
|
|
This tentatively applies the same tweak as in other similar cases.
gcc/testsuite/
PR ada/121532
* ada/acats-4/tests/cxa/cxai033.a: Use Long_Switch_To_New_Task
constant instead of Switch_To_New_Task in delay statements.
|
|
This patch creates a global function __syncbuf_get_mutex, gated by
_GLIBCXX_HAS_GTHREADS, replacing a static instantiated member
_S_get_mutex used in syncbuf<> construction, and makes the global
symbol visible. A static local table of 16 mutexes is shared among
all specializations of syncbuf<>, chosen on construction by a hash
of the wrapped streambuf's address.
It detaches the implementation of _S_get_mutex from the C++20 ABI.
libstdc++-v3/ChangeLog:
* include/std/syncstream: (syncbuf<>::__mutex) Remove _S_get_mutex,
use extern function instead.
* src/c++20/syncbuf.cc: Define global __syncbuf_get_mutex.
* src/c++20/Makefile.am: Mention syncbuf.cc.
* src/c++20/Makefile.in: Regenerate.
* config/abi/pre/gnu.ver: Mention mangled __syncbuf_get_mutex.
|
|
Besides r16-3595, there's another bug in this test: with -std=c23 the
token _Sat isn't recognized as a keyword at all, thus an error massage
different from the expected will be outputted.
Fix it by using -std=gnu23 instead.
gcc/testsuite:
* gcc.dg/fixed-point/bitint-1.c (dg-options): Use -std=gnu23
instead of -std=c23.
|
|
When there's an asm goto in the latch of a loop we may not use
IP_END IVs since instantiating those would (need to) split the
latch edge which in turn invalidates IP_NORMAL position handling.
This is a revision of the PR107997 fix.
PR tree-optimization/107997
PR tree-optimization/121844
* tree-ssa-loop-ivopts.cc (allow_ip_end_pos_p): Do not allow
IP_END for latches ending with a control stmt.
(create_new_iv): Do not split the latch edge, instead assert
that's not necessary.
* gcc.dg/torture/pr121844.c: New testcase.
|
|
This pattern enables the combine pass (or late-combine, depending on the case)
to merge a float_extend'ed vec_duplicate into a plus RTL instruction.
Before this patch, we have four instructions, e.g.:
fcvt.d.s fa0,fa0
vsetvli a5,zero,e64,m1,ta,ma
vfmv.v.f v3,fa0
vfwadd.wv v1,v3,v2
After, we get only one:
vfwadd.vf v1,v2,fa0
gcc/ChangeLog:
* config/riscv/autovec-opt.md (*vfwadd_vf_<mode>): New pattern to
combine float_extend + vec_duplicate + vfwadd.vv into vfwadd.vf.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f16.c: Add vfwadd.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_binop.h
(DEF_VF_BINOP_WIDEN_CASE_0): Fix OP.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfwadd-run-1-f16.c: New test.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfwadd-run-1-f32.c: New test.
|
|
If-conversion isn't being applied to this nbench code:
#include <stdint.h>
#define INTERNAL_FPF_PRECISION 4
typedef uint16_t u16;
void ShiftMantLeft1(u16 *carry, u16 *mantissa)
{
int i;
int new_carry;
u16 accum;
for(i=INTERNAL_FPF_PRECISION-1;i>=0;i--)
{ accum=mantissa[i];
new_carry=accum & 0x8000;
accum=accum<<1;
if(*carry)
accum|=1;
*carry=new_carry;
mantissa[i]=accum;
}
return;
}
Bumping branch_cost from 3 to 4 triggers if-conversion, improving the
nbench FP EMULATION result on Ascalon significantly. There's a risk
that more aggressive use of conditional zero instructions will negatively
impact workloads that predict well, but we haven't seen anything obvious.
gcc/ChangeLog:
* config/riscv/riscv.cc (tt_ascalon_d8_tune_info): Increase branch_cost
from 3 to 4.
|
|
The SLP reduc-index computation is confused by having an outer reduction
inner loop nested cycle fed by another non-reduction nested cycle.
Instead of undoing the unfortunate mixing of outer reduction inner
cycles with general nested cycles the following instead distinguishes
them by not setting STMT_VINFO_REDUC_DEF on the non-reduction nested
cycles.
PR tree-optimization/121830
* tree-vect-loop.cc (vect_analyze_scalar_cycles_1): Only
set STMT_VINFO_REDUC_DEF on reductions.
* tree-vect-slp.cc (vect_build_slp_tree_2): Identify reduction
PHIs by a set STMT_VINFO_REDUC_DEF instead of their def type.
* gcc.dg/vect/pr121830.c: New testcase.
|
|
When the vectorizer removes a forwarder created earlier by split_edge
it uses redirect_edge_pred for convenience and efficiency. That breaks
down when the edge split is originating from an asm goto as that is
a jump that needs adjustments from redirect_edge_and_branch. The
following factores a simple vect_remove_forwarder handling this
situation appropriately.
PR tree-optimization/121829
* tree-vect-loop-manip.cc (vect_remove_forwarder): New
function.
(slpeel_tree_duplicate_loop_to_edge_cfg): Use it.
* gcc.dg/torture/pr121829.c: New testcase.
|
|
I noticed that the -fdump-tree-*-folding flag isn't documented in
the Developer options section of invoke.texi; this patch fixes that.
gcc/ChangeLog:
PR tree-optimization/114892
* doc/invoke.texi (Developer Options): Document -folding option
for -fdump-tree-*.
|
|
Fix ICE with AutoFDO by adding initialization check
before accessing IPA counts to avoid issues with uninitialized profile
counts in self-recursive clone processing.
gcc/ChangeLog:
2025-09-08 Kugan Vivekanandarajah <kvivekananda@nvidia.com>
* ipa-cp.cc (gather_count_of_non_rec_edges): Check count
initialization before adding to total.
Signed-off-by: Kugan Vivekanandarajah <kvivekananda@nvidia.com>
|
|
This pattern enables the combine pass (or late-combine, depending on the case)
to merge a vec_duplicate into a minus RTL instruction. The vec_duplicate is the
minuend operand.
Before this patch, we have two instructions, e.g.:
vfmv.v.f v2,fa0
vfsub.vv v1,v2,v1
After, we get only one:
vfrsub.vf v1,v1,fa0
gcc/ChangeLog:
* config/riscv/autovec-opt.md (*vfrsub_vf_<mode>): New pattern to
combine vec_duplicate + vfsub.vv into vfrsub.vf.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f16.c: Add vfrsub.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_binop_data.h: Add data for
vfrsub.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfrsub-run-1-f16.c: New test.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfrsub-run-1-f32.c: New test.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfrsub-run-1-f64.c: New test.
|
|
This pattern enables the combine pass (or late-combine, depending on the case)
to merge a vec_duplicate into a minus RTL instruction. The vec_duplicate is the
subtrahend operand.
Before this patch, we have two instructions, e.g.:
vfmv.v.f v2,fa0
vfsub.vv v1,v1,v2
After, we get only one:
vfsub.vf v1,v1,fa0
gcc/ChangeLog:
* config/riscv/autovec-opt.md (*vfsub_vf_<mode>): New pattern to
combine vec_duplicate + vfsub.vv into vfsub.vf.
* config/riscv/vector.md (@pred_<optab><mode>_scalar): Allow VLS modes.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/vls/floating-point-sub-2.c: Adjust scan
dumps.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f16.c: Add vfsub.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_binop_data.h: Add data for
vfsub.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfsub-run-1-f16.c: New test.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfsub-run-1-f32.c: New test.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfsub-run-1-f64.c: New test.
|
|
This pattern enables the combine pass (or late-combine, depending on the case)
to merge a vec_duplicate into a plus RTL instruction.
Before this patch, we have two instructions, e.g.:
vfmv.v.f v2,fa0
vfadd.vv v1,v1,v2
After, we get only one:
vfadd.vf v1,v1,fa0
gcc/ChangeLog:
* config/riscv/autovec-opt.md (*vfadd_vf_<mode>): New pattern to
combine vec_duplicate + vfadd.vv into vfadd.vf.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/vls/floating-point-add-2.c: Adjust scan
dump.
* gcc.target/riscv/rvv/autovec/vls/floating-point-add-3.c: Likewise.
* gcc.target/riscv/rvv/autovec/vls/floating-point-sub-3.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f16.c: Add vfadd.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_binop_data.h: Add data for
vfadd.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfadd-run-1-f16.c: New test.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfadd-run-1-f32.c: New test.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfadd-run-1-f64.c: New test.
|
|
This pattern enables the combine pass (or late-combine, depending on the case)
to merge a float_extend'ed vec_duplicate into a mult RTL instruction.
Before this patch, we have six instructions, e.g.:
fcvt.d.s fa0,fa0
vsetvli a5,zero,e64,m1,ta,ma
vfmv.v.f v3,fa0
vfwcvt.f.f.v v1,v2
vsetvli zero,zero,e64,m1,ta,ma
vfmul.vv v1,v3,v1
After, we get only one:
vfwmul.vf v1,v2,fa0
gcc/ChangeLog:
* config/riscv/autovec-opt.md (*vfwmul_vf_<mode>): New pattern to
combine float_extend + vec_duplicate + vfmul.vv into vfmul.vf.
* config/riscv/vector.md (*@pred_dual_widen_<optab><mode>_scalar):
Swap operands to match the RTL emitted by expand, i.e. first
float_extend then vec_duplicate.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f16.c: Add vfwmul.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-1-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-2-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-3-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-4-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_binop.h: Add support for
widening variants.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_binop_widen_run.h: New test
helper.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfwmul-run-1-f16.c: New test.
* gcc.target/riscv/rvv/autovec/vx_vf/vf_vfwmul-run-1-f32.c: New test.
|
|
These patterns enable the combine pass (or late-combine, depending on the case)
to merge a vec_duplicate into an unspec_vfmax RTL instruction.
Before this patch, we have two instructions, e.g.:
vfmv.v.f v2,fa0
vfmax.vv v1,v2,v1
After, we get only one:
vfmax.vf v1,v1,fa0
In some cases, it also shaves off one vsetvli.
gcc/ChangeLog:
* config/riscv/autovec-opt.md (*vfmin_vf_ieee_<mode>): Rename into...
(*v<ieee_fmaxmin_op>_vf_<mode>): New pattern to combine vec_duplicate +
vf{max,min}.vv (unspec) into vf{max,min}.vf.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/vx_vf/vf-5-f16.c: Add vfmax.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-5-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-5-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-6-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-6-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-6-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-7-f16.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-7-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-7-f64.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-8-f16.c: Add vfmax. Also add
missing -fno-fast-math.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-8-f32.c: Likewise.
* gcc.target/riscv/rvv/autovec/vx_vf/vf-8-f64.c: Likewise.
|
|
During the tests mentioned in
https://gcc.gnu.org/pipermail/gcc-patches/2025-August/692482.html
(but dunno why I haven't noticed it back in August but only when testing
https://gcc.gnu.org/pipermail/gcc-patches/2025-September/694527.html )
I've noticed two ext header problems.
One is that #include <ext/pointer.h> got broken with the
r13-3037-g18f176d0b25591e28 change and since then is no longer
self-contained, as it includes iosfwd only if _GLIBCXX_HOSTED is defined
but doesn't actually include bits/c++config.h to make sure it is defined,
then includes a bunch of headers which do include bits/c++config.h and
finally uses in #if _GLIBCXX_HOSTED guarded code what is declared in iosfwd.
The other problem is that ext/cast.h is also not a self-contained header,
but that one has
/** @file ext/cast.h
* This is an internal header file, included by other library headers.
* Do not attempt to use it directly. @headername{ext/pointer.h}
*/
comment, so I think we just shouldn't include it in extc++.h and let
ext/pointer.h include it.
2025-09-08 Jakub Jelinek <jakub@redhat.com>
PR libstdc++/121827
* include/precompiled/extc++.h: Don't include ext/cast.h which is an
internal header.
* include/ext/pointer.h: Include bits/c++config.h before
#if _GLIBCXX_HOSTED.
|