Skip to content

Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS. #144785

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 4, 2025

Conversation

lucarlig
Copy link
Contributor

@lucarlig lucarlig commented Aug 1, 2025

Regression test for #89225, I have shortened the original example as much as i could, while still generating the error.

here is my output on MacOs:

rustup run 1.60 cargo build --release
   Compiling rug_int v0.1.0 (/Users/luca/dev/rug_int)
LLVM ERROR: Unsupported expression in static initializer: zext (i64 ptrtoint (<{ [4 x i8] }>* @anon.fad58de7366495db4650cfefac2fcd61.0 to i64) to i128)
error: could not compile `rug_int`

rustup run 1.61 cargo build --release
   Compiling rug_int v0.1.0 (/Users/luca/dev/rug_int)
    Finished release [optimized] target(s) in 0.60s

@rustbot
Copy link
Collaborator

rustbot commented Aug 1, 2025

r? @davidtwco

rustbot has assigned @davidtwco.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 1, 2025
@rustbot

This comment has been minimized.

@lucarlig lucarlig changed the title Regression test for #89225: LLVM error with unsupported expression in static initializer for const pointer in array on macOS. Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS. Aug 1, 2025
@rust-log-analyzer

This comment has been minimized.

@lqd
Copy link
Member

lqd commented Aug 1, 2025

If you fix the tidy issue (check locally that ./x test tidy doesn't) it'll run CI and should show the issue I mentioned above.

r? lqd

@lucarlig lucarlig force-pushed the master branch 2 times, most recently from bfe3937 to 1a64684 Compare August 1, 2025 17:44
@lqd
Copy link
Member

lqd commented Aug 1, 2025

Thanks.

@bors r+

@bors
Copy link
Collaborator

bors commented Aug 1, 2025

📌 Commit 1a64684 has been approved by lqd

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 1, 2025
bors added a commit that referenced this pull request Aug 4, 2025
Rollup of 12 pull requests

Successful merges:

 - #142205 (Mark `slice::swap_with_slice` unstably const)
 - #144188 (`available_parallelism`: Add documentation for why we don't look at `ulimit`)
 - #144322 (Add lint against dangling pointers from local variables)
 - #144497 (tests: Add test for basic line-by-line stepping in a debugger)
 - #144559 (Enable extract-insert-dyn.rs test on RISC-V (riscv64))
 - #144667 (`AlignmentEnum` should just be `repr(usize)` now)
 - #144706 (Do not give function allocations alignment in consteval and Miri.)
 - #144746 (resolve: Cleanups and micro-optimizations to extern prelude)
 - #144785 (Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS.)
 - #144811 (Stylize `*-lynxos178-*` target maintainer handle to make it easier to copy/paste)
 - #144848 (For "stage 1" ui-fulldeps, use the stage 1 compiler to query target info)
 - #144853 (Remove unnecessary `rust_` prefixes)

Failed merges:

 - #144794 (Port `#[coroutine]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6c7ffef into rust-lang:master Aug 4, 2025
12 of 20 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 4, 2025
rust-timer added a commit that referenced this pull request Aug 4, 2025
Rollup merge of #144785 - lucarlig:master, r=lqd

Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS.

Regression test for #89225, I have shortened the original example as much as i could, while still generating the error.

here is my output on MacOs:
```
rustup run 1.60 cargo build --release
   Compiling rug_int v0.1.0 (/Users/luca/dev/rug_int)
LLVM ERROR: Unsupported expression in static initializer: zext (i64 ptrtoint (<{ [4 x i8] }>* `@anon.fad58de7366495db4650cfefac2fcd61.0` to i64) to i128)
error: could not compile `rug_int`

rustup run 1.61 cargo build --release
   Compiling rug_int v0.1.0 (/Users/luca/dev/rug_int)
    Finished release [optimized] target(s) in 0.60s
```
@Zalathar
Copy link
Contributor

Zalathar commented Aug 4, 2025

Bors is confused.

@bors r-

@bors bors removed the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 4, 2025
@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 4, 2025
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Aug 4, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang/rust#142205 (Mark `slice::swap_with_slice` unstably const)
 - rust-lang/rust#144188 (`available_parallelism`: Add documentation for why we don't look at `ulimit`)
 - rust-lang/rust#144322 (Add lint against dangling pointers from local variables)
 - rust-lang/rust#144497 (tests: Add test for basic line-by-line stepping in a debugger)
 - rust-lang/rust#144559 (Enable extract-insert-dyn.rs test on RISC-V (riscv64))
 - rust-lang/rust#144667 (`AlignmentEnum` should just be `repr(usize)` now)
 - rust-lang/rust#144706 (Do not give function allocations alignment in consteval and Miri.)
 - rust-lang/rust#144746 (resolve: Cleanups and micro-optimizations to extern prelude)
 - rust-lang/rust#144785 (Regression test for LLVM error with unsupported expression in static initializer for const pointer in array on macOS.)
 - rust-lang/rust#144811 (Stylize `*-lynxos178-*` target maintainer handle to make it easier to copy/paste)
 - rust-lang/rust#144848 (For "stage 1" ui-fulldeps, use the stage 1 compiler to query target info)
 - rust-lang/rust#144853 (Remove unnecessary `rust_` prefixes)

Failed merges:

 - rust-lang/rust#144794 (Port `#[coroutine]` to the new attribute system)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants