Hi Alexandre,
on 2023/4/6 13:20, Alexandre Oliva wrote:
> Hello, Kewen,
>
> On Mar 27, 2023, "Kewen.Lin" wrote:
>
>> on 2023/3/25 16:35, Alexandre Oliva wrote:
>
>>> The first loop in main gets stores "vectorized" on powerpc into
>>> full-word stores, even without any vector instruction suppor
I spotted this problem while trying to collate my WIP patches (sorry
for not spotting it when the original patch was discussed).
Although we do not yet have any regression filed against this (AFAIK),
it's only a matter of time - so I'd suggest that we should apply to
13.
Tested on x86_64-darwin2
Add Zcmp extension testcases, zcmpe means Zcmp with RVE extension.
Co-Authored by: Nandni Jamnadas
Co-Authored by: Yulong Shi
Co-Authored by: Shihua Liao
Co-Authored by: Sinan Lin
gcc/testsuite/ChangeLog:
* gcc.target/riscv/zc-zcmp-push-pop-1.c: New test.
* gcc.target/riscv/z
This patch is the minimal support for ZC* extensions, include the extension
name, mask and target defination. Also define the dependencies with Zca
and Zce extension. Notes that all ZC* extensions depend on the Zca extension.
Zce includes all relevant ZC* extensions for microcontrollers using. Zce
Add Zcmp extension instructions support. Generate push/pop
with follow steps:
1. preprocessing:
1.1. if there is no push rtx, then just return. e.g.
(note 5 1 22 2 [bb 2] NOTE_INSN_BASIC_BLOCK)
(insn/f 22 5 23 2 (set (reg/f:SI 2 sp)
(plus:SI (reg/f:SI 2 sp)
(const_int -
RISC-V Code Size Reduction(ZC*) extensions is a group of extensions
which define subsets of the existing C extension (Zca, Zcd, Zcf) and new
extensions(Zcb, Zcmp, Zcmt) which only contain 16-bit encodings.[1]
The implementation of the RISC-V Code Size Reduction extension in GCC is
an important st
From: Charlie Keaney
Add all ZC* extensions march args tests.
Co-Authored by: Nandni Jamnadas
Co-Authored by: Jiawei
Co-Authored by: Mary Bennett
Co-Authored by: Simon Cook
gcc/testsuite/ChangeLog:
* gcc.target/riscv/arch-20.c: New test.
* gcc.target/riscv/arch-21.c: New te
This patch enables the compressible features with ZC* extensions.
Since all ZC* extension depends on the Zca extension, it's sufficient to only
add the target Zca to extend the target RVC.
Co-Authored by: Mary Bennett
Co-Authored by: Nandni Jamnadas
Co-Authored by: Simon Cook
gcc/ChangeLog:
Skip ppc-fortran.exp if a trivial fortran program cannot be compiled.
Regstrapped on x86_64-linux-gnu and ppc64-linux-gnu. Also tested on
ppc64-vx7r2 with gcc-12, with the Fortran language disabled. Ok to
install?
for gcc/testsuite/ChangeLog
* gcc.target/powerpc/ppc-fortran/ppc-for
Hi Alexandre,
on 2023/4/6 12:43, Alexandre Oliva wrote:
> Hello, Kewen,
>
> Thanks for the feedback.
>
> On Mar 27, 2023, "Kewen.Lin" wrote:
>
>> on 2023/3/25 16:37, Alexandre Oliva via Gcc-patches wrote:
>>>
>>> When long double is 64-bit wide, as on vxworks, the rs6000 backend
>>> defines ne
Hi,
This patch removes byte reverse operation before vector integer sign
extension on big endian. These built-ins require to sign extend the element
of the input vector that would fall in the least significant portion of the
result element. So both BE and LE should do the same operation and the b
Hello, Kewen,
On Mar 27, 2023, "Kewen.Lin" wrote:
> on 2023/3/25 16:35, Alexandre Oliva wrote:
>> The first loop in main gets stores "vectorized" on powerpc into
>> full-word stores, even without any vector instruction support, so the
>> test's expectation of no loop vectorization is not met.
> -Original Message-
> From: Vladimir Makarov
> Sent: Wednesday, April 5, 2023 8:59 PM
> To: Jeff Law ; Liu, Hongtao
> ; gcc-patches@gcc.gnu.org
> Subject: Re: [PATCH] Check hard_regno_mode_ok before setting lowest
> memory move cost for the mode with different reg classes.
>
>
> On 4/
Hello, Kewen,
Thanks for the feedback.
On Mar 27, 2023, "Kewen.Lin" wrote:
> on 2023/3/25 16:37, Alexandre Oliva via Gcc-patches wrote:
>>
>> When long double is 64-bit wide, as on vxworks, the rs6000 backend
>> defines neither the __ibm128 type nor the __SIZEOF_IBM128__ macro, but
>> pr99708.
There was a typo in the attributes of the option
-param=vect-induction-float= for IntegerRange.
This fixes that typo.
Committed to GCC 12 branch as obvious after a build/test.
gcc/ChangeLog:
PR tree-optimization/109427
* params.opt (-param=vect-induction-float=):
Fix opti
There was a typo in the attributes of the option
-param=vect-induction-float= for IntegerRange.
This fixes that typo.
Committed as obvious after a build/test.
gcc/ChangeLog:
PR tree-optimization/109427
* params.opt (-param=vect-induction-float=):
Fix option attribute typo
> -原始邮件-
> 发件人: "Jeff Law"
> 发送时间: 2023-04-05 09:30:43 (星期三)
> 收件人: "Hans-Peter Nilsson" , Jiawei
> 抄送: gcc-patches@gcc.gnu.org, kito.ch...@sifive.com, pal...@dabbelt.com,
christoph.muell...@vrull.eu, wuwei2...@iscas.ac.cn
> 主题: Re: [PATCH v2] RISC-V: Add Z*inx imcompatible check in g
On Apr 5, 2023, Thomas Schwinge wrote:
> Given the two "OK"s that you got end of last week, are you going to push
> that anytime soon, please?
Apologies for the delay.
> With...
> Co-authored-by: Thomas Schwinge
> ... added, I suppose.
I wrote the patch based on your report, before eve
On Mon, Apr 3, 2023 at 4:51 PM Haochen Jiang via Gcc-patches
wrote:
>
> Hi all,
>
> These patch aims to add Intel AMX-COMPLEX instructions. Also we added
> AMX-COMPLEX to -march=graniterapids.
>
> The information is based on newly released
> Intel Architecture Instruction Set Extensions and Future
On Mar 30, 2023, Gerald Pfeifer wrote:
> On Thu, 30 Mar 2023, Alexandre Oliva wrote:
>> How about this, does this seem useful?
> I like it - helpful and easy to understand. :-)
'k, I'm putting it in, thanks
On Mar 30, 2023, Arsen Arsenović wrote:
> IMO, yes - in fact, the libstdc++ manual e
On 4/5/23 14:10, Andrew MacLeod via Gcc-patches wrote:
When a statement is first processed, any SSA_NAMEs that are dependencies
are cached for quick future access.
if we ;later rewrite the statement (say propagate a constant into it),
its possible the ssa-name in this cache is no longer act
Hello,
Ping https://gcc.gnu.org/pipermail/gcc-patches/2022-November/606450.html
Thanks,
Lorenzo Salvadore
> From f8e2c2ee89a7d8741bb65163d1f1c20edcd546ac Mon Sep 17 00:00:00 2001
> From: Lorenzo Salvadore develo...@lorenzosalvadore.it
>
> Date: Wed, 16 Nov 2022 11:27:38 +0100
> Subject: [PATCH
This change brings atomic fences in line with table A.6 of the ISA
manual.
Relax mem_thread_fence according to the memmodel given.
2023-04-05 Patrick O'Neill
* riscv.cc: Expose helper functions to sync.md.
* riscv-protos.h: Likewise.
* sync.md (mem_thread_fence_1): Chang
This change brings atomic stores in line with table A.6 of the ISA
manual.
2023-04-05 Patrick O'Neill
PR target/89835
* sync.md (atomic_store): Use simple store instruction in
combination with a fence.
* pr89835.c: New test.
Signed-off-by: Patrick O'Neill
This patch enforces SEQ_CST for atomic compare_exchange ops.
Replace Fence/LR.aq/SC.aq pairs with strong SEQ_CST LR.aqrl/SC.rl pairs
recommended by table A.6 of the ISA manual.
2023-04-05 Patrick O'Neill
* sync.md: Change FENCE/LR.aq/SC.aq into sequentially
consistent LR.aqrl/SC
Replace LR.aq/SC.rl pairs with the SEQ_CST LR.aqrl/SC.rl pairs
recommended by table A.6 of the ISA manual.
2023-04-05 Patrick O'Neill
* atomic.c: Change LR.aq/SC.rl pairs into sequentially
consistent LR.aqrl/SC.rl pair.
Signed-off-by: Patrick O'Neill
---
libgcc/config/riscv/at
Introduce the %I and %J flags for setting the .aqrl bits on LR/SC pairs
as needed.
Atomic compare and exchange ops provide success and failure memory
models. C++17 and later place no restrictions on the relative strength
of each model, so ensure we cover both by using a model that enforces
the ord
Atomic operations with the appropriate bits set already enfore release
semantics. Remove unnecessary release fences from atomic ops.
This change brings AMO ops in line with table A.6 of the ISA manual.
2023-04-05 Patrick O'Neill
* riscv.cc (riscv_memmodel_needs_amo_acquire): Change func
This patch sets the relevant .rl bits on amo operations.
2023-04-05 Patrick O'Neill
* riscv.cc (riscv_print_operand): change behavior of %A to
include release bits.
Signed-off-by: Patrick O'Neill
---
gcc/config/riscv/riscv.cc | 7 ++-
1 file changed, 6 insertions(+), 1 del
Remove references to MEMMODEL_SYNC_* models by converting via
memmodel_base().
2023-04-05 Patrick O'Neill
* atomic.c: Remove MEMMODEL_SYNC_* cases and sanitize memmodel
input with memmodel_base
Signed-off-by: Patrick O'Neill
---
gcc/config/riscv/riscv.cc | 11 +++
1 f
This patchset aims to bring the RISCV atomics implementation in line
with the recommended mapping present in table A.6 of the ISA manual.
https://github.com/riscv/riscv-isa-manual/blob/c7cf84547b3aefacab5463add1734c1602b67a49/src/memory.tex#L1083-L1157
The current mapping in GCC is not internal
Hi Harald,
Quite right - good spot. There was an 'else' that turned out to be
unnecessary.
Thanks
Paul
On Wed, 5 Apr 2023 at 19:50, Harald Anlauf wrote:
> Hi Paul,
>
> On 4/5/23 08:53, Paul Richard Thomas via Gcc-patches wrote:
> > Hi All,
> >
> > This is a first in my recent experience - a
On Mon, 3 Apr 2023, Jason Merrill wrote:
> On 4/3/23 10:49, Patrick Palka wrote:
> > This testcase demonstrates we can legitimately enter satisfaction with
> > an ARGUMENT_PACK_SELECT argument, which is problematic because we can't
> > store such arguments in the satisfaction cache (or any other h
When a statement is first processed, any SSA_NAMEs that are dependencies
are cached for quick future access.
if we ;later rewrite the statement (say propagate a constant into it),
its possible the ssa-name in this cache is no longer active. Normally
this is not a problem, but the changed to
Hi again,
On Wed, Apr 05, 2023 at 11:43:30AM -0600, Jeff Law wrote:
> On 4/5/23 11:38, Segher Boessenkool wrote:
> >Right. But it seems to me it has been there all those years? Does the
> >new testcase fail on older branches? Even if not, it seems clear it is
> >wrong on the older branches as w
On 4/5/23 20:50, Harald Anlauf via Gcc-patches wrote:
can you have a look again at the logic in the hunk touching
trans-stmt.cc (gfc_trans_allocate)? I haven't checked in detail,
but it seems possible that you get a stale tmp in the
gfc_prepend_expr_to_block if (code->ext.alloc.expr3_not_explici
Hi Paul,
On 4/5/23 08:53, Paul Richard Thomas via Gcc-patches wrote:
Hi All,
This is a first in my recent experience - a very old bug that produces too
many finalizations! It results from a bit of a fix up, where class objects
are allocated using the derived typespec, rather than a source or mo
On 4/5/23 11:38, Segher Boessenkool wrote:
On Wed, Apr 05, 2023 at 09:07:30AM -0600, Jeff Law wrote:
On 4/5/23 08:21, Segher Boessenkool wrote:
On Wed, Mar 29, 2023 at 07:48:00AM -0600, Jeff Law wrote:
So as mentioned in the PR the underlying issue here is combine changes
the form of an exi
On Wed, Apr 05, 2023 at 09:07:30AM -0600, Jeff Law wrote:
> On 4/5/23 08:21, Segher Boessenkool wrote:
> >On Wed, Mar 29, 2023 at 07:48:00AM -0600, Jeff Law wrote:
> >>So as mentioned in the PR the underlying issue here is combine changes
> >>the form of an existing insn, but fails to force re-reco
On Wed, Apr 5, 2023 at 10:32 AM Patrick Palka via Gcc-patches
wrote:
>
> On Wed, 5 Apr 2023, Patrick Palka wrote:
>
> > r13-6098-g46711ff8e60d64 made make_typename_type no longer ignore
> > non-types during the lookup, unless the TYPENAME_TYPE in question was
> > followed by the :: scope resolutio
On Wed, 5 Apr 2023, Patrick Palka wrote:
> r13-6098-g46711ff8e60d64 made make_typename_type no longer ignore
> non-types during the lookup, unless the TYPENAME_TYPE in question was
> followed by the :: scope resolution operator. But there is another
> exception to this rule: we need to ignore non
On 4/5/23 10:48, Jakub Jelinek wrote:
On Wed, Apr 05, 2023 at 10:17:59AM -0600, Jeff Law wrote:
It is true that an instruction like
(insn 8 7 9 2 (set (reg:HI 141)
(subreg:HI (reg:SI 142) 0)) "aauu.c":6:18 181 {*movhi_internal}
(nil))
can appear in the IL on WORD_REGISTER_OPE
r13-6098-g46711ff8e60d64 made make_typename_type no longer ignore
non-types during the lookup, unless the TYPENAME_TYPE in question was
followed by the :: scope resolution operator. But there is another
exception to this rule: we need to ignore non-types during the lookup
also if the TYPENAME_TYPE
Ping patch:
| Date: Mon, 27 Mar 2023 23:19:55 -0400
| From: Michael Meissner
| Subject: [PATCH, V3] PR target/105325, Make load/cmp fusion know about
prefixed loads
| Message-ID:
--
Michael Meissner, IBM
PO Box 98, Ayer, Massachusetts, USA, 01432
email: meiss...@linux.ibm.com
On Wed, Apr 05, 2023 at 10:17:59AM -0600, Jeff Law wrote:
> > It is true that an instruction like
> > (insn 8 7 9 2 (set (reg:HI 141)
> > (subreg:HI (reg:SI 142) 0)) "aauu.c":6:18 181 {*movhi_internal}
> > (nil))
> > can appear in the IL on WORD_REGISTER_OPERATIONS target, but I thin
On 4/5/23 08:51, Jakub Jelinek wrote:
On Wed, Apr 05, 2023 at 07:14:23AM -0600, Jeff Law wrote:
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:
Committed to trunk.
Dave
---
Fix 22_locale/locale/cons/12658_thread-2.cc on hppa.
2023-04-05 John David Anglin
libstdc++-v3/ChangeLog:
* testsuite/22_locale/locale/cons/12658_thread-2.cc: Double
timeout factor on hppa*-*-*.
diff --git a/libstdc++-v3/testsuite/22_locale/loca
On 4/5/23 08:21, Segher Boessenkool wrote:
Hi!
On Wed, Mar 29, 2023 at 07:48:00AM -0600, Jeff Law wrote:
So as mentioned in the PR the underlying issue here is combine changes
the form of an existing insn, but fails to force re-recognition. As a
result other parts of the compiler blow up.
Committed to trunk after testing on hppa-unknown-linux-gnu.
Dave
---
Add assember CFI directives to millicode division and remainder routines.
The millicode division and remainder routines trap division by zero.
The unwinder needs these directives to unwind divide by zero traps.
2023-04-05 Joh
On Wed, Apr 05, 2023 at 07:14:23AM -0600, Jeff Law wrote:
> > 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)
> >
Hi!
On Wed, Mar 29, 2023 at 07:48:00AM -0600, Jeff Law wrote:
> So as mentioned in the PR the underlying issue here is combine changes
> the form of an existing insn, but fails to force re-recognition. As a
> result other parts of the compiler blow up.
[snip]
> The fix is trivial, reset the I
From: M V V S Manoj Kumar
Addresses #1567
Created a AST node InlineAsm similar to the one found in rustc.
As there is no Symbol struct/class in gccrs I have made every instance
of Symbol a string.
gcc/rust/ChangeLog:
* ast/rust-ast-full-decls.h (class InlineAsm):Added class declaration.
From: Owen Avery
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h
(Parser::parse_stmt): Handle unsafe expression statements.
gcc/testsuite/ChangeLog:
* rust/compile/issue-1422.rs: New test.
Signed-off-by: Owen Avery
---
gcc/rust/parse/rust-parse-impl.h | 10
From: Philip Herron
Fixes #1361
Signed-off-by: Philip Herron
gcc/testsuite/ChangeLog:
* rust/compile/issue-1361.rs: New test.
---
gcc/testsuite/rust/compile/issue-1361.rs | 8
1 file changed, 8 insertions(+)
create mode 100644 gcc/testsuite/rust/compile/issue-1361.rs
diff
From: Owen Avery
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h
(Parser::parse_expr_stmt): Remove hypothetical unsafe +
expr_stmt_without_block handling.
Signed-off-by: Owen Avery
---
gcc/rust/parse/rust-parse-impl.h | 15 +++
1 file changed, 3 insertions(+), 12 de
From: Philip Herron
When implementing general bounds checking as part of unify calls, we did
not check associated types on bounds which lead to alot of missed error
checking. This now recursively checks the bounds and the associated types
with a decent error message. This also required us to impl
From: SainiAditya1
gcc/rust/Changelog:
* hir/tree/rust-hir-full-test.cc: Moved to...
* hir/tree/rust-hir.cc: ...here.
* Make-lang.in: Rename rust-hir-full-test.
Signed-off-by: SainiAditya1
---
gcc/rust/Make-lang.in| 2 +-
gcc/rust/hi
From: Arthur Cohen
The class now allows for more variants including a `Hint` one which
then gets emitted by calling `rust_inform`. This allows us to display
hints/tips/notes in backtracking contexts such as the parser.
gcc/rust/ChangeLog:
* rust-diagnostics.h (struct Error): Add new Kin
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-pattern.h: Fix formatting.
Signed-off-by: Owen Avery
---
gcc/rust/ast/rust-pattern.h | 70 ++---
1 file changed, 34 insertions(+), 36 deletions(-)
diff --git a/gcc/rust/ast/rust-pattern.h b/gcc/rust/ast/r
From: Owen Avery
gcc/rust/ChangeLog:
* ast/rust-ast-dump.cc
(Dump::visit): Add AltPattern visitor.
* ast/rust-ast-dump.h:
(Dump::visit): Add AltPattern visitor.
* ast/rust-ast-full-decls.h
(class AltPattern): Add declaration.
* ast/rust-ast
From: Arthur Cohen
gcc/rust/ChangeLog:
* ast/rust-ast.h: Keep location in TraitItem base class
* ast/rust-item.h (class TraitItemFunc): Use base class location
instead.
(class TraitItemMethod): Likewise.
(class TraitItemConst): Likewise.
(class TraitItemT
From: Philip Herron
Fixes #776
Signed-off-by: Philip Herron
gcc/testsuite/ChangeLog:
* rust/compile/torture/traits10.rs: Fix test-case
---
.../rust/compile/torture/traits10.rs | 64 ++-
1 file changed, 62 insertions(+), 2 deletions(-)
diff --git a/gcc/testsu
From: Owen Avery
gcc/rust/ChangeLog:
* checks/errors/rust-feature-gate.h: Add trailing newline before EOF.
Signed-off-by: Owen Avery
---
gcc/rust/checks/errors/rust-feature-gate.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/rust/checks/errors/rust-feature-g
From: Arthur Cohen
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc (MacroBuiltin::include_handler): Do not
return nullptr token in expansion of `include!()`
gcc/testsuite/ChangeLog:
* rust/compile/empty.in: New test.
* rust/compile/include_empty.rs: New test
From: Philip Herron
Signed-off-by: Philip Herron
gcc/rust/ChangeLog:
* Make-lang.in: add new dependancy
* typecheck/rust-hir-type-check-base.cc (TypeCheckBase::query_type):
refactor
* typecheck/rust-hir-type-check-base.h: refactor
* typecheck/rust-hir-type-chec
From: Owen Avery
gcc/rust/ChangeLog:
* expand/rust-macro-builtins.cc
(MacroBuiltin::include_str_handler): Add check for valid UTF-8.
gcc/testsuite/ChangeLog:
* rust/compile/builtin_macro_include_str.rs:
Include test of invalid UTF-8.
* rust/compile/inval
From: Owen Avery
gcc/rust/ChangeLog:
* backend/rust-compile-pattern.cc
(CompilePatternLet::visit): Simplify WildcardPattern compilation for
let statements.
* backend/rust-compile-var-decl.h:
(CompileVarDecl::visit): Remove variable declaration for
WildcardPatter
From: Owen Avery
gcc/rust/ChangeLog:
* parse/rust-parse-impl.h
(Parser::parse_grouped_or_tuple_pattern): Add support for empty tuple
patterns.
gcc/testsuite/ChangeLog:
* rust/compile/parse_empty_tuple_pattern.rs: New test.
Signed-off-by: Owen Avery
---
gcc/rust/pars
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
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: 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: 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
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
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: 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: 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:
* 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: 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: 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
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: 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:
* 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: 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: 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
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: 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: 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-type-check.h: refactor
* typecheck/rust-tyctx.cc (TypeCheckContext::iterate): refactor
(TypeCheckContext::have_loop_context): likewise
(TypeCheckContext::push_new_loop_cont
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
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: 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
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: 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: 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
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: 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
(PathProbeCandidate::Candidate::Candidate): refactor
(PathProbeCandidate::PathProbeCandidate): likewise
(PathProbeCandidate::as_string): likewise
(PathProbeC
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
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
1 - 100 of 168 matches
Mail list logo