Skip to content

Investigate program breakage with LTO enabled for few files #1

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

Open
beakthoven opened this issue Feb 15, 2025 · 3 comments
Open

Investigate program breakage with LTO enabled for few files #1

beakthoven opened this issue Feb 15, 2025 · 3 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@beakthoven
Copy link
Member

beakthoven commented Feb 15, 2025

LTO is currently disabled for both wiring.c due to program breakage when enabled. Investigate the root cause, resolve the issue, and remove the workarounds in place currently.

test code used: Blink example from Arduino IDE:

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

breakage: The LED seems to blink once and gets stuck in ON position indefinitely.

@beakthoven beakthoven added bug Something isn't working help wanted Extra attention is needed labels Feb 15, 2025
@benshi001
Copy link

could you please give the incorrect assembly generated by clang/llvm? And create an issue at https://github.com/llvm/llvm-project/issues , with title "[AVR] ..." .

@beakthoven
Copy link
Member Author

As requested, issue opened as llvm/llvm-project#127651 with relevant files attached.

@beakthoven
Copy link
Member Author

Diagnosed problem: llvm/llvm-project#133579
This tracking issue will be closed once bug is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants