Re: [PATCH] Add support for const bool and const float

2021-08-16 Thread Mark Wielaard
Hi, On Mon, Aug 16, 2021 at 11:03:19PM +0200, Mark Wielaard wrote: > Now having replicated it locally the rust.log shows: > > /srv/gccrs/gccrs/gcc/testsuite/rust/compile/torture/ifunaryexpr.rs: In > function 'main': > /srv/gccrs/gccrs/gcc/testsuite/rust/compile/torture/ifunaryexpr.rs:8:5: > err

Re: [PATCH] Add support for const bool and const float

2021-08-16 Thread Mark Wielaard
Hi, On Mon, Aug 16, 2021 at 10:52:07AM +0200, Mark Wielaard wrote: > On Mon, 2021-08-16 at 07:48 +, d...@kataplop.net wrote: > > Looks like tests are not OK, at least in the github action. > > Are you talking about this patch (which I cannot find on github) or > "Use builtin bool instead of c

[PATCH] Allow bool and char to be cast as any integer type

2021-08-16 Thread Mark Wielaard
bools and chars can be cast to any integer type, but not to floats or each other. Adjust the BoolCastRule and CharCastRule to allow these casts. Add a postive test "as_bool_char.rs" and negative test "bad_as_bool_char.rs" to check the correct casts are accepted and the illegal casts produce errors.

Re: [PATCH] Add support for const bool and const float

2021-08-16 Thread Mark Wielaard
Hi Marc, On Mon, 2021-08-16 at 07:48 +, d...@kataplop.net wrote: > Looks like tests are not OK, at least in the github action. Are you talking about this patch (which I cannot find on github) or "Use builtin bool instead of creating new bool types for ComparisonExpr"? On github I can only see

Re: [PATCH] Add support for const bool and const float

2021-08-16 Thread dkm--- via Gcc-rust
Hey! Looks like tests are not OK, at least in the github action. Can't test but maybe you can confirm this issue ? # of unexpected failures14 Marc August 15, 2021 9:55 PM, "Mark Wielaard" wrote: > Handle BOOL and FLOAT in ConstFoldExpr::visit (HIR::LiteralExpr) to > make it possible