| 1 |
// PR middle-end/104529 |
| 2 |
// { dg-do compile { target c++11 } } |
| 3 |
// { dg-options "-O2 -fdump-tree-optimized" } |
| 4 |
// { dg-final { scan-tree-dump-not "MEM\[^\n\r]*MEM" "optimized" } } |
| 5 |
// { dg-skip-if "requires hosted libstdc++ for vector" { ! hostedlib } } |
| 6 |
|
| 7 |
#include <cstddef> |
| 8 |
#include <vector> |
| 9 |
|
| 10 |
struct S { |
| 11 |
unsigned int a; |
| 12 |
std::vector<unsigned char> b; |
| 13 |
std::vector<unsigned char> c; |
| 14 |
}; |
| 15 |
|
| 16 |
std::size_t |
| 17 |
foo () |
| 18 |
{ |
| 19 |
S test[] = { { 48, { 255, 0, 0, 0, 0, 0 } } }; |
| 20 |
return sizeof (test); |
| 21 |
} |