回答編集履歴

1

VLAのコードが大きさ0の配列を生成しており、未定義な動作になっていた。

2018/07/26 13:33

投稿

raccy
raccy

スコア21735

test CHANGED
@@ -16,7 +16,7 @@
16
16
 
17
17
  int x;
18
18
 
19
- int y[i];
19
+ int y[i + 1];
20
20
 
21
21
  int z[i + 2];
22
22
 
@@ -30,7 +30,7 @@
30
30
 
31
31
 
32
32
 
33
- [Wandboxでの実行結果](https://wandbox.org/permlink/P0IZ8yn3WAvnUng5)
33
+ [Wandboxでの実行結果](https://wandbox.org/permlink/KVFwuJkuIyG2UAJF)
34
34
 
35
35
  ※ GCCなどVLAが使用できるコンパイラで最適化無し(`-O0`)で実行してください。
36
36