Age | Commit message (Collapse) | Author | Files | Lines |
|
gcc/testsuite/ChangeLog:
* rust/compile/macros/proc/proc_macro.exp: New deja gnu file to execute
proc-macro tests.
* rust/compile/proc_macro_attribute_crate_type.rs: Move to...
* rust/compile/macros/proc/attribute_crate_type.rs: ...here.
* rust/compile/proc_macro_attribute_non_function.rs: Move to...
* rust/compile/macros/proc/attribute_non_function.rs: ...here.
* rust/compile/proc_macro_attribute_non_root_function.rs: Move to...
* rust/compile/macros/proc/attribute_non_root_function.rs: ...here.
* rust/compile/proc_macro_attribute_non_root_method.rs: Move to...
* rust/compile/macros/proc/attribute_non_root_method.rs: ...here.
* rust/compile/proc_macro_attribute_non_root_module.rs: Move to...
* rust/compile/macros/proc/attribute_non_root_module.rs: ...here.
* rust/compile/proc_macro_attribute_private.rs: Move to...
* rust/compile/macros/proc/attribute_private.rs: ...here.
* rust/compile/proc_macro_crate_type.rs: Move to...
* rust/compile/macros/proc/crate_type.rs: ...here.
* rust/compile/proc_macro_derive_crate_type.rs: Move to...
* rust/compile/macros/proc/derive_crate_type.rs: ...here.
* rust/compile/proc_macro_derive_malformed.rs: Move to...
* rust/compile/macros/proc/derive_malformed.rs: ...here.
* rust/compile/proc_macro_derive_non_function.rs: Move to...
* rust/compile/macros/proc/derive_non_function.rs: ...here.
* rust/compile/proc_macro_derive_non_root_function.rs: Move to...
* rust/compile/macros/proc/derive_non_root_function.rs: ...here.
* rust/compile/proc_macro_derive_non_root_module.rs: Move to...
* rust/compile/macros/proc/derive_non_root_module.rs: ...here.
* rust/compile/proc_macro_derive_private.rs: Move to...
* rust/compile/macros/proc/derive_private.rs: ...here.
* rust/compile/proc_macro_non_function.rs: Move to...
* rust/compile/macros/proc/non_function.rs: ...here.
* rust/compile/proc_macro_non_root_function.rs: Move to...
* rust/compile/macros/proc/non_root_function.rs: ...here.
* rust/compile/proc_macro_non_root_method.rs: Move to...
* rust/compile/macros/proc/non_root_method.rs: ...here.
* rust/compile/proc_macro_non_root_module.rs: Move to...
* rust/compile/macros/proc/non_root_module.rs: ...here.
* rust/compile/proc_macro_derive_non_root_method.rs: Move to...
* rust/compile/macros/proc/non_root_trait_method.rs: ...here.
* rust/compile/proc_macro_private.rs: Move to...
* rust/compile/macros/proc/private.rs: ...here.
* rust/compile/proc_macro_pub_function.rs: Move to...
* rust/compile/macros/proc/pub_function.rs: ...here.
* rust/compile/proc_macro_pub_module.rs: Move to...
* rust/compile/macros/proc/pub_module.rs: ...here.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
|
|
gcc/rust/ChangeLog:
* ast/rust-ast.cc:
Fix Attribute constructors to copy inner_attribute
* checks/errors/rust-unsafe-checker.cc:
Add pass for #[may_dangle] in safe impl's
* hir/rust-ast-lower-item.cc:
Add support for unsafe impl's
* hir/rust-ast-lower-type.cc:
Lower attributes in impl's from AST to HIR
* hir/rust-hir-dump.cc:
Change single attribute to AttrVec
* hir/tree/rust-hir-item.h:
Add unsafe support to Impl blocks in HIR
* hir/tree/rust-hir.cc:
Change single attribute to AttrVec
* hir/tree/rust-hir.h:
Add has/get_outer_attribute to GenericParam
gcc/testsuite/ChangeLog:
* rust/compile/issue-3045-1.rs:
Add test for #[may_dangle] Generic Type triggering error
* rust/compile/issue-3045-2.rs:
Add test for #[may_dangle] Lifetime triggering error
Signed-off-by: Liam Naddell <liam.naddell@mail.utoronto.ca>
|
|
gcc/testsuite/ChangeLog:
* rust/rustc/README.md: information about
rustc external directory.
* rust/rustc/rustc.exp: New test.
Signed-off-by: Muhammad Mahad <mahadtxt@gmail.com>
|
|
gcc/rust/ChangeLog:
* expand/rust-cfg-strip.cc:
Strip struct expr fields and strip fields in struct definition
* expand/rust-cfg-strip.h:
Signatures for new function maybe_strip_struct_expr_fields
gcc/testsuite/ChangeLog:
* rust/compile/macro-issue2983_2984.rs:
Add test to check for correct stripped fields
Signed-off-by: Antonio Gomes <antoniospg100@gmail.com>
|
|
PR fortran/119272
gcc/fortran/ChangeLog:
* resolve.cc (resolve_compcall): Postpone error report when
symbol is not resolved yet for component call resolve.
gcc/testsuite/ChangeLog:
* gfortran.dg/associate_74.f90: New test.
|
|
This implements part of LWG4223 that enables deduction for maps types
(map, unordered_map, flat_map and non-unique equivalent) from
(from_range, rg, ...) arguments, where rg is range of tuple
or other pair-like.
libstdc++-v3/ChangeLog:
* include/bits/ranges_base.h (__detail::__range_key_type):
Replace RV::first_type with tuple_element_t<0, RV>.
(__detail::__range_mapped_type) Replace RV::second_type
with tuple_element_t<1, RV>.
* testsuite/23_containers/flat_map/1.cc: New tests.
* testsuite/23_containers/flat_multimap/1.cc: New tests.
* testsuite/23_containers/map/cons/from_range.cc: New tests.
* testsuite/23_containers/multimap/cons/from_range.cc: New tests.
* testsuite/23_containers/unordered_map/cons/from_range.cc: New tests.
* testsuite/23_containers/unordered_multimap/cons/from_range.cc:
New tests.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
|
|
The following testcase ICEs, because the splitters into vptest
create an invalid instruction. The operands of all the UNSPEC_PTEST
using instructions use register_operand and vector_operand predicate,
these splitters use vector_operand predicate but create vptest
instruction which has the same argument twice, so one of them needs
to be in a register.
The following patch keeps vector_operand predicate on the splitters
but uses force_reg to force it into a REG if it was a MEM, that results
in better code generation e.g. on the included testcase, as combine
can match those even with MEM.
The difference on the testcase is
- vpxor %xmm0, %xmm0, %xmm0
- vpcmpeqb (%rdi), %xmm0, %xmm0
- vpmovmskb %xmm0, %eax
- cmpl $65535, %eax
+ vmovdqa (%rdi), %xmm0
+ vptest %xmm0, %xmm0
(- for patch which changes the splitters to
s/vector_operand/register_operand/ and + for this patch).
2025-03-19 Jakub Jelinek <jakub@redhat.com>
PR target/119357
* config/i386/sse.md (pmovmskb 0xffff to ptest splitter,
*pmovsk_ptest_<mode>_avx512): Force operands[0] into a REG.
* gcc.target/i386/avx512vlbw-pr119357.c: New test.
|
|
Broadly speaking, these tests were failing because the BB limitation for SLP'ing
loads in an || in an early break makes the loads end up in different BBs and so
today we can't SLP them. This results in load_lanes being required to vectorize
them because the alternative is loads with permutes which we don't allow.
The original checks were only checking partial vectors, which ended up working
because e.g. Adv. SIMD isn't a partial vector target, so it failed, and SVE was
a partial vector target but also has load lanes so it passes.
GCN however is a partial vector target without load lanes which makes the tests
fail. As we require load_lanes for now, also check for them.
Bootstrapped Regtested on aarch64-none-linux-gnu,
arm-none-linux-gnueabihf, x86_64-pc-linux-gnu
-m32, -m64 and no issues.
Cross checked the failing cases on amdgcn-amdhsa
and all pass now.
gcc/testsuite/ChangeLog:
PR target/119286
* gcc.dg/vect/bb-slp-41.c: Add pragma novector.
* gcc.dg/vect/vect-early-break_133_pfa11.c: Should never vectorize today
as indexes can be out of range.
* gcc.dg/vect/vect-early-break_128.c: Require load_lanes as well.
* gcc.dg/vect/vect-early-break_133_pfa10.c: Likewise.
* gcc.dg/vect/vect-early-break_133_pfa8.c: Likewise.
* gcc.dg/vect/vect-early-break_133_pfa9.c: Likewise.
* gcc.dg/vect/vect-early-break_22.c: Likewise.
* gcc.dg/vect/vect-early-break_26.c: Likewise.
* gcc.dg/vect/vect-early-break_43.c: Likewise.
* gcc.dg/vect/vect-early-break_44.c: Likewise.
* gcc.dg/vect/vect-early-break_6.c: Likewise.
* gcc.dg/vect/vect-early-break_56.c: Expect failures on group misalign.
|
|
unordered containers.
This patch implements part of LWG2713 covering the from_range
constructors, which makes std::ranges::to<std::unordered_set>(alloc)
well-formed. Likewise for rest of unordered containers.
As this consturctors were added to v15, this has no impact
on code that compiled with previous versions.
libstdc++-v3/ChangeLog:
* include/bits/unordered_map.h
(unordered_map(from_range_t, _Rg&&, const allocator_type&))
(unordered_multimap(from_range_t, _Rg&&, const allocator_type&)):
Define.
* include/bits/unordered_set.h
(unordered_set(from_range_t, _Rg&&, const allocator_type&))
(unordered_multiset(from_range_t, _Rg&&, const allocator_type&)):
Define.
* testsuite/23_containers/unordered_map/cons/from_range.cc: New tests.
New tests.
* testsuite/23_containers/unordered_multimap/cons/from_range.cc:
New tests.
* testsuite/23_containers/unordered_multiset/cons/from_range.cc:
New tests.
* testsuite/23_containers/unordered_set/cons/from_range.cc: New tests.
* testsuite/std/ranges/conv/1.cc: New tests.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
|
|
r15-7222 added an empty file gcc.dg/pr not mentioned in the ChangeLog
nor used anywhere in that patch.
Removed as obvious.
2025-03-19 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/pr: Remove.
|
|
containers [PR119358]
ranges::distance may produce an integer-like class type
(ranges::__detail::__max_diff_type) that is only explicitly convertible to
other integer types, so the result needs to be casted to containers size_type.
PR libstdc++/119358
libstdc++-v3/ChangeLog:
* include/bits/unordered_map.h (unordered_multimap::insert_range):
Cast ranges::distance to size_type before passing to _M_rehash_insert.
* include/bits/unordered_set.h (unordered_multiset::insert_range):
Same as unordered_multimap::insert_range.
* testsuite/23_containers/unordered_multimap/cons/from_range.cc:
New tests.
* testsuite/23_containers/unordered_multiset/cons/from_range.cc:
New tests.
|
|
The ArmARM says:
"In an Armv9.4 implementation, if FEAT_SVE2 is implemented, FEAT_SVE2p1
is implemented."
We should enable +sve2p1 as part of -march=armv9.4-a, which this patch does.
This makes gcc consistent with gas.
Bootstrapped and tested on aarch64-none-linux-gnu.
Signed-off-by: Kyrylo Tkachov <ktkachov@nvidia.com>
gcc/
* config/aarch64/aarch64-arches.def (...): Add SVE2p1.
* doc/invoke.texi (AArch64 Options): Document +sve2p1 in
-march=armv9.4-a.
|
|
[PR118068]
The r14-4140 change moved consteval evaluation from build_over_call to
cp_fold_r.
The following testcase is a regression caused by that change. There
is a cast around immediate invocation, (int) foo (0x23)
where consteval for returns unsigned char. When the consteval call
has been folded early to 0x23 (with unsigned char type), cp_fold sees
(int) 0x23 and folds that to 0x23 with int type.
But when the immediate invocation is handled only during cp_fold_r,
cp_fold_r first calls cp_fold on the NOP_EXPR, which calls cp_fold
on its operand, it is CALL_EXPR, nothing is folded at that point.
Then cp_fold_r continues to walk the NOP_EXPR's operand, sees it is
an immediate function invocation and cp_fold_immediate_r calls
cxx_constant_value on it and replaces the CALL_EXPR with the INTEGER_CST
0x23. Nothing comes back to folding the containing NOP_EXPR though.
Sure, with optimizations enabled some GIMPLE optimization folds that later,
but e.g. with -O0 nothing does that. I think there could be arbitrarily
complex expressions on top of the immediate invocation(s) that used to be
folded by cp_fold before and aren't folded anymore.
One possibility would be to do the immediate invocation evaluation in
cp_fold rather than cp_fold_r (or in addition to cp_fold_r).
The following patch instead first evaluates all immediate invocations and
does cp_fold_r in a separate step. That not only allows the folding of
expressions which contain immediate invocations, but also simplifies some
of the quirks that had to be done when it was in cp_fold_r.
Though, I had to add an extra case to cp_genericize_r RETURN_EXPR handling
to avoid a regression where after emitting errors in RETURN_EXPR argument
we've emitted a -Wreturn-type false positive. Previously we ended up with
RETURN_EXPR with CLEANUP_POINT_EXPR with INIT_EXPR of RESULT_DECL to
error_mark_node, now we fold it more and have RETURN_EXPR with
error_mark_node operand. The former would result during gimplification
into something -Wresult-type was quiet about, the latter doesn't.
BTW, r14-4140 changed behavior on
consteval bool foo (bool x) { if (x) throw 1; return false; }
constexpr void
foo ()
{
if constexpr (false)
{
bool a = foo (true);
}
}
where GCC 13 emitted
error: expression ‘<throw-expression>’ is not a constant expression
error and GCC 14/trunk including the patch below doesn't reject it.
And clang++ trunk rejects it. It isn't immediately clear to me what
is right, if immediate invocations in discarded statements should
be evaluated or not.
2025-03-19 Jakub Jelinek <jakub@redhat.com>
PR target/118068
gcc/cp/
* cp-gimplify.cc (cp_fold_immediate): Use cp_walk_tree rather than
cp_walk_tree_without_duplicates.
(cp_fold_immediate_r): For IF_STMT_CONSTEVAL_P IF_STMT don't walk
into THEN_CLAUSE subtree, only ELSE_CLAUSE. For non-call related
stmts call data->pset.add and if it returns true, don't walk subtrees.
(cp_fold_r): Don't call cp_fold_immediate_r here.
(cp_fold_function): For C++20 or later call cp_walk_tree
with cp_fold_immediate_r callback first before calling cp_walk_tree
with cp_fold_r callback and call data.pset.empty () in between.
(cp_fully_fold_init): Likewise.
(cp_genericize_r) <case RETURN_EXPR>: Suppress -Wreturn-type warning
if RETURN_EXPR has erroneous argument.
gcc/testsuite/
* g++.target/i386/pr118068.C: New test.
|
|
This is a regression in recent releases. The problem is that the IPA mod/ref
pass looks through the (nominal) type of a pointer-to-discriminated-type
parameter in a call to a subprogram in order to see the (actual) type used
for the dereferences of the parameter in the callee, which is a
pointer-to-constrained-subtype.
Historically the discriminated type is marked with the may_alias attribute
because of the symmetric effect for the argument in the caller, so we mark
the constrained subtype with the attribute now for the sake of the callee.
gcc/ada/
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Record_Subtype>: Set
the may_alias attribute if a specific GCC type is built.
|
|
When we redefine a tagged type we incorrectly update TYPE_STUB_DECL
of the previously defined type instead of the new one. Because
TYPE_STUB_DECL is used when determining whether two such types are
the same, this can cause valid typedef redefinitions to be rejected
later. This is only a partial fix for PR118765.
PR c/118765
gcc/c/ChangeLog:
* c-decl.cc (finish_struct,finish_enum): Swap direction when
copying TYPE_STRUB_DECL in redefinitions.
gcc/testsuite/ChangeLog:
* gcc.dg/pr118765.c: New test.
|
|
Return early when comparing two structures for compatibility
and the type of a member is erroneous.
PR c/118061
gcc/c/ChangeLog:
* c-typeck.cc (tagged_types_tu_compatible_p): Handle
errors in types of struct members.
gcc/testsuite/ChangeLog:
* gcc.dg/pr118061.c: New test.
|
|
This is not a regression but the issue is quite annoying and the fix is
trivial. The problem is that a formal parameter covered by a box in the
formal package is not visible in the instance when it comes after another
formal parameter that is also a formal package.
It comes from a discrepancy internal to Instantiate_Formal_Package, where
a specific construct (the abbreviated instance) built for the nested formal
package discombobulates the processing done for the outer formal package.
gcc/ada/
* gen_il-gen-gen_nodes.adb (N_Formal_Package_Declaration): Use
N_Declaration instead of Node_Kind as ancestor.
* sem_ch12.adb (Get_Formal_Entity): Remove obsolete alternative.
(Instantiate_Formal_Package): Take into account the abbreviated
instances in the main loop running over the actuals of the local
package created for the formal package.
gcc/testsuite/
* gnat.dg/generic_inst14.adb: New test.
* gnat.dg/generic_inst14_pkg.ads: New helper.
* gnat.dg/generic_inst14_pkg-child.ads: Likewise.
|
|
We already allow the ABI names for GPR in inline asm clobber list, so
for consistency allow the ABI names for FPR as well.
Reported-by: Yao Zi <ziyao@disroot.org>
gcc/ChangeLog:
* config/loongarch/loongarch.h (ADDITIONAL_REGISTER_NAMES): Add
fa0-fa7, ft0-ft16, and fs0-fs7.
gcc/testsuite/ChangeLog:
* gcc.target/loongarch/regname-float-abi.c: New test.
|
|
It looks like the testcase is fragile, it's supposed to check the
compiler ability of generating code_6_gottpoff_reloc instruction, but
failed since there's a seg_prefixed memory
usage(r14-6242-gd564198f960a2f).
mov r13, QWORD PTR j@gottpoff[rip]
mov r12, QWORD PTR a@gottpoff[rip]
mov rbp, QWORD PTR [rsp+1040]
lea rbx, [rsp+1040]
add r14, QWORD PTR fs:0, r12
gcc/testsuite/ChangeLog:
PR target/117069
* gcc.target/i386/apx-ndd-tls-1b.c: Add xfail.
|
|
|
|
This ICE only occurred when the compiler is built with, say
CXXFLAGS='-Wp,-D_GLIBCXX_ASSERTIONS'. The problem was that
a value from an illegal REGNO was read. The value was not
used in these cases, but the access triggered an assertion
due to reading past std::array.
gcc/
PR target/119355
* config/avr/avr-passes.cc (memento_t::apply): Only
read values[p.arg] when it is actually used.
|
|
This ICE appeared with the removal of NON_DEPENDENT_EXPR. Previously
skip_simple_arithmetic would get NON_DEPENDENT_EXPR<CAST_EXPR<>> and
since NON_DEPENDENT_EXPR is neither BINARY_CLASS_P nor UNARY_CLASS_P,
there was no problem. But now we pass just CAST_EXPR<> and a CAST_EXPR
is a tcc_unary, so we extract its null operand and crash.
skip_simple_arithmetic is called from save_expr. cp_save_expr already
avoids calling save_expr in a template, so that seems like an appropriate
way to fix this.
PR c++/119344
gcc/cp/ChangeLog:
* typeck.cc (cp_build_binary_op): Use cp_save_expr instead of save_expr.
gcc/testsuite/ChangeLog:
* g++.dg/conversion/ptrmem10.C: New test.
Reviewed-by: Patrick Palka <ppalka@redhat.com>
Reviewed-by: Jason Merrill <jason@redhat.com>
|
|
Here we were assuming that a constant variable appearing in a template
argument is used for its value. We also need to handle seeing its address
taken.
PR c++/119194
gcc/cp/ChangeLog:
* decl2.cc (min_vis_expr_r) [ADDR_EXPR]: New case.
gcc/testsuite/ChangeLog:
* g++.dg/template/linkage7.C: New test.
|
|
r12-1094 mentions that adding the assert didn't lead to any regressions
in the testsuite, but this test case demonstrates that we can reach it
with valid code.
Here we arrive in use_pack_expansion_extra_args_p with t which is an
expansion whose pattern is void(Ts, Us) and tparm packs are {Us, Ts},
and parm_packs is { Ts -> <int, int>, Us -> <A, P...> }. We want to
expand the pack into void(int, A) and void(int, P...). We compare
int to A, which is fine, but then int to P... which crashes. But
the code is valid so this patch removes the assert.
PR c++/118104
gcc/cp/ChangeLog:
* pt.cc (use_pack_expansion_extra_args_p): Remove an assert.
gcc/testsuite/ChangeLog:
* g++.dg/cpp0x/alias-decl-variadic3.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
|
|
EXEC_LIB is no longer defined anywhere, so that the dependent code is
now dead. The rpath code (if required) would need to be conditional
since rpath support is not available on all hosts. Remove now and then
address if/when it is needed (other drivers do not do this).
gcc/cobol/ChangeLog:
* gcobolspec.cc (append_rpath): Remove.
(lang_specific_driver): Remove hard-wired rpath and library
names.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
|
|
This adds a configure check for get_current_dir_name and falls back
to getcwd() if it is not available on the host.
PR cobol/119301
gcc/cobol/ChangeLog:
* util.cc: Check for the availability of get_current_dir_name
snf fall back to getcwd() if it is not present on the host.
gcc/ChangeLog:
* config.in: Regenerate.
* configure: Regenerate.
* configure.ac: Add check for get_current_dir_name.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
|
|
Instead of passing receiver into the conversion function, just return
the value and assign it to the receiver. Renamed the conversion function
and also cleaned up all the `typeof' calls, which were very verbose.
libphobos/ChangeLog:
* src/MERGE: Merge upstream phobos 79cbde1ab.
Reviewed-on: https://github.com/dlang/phobos/pull/10684
|
|
libphobos/ChangeLog:
* src/MERGE: Merge upstream phobos cafe86453.
Reviewed-on: https://github.com/dlang/phobos/pull/10683
|
|
gcc/rust/Changelog:
PR rust/119333
* Make-lang.in: Force offline mode for cargo
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
|
|
This fixes PR #119333 by allowing our borrow-checker interface to be built
offline. This was already done for our components in libgrust/, but had never been
done for the borrow-checker.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119333
gcc/rust/ChangeLog:
* checks/errors/borrowck/ffi-polonius/.cargo/config.toml: New file, force vendored deps.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/.cargo-checksum.json: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/CODE_OF_CONDUCT.md: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/Cargo.toml: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/LICENSE-APACHE: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/LICENSE-MIT: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/README.md: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/RELEASES.md: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/examples/borrow_check.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/examples/graspan1.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/join.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/lib.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/map.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/test.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/datafrog/src/treefrog.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/.cargo-checksum.json: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/CHANGELOG.md: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/Cargo.toml: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/LICENSE-APACHE: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/LICENSE-MIT: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/README.md: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/benches/value.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/__private_api.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/error.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/key.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/mod.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/source.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/kv/value.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/lib.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/macros.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/src/serde.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/log/triagebot.toml: New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/.cargo-checksum.json: New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/Cargo.toml: New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/README.md: New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/facts.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/lib.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/datafrog_opt.rs:
New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/initialization.rs:
New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/liveness.rs:
New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/location_insensitive.rs:
New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/mod.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/polonius-engine/src/output/naive.rs: New file.
* checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/.cargo-checksum.json: New file.
* checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/CODE_OF_CONDUCT.md: New file.
* checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/Cargo.toml: New file.
* checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/LICENSE-APACHE: New file.
* checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/LICENSE-MIT: New file.
* checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/README.md: New file.
* checks/errors/borrowck/ffi-polonius/vendor/rustc-hash/src/lib.rs: New file.
|
|
PR fortran/119338
gcc/fortran/ChangeLog:
* resolve.cc (resolve_allocate_expr): Check F2003:C626: Type-spec
in ALLOCATE of an assumed-length character dummy argument shall be
an asterisk.
gcc/testsuite/ChangeLog:
* gfortran.dg/deferred_character_18.f90: Adjust testcase.
* gfortran.dg/allocate_assumed_charlen_5.f90: New test.
|
|
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd fde0f8c40a.
Reviewed-on: https://github.com/dlang/dmd/pull/21014
|
|
libphobos/ChangeLog:
* libdruntime/MERGE: Merge upstream druntime d2ee11364c.
* testsuite/libphobos.aa/test_aa.d: Add new test.
* testsuite/libphobos.betterc/test19933.d: Adjust imports.
* testsuite/libphobos.config/test22523.d: Likewise.
* testsuite/libphobos.exceptions/assert_fail.d: Adjust test.
* testsuite/libphobos.exceptions/chain.d: Adjust imports.
* testsuite/libphobos.exceptions/future_message.d: Likewise.
* testsuite/libphobos.exceptions/line_trace.d: Likewise.
* testsuite/libphobos.exceptions/long_backtrace_trunc.d: Likewise.
* testsuite/libphobos.exceptions/static_dtor.d: Likewise.
* testsuite/libphobos.gc/forkgc.d: Likewise.
* testsuite/libphobos.gc/precisegc.d: Likewise.
* testsuite/libphobos.gc/recoverfree.d: Likewise.
* testsuite/libphobos.hash/test_hash.d: Likewise.
* testsuite/libphobos.init_fini/custom_gc.d: Likewise.
* testsuite/libphobos.init_fini/thread_join.d: Likewise.
* testsuite/libphobos.thread/external_threads.d: Likewise.
* testsuite/libphobos.thread/fiber_guard_page.d: Likewise.
* testsuite/libphobos.thread/tlsgc_sections.d: Likewise.
* testsuite/libphobos.thread/tlsstack.d: Likewise.
* testsuite/libphobos.unittest/customhandler.d: Likewise.
|
|
gcc/d/ChangeLog:
* dmd/MERGE: Merge upstream dmd 51be8bb729.
Reviewed-on: https://github.com/dlang/dmd/pull/20958
|
|
The following new testcase FAILs with C (and succeeds with C++).
c_parser_handle_musttail is used in c_parser_compound_statement_nostart
where it is directly passed to c_parser_statement_after_labels, and in
c_parser_all_labels where it is returned. Now, out of the 3
c_parser_all_labels callers, c_parser_statement passes it down to
c_parser_statement_after_labels, but c_parser_if_body and c_parser_else_body
don't, so if there are return statements with [[gnu::musttail]] or
[[clang::musttail]] directly in if or else bodies rather than wrapped with
{}s, we throw that information away.
2025-03-18 Jakub Jelinek <jakub@redhat.com>
PR c/119311
* c-parser.cc (c_parser_if_body): Pass result of c_parser_all_labels
as last argument to c_parser_statement_after_labels.
(c_parser_else_body): Likewise.
* c-c++-common/musttail14.c: Use * instead of \* in the regexps.
* c-c++-common/musttail25.c: New test.
|
|
Apparently some programs in the wild use
#if __has_attribute(musttail)
__attribute__((musttail)) return foo ();
#else
return foo ();
#endif
clang supports musttail both as a standard attribute ([[clang::musttail]]
which we also support for compatibility) and the above worked just
fine with GCC 14 which had __has_attribute(musttail) 0. Now that it is
0, this doesn't compile anymore.
So, either we need to ensure that __has_attribute(musttail) is 0
and just __has_c{,pp}_attribute({gnu,clang}::musttail) are non-zero,
or IMHO better we just make it work in the attribute form, especially for
C < C23 I can see why some projects would prefer that form.
While [[gnu::musttail]] is rejected as an error in C11 etc. before GCC 15,
rather than just handled as an unknown attribute.
I view this as both a regression and compatibility issue.
The patch handles it in similar spots to fallthrough/assume attributes
inside of __attribute__ for C, and for C++ enables mixing of standard [[]]
and GNU __attribute__(()) attributes at the start of statements in any order.
While working on it, I've noticed we weren't diagnosing arguments to the
clang::musttail attribute (fixed by the c-attribs.cc hunk) and newly
on the __attribute__ form attribute (in that case the arguments aren't just
skipped, they are always parsed and because we don't call decl_attributes
etc., it wouldn't be diagnosed without a manual check).
2025-03-18 Jakub Jelinek <jakub@redhat.com>
PR c/116545
gcc/
* doc/extend.texi (musttail statement attribute): Document
that musttail GNU attribute can be used as well.
gcc/c-family/
* c-attribs.cc (c_common_clang_attributes): Add musttail.
gcc/c/
* c-parser.cc (c_parser_declaration_or_fndef): Parse
__attribute__((musttail)) return.
(c_parser_handle_musttail): Diagnose attribute arguments.
(c_parser_statement_after_labels): Parse
__attribute__((musttail)) return.
gcc/cp/
* parser.cc (cp_parser_statement): Call cp_parser_attributes_opt
rather than cp_parser_std_attribute_spec_seq.
(cp_parser_jump_statement): Diagnose gnu::musttail attributes
with no arguments.
gcc/testsuite/
* c-c++-common/attr-fallthrough-2.c: Adjust expected diagnostics
for C++.
* c-c++-common/musttail15.c: New test.
* c-c++-common/musttail16.c: New test.
* c-c++-common/musttail17.c: New test.
* c-c++-common/musttail18.c: New test.
* c-c++-common/musttail19.c: New test.
* c-c++-common/musttail20.c: New test.
* c-c++-common/musttail21.c: New test.
* c-c++-common/musttail22.c: New test.
* c-c++-common/musttail23.c: New test.
* c-c++-common/musttail24.c: New test.
* g++.dg/musttail7.C: New test.
* g++.dg/musttail8.C: New test.
* g++.dg/musttail12.C: New test.
* g++.dg/musttail13.C: New test.
* g++.dg/musttail14.C: New test.
* g++.dg/ext/pr116545.C: New test.
|
|
* fr.po, sv.po: Update.
|
|
The following implements -fdump-tree-original dumping for cobol,
mimicing what the D frontend does.
gcc/cobol/
* gengen.cc (gg_finalize_function): Dump to TDI_original.
|
|
gcc/testsuite
* cobol.dg/group1/check_88.cob: New testcase.
* cobol.dg/group1/comp5.cob: Likewise.
* cobol.dg/group1/declarative_1.cob: Likewise.
* cobol.dg/group1/display.cob: Likewise.
* cobol.dg/group1/display2.cob: Likewise.
* cobol.dg/group1/line-sequential.cob: Likewise.
* cobol.dg/group1/multiple-compares.cob: Likewise.
* cobol.dg/group1/multiply2.cob: Likewise.
* cobol.dg/group1/packed.cob: Likewise.
* cobol.dg/group1/perform-nested-exit.cob: Likewise.
* cobol.dg/group1/pointer1.cob: Likewise.
* cobol.dg/group1/simple-arithmetic.cob: Likewise.
* cobol.dg/group1/simple-classes.cob: Likewise.
* cobol.dg/group1/simple-if.cob: Likewise.
* cobol.dg/group1/simple-perform.cob: Likewise.
|
|
which I forgot and the autobuilder complained.
* config/rs6000/rs6000.opt.urls: Regenerate.
|
|
gcc/cobol
* cdf.y: Make compatible with C++14.
* copybook.h: Likewise.
* dts.h: Likewise.
* except.cc: Likewise.
* genapi.cc: Likewise.
* genutil.cc: Likewise.
* genutil.h: Likewise.
* lexio.cc: Likewise.
* parse.y: Likewise.
* parse_ante.h: Likewise.
* show_parse.h: Likewise.
* symbols.cc: Likewise.
* symbols.h: Likewise.
* util.cc: Likewise.
|
|
The COBOL tests has many tests which just dump emit lots of output
to stdout and want to compare it against expected output.
We have the dg-output directive, but if one needs more than dozens
of lines in the output, adding hundreds of dg-output directives to
each source uses too much memory and is harder to maintain.
The following patch offers an alternative, dg-output-file
directive where one can supply a text file with expected output
(no regexp matching in that case, just exact output, except that it
handles different line ending styles (for the expected file
using tcl gets, for the actual output skips over \n, \r\n or \r).
And a newline at the end of the whole output is optional (in the actual
output, because I think some boards get it eaten).
Also tested with addition or subtraction of some characters from the
expected output files and saw FAILs with appropriate messages.
2025-03-18 Jakub Jelinek <jakub@redhat.com>
* doc/sourcebuild.texi (dg-output-file): Document.
* lib/gcc-dg.exp (${tool}-load): If output-file is set, compare
combined output against content of the [lindex ${output-file} 1]
file.
(dg-output-file): New directive.
* lib/dg-test-cleanup.exp (cleanup-after-saved-dg-test): Clear
output-file variable.
* gcc.dg/dg-output-file-1.c: New test.
* gcc.dg/dg-output-file-1-lp64.txt: New test.
* gcc.dg/dg-output-file-1-ilp32.txt: New test.
|
|
This is just the member function pointer version of PR c++/105848,
in which our non-dependent call pruning may cause us to not mark an
otherwise unused function pointer template argument as used.
PR c++/119233
gcc/cp/ChangeLog:
* pt.cc (mark_template_arguments_used): Also handle member
function pointers.
gcc/testsuite/ChangeLog:
* g++.dg/template/fn-ptr5.C: New test.
Reviewed-by: Jason Merrill <jason@redhat.com>
|
|
gcc/cobol/
2025-03-18 Matthias Klose <doko@ubuntu.com>
* Make-lang.in (GCOBC_TARGET_INSTALL_NAME, gcobol-cross): New.
(cobol.all.cross): Depend on gcobol-cross.
(cobol.install-common): Adjust install for the cross build.
(cobol.uninstall): Use *_INSTALL_NAME for uninstall.
|
|
In this case the deduction for Darwin's implementation is 'char *' which
then conflicts with the second use of data.initial in the find_if
callback. Let's just specify it as 'const char *'.
gcc/cobol/ChangeLog:
* util.cc (cbl_field_t::report_invalid_initial_value): Avoid
auto here and specify const char *.
Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
|
|
While debugging a failure, I noticed that SCC copy didn't print
out what it was doing, e.g. replacing name1 with name 2.
This adds that dump.
Bootstrapped and tested on x86_64-linux-gnu.
gcc/ChangeLog:
* gimple-ssa-sccopy.cc (scc_copy_prop::replace_scc_by_value): Dump
what is being replaced with what.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
|
|
This is another piece of P1206R7, adding new members to std::unordered_map
and std::unordered_multimap.
PR libstdc++/111055
libstdc++-v3/ChangeLog:
* include/bits/unordered_map.h (unordered_map): Define from_range
constructors and insert_range member.
(unordered_multimap): Likewise.
* testsuite/23_containers/unordered_multimap/cons/from_range.cc:
New test.
* testsuite/23_containers/unordered_multimap/modifiers/insert_range.cc:
New test.
* testsuite/23_containers/unordered_map/cons/from_range.cc:
New test.
* testsuite/23_containers/unordered_map/modifiers/insert_range.cc:
New test.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
|
|
This is another piece of P1206R7, adding new members to std::unordered_set
and std::unordered_multiset.
PR libstdc++/111055
libstdc++-v3/ChangeLog:
* include/bits/hashtable.h (_M_rehash_insert)
(_M_insert_range_multi): Extracted rehashing for range insertion
to separate function.
* include/bits/unordered_set.h (unordered_set): Define from_range
constructors and insert_range member.
(unordered_multiset) Likewise.
* testsuite/23_containers/unordered_multiset/cons/from_range.cc:
New test.
* testsuite/23_containers/unordered_multiset/modifiers/insert_range.cc:
New test.
* testsuite/23_containers/unordered_set/cons/from_range.cc:
New test.
* testsuite/23_containers/unordered_set/modifiers/insert_range.cc:
New test.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
|
|
The following testcase ICEs starting with r15-3213 in
decompose_normal_address and starting with r15-3288 ICEs
in lra_rtx_hash, which since r8-5466 can't handle SUBREG
(previously SUBREG was "ei" and lra_rtx_hash can handle
that through
val += lra_rtx_hash (XEXP (x, i));
for e and
val += XINT (x, i);
for i, now it is "ep" where p stands for poly_uint16).
The following patch fixes it by handling SUBREG directly, a variant
could be instead add
case 'p':
for (int i = 0; i < NUM_POLY_INT_COEFFS; ++i)
val += SUBREG_BYTE (x).coeffs[i];
break;
if you prefer that more (p is used solely for SUBREG and e.g. rtx_equal_p
has
case 'p':
if (maybe_ne (SUBREG_BYTE (x), SUBREG_BYTE (y)))
return false;
break;
). Given the above rtx_equal_p snippet and that lra_rtx_hash
is solely used in invariant_hash (and recursion) and invariant_eq_p
uses rtx_equal_p we'll never consider different SUBREGs of the same thing
as the same invariant.
2025-03-18 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/119307
* lra.cc (lra_rtx_hash): Handle SUBREG.
* gcc.target/i386/pr119307.c: New test.
|
|
This is another piece of P1206R7, adding new members to std::set
and std::multiset.
PR libstdc++/111055
libstdc++-v3/ChangeLog:
* include/bits/stl_multiset.h: (inser_range)
(multiset(from_range_t, _Rg&&, const _Compare&, const _Alloc&))
(multiset(from_range_t, _Rg&&, const _Alloc&)): Define.
* include/bits/stl_set.h: (set(from_range_t, _Rg&&, const _Alloc&))
(set(from_range_t, _Rg&&, const _Compare&, const _Alloc&), insert_range):
Define.
* testsuite/23_containers/multiset/cons/from_range.cc: New test.
* testsuite/23_containers/multiset/modifiers/insert/insert_range.cc:
New test.
* testsuite/23_containers/set/cons/from_range.cc: New test.
* testsuite/23_containers/set/modifiers/insert/insert_range.cc:
New test.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
|