Closed
Description
I changed array size of the following line.
Some values cause compiler hang in release mode.
In debug mode, all value is OK.
For example,
aligns: [Align; 1], // OK
aligns: [Align; 2], // NG
aligns: [Align; 3], // OK
aligns: [Align; 4], // OK
In 1..20, 2 and 6 to 12 is NG. The others is OK.
I tried to change the array to Vec. It is NG.
aligns: Vec<Align>,
I couldn't reduce the testcase size.
So I write the reproduce procedure.
$ git clone https://github.com/dalance/veryl
$ git checkout eff1afcbdca883e6938d232852e3f10944001682
$ cargo build --release # OK
$ sed -i 's/Align; 5/Align; 2/g' crates/formatter/src/aligner.rs
$ cargo build --release # NG
Meta
rustc --version --verbose
:
rustc 1.66.0 (69f9c33d7 2022-12-12)
binary: rustc
commit-hash: 69f9c33d71c871fc16ac445211281c6e7a340943
commit-date: 2022-12-12
host: x86_64-unknown-linux-gnu
release: 1.66.0
LLVM version: 15.0.2
Metadata
Metadata
Assignees
Labels
Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Link-time optimization (LTO)Area: `[T; N]`Category: This is a bug.Issue: Problems and improvements with respect to compile times.Relevant to the compiler team, which will review and decide on the PR/issue.