You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tried in the debugger, shows segfault in llvm call.
hstormo
changed the title
Compiler silently exits when using the a,b=b,a syntax on large arrays
Compiler crashes when using the a,b=b,a syntax on large arrays
May 25, 2024
Well, if I swap the arrays the "traditional" way with a temporary variable, like t := a; a = b; b = t it compiles fine with a warning: Warning: Declaration of 't' may cause a stack overflow due to its type '[100000]int' having a size of 800000 bytes So I assumed the same would be possible with the special syntax. But I don't know how it's actually implemented.
Context
Expected Behavior
The program should compile, probably with a "possible stack overflow" warning like it does if you declare a large array as local variable.
Current Behavior
The compiler crashes.
Steps to Reproduce
Compile the code above.
The text was updated successfully, but these errors were encountered: