-
Notifications
You must be signed in to change notification settings - Fork 15.3k
Closed
Labels
accepts-invalidc99clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute
Description
The execution of a program compiled from the following code crashes:
#include <stdio.h>
int main() {
int size = 5;
(void)(int[size]) {};
}
Options: -std=c2x -Wall -pedantic
Godbold: https://godbolt.org/z/84d13Tqve
Related:
int main() {
int size = 5;
(void)(int[size]) {};
return size;
}
Returns incorrect 0 when compiling with no optimization (-O0), but works fine with higher optimization levels.
See https://godbolt.org/z/M9xeeo5qa vs https://godbolt.org/z/soahEGrjx .
Metadata
Metadata
Assignees
Labels
accepts-invalidc99clang:frontendLanguage frontend issues, e.g. anything involving "Sema"Language frontend issues, e.g. anything involving "Sema"confirmedVerified by a second partyVerified by a second partygood first issuehttps://github.com/llvm/llvm-project/contributehttps://github.com/llvm/llvm-project/contribute