nrvo shouldn't touch bycopy object[backport:1.2] (#19385)
fix nim-lang#19342
This commit is contained in:
parent
5853303be0
commit
9b9ae8a487
3 changed files with 31 additions and 1 deletions
12
tests/objects/m19342.c
Normal file
12
tests/objects/m19342.c
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
struct Node
|
||||
{
|
||||
int data[25];
|
||||
};
|
||||
|
||||
|
||||
struct Node hello(int name) {
|
||||
struct Node x = {999, 1, 2, 3, 4, 5, 6, 7, 8, 9,
|
||||
0, 1, 2, 3, 4, 5, 6, 7 ,8, 9,
|
||||
1, 2, 3, 4, 5};
|
||||
return x;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue