Fortran: ICE in gfc_conv_expr_present w. defined assignment [PR118640]
[gcc.git] / libstdc++-v3 / testsuite / 23_containers / array / iterators / begin_end.cc
blob69594a1fc74ba59e5eac4632f719ae0037ce92ff
1 // { dg-do compile { target c++11 } }
3 #include <array>
5 #pragma GCC push_options
6 #pragma GCC optimize "0"
8 extern void
9 sink (const void*, ...);
11 void
12 test01()
15 const std::size_t len = 1;
16 typedef std::array<int, len> array_type;
17 typedef array_type::iterator iterator;;
18 array_type a;
20 iterator b = a.begin(); // { dg-bogus "-Wmaybe-uninitialized" }
21 iterator e = a.end(); // { dg-bogus "-Wmaybe-uninitialized" }
23 sink(&b, &e);
27 const std::size_t len = 3;
28 typedef std::array<int, len> array_type;
29 typedef array_type::reverse_iterator reverse_iterator;
30 array_type a;
32 reverse_iterator b = a.rbegin(); // { dg-bogus "-Wmaybe-uninitialized" }
33 reverse_iterator e = a.rend(); // { dg-bogus "-Wmaybe-uninitialized" }
35 sink(&b, &e);
39 #pragma GCC pop_options