Commit 38fc892
committed
gccrs: Add missing maybe fold reference to constexpr from cp/constcexpr.cc
Fixes #4631
gcc/rust/ChangeLog:
* backend/rust-constexpr.cc (maybe_fold_reference_address_to_pointer): port over from cp
(eval_binary_expression): likewise
gcc/testsuite/ChangeLog:
* rust/compile/issue-4631.rs: New test.
Signed-off-by: Philip Herron <herron.philip@googlemail.com>1 parent 05c8d7b commit 38fc892
2 files changed
Lines changed: 36 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
| 556 | + | |
556 | 557 | | |
557 | 558 | | |
558 | 559 | | |
| |||
3157 | 3158 | | |
3158 | 3159 | | |
3159 | 3160 | | |
| 3161 | + | |
| 3162 | + | |
| 3163 | + | |
3160 | 3164 | | |
3161 | 3165 | | |
3162 | 3166 | | |
| |||
3180 | 3184 | | |
3181 | 3185 | | |
3182 | 3186 | | |
3183 | | - | |
| 3187 | + | |
| 3188 | + | |
| 3189 | + | |
| 3190 | + | |
3184 | 3191 | | |
3185 | 3192 | | |
3186 | 3193 | | |
| |||
6870 | 6877 | | |
6871 | 6878 | | |
6872 | 6879 | | |
| 6880 | + | |
| 6881 | + | |
| 6882 | + | |
| 6883 | + | |
| 6884 | + | |
| 6885 | + | |
| 6886 | + | |
| 6887 | + | |
| 6888 | + | |
| 6889 | + | |
| 6890 | + | |
| 6891 | + | |
| 6892 | + | |
| 6893 | + | |
| 6894 | + | |
6873 | 6895 | | |
6874 | 6896 | | |
6875 | 6897 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
0 commit comments