Hi Alexandre!
On 2023-03-30T10:51:32-0300, Alexandre Oliva via Gcc-patches
wrote:
> On Mar 30, 2023, Alexandre Oliva wrote:
>
>> If we're dropping the renaming, I suppose we could also revert Jakub's
>> change. I suppose this patch will take care of it, pending testing...
>
> Regstrapped on x8
Hi,
For the following test:
svint32_t f(svint32_t v)
{
return svrev_s32 (svrev_s32 (v));
}
We generate 2 rev instructions instead of nop:
f:
rev z0.s, z0.s
rev z0.s, z0.s
ret
The attached patch tries to fix that by trying to recognize the following
pattern in ma
Hi!
tree_vect_extract uses gimple-fold/match.pd to attempt to simplify
the BIT_FIELD_REF immediately.
Unfortunately, maybe_push_res_to_seq has:
/* Play safe and do not allow abnormals to be mentioned in
newly created statements. */
for (unsigned int i = 0; i < num_ops; ++i)
if (TREE_
Hi,
The original patch to fix this PR broke the if-conversion of calls into
IFN_MASK_CALL. This patch restores that original behaviour and makes
sure the tests added earlier specifically test inbranch SIMD clones.
Bootstrapped and regression tested on aarch64-none-linux-gnu and
x86_64-pc-li
Hi!
The following testcase is miscompiled on riscv since the addition
of *mvconst_internal define_insn_and_split.
I believe the bug is in DSE. We have:
(insn 36 35 39 2 (set (mem/c:SI (plus:SI (reg/f:SI 65 frame)
(const_int -64 [0xffc0])) [2 S4 A128])
(reg:SI
On 05/04/23 01:09 +0200, Arsen Arsenović wrote:
Due to recent, large changes in libstdc++, the feature test macros
declared in got out of sync with the other headers that
possibly declare them.
libstdc++-v3/ChangeLog:
* include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
Sy
On 05/04/23 01:09 +0200, Arsen Arsenović wrote:
This test detects redefinitions by compiling stdc++.h with
-Wsystem-headers. Thanks Patrick Palka for the suggestion.
libstdc++-v3/ChangeLog:
* testsuite/17_intro/versionconflict.cc: New test.
---
libstdc++-v3/testsuite/17_intro/versionco
On Wed, 5 Apr 2023 at 00:12, Arsen Arsenović via Libstdc++
wrote:
>
> Supporting the debug mode in freestanding is a non-trivial job, so
> instead, as a best-effort, enable assertions, which are light and easy.
OK for trunk.
>
> libstdc++-v3/ChangeLog:
>
> * include/bits/c++config: When
On Wed, 5 Apr 2023 at 00:13, Arsen Arsenović via Libstdc++
wrote:
>
> At some point, was added to the non-hosted bit of the C++17
> block, which induced failures in many tests.
>
> In addition, some tests also lacked a dg-require-effective-target hosted
> tag.
>
> libstdc++-v3/ChangeLog:
>
>
Tested x86_64-linux. Pushed to trunk.
-- >8 --
This was approved at the C++ meeting in February.
libstdc++-v3/ChangeLog:
* include/bits/regex.h (sub_match::swap): New function.
* testsuite/28_regex/sub_match/lwg3204.cc: New test.
---
libstdc++-v3/include/bits/regex.h
Jonathan Wakely writes:
> On Wed, 5 Apr 2023 at 00:13, Arsen Arsenović via Libstdc++
> wrote:
>>
>> At some point, was added to the non-hosted bit of the C++17
>> block, which induced failures in many tests.
>>
>> In addition, some tests also lacked a dg-require-effective-target hosted
>> tag.
Jonathan Wakely writes:
> On 05/04/23 01:09 +0200, Arsen Arsenović wrote:
>>This test detects redefinitions by compiling stdc++.h with
>>-Wsystem-headers. Thanks Patrick Palka for the suggestion.
>>
>>libstdc++-v3/ChangeLog:
>>
>> * testsuite/17_intro/versionconflict.cc: New test.
>>---
>>
Jonathan Wakely writes:
>> [snip...]
>>+/* Duplicate definition with unique_ptr.h. */
>>+#if __cplusplus > 202002L && defined(__cpp_constexpr_dynamic_alloc)
>>+# define __cpp_lib_constexpr_memory 202202L
>>+#elif __cplusplus > 201703L
>>+# include
>
> Including is unrelated to the FTM, and sh
Arsen Arsenović via Libstdc++ writes:
> Good idea. Both the positive and negative cases work when implemented
> like this:
>
> From 98d302bab9a87d3f2daecf9d54d62f33ba216673 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?=
> Date: Wed, 8 Mar 2023 17:01:24 +0100
> Subject: [PA
On 03/27, Peter Zijlstra wrote:
> On Sat, Mar 25, 2023 at 01:54:16AM -0700, Dan Li wrote:
>
> > In the compiler part[4], most of the content is the same as Sami's
> > implementation[3], except for some minor differences, mainly including:
> >
> > 1. The function typeid is calculated differently a
On 03/27, Sami Tolvanen wrote:
> On Mon, Mar 27, 2023 at 2:30 AM Peter Zijlstra wrote:
> >
> > On Sat, Mar 25, 2023 at 01:54:16AM -0700, Dan Li wrote:
> >
> > > In the compiler part[4], most of the content is the same as Sami's
> > > implementation[3], except for some minor differences, mainly inc
On Wed, 5 Apr 2023 at 12:39, Arsen Arsenović wrote:
>
>
> Arsen Arsenović via Libstdc++ writes:
>
> > Good idea. Both the positive and negative cases work when implemented
> > like this:
> >
> > From 98d302bab9a87d3f2daecf9d54d62f33ba216673 Mon Sep 17 00:00:00 2001
> > From: =?UTF-8?q?Arsen=20Ar
On Wed, 5 Apr 2023 at 12:36, Arsen Arsenović wrote:
>
>
> Jonathan Wakely writes:
>
> >> [snip...]
> >>+/* Duplicate definition with unique_ptr.h. */
> >>+#if __cplusplus > 202002L && defined(__cpp_constexpr_dynamic_alloc)
> >>+# define __cpp_lib_constexpr_memory 202202L
> >>+#elif __cplusplus >
This patch fixes an ICE with checking enabled with the patch:
abcb5dbac666513c798e574808f849f76a1c0799
There were two problems: first, OMP_CLAUSE_CHAIN was erroneously
used as the chain pointer instead of TREE_CHAIN for a non-OMP clause
list. Secondly, "copy_node" by itself is not sufficient to
On Wed, 5 Apr 2023 at 13:09, Jonathan Wakely wrote:
>
> On Wed, 5 Apr 2023 at 12:36, Arsen Arsenović wrote:
> >
> >
> > Jonathan Wakely writes:
> >
> > >> [snip...]
> > >>+/* Duplicate definition with unique_ptr.h. */
> > >>+#if __cplusplus > 202002L && defined(__cpp_constexpr_dynamic_alloc)
>
> Am 05.04.2023 um 10:58 schrieb Jakub Jelinek via Gcc-patches
> :
>
> Hi!
>
> tree_vect_extract uses gimple-fold/match.pd to attempt to simplify
> the BIT_FIELD_REF immediately.
> Unfortunately, maybe_push_res_to_seq has:
> /* Play safe and do not allow abnormals to be mentioned in
> n
On Sun, 2 Apr 2023 11:38:42 +0200
Thomas Schwinge wrote:
> Hi Julian!
>
> On 2023-03-27T18:54:30+, Julian Brown
> wrote:
> > This patch adds support for running constructors and destructors for
> > static (file-scope) aggregates for C++ objects which are marked with
> > "declare target" dir
On 4/4/23 21:29, Jeff Law wrote:
On 4/3/23 23:13, liuhongt via Gcc-patches wrote:
There's a potential performance issue when backend returns some
unreasonable value for the mode which can be never be allocate with
reg class.
Bootstrapped and regtested on x86_64-pc-linux-gnu{-m32,}.
Ok for t
On 4/2/23 16:40, juzhe.zh...@rivai.ai wrote:
This point is seletected not because LCM but by Phase 3 (VL/VTYPE demand
info backward fusion and propogation) which
is I introduced into VSETVL PASS to enhance LCM && improve vsetvl
instruction performance.
So fusion in this context is really abou
On 4/5/23 03:16, Jakub Jelinek wrote:
Hi!
The following testcase is miscompiled on riscv since the addition
of *mvconst_internal define_insn_and_split.
I believe the bug is in DSE. We have:
(insn 36 35 39 2 (set (mem/c:SI (plus:SI (reg/f:SI 65 frame)
(const_int -64 [0xff
Am Dienstag, dem 04.04.2023 um 19:31 -0600 schrieb Jeff Law:
>
> On 4/3/23 13:34, Martin Uecker via Gcc-patches wrote:
> >
> >
> > With the relatively new warnings (11..) affecting VLA bounds,
> > I now get a lot of false positives with -Wall. In general, I find
> > the new warnings very useful,
On 4/2/23 18:38, juzhe.zh...@rivai.ai wrote:
From: Ju-Zhe Zhong
It's quite obvious that the order of vrsub SEW64 is wrong.
gcc/ChangeLog:
* config/riscv/vector.md: Fix incorrect operand order.
gcc/testsuite/ChangeLog:
* g++.target/riscv/rvv/base/bug-23.C: New test.
Tha
>> So fusion in this context is really about identifying cases where two
>> configuration settings are equivalent and you "fuse" them together.
>> Presumably this is only going to be possible when the vector insns are
>> just doing data movement rather than actual computations?
>> If my understand
Hi everyone,
This patchset contains around 80 commits concerning the Rust frontend.
We have been hard at work trying to get the Rust core library to
compile, and hope to push more commits in the coming days as we try
and upstream a more recent version of gccrs. All of the team has done
a tremendo
From: Prajwal S N
The `target_feature` attribute is for conditional compilation and may or
may not compile on all platforms. Using it requires an unsafe function
or block.
gcc/rust/ChangeLog:
* checks/errors/rust-unsafe-checker.cc (check_target_attr): New
function.
(UnsafeCheck
From: Raiki Tamura
gcc/rust/ChangeLog:
* ast/rust-ast-full-decls.h (class MacroItem): Remove forward
declaration.
* ast/rust-ast-full-test.cc (MacroRulesDefinition):
Rework MacroRulesDefinition class
* ast/rust-ast.h (class MacroItem): Remove abstract class.
From: Dave
Use StackedContext instead. Fix error string
Signed-off-by: Dave Evans
(Squashed commits) Check for mutable references in const functions using
StackedContext
gcc/rust/ChangeLog:
* checks/errors/rust-const-checker.cc (ConstChecker::visit): Use
StackedContext
clas
From: Arthur Cohen
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Fix typo.
---
gcc/rust/rust-session-manager.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/rust-session-manager.cc b/gcc/rust/rust-session-manager.cc
index 732aabe
From: mxlol233
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_generic_arg): Add proper bound
parsing.
gcc/testsuite/ChangeLog:
* rust/compile/bounds.rs: New test.
Signed-off-by: Xiao Ma
---
gcc/rust/parse/rust-parse-impl.h | 17 +
gcc/tests
From: Philip Herron
When specifying generic arguments to Traits we can also specify the
associated types using `` syntax we need to add
name resolution to the type argument here and rely on the type
resolution pass to ensure the associated type exists and to setup the
associated types accordingly
From: Owen Avery
This allows patterns to declare multiple/no variables
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc
(HIRCompileBase::compile_locals_for_block):
Allow patterns to declare zero or multiple variables.
* backend/rust-compile-var-decl.h: Change function
From: mxlol233
This commit adds virtual function get_locus to base class MetaItemInner,
which is helpful when we need to print diagnostics on some sub-classes of
MetaItemInner.
gcc/rust/ChangeLog:
* ast/rust-ast.h: Add get_locus method.
* ast/rust-expr.h: Likewise.
* as
From: Owen Avery
Update Rust type-checking to reuse TypeCheckPattern on HIR::LetStmt's.
This will unify the paths and improve error handling.
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-stmt.cc (TypeCheckStmt::visit): Cleanup
LetStmt
type checking.
Signed-off-by: Owen
From: Owen Avery
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-pattern.h: Support GroupedPattern properly.
Signed-off-by: Owen Avery
---
gcc/rust/resolve/rust-ast-resolve-pattern.h | 5 +
1 file changed, 5 insertions(+)
diff --git a/gcc/rust/resolve/rust-ast-resolve-pattern.h
b
From: mxlol233
Currently, the diagnostics only point to the corresponding token's
start position by carets, and lack of underlines for full token. This
commit add support for such underlines in diagnostics by encoding range
information in location_t.
gcc/rust/ChangeLog:
* lex/rust-lex.
From: Lyra
This commit fixes a compiler crash when expanding an empty macro into an
existing AST.
gcc/rust/ChangeLog:
* expand/rust-macro-expand.cc (transcribe_expression): Fix ICE when
expanding
empty macros.
gcc/testsuite/ChangeLog:
* rust/compile/macro45.rs: New t
From: Philip Herron
This patch adds support for the GenercArgsBinding type, where you can
specify the associated types of a trait bound using `` style
syntax. Note that the type-resolution relys on the i32 impl for Add
as type resolution will resolve the `a+a` to the core::ops::Add method
so code
From: Owen Avery
gcc/rust/ChangeLog:
* hir/rust-ast-lower-pattern.cc (ASTLoweringPattern::visit): Add proper
visitor.
* hir/rust-ast-lower-pattern.h: Declare it.
Signed-off-by: Owen Avery
---
gcc/rust/hir/rust-ast-lower-pattern.cc | 16
gcc/rust/hir/rust-ast-
From: Owen Avery
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit):
Add proper
visitor.
Signed-off-by: Owen Avery
---
gcc/rust/typecheck/rust-hir-type-check-pattern.cc | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff -
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-pattern.cc (CompilePatternCaseLabelExpr::visit):
Add proper
visitor.
(CompilePatternBindings::visit): Likewise.
* backend/rust-compile-pattern.h: Declare them.
Signed-off-by: Owen Avery
---
gcc/rust/b
From: Owen Avery
gcc/rust/ChangeLog:
* hir/tree/rust-hir-pattern.h: Add get_item method.
Signed-off-by: Owen Avery
---
gcc/rust/hir/tree/rust-hir-pattern.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/gcc/rust/hir/tree/rust-hir-pattern.h
b/gcc/rust/hir/tree/rust-hir-patt
From: Arthur Cohen
In dg-output, check for \r* carriage returns to make sure execution
tests pass on windows platforms
gcc/testsuite/ChangeLog:
* rust/execute/torture/builtin_macro_cfg.rs: Handle carriage returns
properly.
* rust/execute/torture/builtin_macro_con
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-macro.h (enum class): Add `BuiltinMacro` enum class.
* expand/rust-attribute-visitor.cc (AttrVisitor::visit): Mention
switching on `macro.kind` once builtin macro invocations are properly
handled.
* parse/r
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-pattern.cc (CompilePatternLet::visit): New
function.
* backend/rust-compile-stmt.cc (CompileStmt::visit): Likewise.
* backend/rust-compile-pattern.h (class CompilePatternLet): New visitor.
Signed-off-by: Owen A
From: Parthib
gcc/rust/ChangeLog:
* Make-lang.in: Rename object file.
* ast/rust-ast-full-test.cc: Moved to...
* ast/rust-ast.cc: ...here.
---
gcc/rust/Make-lang.in | 2 +-
gcc/rust/ast/{rust-ast-full-test.cc => rust-ast.cc} | 0
2 files cha
From: Abdul Rafey
gcc/rust/ChangeLog:
* ast/rust-ast.cc: Fix include list.
* ast/rust-expr.h: Likewise.
* hir/tree/rust-hir-expr.h: Likewise.
* rust-backend.h: Likewise.
* util/rust-lang-item.h: Likewise.
* operator.h: Moved to...
* util/ru
From: Arthur Cohen
The parser now recursively tries to parse a reference type after seeing
a `&` or `&&` token.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_type): Handle double ampersan
properly
(Parser::parse_reference_type): Call into `parse_reference_
From: MAHAD
gcc/rust/ChangeLog:
* rust-buffered-queue.h: Moved to...
* util/rust-buffered-queue.h: ...here.
Signed-off-by: Muhammad Mahad
---
gcc/rust/{ => util}/rust-buffered-queue.h | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename gcc/rust/{ => util}/rust-buffere
From: Abdul Rafey
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc (Dump::visit): removed extra indentations in
trait ast dump
Signed-off-by: Abdul Rafey
---
gcc/rust/ast/rust-ast-dump.cc | 7 +--
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/gcc/rust/ast/rust-ast-dump.c
From: Owen Avery
gcc/rust/ChangeLog:
* hir/rust-ast-lower-pattern.cc
(ASTLoweringPattern::visit): Lower AST::GroupedPattern to its inner
pattern.
Signed-off-by: Owen Avery
---
gcc/rust/hir/rust-ast-lower-pattern.cc | 12 +---
1 file changed, 1 insertion(+), 11 deletio
From: Abdul Rafey
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::null_denotation): Add proper error
when seeing wildcard var on right side of assignment.
gcc/testsuite/ChangeLog:
* rust/compile/issue-867.rs: New test.
Signed-off-by: Abdul Rafey
---
gcc/rust/p
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-fnparam.h
(CompileFnParam::visit): Remove HIR::GroupedPattern visitor.
* backend/rust-compile-pattern.cc
(CompilePatternCaseLabelExpr::visit): Remove HIR::GroupedPattern
visitor.
(CompilePatternB
From: Owen Avery
gcc/rust/ChangeLog:
* hir/tree/rust-hir-pattern.h
(class ReferencePattern): Remove has_two_amps field.
* hir/tree/rust-hir-full-test.cc
(ReferencePattern::as_string): Remove usage of
ReferencePattern::has_two_amps.
Signed-off-by: Owen Avery
---
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-pattern.h:
(ReferencePattern::is_double_reference): Add method.
(ReferencePattern::get_is_mut): Add method.
* hir/rust-ast-lower-pattern.cc
(ASTLoweringPattern::visit): Add ReferencePattern visitor.
*
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Removed
copy-pasted comment.
Signed-off-by: Owen Avery
---
gcc/rust/backend/rust-compile-expr.cc | 24
1 file changed, 24 deletions(-)
diff --git a/gcc/rust/backend/rus
From: Philip Herron
This moves the implementation code out of the header and into its
respective cc file.
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-tyty-bounds.cc (TypeBoundPredicateItem::error):
refactor
(TypeBoundPredicateItem::is_error): likewise
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* Make-lang.in: update the makefile
* typecheck/rust-tyty.cc (SubstitutionParamMapping::need_substitution):
likewise
(SubstitutionParamMapping::override_context): likewise
(SubstitutionRef::ge
From: Arthur Cohen
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_closure_expr): Advance tokens
properly when parsing closure param list.
gcc/testsuite/ChangeLog:
* rust/compile/closure_move_expr.rs: New test.
---
gcc/rust/parse/rust-parse-impl.h
From: Philip Herron
This extract these helpers into seperate files
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* Make-lang.in: update makefile
* typecheck/rust-tyty.cc (TyVar::TyVar): move to new file
(TyVar::get_tyty): likewise
(TyVar::get_implicit_infer_
From: mxlol233
This commit implements a very basic feature checking module.
gcc/rust/ChangeLog:
* Make-lang.in: Add object files: `rust-feature.o` and
`rust-feature-gate.o`
* checks/errors/rust-feature-gate.cc: New file.
* checks/errors/rust-feature-gate.h: New file.
From: Philip Herron
When we check if this is concrete the guard checks to ensure the argument
is non null but the check here is wrongly returning early when the check
is non null meaning when it is null and therefore not concrete it will
end up doing a null dereference.
Signed-off-by: Philip Her
From: Arthur Cohen
The parser was missing code for handling complex type arguments such
as type paths or nested generics.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_generic_arg): Handle type
paths and nested generics properly.
gcc/testsuite/ChangeLog:
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-tyty.cc (BaseType::BaseType): refactor
(BaseType::~BaseType): likewise
(BaseType::get_ref): likewise
(BaseType::set_ref): likewise
(BaseType::get_ty_ref): likewise
From: Philip Herron
We need these lang items to be defined and later down the line the mappings
will be used to implement proper copy and clone logic.
Fixes #1786
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* util/rust-lang-item.h:
gcc/testsuite/ChangeLog:
* rust/compi
From: Philip Herron
This demonstrates that this also works for custom algebraic data types too.
gcc/testsuite/ChangeLog:
* rust/execute/torture/issue-1720-2.rs: New test.
Signed-off-by: Philip Herron
---
.../rust/execute/torture/issue-1720-2.rs | 30 +++
1 file c
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-path-probe.cc
(PathProbeCandidate::Candidate::Candidate): refactor
(PathProbeCandidate::PathProbeCandidate): likewise
(PathProbeCandidate::as_string): likewise
(PathProbeC
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* Make-lang.in: update name
* typecheck/rust-tyctx.cc: Moved to...
* typecheck/rust-typecheck-context.cc: ...here.
---
gcc/rust/Make-lang.in | 2 +-
gcc/rust/
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-path-probe.cc (PathProbeType::PathProbeType):
refactor
(PathProbeType::Probe): likewise
(PathProbeType::visit): likewise
(PathProbeType::process_enum_item_for_candiates):
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-macro-expand.cc (MacroExpander::expand_eager_invocations):
Add documentation explaining the algorithm.
---
gcc/rust/expand/rust-macro-expand.cc | 14 +++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git
From: Philip Herron
This patch changes the recusive substitution code to take a reference
instead of a copy. This is important as the callback field is going to be
made non-copyable in a future patch and this pipeline is for recursive
substitutions so its ok to reuse the same mappings here.
Sign
From: Philip Herron
When we set the callback on substitutions this is not safe to be copied
around since we store the used argument mappings and can reuse them in
different contexts. This clears the callback on copy's to make it safer.
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
From: Owen Avery
gcc/rust/ChangeLog:
* typecheck/rust-tyty-call.cc
(TypeCheckCallExpr::visit): Add variadic argument type checking.
(TypeCheckCallExpr::visit): Fix comment spelling ("varadic").
gcc/testsuite/ChangeLog:
* rust/execute/torture/overflow1.rs: Fix te
From: Philip Herron
During CallExpr argument type checking we may be calling a default
implementation of a trait function this will require any possible
associated types to be resolved and setup. This monomoprhization call does
this but it will premtivly do extra unification of types which will t
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-substitution-mapper.cc (SubstMapper::SubstMapper):
refactor
(SubstMapper::Resolve): likewise
(SubstMapper::InferSubst): likewise
(SubstMapper::have_generic_args): likewise
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-type-check.h: refactor
* typecheck/rust-tyctx.cc (TypeCheckContext::iterate): refactor
(TypeCheckContext::have_loop_context): likewise
(TypeCheckContext::push_new_loop_cont
From: Pierre-Emmanuel Patry
RAIIFile constructor was accepting directory filename. This lead to
unattended directory opening in some part of the code (load_file_bytes)
wich resulted in ice. Since RAIIFile are used for the lexer, removing
the ability to open directories with RAIIFile fixes those i
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-hir-trait-ref.h: Moved to...
* typecheck/rust-hir-trait-reference.h: ...here.
* typecheck/rust-hir-trait-resolve.cc: refactor
* typecheck/rust-hir-trait-resolve.h (RUST_HIR_TRA
From: Philip Herron
This updates the higher ranked trait bounds computation to handle ambigious
cases. When we have a slice for example:
let slice = &a[1..3];
This works by reusing the Index operator overload from libcore, so when the
index range of 1..3 is computed, the type system needs to
From: Pierre-Emmanuel Patry
Add two new tests with empty string for include_str and include_bytes
macros.
gcc/testsuite/ChangeLog:
* rust/compile/issue-1830_bytes.rs: New test.
* rust/compile/issue-1830_str.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): remove error
message
gcc/testsuite/ChangeLog:
* rust/compile/func3.rs: update test case
---
gcc/rust/typecheck/rust-tyty-call.cc | 5 -
gcc/tes
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-tyty-subst.cc: add missing callback
---
gcc/rust/typecheck/rust-tyty-subst.cc | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/rust/typecheck/rust-tyty-subst.cc
b/gcc/rust/typecheck/rust-tyty
From: Owen Avery
gcc/rust/ChangeLog:
* hir/tree/rust-hir-pattern.h
(TuplePatternItemsRanged::get_lower_patterns): Add method.
(TuplePatternItemsRanged::get_upper_patterns): Add method.
* backend/rust-compile-pattern.cc
(CompilePatternLet::visit): Implement
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* hir/tree/rust-hir-item.h: implement virtual function
* hir/tree/rust-hir.h: add virtual function
---
gcc/rust/hir/tree/rust-hir-item.h | 17 -
gcc/rust/hir/tree/rust-hir.h | 2 ++
2 fi
From: Philip Herron
This refactors the unification systems to be a consistent interface using
switch statements and simple functions instead of the old clunky visitor
system. This is more maintainable as it is harder to miss cases when we
can take advantages of switch statements.
Signed-off-by:
From: Philip Herron
Existing tests are updated to use libcore copy and clone implementation.
Addresses #1725
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* typecheck/rust-unify.cc (UnifyRules::go): ensure the bounds are
checked
gcc/testsuite/ChangeLog:
* rust/compile/t
From: Arthur Cohen
gcc/rust/ChangeLog:
* parse/rust-parse.h: Move `parse_macro_invocation` to public API.
---
gcc/rust/parse/rust-parse.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 2f767bb2a53..
From: Thomas Schwinge
'dg-excess-errors' "indicates that the test is expected to fail due to compiler
messages that are not handled by 'dg-error', [etc.]". It's argument doesn't
specify the message to match but just just a comment. Here, however, we'd like
to match specific compiler messages, s
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-macro-invoc-lexer.cc (MacroInvocLexer::get_token_slice):
Add API to retrieve token slices when lexing macro expansions.
* expand/rust-macro-invoc-lexer.h: Declare `get_token_slice`.
---
gcc/rust/expand/rust-macro-invoc
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-item.h (class BlockExpr): Remove forward declaration of
class `BlockExpr`.
---
gcc/rust/ast/rust-item.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index
From: Pierre-Emmanuel Patry
Move function body to their own cc file instead of keeping them in the
header file.
gcc/rust/ChangeLog:
* Make-lang.in: Add `rust-hir-trait-reference.o`.
* typecheck/rust-hir-trait-reference.h: Remove multiple function body.
* typecheck/rust-h
From: Arthur Cohen
This commit changes our macro expansion system from an eager and recursive
macro expansion to a fixed-point like system. Instead of, when seeing
a macro invocation, expanding it and all of the macros within it, we
now perform multiple passes of expansion on the entire crate.
T
From: Pierre-Emmanuel Patry
The compiler's warning message about the safety flag did not match
cargo-gccrs environment variable name anymore.
gcc/rust/ChangeLog:
* rust-session-manager.cc (Session::compile_crate): Update the
environment variable name.
Signed-off-by: Pierre-Emma
From: Thomas Schwinge
gcc/rust/ChangeLog:
* ast/rust-ast-fragment.cc: Update copyright years.
* ast/rust-ast-fragment.h: Likewise.
* ast/rust-macro.cc: Likewise.
* checks/errors/rust-feature-gate.cc: Likewise.
* checks/errors/rust-feature-gate.h: Likewise.
From: Owen Avery
gcc/testsuite/ChangeLog:
* rust/compile/variadic.rs: New test.
Signed-off-by: Owen Avery
---
gcc/testsuite/rust/compile/variadic.rs | 8
1 file changed, 8 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/variadic.rs
diff --git a/gcc/testsuite/rus
From: mxlol233
This commit implemented a feature gate to check `intrinsics`.
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.cc: Add implementation for
`void FeatureGate::visit (AST::ExternBlock &block)`. Add `valid_feature`
construction process in `FeatureGate::ch
1 - 100 of 168 matches
Mail list logo