1 | #include <IO/WriteHelpers.h> |
---|---|
2 | #include <IO/WriteBufferFromFileDescriptor.h> |
3 | |
4 | |
5 | /** gcc-7 generates wrong code with -O1 -finline-small-functions -ftree-vrp |
6 | * This is compiler bug. The issue does not exist in gcc-8 or clang-8. |
7 | */ |
8 | |
9 | |
10 | using namespace DB; |
11 | |
12 | |
13 | static void NO_INLINE write(WriteBuffer & out, size_t size) |
14 | { |
15 | for (size_t i = 0; i < size; ++i) |
16 | { |
17 | writeIntText(i, out); |
18 | writeChar(' ', out); |
19 | } |
20 | } |
21 | |
22 | |
23 | int main(int, char **) |
24 | { |
25 | WriteBufferFromFileDescriptor out(STDOUT_FILENO); |
26 | write(out, 80); |
27 | return 0; |
28 | } |
29 |