Hi!
The expansion of this builtin emits an error if the argument is not
INTEGER_CST, otherwise uses tree_to_uhwi on the argument (which is declared
int) and then uses EH_RETURN_DATA_REGNO macro which on most targets returns
INVALID_REGNUM for all values but some small number (2 or 4); if it return
Hi!
Since r10-2101-gb631bdb3c16e85f35d3 handle_store uses
count_nonzero_bytes{,_addr} which (more recently limited to statements
with the same vuse) can walk earlier statements feeding the rhs
of the store and call get_stridx on it.
Unlike most of the other functions where get_stridx is called fir
From: Pan Li
According to the issue as below.
https://hub.fgit.cf/riscv-non-isa/riscv-elf-psabi-doc/pull/416
When the mode size of vls integer mode is less than 2 * XLEN, we will
take the gpr for both the args and the return values. Instead of the
reference. For example the below code:
typedef
On Mon, Jan 29, 2024 at 01:05:51PM +0100, Richard Biener wrote:
> * gcc.target/i386/pr113622-2.c: New testcase.
> * gcc.target/i386/pr113622-3.c: Likewise.
The 2 new tests FAIL for me on i686-linux:
.../gcc/testsuite/gcc.target/i386/pr113622-2.c:5:14: error: data type of 'a'
isn't sui
Thanks Kito for comments, rebase the upstream and always goes to GPR in V2.
https://gcc.gnu.org/pipermail/gcc-patches/2024-January/644291.html
Pan
-Original Message-
From: Kito Cheng
Sent: Monday, January 29, 2024 9:23 PM
To: Li, Pan2
Cc: gcc-patches@gcc.gnu.org; juzhe.zh...@rivai.ai;
On Tue, 30 Jan 2024, Jakub Jelinek wrote:
> Hi!
>
> The expansion of this builtin emits an error if the argument is not
> INTEGER_CST, otherwise uses tree_to_uhwi on the argument (which is declared
> int) and then uses EH_RETURN_DATA_REGNO macro which on most targets returns
> INVALID_REGNUM for
On Tue, 30 Jan 2024, Jakub Jelinek wrote:
> Hi!
>
> Since r10-2101-gb631bdb3c16e85f35d3 handle_store uses
> count_nonzero_bytes{,_addr} which (more recently limited to statements
> with the same vuse) can walk earlier statements feeding the rhs
> of the store and call get_stridx on it.
> Unlike m
The UNSPEC_XTHEAD* macros ended up in the unspecv enum,
which broke gcc/testsuite/gcc.target/riscv/xtheadfmv-fmv.c.
The INSNs expect these unspecs to be not volatile.
Further, there is not reason to have them defined volatile.
So let's simply move the macros into the unspec enum.
With this patch w
In this PR, we entered early-ra with quite a bit of dead code.
The code was duly removed (to avoid wasting registers), but there
was a dangling reference in debug instructions, which caused an
ICE later.
Fixed by resetting a debug instruction if it references a register
that is no longer needed by
For something like:
void
foo (void)
{
int *ptr;
asm volatile ("%0" : "=w" (ptr));
asm volatile ("%0" :: "m" (*ptr));
}
early-ra would allocate ptr to an FPR for the first asm, thus
leaving an FPR address in the second asm. The address was then
reloaded by LRA to make it valid.
But early-r
On Sun, Jan 21, 2024 at 07:57:54PM +0530, Ajit Agarwal wrote:
>
> Hello All:
>
> New pass to replace adjacent memory addresses lxv with lxvp.
> Added common infrastructure for load store fusion for
> different targets.
>
> Common routines are refactored in fusion-common.h.
>
> AARCH64 load/stor
Yeah, that should be put in unspec rather than unspecv, LGTM :)
On Tue, Jan 30, 2024 at 5:29 PM Christoph Müllner
wrote:
>
> The UNSPEC_XTHEAD* macros ended up in the unspecv enum,
> which broke gcc/testsuite/gcc.target/riscv/xtheadfmv-fmv.c.
> The INSNs expect these unspecs to be not volatile.
>
On Mon, 29 Jan 2024, Tamar Christina wrote:
> Hi All,
>
> When analyzing loads for early break it was always the intention that
> for the exit where things get moved to we only check the loads that can
> be reached from the condition.
Looking at the code I'm a bit confused that we always move
On Tue, Jan 30, 2024 at 8:33 AM Roger Sayle wrote:
>
>
> This patch resolves PR113560, a code quality regression from GCC12
> affecting x86_64, by enhancing the middle-end's tree-ssa-math-opts.cc
> to recognize more instances of widening multiplications.
>
> The widening multiplication perception
tested on i686, x86_64 (and aarch64) Darwin, x86_64, aarch64 Linux,
OK for trunk?
thanks
Iain
--- 8< ---
We use the shared asan/hwasan from both C,C++,D and Fortran.
The sanitizer libraries link to libstdc++.
When we are using the C/gdc/gfortran driver, and the target might
require a path to the
tested on i686, x86_64 (and aarch64) Darwin, x86_64, aarch64 Linux,
OK for trunk?
thanks
Iain
--- 8< ---
We use the ubsan tests from both C, C++, D and Fortran.
the sanitizer libraries link to libstdc++.
When we are using the C/gdc/gfortran driver, and the target might
require a path to the libs
Le 29/01/2024 à 21:50, Harald Anlauf a écrit :
Am 29.01.24 um 18:25 schrieb Harald Anlauf:
I was talking about the generated format strings of runtime error
messages.
program p
implicit none
type t
real :: zzz(10) = 42
end type t
class(t), allocatable :: xx(:)
integer :: j
Richard Biener writes:
> On Mon, Jan 29, 2024 at 5:00 PM Richard Sandiford
> wrote:
>>
>> Tamar Christina writes:
>> > Hi All,
>> >
>> > Recently something in the midend had started inverting the branches by
>> > inverting
>> > the condition and the branches.
>> >
>> > While this is fine, it ma
Le 30/01/2024 à 11:38, Mikael Morin a écrit :
Another (easier) way to clarify the data reference would be rephrasing
the message so that the array part is separate from the scalar part,
like so (there are too many 'of', but I lack inspiration):
Index '0' of dimension 1 of component 'zz' of el
On Tue, Jan 30, 2024 at 11:40 AM Richard Sandiford
wrote:
>
> Richard Biener writes:
> > On Mon, Jan 29, 2024 at 5:00 PM Richard Sandiford
> > wrote:
> >>
> >> Tamar Christina writes:
> >> > Hi All,
> >> >
> >> > Recently something in the midend had started inverting the branches by
> >> > inv
The following handles the case of the main exit going to a path without
virtual use and handles it similar to the alternate exit handling.
Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed.
PR tree-optimization/113659
* tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop
On 19/01/2024 14:40, Andre Vieira wrote:
>
> Reposting for testing purposes, no changes from v2 (other than rebase).
We seem to have lost the ChangeLog for this hunk :(
The code itself looks OK, though.
This patch targets GCC-15.
Consider this following case:
unsigned int
single_loop_with_if_condition (unsigned int *restrict a, unsigned int *restrict
b,
unsigned int *restrict c, unsigned int loop_size)
{
unsigned int result = 0;
for (unsigned int i = 0; i < lo
On 19/01/2024 14:40, Andre Vieira wrote:
>
> Respin after comments from Kyrill and rebase. I also removed an if-then-else
> construct in arm_mve_check_reg_origin_is_num_elems similar to the other
> functions
> Kyrill pointed out.
>
> After an earlier comment from Richard Sandiford I also added c
Hi everyone,
This is our first upstream of 2024. It includes commits up to the 25th
of January, including fixes for some of the issues reported after our
previous patchset.
The fixes for little-endian platforms have yet to land as we are
investigating a weird scan-assembler regression on our OSX
From: Pierre-Emmanuel Patry
The compiler shall parse visibility modifiers on trait items and reject
those at a later stage (ast validation).
gcc/rust/ChangeLog:
* ast/rust-item.h (struct Visibility): Move Visibility from here...
* ast/rust-ast.h (struct Visibility): ...to here.
From: Pierre-Emmanuel Patry
This new test highlight the parser's behavior around public trait types.
gcc/testsuite/ChangeLog:
* rust/compile/trait_pub_type.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/compile/trait_pub_type.rs | 6 ++
1 file changed,
From: Pierre-Emmanuel Patry
Self parameter parsing errors may come from different situations, which
should not be handled in the same way. It is now possible to
differentiate a missing self parameter from a self pointer or a parsing
error.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h: Improve resolve_path API.
* resolve/rust-forever-stack.hxx: Likewise and fix implementation.
---
gcc/rust/resolve/rust-forever-stack.h | 19 +++--
gcc/rust/resolve/rust-forever-stack.hxx | 38 ++
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.hxx: Do not copy segment when
dereferencing iterator in `find_starting_point`.
---
gcc/rust/resolve/rust-forever-stack.hxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/resolve/rus
From: Pierre-Emmanuel Patry
Self pointer checking loop condition was inverted, the latter was
therefore never executed.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_self_param): Fix the loop
exit condition.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/par
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h: Fix `ForeverStack::resolve_path`
signature.
* resolve/rust-forever-stack.hxx: Likewise.
* resolve/rust-early-name-resolver-2.0.cc (Early::visit): Use new API.
(Early::visit_attributes):
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h: New method.
* resolve/rust-forever-stack.hxx: Likewise.
---
gcc/rust/resolve/rust-forever-stack.h | 2 ++
gcc/rust/resolve/rust-forever-stack.hxx | 20 +++-
2 files changed, 21 insertions(+
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.h: New method.
* resolve/rust-forever-stack.hxx: Likewise.
---
gcc/rust/resolve/rust-forever-stack.h | 25 ++-
gcc/rust/resolve/rust-forever-stack.hxx | 90 -
2 files changed, 110 i
From: Pierre-Emmanuel Patry
Add new tests to highlight the behavior of errors thrown when meeting a
self pointer.
gcc/testsuite/ChangeLog:
* rust/compile/self_const_ptr.rs: New test.
* rust/compile/self_mut_ptr.rs: New test.
* rust/compile/self_ptr.rs: New test.
Signed-
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast.h: Change Path API to be more consistent.
* ast/rust-path.h: Likewise.
* ast/rust-ast-collector.cc (TokenCollector::visit): Use new API.
* resolve/rust-ast-resolve-item.cc (ResolveItem::visit): Likewise.
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-ast-resolve-path.cc (ResolvePath::resolve_path): Format.
---
gcc/rust/resolve/rust-ast-resolve-path.cc | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/gcc/rust/resolve/rust-ast-resolve-path.cc
b/gcc/rust/resol
From: Pierre-Emmanuel Patry
Add a new regression test for the error message in regular function
variadic errors during ast validation pass.
gcc/testsuite/ChangeLog:
* rust/compile/non_foreign_variadic_function.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.hxx: Remove debug log.
---
gcc/rust/resolve/rust-forever-stack.hxx | 2 --
1 file changed, 2 deletions(-)
diff --git a/gcc/rust/resolve/rust-forever-stack.hxx
b/gcc/rust/resolve/rust-forever-stack.hxx
index 65796172b0
From: Pierre-Emmanuel Patry
Reject rust code with associated items on auto traits.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add auto
trait associated item check in AST validation pass.
* parse/rust-parse-impl.h: Remove old error
From: Arthur Cohen
Not sure if dealing with "labels" is the proper way of doing so, so we
might eventually change this to use `resolver.values` later on.
gcc/rust/ChangeLog:
* resolve/rust-name-resolution-context.h: Add a Labels stack.
---
gcc/rust/resolve/rust-name-resolution-context.
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-rib.h: Add Namespace enum.
---
gcc/rust/resolve/rust-rib.h | 25 +
1 file changed, 25 insertions(+)
diff --git a/gcc/rust/resolve/rust-rib.h b/gcc/rust/resolve/rust-rib.h
index 37bd90f1f75..4ffd00a5d6c 100644
From: Pierre-Emmanuel Patry
Reject auto traits containing a super trait bound during AST validation
pass.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Reject
auto traits with super traits.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust
From: Pierre-Emmanuel Patry
Generics are forbidden on auto traits and an error should be emitted.
This commit highlight this behavior.
gcc/testsuite/ChangeLog:
* rust/compile/generic_auto_trait.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/compile/generic_
From: Pierre-Emmanuel Patry
TOK suffix was chosen to disambiguate some identifiers with c++ reserved
keyword. Even though this list lies within the rust-token header, this
macro is used in many context sometimes unrelated with the lexer and
tokens. This TOK suffix may appear surprising in such co
From: Philip Herron
When making more desugaring for the HIR we can need to add new Let bindings
which will require namesolution information but also rib information for
which block the let binding is associated which was very unnessecary. This
patch simply updates the BLOCK_CONTEXT of the current
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-forever-stack.hxx: Add specific behavior for
`ForeverStack::get` when dealing with labels.
---
gcc/rust/resolve/rust-forever-stack.hxx | 29 -
1 file changed, 28 insertions(+), 1 deletion(-)
diff --gi
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::visit): Use
the DefaultResolver in the toplevel visitor.
---
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a
From: Pierre-Emmanuel Patry
Variadic regular functions were recently added in the parser as they
should be rejected in the ast validation pass. This commit add the ast
validation pass rejecting this kind of variadic arguments.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (
From: Pierre-Emmanuel Patry
Raw values may have typos or contain error, replacing those will
improve the codebase.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Replace raw value.
* parse/rust-parse-impl.h (Parser::is_macro_rules_def): Likewise.
From: Pierre-Emmanuel Patry
Functions that are both async and const shall be rejected during the
AST validation pass. This new test highlight this behavior.
gcc/testsuite/ChangeLog:
* rust/compile/const_async_function.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsui
From: Pierre-Emmanuel Patry
It might be required in the future to get only the keywords from a
specific edition. To do so we need a mean to differentiate keywords based
on their edition. This commit changes the existing keyword macro to
allow such behavior.
gcc/rust/ChangeLog:
* lex/rus
From: Pierre-Emmanuel Patry
We need to account for const specifiers in async parsing as const
can be used in the syntax before the async keyword.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_vis_item): Allow parsing async
items in const.
(Parser::parse_as
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc
(Late::setup_builtin_types): New function.
(Late::go): Setup builtin types.
* resolve/rust-late-name-resolver-2.0.h:
* resolve/rust-name-resolution-context.cc
(NameReso
From: Pierre-Emmanuel Patry
Const fn declaration in trait declarations shall emit an error. This new
test highlight this behavior.
gcc/testsuite/ChangeLog:
* rust/compile/const_trait_fn.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/compile/const_trait_fn.r
From: Pierre-Emmanuel Patry
Add a check during AST validation pass to ensure functions are either
const or async but not both.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
async const check.
Signed-off-by: Pierre-Emmanuel Patry
---
gc
From: Pierre-Emmanuel Patry
Make the underscore token a 2015 keyword.
gcc/rust/ChangeLog:
* lex/rust-token.h (enum PrimitiveCoreType): Change macro for
underscore in token list.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/lex/rust-token.h | 3 +--
1 file changed, 1 inse
From: Pierre-Emmanuel Patry
Generic parameters are not allowed on auto traits, the compiler should
emit an error.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
check for generics on auto traits.
* checks/errors/rust-ast-validation
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::insert_or_error_out): Add documentation comment.
(TopLevel::go): Likewise.
---
gcc/rust/resolve/rust-toplevel-name-resolver-2.0.cc | 8
1 file changed, 8 insertions(+)
From: Pierre-Emmanuel Patry
We already have some compile tests but it lacked an execution test to
ensure everything compiles correctly to the correct value.
gcc/testsuite/ChangeLog:
* rust/execute/torture/name_resolution.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
.../rust
From: Pierre-Emmanuel Patry
Make the attribute checker visitor inherit from the default visitor
in order to keep visit behavior shared.
gcc/rust/ChangeLog:
* util/rust-attributes.cc (AttributeChecker::visit): Add visit function
for crates.
* util/rust-attributes.h (class
From: Arthur Cohen
gcc/rust/ChangeLog:
* Make-lang.in: Compile late name resolver.
* resolve/rust-late-name-resolver-2.0.cc: New file.
* resolve/rust-late-name-resolver-2.0.h: New file.
---
gcc/rust/Make-lang.in | 1 +
.../resolve/rust-late-name
From: Pierre-Emmanuel Patry
Add a new regression test to highlight the error behavior with a super
trait on an auto trait.
gcc/testsuite/ChangeLog:
* rust/compile/auto_trait_super_trait.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/compile/auto_trait_super
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver-2.0.cc
(Early::visit): Remove visitors.
* resolve/rust-early-name-resolver-2.0.h: Likewise.
---
gcc/rust/resolve/rust-early-name-resolver-2.0.cc | 16
gcc/rust/resolve/rust-early-n
From: Nobel Singh
Fixes issue #2040
Add check to assure that a function cant be declared const inside trait impl
blocks.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
check for const funtion.
gcc/testsuite/ChangeLog:
* rust/com
From: Pierre-Emmanuel Patry
Many visit functions in the early name resolver are just plain old
traversal visit functions like the ones from the default visitor.
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver.cc
(EarlyNameResolver::resolve_generic_args):
Move function.
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Store mappings
after having resolved them.
* resolve/rust-late-name-resolver-2.0.h: Add `TypePath` visitor.
---
.../resolve/rust-late-name-resolver-2.0.cc| 33 +
From: Pierre-Emmanuel Patry
Unions with zero fields are forbidden. Add regression test for empty
unions.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
zero field check during ast validation pass.
* checks/errors/rust-ast-validatio
From: Pierre-Emmanuel Patry
The rust syntax allows unsafe module even if those are rejected at a
later stage.
gcc/rust/ChangeLog:
* ast/rust-item.h: Add safety status to Modules in the AST.
* parse/rust-parse-impl.h (Parser::parse_module): Adapt constructors.
Signed-off-by: Pie
From: Kushal Pal
Fixes issue #2768
gcc/rust/ChangeLog:
* backend/rust-compile-base.cc (HIRCompileBase::setup_abi_options):
Renamed `WIN64` to `WIN_64`
* util/rust-abi.cc (get_abi_from_string): Likewise
(get_string_from_abi): Likewise
* util/rust-abi.h (en
From: Owen Avery
gcc/rust/ChangeLog:
* checks/errors/rust-feature.cc
(Feature::name_hash_map):
Add entries for Name::LANG_ITEMS and Name::NO_CORE.
* checks/errors/rust-feature.h
(Feature::Name::LANG_ITEMS): New.
(Feature::Name::NO_CORE): New.
gcc/
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-early-name-resolver-2.0.cc
(Early::insert_once): New function.
(Early::visit): Likewise.
* resolve/rust-early-name-resolver-2.0.h: Likewise.
---
.../resolve/rust-early-name-resolver-2.0.cc | 30 +
From: Pierre-Emmanuel Patry
The 2018 edition await keyword was missing from the keyword list.
gcc/rust/ChangeLog:
* lex/rust-token.h (enum PrimitiveCoreType): Add await keyword
definition.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/rust/lex/rust-token.h | 1 +
1 file change
From: Pierre-Emmanuel Patry
Unsafe module are rejected at a later stage but could not be parsed
properly. This commit changes the parser in order to allow unsafe module
in the AST.
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_vis_item): Dispatch to parse
module w
From: Pierre-Emmanuel Patry
Missing body on a function should be rejected at a later stage in the
compiler, not during parsing.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Adapt defintion
getter.
* ast/rust-ast-visitor.cc (DefaultASTVisitor::
From: Jakub Dupak
There was a mismatch whether lifetime 'static is parsed as "static"
or "'static".
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::lifetime_from_token): Fix matched
pattern.
Signed-off-by: Jakub Dupak
---
gcc/rust/parse/rust-parse-impl.h | 4 ++--
1 file chan
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-item.h (class UseTree): Add `node_id` member.
---
gcc/rust/ast/rust-item.h | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/gcc/rust/ast/rust-item.h b/gcc/rust/ast/rust-item.h
index 2c0e45962ce..3480d126bc0 100
From: Pierre-Emmanuel Patry
Retrieving a weak keyword value is done using raw values. Introducing a
list of weak keywords means this could change.
gcc/rust/ChangeLog:
* util/rust-keyword-values.h (class WeakKeywords): Add new class with
weak keyword constexpr.
Signed-off-by: Pi
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-ast-full-decls.h
(class InherentImplItem): Remove.
* ast/rust-ast.h
(class InherentImplItem): Remove.
(class SingleASTNode):
Store pointer to AssociatedItem instead of InherentImplItem.
* ast
From: Pierre-Emmanuel Patry
Many visit functions in the expand visitor simply visit their components
like the default visitor. Making the expand visitor inherit from the
default visitor allows us to keep all visitor in sync without having to
change every visitor.
gcc/rust/ChangeLog:
* e
From: Jakub Dupak
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_generic_param): Lifetime
elision control.
(Parser::parse_lifetime_where_clause_item): Lifetime elision control.
(Parser::parse_type_param_bound): Lifetime elision control.
(Parser::par
From: Owen Avery
gcc/rust/ChangeLog:
* hir/tree/rust-hir-pattern.h
(class TupleItems): New.
(class TupleStructItems): Inherit from TupleItems.
(class TuplePatternItems): Likewise.
Signed-off-by: Owen Avery
---
gcc/rust/hir/tree/rust-hir-pattern.h | 47 +
From: Pierre-Emmanuel Patry
The old "keyword" list was used for the lexer, and could therefore not
be used with keyword spanning over multiple tokens as those tokens should
remain lexed as is. Hence the introduction of a new list macro for
keyword exclusive tasks. This also means we can no longer
From: Pierre-Emmanuel Patry
Local variables and functions or global variables have different
resolution when binded to a variable. This was not covered before, even
though it was handled by the new name resolution. This commit highlight
this behavior from the new name resolution mechanism.
gcc/t
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-tyty.h: Fix nodiscard to warn unused.
Signed-off-by: Jakub Dupak
---
gcc/rust/typecheck/rust-tyty.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.
From: Kushal Pal
Fixes #2788
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_inherent_impl_item):
Added switch-case for ASYNC token.
gcc/testsuite/ChangeLog:
* rust/compile/issue-2788.rs: New test.
Signed-off-by: Kushal Pal
---
gcc/rust/parse/rust-parse
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-toplevel-name-resolver-2.0.cc
(TopLevel::insert_or_error_out): New functions.
(TopLevel::handle_use_dec): New function.
(flatten_rebind): Likewise.
(flatten_list): Likewise.
(flatten_glob): Like
From: Pierre-Emmanuel Patry
Raw values cannot be understood easily by most tools. This commit replace
some raw values with their variable counterpart.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Replace raw value
with keyword call.
* ast/rust
From: Pierre-Emmanuel Patry
The default resolver put some scope in place but mostly has traversal
functions similar to the default ast visitor, making it inherit from the
default visitor allows us to avoid code duplication.
gcc/rust/ChangeLog:
* resolve/rust-default-resolver.cc (Default
From: Kushal Pal
Fixes #2778
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h (Parser::parse_trait_impl_item):
Handled `async` items
Signed-off-by: Kushal Pal
---
gcc/rust/parse/rust-parse-impl.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/rust/parse/rust-parse-imp
From: Jakub Dupak
This test did not compile with rustc.
gcc/testsuite/ChangeLog:
* rust/compile/torture/utf8_identifiers.rs: add mising lifetime
Signed-off-by: Jakub Dupak
---
gcc/testsuite/rust/compile/torture/utf8_identifiers.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Pierre-Emmanuel Patry
Add a new test to check for unsafe modules during AST validation pass.
gcc/testsuite/ChangeLog:
* rust/compile/unsafe_module.rs: New test.
Signed-off-by: Pierre-Emmanuel Patry
---
gcc/testsuite/rust/compile/unsafe_module.rs | 2 ++
1 file changed, 2 insert
From: M V V S Manoj Kumar
Fixes issue #2650
The parser now parses ASYNC functions. Added ASYNC case to parse_item
Added a new function parse_async_item which is called in
parse_vis_item to handle the ASYNC case. Parse_async_item
also checks the current Rust edition and generates an error if the
e
From: Jakub Dupak
Allows skipping parent check when casting.
gcc/rust/ChangeLog:
* typecheck/rust-tyty.h (BaseType::is): Cast API.
(SubstitutionRef>): Cast API.
(BaseType::as): Cast API.
(BaseType::try_as): Cast API.
Signed-off-by: Jakub Dupak
---
gcc/rust/typ
From: Raiki Tamura
gcc/rust/ChangeLog:
* Make-lang.in: Add .o files
* backend/rust-mangle.cc (struct V0Path): moved to splitted files
(v0_path): Likewise.
(legacy_mangle_name): Likewise.
(legacy_mangle_canonical_path): Likewise.
(legacy_hash): Like
From: Arthur Cohen
gcc/testsuite/ChangeLog:
* rust/execute/torture/builtin_macros1.rs: Fix output pattern.
* rust/execute/torture/coercion3.rs: Likewise.
* rust/execute/torture/issue-2080.rs: Likewise.
* rust/execute/torture/issue-2179.rs: Likewise.
* rust
From: Arthur Cohen
gcc/rust/ChangeLog:
* resolve/rust-name-resolution-context.h: Store a reference to the
mappings.
* resolve/rust-name-resolution-context.cc
(NameResolutionContext::NameResolutionContext): Likewise.
---
gcc/rust/resolve/rust-name-resolution-conte
From: Pierre-Emmanuel Patry
Add a new check in AST validation pass that checks that no function
declaration in traits are declared const.
gcc/rust/ChangeLog:
* checks/errors/rust-ast-validation.cc (ASTValidation::visit): Add
const check.
* checks/errors/rust-ast-validati
From: Jakub Dupak
gcc/rust/ChangeLog:
* typecheck/rust-tyty.h (class ClosureType): Inherit interface.
(class FnPtr): Inherit interface.
(class FnType): Inherit interface.
(class CallableTypeInterface): New interface.
(BaseType::is): Detect interface member
From: Jakub Dupak
gcc/rust/ChangeLog:
* ast/rust-ast.h: Elided lifetime static constructor
* ast/rust-type.h: Default lifetime to elided.
* parse/rust-parse-impl.h (Parser::parse_lifetime_param): Use elided
lifetime.
(Parser::parse_lifetime): Use elided lifetime/
1 - 100 of 202 matches
Mail list logo