Age | Commit message (Collapse) | Author | Files | Lines |
|
With -fno-trapping-math it is safe to optimize fabs(a + 0.0) as
fabs (a).
PR tree-optimization/121595
* match.pd (fabs(a + 0.0) -> fabs (a)): Optimization pattern limited to
the -fno-trapping-math case.
* gcc.dg/fabs-plus-zero-1.c: New testcase.
* gcc.dg/fabs-plus-zero-2.c: Likewise.
Signed-off-by: Matteo Nicoli <matteo.nicoli001@gmail.com>
Reviewed-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
|
|
LSX and SCQ
Enable those tests so we won't make too stupid mistakes in 16B atomic
implementation anymore.
All these test passed on a Loongson 3C6000/S except
atomic-other-int128.c. With GDB patched to support sc.q
(https://sourceware.org/pipermail/gdb-patches/2025-August/220034.html)
this test also XPASS.
gcc/testsuite/ChangeLog:
* lib/target-supports.exp
(check_effective_target_loongarch_scq_hw): New.
(check_effective_target_sync_int_128_runtime): Return 1 on
loongarch64-*-* if hardware supports both LSX and SCQ.
* gcc.dg/atomic-compare-exchange-5.c: Pass -mlsx -mscq for
loongarch64-*-*.
* gcc.dg/atomic-exchange-5.c: Likewise.
* gcc.dg/atomic-load-5.c: Likewise.
* gcc.dg/atomic-op-5.c: Likewise.
* gcc.dg/atomic-store-5.c: Likewise.
* gcc.dg/atomic-store-6.c: Likewise.
* gcc.dg/simulate-thread/atomic-load-int128.c: Likewise.
* gcc.dg/simulate-thread/atomic-other-int128.c: Likewise.
(dg-final): xfail on loongarch64-*-* because gdb does not
handle sc.q properly yet.
|
|
In a CAS operation, even if expected != *memory we still need to do an
atomic load of *memory into output. But I made a mistake in the initial
implementation, causing the output to contain junk in this situation.
Like a normal atomic load, the atomic load embedded in the CAS semantic
is required to work on read-only page. Thus we cannot rely on sc.q to
ensure the atomicity of the load. Use LSX to perform the load instead,
and also use LSX to compare the 16B values to keep the ll-sc loop body
short.
gcc/ChangeLog:
* config/loongarch/sync.md (atomic_compare_and_swapti_scq):
Require LSX. Change the operands for the output, the memory,
and the expected value to LSX vector modes. Add a FCCmode
output to indicate if CAS has written the desired value into
memory. Use LSX to atomically load both words of the 16B value
in memory.
(atomic_compare_and_swapti): Pun the modes to satisify
the new atomic_compare_and_swapti_scq implementation. Read the
bool return value from the FCC instead of performing a
comparision.
|
|
This modifier is intended to output $r0 for (const_int 0), but the
logic:
GET_MODE (op) != TImode || (op != CONST0_RTX (TImode) && code != REG)
will reject (const_int 0) because (const_int 0) actually does not have
a mode and GET_MODE will return VOIDmode for it.
Use reg_or_0_operand instead to fix the issue.
gcc/ChangeLog:
* config/loongarch/loongarch.cc (loongarch_print_operand): Call
reg_or_0_operand for checking the sanity of %t.
|
|
libstdc++-v3/ChangeLog:
* include/std/syncstream: Remove trailing whitespace.
|
|
The PR reports
vectorizer.h:276:3: runtime error: load of value 32695, which is not a valid value for type 'internal_fn'
which I believe is from
slp_node->data = new vect_load_store_data (std::move (ls));
where 'ls' can be partly uninitialized (and that data will be not
used, but of course the move CTOR doesn't know this). The following
tries to fix that by using value-initialization of 'ls'.
PR tree-optimization/121703
* tree-vect-stmts.cc (vectorizable_store): Value-initialize ls.
(vectorizable_load): Likewise.
|
|
In general, tail call optimization requires that the callee's saved
registers are a superset of the caller's.
The Standard Vector Calling Convention Variant (assembler: .variant_cc)
requires that a function with this calling convention preserves vector
registers v1-v7 and v24-v31 across calls (i.e. callee-saved). However,
the same set of registers are (function-local) temporary registers
(i.e. caller-saved) on the normal (non-vector) calling convention.
Even if a function with this calling convention variant calls another
function with a non-vector calling convention, those vector registers
are correctly clobbered -- except when the sibling (tail) call
optimization occurs as it violates the general rule mentioned above.
If this happens, following function body:
1. Save v1-v7 and v24-v31 for clobbering
2. Call another function with a non-vector calling convention
(which may destroy v1-v7 and/or v24-v31)
3. Restore v1-v7 and v24-v31
4. Return.
may be incorrectly optimized into the following sequence:
1. Save v1-v7 and v24-v31 for clobbering
2. Restore v1-v7 and v24-v31 (?!)
3. Jump to another function with a non-vector calling convention
(which may destroy v1-v7 and/or v24-v31).
This commit suppresses cross CC sibling call optimization from
the vector calling convention variant.
gcc/ChangeLog:
* config/riscv/riscv.cc (riscv_function_ok_for_sibcall):
Suppress cross calling convention sibcall optimization from
the vector calling convention variant.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/base/abi-call-variant_cc-sibcall.c: New test.
* gcc.target/riscv/rvv/base/abi-call-variant_cc-sibcall-indirect-1.c: Ditto.
* gcc.target/riscv/rvv/base/abi-call-variant_cc-sibcall-indirect-2.c: Ditto.
|
|
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
* cfgloopmanip.cc (create_preheader): Ensure we can insert
at the end of a preheader.
* gcc.dg/torture/pr121829.c: New testcase.
|
|
When a dead EH or abnormal edge makes a call queued for noreturn fixup
unreachable, just skip processing it.
PR tree-optimization/121870
* tree-ssa-propagate.cc
(substitute_and_fold_engine::substitute_and_fold): Skip
removed stmts from noreturn fixup.
* g++.dg/torture/pr121870.C: New testcase.
|
|
BACKLOG_MAX represents the number of outstanding connections in the
socket's listen queue.
gcc/ada/ChangeLog:
* libgnat/g-socket.adb (Listen_Socket): Change default value.
* libgnat/g-socket.ads (Listen_Socket): Likewise.
* s-oscons-tmplt.c (BACKLOG_MAX): New.
|
|
gcc/ada/ChangeLog:
* env.c (__gnat_clearenv): Adjust comment.
* libgnarl/a-intnam__bsd.ads: Fix copyright date.
|
|
This is a follow-up to a recent change, where a warning was implemented
for huge library-level objects. However it is not given if the objects
are imported, although an indirection is also added for them under the
hood to match the export side.
gcc/ada/ChangeLog:
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Variable>: Give a
warning for huge imported objects as well.
|
|
The TYPE_ALIGN_OK flag had originally been a GCC flag tested in the RTL
expander and was at some point kicked out of the middle-end to become a
pure Gigi flag. But it's only set for tagged types and CW-equivalent
types and can be replaced by a explicit predicate without too much work.
gcc/ada/ChangeLog:
* gcc-interface/ada-tree.h (TYPE_ALIGN_OK): Delete.
* gcc-interface/decl.cc (gnat_to_gnu_entity): Do not set it.
* gcc-interface/gigi.h (standard_datatypes): Add ADT_tag_name_id.
(tag_name_id): New macro.
(type_is_tagged_or_cw_equivalent): New inline predicate.
* gcc-interface/trans.cc (gigi): Initialize tag_name_id.
(gnat_to_gnu) <N_Unchecked_Type_Conversion>: Replace tests on
TYPE_ALIGN_OK with calls to type_is_tagged_or_cw_equivalent.
(addressable_p): Likewise.
* gcc-interface/utils.cc (convert): Likewise.
* gcc-interface/utils2.cc (build_binary_op): Likewise.
|
|
This happens when the object is declared in another compilation unit.
gcc/ada/ChangeLog:
* gcc-interface/misc.cc (gnat_get_array_descr_info): In the record
type case, bail out if the original array type cannot be retrieved.
|
|
The implementation is essentially mirrored from the one for signed types.
gcc/ada/ChangeLog:
* gcc-interface/gigi.h (standard_datatypes): Add ADT_uns_mulv64_decl
and ADT_uns_mulv128_decl.
(uns_mulv64_decl): New macro.
(uns_mulv128_decl): Likewise.
* gcc-interface/trans.cc (gigi): Create the uns_mulv64_decl and
uns_mulv128_decl declarations.
(gnat_to_gnu) <N_Op_Add>: Perform an overflow check for unsigned
integer addition, subtraction and multiplication if required.
<N_Op_Minus>: Perform an overflow check for unsigned integer
negation if required.
(build_unary_op_trapv): Add support for unsigned types.
(build_binary_op_trapv): Likewise.
<MINUS_EXPR>: Perform the check if the LHS is zero in the signed
case as well.
|
|
In the case of a call to a subprogram that has an out (or in-out) parameter
that is passed by copy, the caller performs copy-back after the call returns.
If the actual parameter is a view conversion to a subtype that has an enabled
predicate, then the predicate check performed at that point should be
performed before, not after, the operand of the view conversion is updated.
gcc/ada/ChangeLog:
* exp_ch6.adb (Expand_Actuals): After building the tree for a
predicate check, call Prepend_To instead of Append_To so that the
check is performed before, instead of after, the corresponding
parameter copy-back.
|
|
Create a ghost region for pragma annotate so that we are able to analyze
the entity references correctly inside the pragma.
gcc/ada/ChangeLog:
* sem_prag.adb: Create a ghost region for pragma annotate before
analyzing its arguments.
|
|
Since we do not analyze the policy errors for expanded code we need to
check the functions specified in the Iterable aspect whenever we are
analyzing an iterator spcification with that aspect.
gcc/ada/ChangeLog:
* sem_ch5.adb (Analyze_Iterator_Specification): Check ghost context
of Iterable functions when handling iterator specifications with an
Iterable aspect.
|
|
gcc/ada/ChangeLog:
* ghost.adb (Check_Ghost_Policy): Update coding style.
|
|
It is OK to define a checked ghost type with an iterable aspect
that has ignored Iterable functions.
gcc/ada/ChangeLog:
* ghost.adb (Check_Ghost_Policy): Avoid triggering a ghost
policy error if the policy is referenced within the Iterable
aspect.
|
|
Check that entities on the RHS are ghost level dependent on the
entities on the LHS of the assignemnt.
gcc/ada/ChangeLog:
* ghost.adb (Is_OK_Statement): Check the levels of the
assignee with the levels of the entity are ghost level dependent.
(Check_Assignement_Levels): New function for checking the level
dependencies.
|
|
Fix grammar in comment.
gcc/ada/ChangeLog:
* einfo.ads (Ghost_Assertion_Level): Fix comment.
|
|
When frontend is operating in GNATprove mode (where expander is disabled), it
should check ghost policy for assignment statements just like it does for other
statements. This is because we want ghost policy errors to be reported not just
by GNAT, but also by GNATprove.
Additionally we need to perform the checks for valid location of ghost assigments
based on the region around the assigment before we create the region for
the assignment itself.
gcc/ada/ChangeLog:
* ghost.adb (Mark_And_Set_Ghost_Assignment): Create a ghost region
for an assigment irregardless of whether the expander is active.
Relocate the Assignment validity checks from Is_OK_Statement to
this subprogram.
|
|
The compiler blows up on a container aggregate with a container element
association that has a key_choice given by a nonstatic key expression.
This happens in the size computation for the aggregate due to calling
Update_Choices with the nonstatic expression. The fix is simply to
condition the call to Update_Choices on whether the choice expression
is static.
gcc/ada/ChangeLog:
* exp_aggr.adb (Build_Container_Aggr_Code.Build_Size_Expr): In the case
of an association with a single choice, only call Update_Choices when
the choice expression is nonstatic.
|
|
This patch fixes the following bug:
If the right-hand side of an expression contains a target name
(i.e. "@"), and also contains a reference to a user-defined operator
that is directly visible because of a "use type" clause on a renaming of
the package where the operator is declared, the compiler gives an
incorrect error saying that the renamed package is not visible.
It turns out that setting Entity of resolved nodes is unnecessary
and wrong; the fix is to simply remove that code.
gcc/ada/ChangeLog:
* exp_ch5.adb
(Expand_Assign_With_Target_Names.Replace_Target):
Remove code setting Entity to Empty.
* sinfo.ads (Has_Target_Names):
Improve comment: add "@" to clarify what "target name"
means, and remove the content-free phrase "and must
be expanded accordingly."
|
|
Recent changes "Fix regression in Root_Type" and
"Crash on b3a1004 with assertions enabled" are partially
redundant; they are addressing the same bug.
This patch adjusts the former in the case of Root_Type.
But we leave Root_Type_If_Set alone; debugging printouts
should survive bugs when possible.
gcc/ada/ChangeLog:
* einfo-utils.adb (Root_Type): Do not deal with missing Etype.
|
|
Previous change, "Make pp and friends more robust (base type only)"
introduced a bug in Root_Type. Etype (T) can, in fact, be Empty
(but only in case of errors.) This patch fixes it.
gcc/ada/ChangeLog:
* einfo-utils.adb (Root_Type): Deal with missing Etype.
(Root_Type_If_Set): Likewise.
|
|
The compilation of files b3a10041.ads and b3a10042.adb crash when
the compiler is built with assertions enabled.
gcc/ada/ChangeLog:
* freeze.adb (Freeze_Entity): Protect call to Associated_Storage_Pool
since it cannot be used when the Etype is not set.
* sem_ch3.adb (Access_Type_Declaration): Ditto.
* sem_aux.adb (Is_Derived_Type): Protect call to Root_Type since it
cannot be used when the Etype is not set.
|
|
gcc/ada/ChangeLog:
* libgnat/s-crtl.ads: define unsigned
* libgnat/s-crtl__mingw.adb (read, write): change arg type
|
|
For Implicit_Packing, do not require the Size clause to exactly match
the packed size.
For example, an array of 7 Booleans will fit in
7 bits if packed, or 7*8=56 bits if not packed.
This patch allows "for T'Size use 8;" to force packing
in Implicit_Packing mode; previously, the compiler
ignored Implicit_Packing unless it was exactly "use 7".
Apparently, customers have that sort of code, and the
whole point of Implicit_Packing is to allow such legacy
code to work.
We already do the right thing for records, at least in
cases tested.
We deliberately avoid changing the error messages given here.
They could possibly use some work, but there are subtle interactions
with the messages given in Sem_Ch13 for the same thing.
gcc/ada/ChangeLog:
* freeze.adb (Freeze_Entity): Change "=" to ">=" in
size comparison for Implicit_Packing mode.
Keep it as "=" for giving error messages.
* opt.ads (Implicit_Packing): Minor: correct obsolete
comment.
|
|
A compiler built with assertions enabled crashes processing
a null aggregate of multidimensional type.
gcc/ada/ChangeLog:
* sem_aggr.adb (Report_Null_Array_Constraint_Error): Adjust code
for reporting the error on enumeration types.
(Resolve_Null_Array_Aggregate): On multidimiensional arrays, avoid
reporting the same error several times. Flag the node as raising
constraint error when the bounds are known and some of them is
known to raise constraint error.
|
|
Prior to this fix, if pp(N) tried to print a "base type only" field, and
Base_Type(N) was not yet set, it would raise an exception, which was
confusing. This patch makes it simply ignore such fields. Similarly
for Impl_Base_Type_Only and Root_Type_Only fields.
We do this by having alternative versions of Base_Type,
Implementation_Base_Type, and Root_Type that return Empty
in error cases, and call these alteratives from Treepr.
We don't want to Base_Type and friends to return Empty;
we want them to blow up when called from anywhere but
Treepr.
gcc/ada/ChangeLog:
* atree.ads (Node_To_Fetch_From_If_Set): Alternative to
Node_To_Fetch_From that returns Empty in error cases.
For use only in Treepr.
* treepr.adb (Print_Entity_Field): Avoid printing field
if Node_To_Fetch_From_If_Set returns Empty.
* einfo-utils.ads (Base_Type_If_Set): Alternative to
Base_Type that returns Empty in error cases.
(Implementation_Base_Type_If_Set): Likewise.
(Root_Type_If_Set): Likewise.
(Underlying_Type): Use more accurate result subtype.
* einfo-utils.adb (Base_Type): Add Asserts.
(Implementation_Base_Type): Add Assert; minor cleanup.
(Root_Type): Add Assert; minor cleanup. Remove Assert that
is redundant with predicate.
(Base_Type_If_Set): Body of new function.
(Implementation_Base_Type_If_Set): Body of new function.
(Root_Type_If_Set): Body of new function.
|
|
The QNX Certified Products Defect Notification from February 2025
mentions a potential memory leak when pthread_create is interrupted by a
signal. It recommends to disable signals for this function call.
gcc/ada/ChangeLog:
* adaint.c: Add functions to disable and enable signals on QNX.
* libgnarl/s-taprop__qnx.adb (Create_Task): Disable
signals when calling pthread_create.
|
|
equality
The initial implementation of the warning resulted in unwanted false
positives for types that have a user-defined equality function (in
which case abstract equality on components will typically not ever
be invoked). The conditions for reporting the warning are refined
by this change to exclude checking for presence of abstract component
equality functions in the case where the containing type has a user-defined
equality.
gcc/ada/ChangeLog:
* exp_ch4.adb (Expand_N_Op_Eq): Test for absence of user-defined
equality on type being compared (for both array and record types)
as a condition for checking for abstract equality on component
types. Add a "???" comment about current limitations on issuing
the new warning.
(Warn_On_Abstract_Equality_For_Component): Remove temporary disabling
of the warning. Improve comment on declaration.
|
|
This patch fixes a reference to an Ada RM clause, fixes an occurrence of
"unconstrained" that should have been "indefinite", and removes an
incorrect claim that completing a partial view without discriminants
with a full view with defaulted discriminants is an error situation.
gcc/ada/ChangeLog:
* sem_ch3.adb (Process_Discriminants, Process_Full_View): Fix
comments.
|
|
Unfolding of static expressions is needed when evaluating static bounds, even in
the presence of strict analysis. Otherwise, we may wrongly identify static
predicates as dynamic ones, and thus require unnecessary "others" default case.
gcc/ada/ChangeLog:
* sem_attr.adb (Eval_Attribute): Remove strict analysis condition.
|
|
unit naming
This patch improves the warning message when the actual file name of a child
package with a single letter parent isn't the expected one because it may
collide with a predefined unit name. The warning explain why in this specific
case the expected name is not the standard one using the minus to separate
parents with children.
gcc/ada/ChangeLog:
* par-load.adb (Load): Better warning message.
|
|
When creating the local functions to implement the Valid_Scalars
attribute for array and record types, set a Related_Expression that
points to the original attribute reference (blah'Valid_Scalars).
This allows the Inspector to give a more user-friendly name
when these functions are called and they are known, for example,
to always return True.
gcc/ada/ChangeLog:
* exp_attr.adb
(Build_Array_VS_Func and Build_Record_VS_Func): Pass in the
Attr as the Related_Node parametr when calling
Make_Temporary for the Func_Id for the array and record
Valid_Scalars local functions.
|
|
The meaning of the return value of Find_Type_Name depends greatly on
whether the declaration it's passed is a completion. This patch adds a
description of this to the documentation comment of Find_Type_Name.
gcc/ada/ChangeLog:
* sem_ch3.ads (Find_Type_Name): Improve documentation comment.
|
|
The new warning is spuriously flagged on membership tests in
vss-xml-implementation-html_writer_data.adb, leading to the GNAT CB
failing, so we disable it until that issue can be resolved.
gcc/ada/ChangeLog:
* exp_ch4.adb (Warn_On_Abstract_Equality_For_Component): Temporarily
disable warning.
|
|
libstdc++-v3/ChangeLog:
* testsuite/std/time/year_month_day/io.cc: Additional tests.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
|
|
ifcvt likes to emit
(set
(if_then_else)
(ge (reg 1) (reg2))
(reg 1)
(reg 2))
which can be recognized as min/max patterns in the backend.
This patch adds such patterns and the respective iterators as well as a
test.
gcc/ChangeLog:
* config/riscv/bitmanip.md (*<bitmanip_minmax_cmp_insn>_cmp_<mode>3):
New min/max ifcvt pattern.
* config/riscv/iterators.md (minu): New iterator.
* config/riscv/riscv.cc (riscv_noce_conversion_profitable_p):
Remove riscv-specific adjustment.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zbb-min-max-04.c: New test.
|
|
Before noce_find_if_block processes a block it sets up an if_info
structure that holds the original costs. At that point the costs of
the then/else blocks have not been added so we only care about the
"if" cost.
The code originally used BRANCH_COST for that but was then changed
to COST_N_INSNS (2) - a compare and a jump.
This patch computes the jump costs via
insn_cost (if_info.jump, ...)
under the assumption that the target takes BRANCH_COST into account
when costing a jump instruction.
In noce_convert_multiple_sets we keep track of the need for the initial
CC comparison. If needed for the generated sequence we add its
cost in default_noce_conversion_profitable_p.
gcc/ChangeLog:
* ifcvt.cc (noce_convert_multiple_sets_1): Add use_cond_earliest
param.
(noce_convert_multiple_sets): Set use_cond_earliest.
(noce_process_if_block): Just use original cost.
(noce_find_if_block): Use insn_cost (jump_insn).
gcc/testsuite/ChangeLog:
* gcc.target/riscv/addsieq.c: Remove xfail and expect conversion
through noce_convert_multiple_sets.
* gcc.target/riscv/addsifeq.c: Ditto.
* gcc.target/riscv/addsifge.c: Ditto.
* gcc.target/riscv/addsifgt.c: Ditto.
* gcc.target/riscv/addsifle.c: Ditto.
* gcc.target/riscv/addsiflt.c: Ditto.
* gcc.target/riscv/addsifne.c: Ditto.
* gcc.target/riscv/addsige.c: Ditto.
* gcc.target/riscv/addsigeu.c: Ditto.
* gcc.target/riscv/addsigt.c: Ditto.
* gcc.target/riscv/addsigtu.c: Ditto.
* gcc.target/riscv/addsile.c: Ditto.
* gcc.target/riscv/addsileu.c: Ditto.
* gcc.target/riscv/addsilt.c: Ditto.
* gcc.target/riscv/addsiltu.c: Ditto.
|
|
Hard register constraints are only supported for LRA and not old reload.
Targets hppa, m68k, pdp11, rx, sh, vax do not default to LRA which is
why these tests fail there. Limit the tests to LRA targets, although,
this means that currently on these targets the tests are skipped by
default. Since the tests are about general logic, the extra coverage we
loose by skipping these targets is negligible.
For hppa, register 0 cannot be used as a general register. Therefore,
use temporary registers r20 and r21 instead. Likewise, for AVR use r20
and r24 instead.
gcc/testsuite/ChangeLog:
* gcc.dg/asm-hard-reg-error-4.c: Limit the test to LRA targets.
Use registers r20 and r21 for hppa. Likewise, for AVR use r20
and r24 instead.
* gcc.dg/asm-hard-reg-error-5.c: Ditto.
|
|
can_find_related_mode_p incorrectly handled VLS (Vector Length Specific)
types by using TARGET_MIN_VLEN directly, which is in bits, instead of
converting it to bytes as required.
This patch fixes the issue by dividing TARGET_MIN_VLEN by 8 to convert
from bits to bytes when calculating the number of units for VLS modes.
The fix enables proper vectorization for several test cases:
- zve32f-1.c: Now correctly finds vector mode for SF mode in foo3,
enabling vectorization of an additional loop.
- zve32f_zvl256b-1.c and zve32x_zvl256b-1.c: Added -mrvv-max-lmul=m2
option to handle V8SI[2] (vector array mode) requirements during
vectorizer analysis, which needs V16SI to pass, and V16SI was enabled
incorrectly before.
Changes since V4:
- Fix testsuite, also triaged why changed.
gcc/ChangeLog:
* config/riscv/riscv-selftests.cc (riscv_run_selftests): Call
run_vectorize_related_mode_selftests.
(test_vectorize_related_mode): New function to test
vectorize_related_mode behavior.
(run_vectorize_related_mode_selftests): New function to run all
vectorize_related_mode tests.
(run_vectorize_related_mode_vla_selftests): New function to test
VLA modes.
(run_vectorize_related_mode_vls_rv64gcv_selftests): New function to
test VLS modes on rv64gcv.
(run_vectorize_related_mode_vls_rv32gc_zve32x_zvl256b_selftests):
New function to test VLS modes on rv32gc_zve32x_zvl256b.
(run_vectorize_related_mode_vls_selftests): New function to run all
VLS mode tests.
* config/riscv/riscv-v.cc (can_find_related_mode_p): Fix VLS type
handling by converting TARGET_MIN_VLEN from bits to bytes.
gcc/testsuite/ChangeLog:
* gcc.target/riscv/rvv/autovec/zve32f-1.c: Update expected
vectorization count from 2 to 3.
* gcc.target/riscv/rvv/autovec/zve32f_zvl256b-1.c: Add
-mrvv-max-lmul=m2 option.
* gcc.target/riscv/rvv/autovec/zve32x_zvl256b-1.c: Add
-mrvv-max-lmul=m2 option.
|
|
Committing r16-3673 cause the test cases in the list to fail.
Make the test pass by modifying the test case or adding compilation
options.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/cmodel-extreme-1.c: Add -fPIC.
* gcc.target/loongarch/cmodel-extreme-2.c: Likewise.
* gcc.target/loongarch/tls-gd-noplt.c: Likewise.
* gcc.target/loongarch/tls-extreme-macro.c: Likewise.
* gcc.target/loongarch/func-call-medium-2.c: Modify.
* gcc.target/loongarch/func-call-medium-3.c: Modify.
* gcc.target/loongarch/func-call-medium-4.c: Removed.
|
|
|
|
libstdc++-v3/ChangeLog:
* include/bits/unique_ptr.h: Remove blank line.
|
|
C++17 has a 'Requires:' precondition that the two random access iterator
types have the same value type. In C++20 that is a 'Mandates:'
requirement which we must diagnose.
Although we could diagnose it in C++17, that might be a breaking change
for any users relying on it today. Also I am lazy and wanted to use
C++20's std::iter_value_t for the checks. So this only enforces the
requirement for C++20 and later.
libstdc++-v3/ChangeLog:
* include/std/functional (boyer_moore_searcher::operator()): Add
static_assert.
(boyer_moore_horspool_searcher::operator()): Likewise.
* testsuite/20_util/function_objects/121782.cc: New test.
|
|
C2Y removes various instances of undefined behavior, typically making
them either constraint violations or implementation-defined.
In many but not all such cases, GCC's existing behavior is compatible
with the C2Y changes. For an initial batch of such cases, add
explicit tests for how GCC behaves in C2Y mode; more such cases will
need tests added in future patches, and there are also some such
changes that will need changes to how GCC behaves, not just new tests.
(Some of the individual examples in these tests may have been
constraint violations even before C2Y.)
Tested for x86_64-pc-linux-gnu.
* gcc.dg/c2y-function-qual-1.c, gcc.dg/c2y-incomplete-1.c,
gcc.dg/c2y-inline-1.c, gcc.dg/c2y-pointer-1.c,
gcc.dg/c2y-register-array-1.c, gcc.dg/c2y-storage-class-1.c,
gcc.dg/c2y-struct-empty-1.c: New tests.
|