Skip to content

Commit

Permalink
Merge branch 'Rust-GCC:master' into required_features
Browse files Browse the repository at this point in the history
  • Loading branch information
MajoraSans authored Dec 10, 2024
2 parents 4922718 + 55a9d8d commit 453a6fa
Show file tree
Hide file tree
Showing 212 changed files with 10,424 additions and 6,283 deletions.
26 changes: 3 additions & 23 deletions .github/alpine_32bit_log_warnings
Original file line number Diff line number Diff line change
Expand Up @@ -62,34 +62,14 @@
../../../libgcc/soft-fp/op-common.h:1563:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘USItype’ {aka ‘unsigned int’} [-Wsign-compare]
../../../libgcc/soft-fp/op-common.h:1563:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘USItype’ {aka ‘unsigned int’} [-Wsign-compare]
../../../libgcc/soft-fp/op-common.h:1563:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘USItype’ {aka ‘unsigned int’} [-Wsign-compare]
../../gcc/analyzer/store.h:310:5: warning: 'size_in_bytes.generic_wide_int<fixed_wide_int_storage<128> >::<anonymous>.fixed_wide_int_storage<128>::val[1]' may be used uninitialized [-Wmaybe-uninitialized]
../../gcc/../libgcc/libgcov-util.c:214:59: warning: 'void* calloc(size_t, size_t)' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
../../gcc/../libgcc/libgcov-util.c:529:43: warning: 'void* calloc(size_t, size_t)' sizes specified with 'sizeof' in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
../../gcc/analyzer/store.h:310:5: warning: 'size_in_bytes.generic_wide_int<fixed_wide_int_storage<128> >::fixed_wide_int_storage<128>.fixed_wide_int_storage<128>::val[1]' may be used uninitialized [-Wmaybe-uninitialized]
../../gcc/expmed.cc:1845:45: warning: '*(unsigned int*)((char*)&imode + offsetof(scalar_int_mode, scalar_int_mode::m_mode))' may be used uninitialized [-Wmaybe-uninitialized]
../../gcc/gcc.cc:2412:30: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2413:32: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/gcc.cc:2432:30: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2433:32: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/gcc.cc:2458:30: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2459:32: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/gcc.cc:2467:30: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2468:32: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/gcc.cc:2477:30: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2478:32: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/gcc.cc:2487:30: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2488:32: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/gcc.cc:2527:26: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2527:59: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/gcc.cc:2539:22: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2539:51: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/gcc.cc:2553:22: warning: too many arguments for format [-Wformat-extra-args]
../../gcc/gcc.cc:2553:51: warning: unknown conversion type character 't' in format [-Wformat=]
../../gcc/text-art/style.cc:150:25: warning: spurious leading punctuation sequence ';' in format [-Wformat-diag]
../../gcc/text-art/style.cc:160:25: warning: spurious leading punctuation sequence ';' in format [-Wformat-diag]
../../gcc/text-art/table.cc:981:62: warning: unquoted keyword 'char' in format [-Wformat-diag]
../../gcc/text-art/table.cc:981:69: warning: spurious trailing punctuation sequence '])' in format [-Wformat-diag]
/usr/include/c++/13.2.1/bits/new_allocator.h:172:33: warning: '*(std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_M_impl.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl::<anonymous>.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl_data::_M_start' may be used uninitialized [-Wmaybe-uninitialized]
/usr/include/c++/13.2.1/bits/stl_vector.h:367:49: warning: '*(std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_M_impl.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl::<anonymous>.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl_data::_M_end_of_storage' may be used uninitialized [-Wmaybe-uninitialized]
/usr/include/c++/13.2.1/bits/stl_vector.h:367:49: warning: '*(std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_M_impl.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl::<anonymous>.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl_data::_M_end_of_storage' may be used uninitialized [-Wmaybe-uninitialized]
/usr/include/c++/13.2.1/bits/stl_vector.h:367:49: warning: '*(std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >*)((char*)&saved + offsetof(Rust::BIR::PatternBindingBuilder::SavedState, Rust::BIR::PatternBindingBuilder::SavedState::regions.tl::optional<Rust::FreeRegions>::<unnamed>.tl::detail::optional_move_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_assign_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_move_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_copy_base<Rust::FreeRegions, false>::<unnamed>.tl::detail::optional_operations_base<Rust::FreeRegions>::<unnamed>.tl::detail::optional_storage_base<Rust::FreeRegions, false>::<unnamed>)).std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_M_impl.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl::<anonymous>.std::_Vector_base<Rust::FreeRegion, std::allocator<Rust::FreeRegion> >::_Vector_impl_data::_M_start' may be used uninitialized [-Wmaybe-uninitialized]
gengtype-lex.cc:356:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
gengtype-lex.cc:356:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
gengtype-lex.cc:356:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
Expand Down
8 changes: 0 additions & 8 deletions .github/bors.toml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/glibcxx_ubuntu64b_log_expected_warnings
Original file line number Diff line number Diff line change
Expand Up @@ -128,5 +128,5 @@ gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fal
gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
install.texi:2231: warning: `.' or `,' must follow @xref, not f
install.texi:2230: warning: `.' or `,' must follow @xref, not f
libtool: install: warning: remember to run `libtool --finish /usr/local/libexec/gcc/x86_64-pc-linux-gnu/14.0.1'
Original file line number Diff line number Diff line change
Expand Up @@ -150,5 +150,5 @@ gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fal
gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
gengtype-lex.cc:357:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
install.texi:2231: warning: `.' or `,' must follow @xref, not f
install.texi:2230: warning: `.' or `,' must follow @xref, not f
libtool: install: warning: remember to run `libtool --finish /usr/local/libexec/gcc/x86_64-pc-linux-gnu/14.0.1'
2 changes: 1 addition & 1 deletion .github/workflows/Remark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
# Setup
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/bootstrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Deps
run: |
Expand Down
84 changes: 54 additions & 30 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
build-and-check-ubuntu-64bit:

env:
# Force locale, in particular for reproducible results re '.github/bors_log_expected_warnings' (see below).
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Deps
run: |
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
if diff -U0 ../.github/bors_log_expected_warnings log_warnings; then
if diff -U0 ../.github/log_expected_warnings log_warnings; then
:
else
echo 'See <https://github.com/Rust-GCC/gccrs/pull/1026>.'
Expand Down Expand Up @@ -100,13 +100,13 @@ jobs:
build-and-check-ubuntu-64bit-glibcxx:

env:
# Force locale, in particular for reproducible results re '.github/bors_log_expected_warnings' (see below).
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Deps
run: |
Expand Down Expand Up @@ -185,13 +185,13 @@ jobs:
build-and-check-ubuntu-32bit:

env:
# Force locale, in particular for reproducible results re '.github/bors_log_expected_warnings' (see below).
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Deps
run: |
Expand Down Expand Up @@ -237,7 +237,7 @@ jobs:
run: |
cd gccrs-build
< log grep 'warning: ' | sort > log_warnings
if diff -U0 ../.github/bors_log_expected_warnings log_warnings; then
if diff -U0 ../.github/log_expected_warnings log_warnings; then
:
else
echo 'See <https://github.com/Rust-GCC/gccrs/pull/1026>.'
Expand Down Expand Up @@ -266,69 +266,93 @@ jobs:
exit 0; \
fi
build-and-check-gcc-48:
build-and-check-gcc-5:

runs-on: ubuntu-22.04
container: ubuntu:18.04
env:
# otherwise we hang when installing tzdata
DEBIAN_FRONTEND: noninteractive
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Deps
run: |
apt-get update;
apt-get install -y \
sudo apt-get update;
sudo apt-get install -y \
curl \
automake \
autoconf \
libtool \
autogen \
bison \
flex \
libc6-dev \
libc6-dev-i386 \
libgmp3-dev \
libmpfr-dev \
libmpc-dev \
build-essential \
gcc-4.8 \
g++-4.8 \
gcc-4.8-multilib \
g++-4.8-multilib \
dejagnu;
# install Rust directly using rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0;
- name: Restore cached gcc-5.4
id: restore-gcc5
uses: actions/cache/restore@v4
with:
key: ce-tar-gcc-5
path: ~/gcc-5.4.0/

- name: Download and install gcc5.4
if: ${{ steps.restore-gcc5.outputs.cache-hit != 'true' }}
run: |
curl "https://s3.amazonaws.com/compiler-explorer/opt/gcc-5.4.0.tar.xz" -o /tmp/gcc.tar.xz;
cd ~;
tar xvf /tmp/gcc.tar.xz
- name: Store gcc-5.4 to cache
id: cache-gcc5
if: always() && steps.restore-gcc5.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
key: ce-tar-gcc-5
path: ~/gcc-5.4.0/

- name: Make Source Read-Only
run: chmod -R a-w ./*

- name: Configure
run: |
mkdir -p gccrs-build;
cd gccrs-build;
../configure \
CC='gcc-4.8' \
CXX='g++-4.8' \
--enable-languages=rust \
--disable-bootstrap \
--enable-multilib
# Add cargo to our path quickly
. "$HOME/.cargo/env";
PATH=$HOME/gcc-5.4.0/bin:$PATH \
../configure \
--enable-languages=rust \
--disable-bootstrap \
--enable-multilib
- name: Build
shell: bash
run: |
# Add cargo to our path quickly
. "$HOME/.cargo/env";
make -C gccrs-build -j $(nproc)
PATH=$HOME/gcc-5.4.0/bin:$PATH \
make -C gccrs-build -j $(nproc)
- name: Run Tests
run: |
cd gccrs-build; \
make check-rust RUNTESTFLAGS="--target_board=unix\{-m32,-m64}"
PATH=$HOME/gcc-5.4.0/bin:$PATH \
make check-rust RUNTESTFLAGS="--target_board=unix\{-m32,-m64}"
- name: Archive check-rust results
uses: actions/upload-artifact@v3
with:
name: check-rust-logs-4.8
name: check-rust-logs-5
path: |
gccrs-build/gcc/testsuite/rust/
Expand All @@ -353,7 +377,7 @@ jobs:
runs-on: macos-13

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Deps
run: |
Expand Down Expand Up @@ -405,13 +429,13 @@ jobs:
build-and-check-asan:

env:
# Force locale, in particular for reproducible results re '.github/bors_log_expected_warnings' (see below).
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Deps
run: |
Expand Down Expand Up @@ -459,7 +483,7 @@ jobs:
# run: |
# cd gccrs-build
# < log grep 'warning: ' | sort > log_warnings
# if diff -U0 ../.github/bors_log_expected_warnings log_warnings; then
# if diff -U0 ../.github/log_expected_warnings log_warnings; then
# :
# else
# echo 'See <https://github.com/Rust-GCC/gccrs/pull/1026>.'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ccpp32alpine.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ jobs:
build-alpine-32bit-and-check-alpine-32bit:

env:
# Force locale, in particular for reproducible results re '.github/bors_log_expected_warnings' (see below).
# Force locale, in particular for reproducible results re '.github/log_expected_warnings' (see below).
LC_ALL: C.UTF-8

runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Alpine Linux (32-bit)
uses: jirutka/setup-alpine@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
# If updating these steps, please also correspondingly update '../../CONTRIBUTING.md', "Running `clang-format` locally".
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Copy .clang-format file
run: cp contrib/clang-format .clang-format
- name: Check clang-format
Expand Down
36 changes: 33 additions & 3 deletions .github/workflows/commit-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: check-changelogs

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand All @@ -37,7 +37,7 @@ jobs:
if: ${{ github.base_ref == 'gcc-patch-dev' }} # master commits don't need the gccrs prefix

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand All @@ -62,7 +62,7 @@ jobs:
name: check-commit-signoff

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
Expand Down Expand Up @@ -108,3 +108,33 @@ jobs:
done < <(git rev-list --reverse "$rev_list" )
exit $retval;
check-issue-reference:
runs-on: ubuntu-latest
continue-on-error: true # We do not want to block merge if it is a legitimate GCC bugzilla reference.
name: check-issue-reference

steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0

- name: Check for issue number reference in commit messages
run: |
retval=0;
rev_list="origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}"
for commit in $(git rev-list --reverse "$rev_list"); do
if [ "$(git log --format=%B -n 1 \"$commit\" | grep '#[0-9]*' | grep -v -i 'Rust-GCC/gccrs#[0-9]*' | wc -l)" -ne 0 ]; then
echo "$commit: KO"
retval=1
else
echo "$commit: OK"
fi
done;
if [ "$retval" -ne 0 ]; then
echo "Some raw issue references were found (eg. #4242)."
echo "You shall rewrite the faulty commit message with this format: Rust-GCC/gccrs#4242"
echo "You may ignore this CI step if it represents a valid GCC bugzilla or external repository reference instead."
fi
exit $retval;
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ and the link to the GitHub PR sent to the submitter.
* The PR policy: Everything has to go through a PR
- An exception to this rule will be the merge commits of updating the repo against upstream GCC

* Reviewers/Maintainers of the project (aka people who have bors rights) should be pinged for reviews/questions.
* Reviewers/Maintainers of the project should be pinged for reviews/questions.

* A PR can have one or several commits (split should have a technical/logical reason, ie. no fixup-ish commit)

Expand Down
Loading

0 comments on commit 453a6fa

Please sign in to comment.