Repository navigation
core fails to build for 16-bit pointer targets after #162879 #163158
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-AVRTarget: AVR processors (ATtiny, ATmega, etc.)Target: AVR processors (ATtiny, ATmega, etc.)T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
Description
Activity
- addedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Sep 22, 2026 A minimal reproducer:
cargo new --lib avr-core-regression cd avr-core-regression printf '#![no_std]\n' > src/lib.rs rustup toolchain install nightly-2026-09-19 --profile minimal --component rust-src rustup toolchain install nightly-2026-09-20 --profile minimal --component rust-src RUSTFLAGS="-C target-cpu=atmega328p" cargo +nightly-2026-09-19 build -Zbuild-std=core --target avr-none RUSTFLAGS="-C target-cpu=atmega328p" cargo +nightly-2026-09-20 build -Zbuild-std=core --target avr-none
The first build succeeds; the second fails while compiling
core.- addedO-AVRTarget: AVR processors (ATtiny, ATmega, etc.)Target: AVR processors (ATtiny, ATmega, etc.)T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.A-no_stdArea: `#![no_std]`Area: `#![no_std]`and removedA-no_stdArea: `#![no_std]`Area: `#![no_std]`
on Sep 22, 2026 I submitted a pull request for this just before seeing the issue! #163197
Reacted by José Luis Cruz- added 2 commits that reference this issue
on Sep 23, 2026 - removedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Sep 23, 2026 - added a commit that references this issue
on Sep 23, 2026 - added a commit that references this issue
on Oct 2, 2026
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-AVRTarget: AVR processors (ATtiny, ATmega, etc.)Target: AVR processors (ATtiny, ATmega, etc.)T-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
corefails to compile for AVR (target_pointer_width = "16") starting withnightly-2026-09-20.Regression range:
nightly-2026-09-19: worksnightly-2026-09-20: failsI am building for
avr-none/ ATmega328P with-Zbuild-std=core.The failure is:
followed by errors such as:
This appears to have been introduced by #162879.
That PR changed
dragon.rsfrom using the 32-bit implementation directly:to using aliases selected by pointer width:
but those aliases, the bignum implementations, and the
POW5TO*tables are only defined for:so nothing is selected for
target_pointer_width = "16".Before #162879, AVR successfully used the
Big32x40implementation, so using that path for 16-bit pointer targets may be enough to fix it.