about summary refs log tree commit diff
path: root/src/test/codegen/repr-transparent.rs
AgeCommit message (Collapse)AuthorLines
2023-01-11Move /src/test to /testsAlbert Larsan-170/+0
2022-12-06Fix failing codegen tests on s390xUlrich Weigand-0/+1
Several codegen tests are currently failing due to making assumptions that are not valid for the s390x architecture: - catch-unwind.rs: fails due to inlining differences. Already ignored on another platform for the same reason. Solution: Ignore on s390x. - remap_path_prefix/main.rs: fails due to different alignment requirement for string constants. Solution: Do not test for the alignment requirement. - repr-transparent-aggregates-1.rs: many ABI assumptions. Already ignored on many platforms for the same reason. Solution: Ignore on s390x. - repr-transparent.rs: no vector ABI by default on s390x. Already ignored on another platform for a similar reason. Solution: Ignore on s390x. - uninit-consts.rs: hard-coded little-endian constant. Solution: Match both little- and big-endian versions. Fixes part of https://github.com/rust-lang/rust/issues/105383.
2022-05-25Update some codegen tests for opaque pointersNikita Popov-3/+3
2022-02-26Apply noundef attribute to all scalar types which do not permit raw initErik Desjardins-2/+2
Beyond `&`/`&mut`/`Box`, this covers `char`, discriminants, `NonZero*`, etc. All such types currently cause a Miri error if left uninitialized, and an `invalid_value` lint in cases like `mem::uninitialized::<char>()` Note that this _does not_ change whether or not it is UB for `u64` (or other integer types with no invalid values) to be undef.
2021-04-03Manually set dso_local when its valid to do soSimonas Kazlauskas-17/+17
This should have no real effect in most cases, as e.g. `hidden` visibility already implies `dso_local` (or at least LLVM IR does not preserve the `dso_local` setting if the item is already `hidden`), but it should fix `-Crelocation-model=static` and improve codegen in executables. Note that this PR does not exhaustively port the logic in [clang]. Only the obviously correct portion and what is necessary to fix a regression from LLVM 12 that relates to `-Crelocation_model=static`. Fixes #83335 [clang]: https://github.com/llvm/llvm-project/blob/3001d080c813da20b329303bf8f45451480e5905/clang/lib/CodeGen/CodeGenModule.cpp#L945-L1039
2021-01-13Update code to account for extern ABI requirementMark Rousskov-17/+17
2020-06-04test: codegen: skip tests inappropriate for riscv64Tom Eccles-0/+3
2020-01-20stabilize transparent_enumsMazdak Farrokhzad-1/+1
2019-09-13codegen: use "_N" (like for other locals) instead of "argN", for argument names.Eduard-Mihai Burtescu-17/+17
2019-06-10Implement RFC 2645 (transparent enums and unions)Michael Bradshaw-1/+42
Tracking issue: #60405
2018-12-25Remove licensesMark Rousskov-10/+0
2018-06-12Stabilize #[repr(transparent)]Simon Sapin-1/+1
Tracking issue FCP: https://github.com/rust-lang/rust/issues/43036#issuecomment-394094318 Reference PR: https://github.com/rust-lang-nursery/reference/pull/353
2018-02-08Fix oversized loads on x86_64 SysV FFI callsBjörn Steinbrink-51/+9
The x86_64 SysV ABI should use exact sizes for small structs passed in registers, i.e. a struct that occupies 3 bytes should use an i24, instead of the i32 it currently uses. Refs #45543
2018-01-16Implement repr(transparent)Robin Kruppe-0/+177