Skip to content

Commit bd1f435

Browse files
Merge #1059
1059: Add base for build job using older GCC version r=CohenArthur a=CohenArthur Fixes #1058 Co-authored-by: Arthur Cohen <arthur.cohen@embecosm.com>
2 parents e8b9587 + e824a08 commit bd1f435

File tree

2 files changed

+70
-7
lines changed

2 files changed

+70
-7
lines changed

.github/workflows/ccpp.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,3 +84,68 @@ jobs:
8484
else \
8585
exit 0; \
8686
fi
87+
88+
build-and-check-gcc-48:
89+
90+
runs-on: ubuntu-18.04
91+
steps:
92+
- uses: actions/checkout@v2
93+
94+
- name: Install Deps
95+
run: |
96+
sudo apt-get update;
97+
sudo apt-get install -y \
98+
automake \
99+
autoconf \
100+
libtool \
101+
autogen \
102+
bison \
103+
flex \
104+
libgmp3-dev \
105+
libmpfr-dev \
106+
libmpc-dev \
107+
build-essential \
108+
gcc-4.8 \
109+
g++-4.8 \
110+
gcc-4.8-multilib \
111+
g++-4.8-multilib \
112+
dejagnu
113+
114+
- name: Configure
115+
run: |
116+
mkdir -p gccrs-build;
117+
cd gccrs-build;
118+
../configure \
119+
CC='gcc-4.8' \
120+
CXX='g++-4.8' \
121+
--enable-languages=rust \
122+
--disable-bootstrap \
123+
--enable-multilib
124+
125+
- name: Build
126+
shell: bash
127+
run: |
128+
make -C gccrs-build -j $(nproc)
129+
130+
- name: Run Tests
131+
run: |
132+
cd gccrs-build; \
133+
make check-rust
134+
135+
- name: Archive check-rust results
136+
uses: actions/upload-artifact@v2
137+
with:
138+
name: check-rust-logs-4.8
139+
path: |
140+
gccrs-build/gcc/testsuite/rust/
141+
142+
- name: Check regressions
143+
run: |
144+
cd gccrs-build; \
145+
if grep -e "unexpected" -e "unresolved" gcc/testsuite/rust/rust.sum;\
146+
then \
147+
echo "some tests are not correct"; \
148+
exit 1; \
149+
else \
150+
exit 0; \
151+
fi

gcc/rust/typecheck/rust-hir-path-probe.h

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -364,10 +364,9 @@ class PathProbeType : public TypeCheckBase
364364
PathProbeCandidate::TraitItemCandidate trait_item_candidate{trait_ref,
365365
trait_item_ref,
366366
impl};
367-
PathProbeCandidate candidate{candidate_type,
368-
trait_item_tyty,
369-
trait_ref->get_locus (),
370-
{trait_item_candidate}};
367+
368+
PathProbeCandidate candidate{candidate_type, trait_item_tyty,
369+
trait_ref->get_locus (), trait_item_candidate};
371370
candidates.push_back (std::move (candidate));
372371
}
373372

@@ -409,10 +408,9 @@ class PathProbeType : public TypeCheckBase
409408
PathProbeCandidate::TraitItemCandidate trait_item_candidate{trait_ref,
410409
trait_item_ref,
411410
nullptr};
412-
PathProbeCandidate candidate{candidate_type,
413-
trait_item_tyty,
411+
PathProbeCandidate candidate{candidate_type, trait_item_tyty,
414412
trait_item_ref->get_locus (),
415-
{trait_item_candidate}};
413+
trait_item_candidate};
416414
candidates.push_back (std::move (candidate));
417415
}
418416

0 commit comments

Comments
 (0)