Daily bump.
[gcc.git] / gcc / testsuite / g++.dg / warn / Wuninitialized-13.C
blobb74a2fa98ecb52fb6b5e154f69d09efca2e728da
1 /* PR c/98597 - ICE in -Wuninitialized printing a MEM_REF
2    { dg-do compile }
3    { dg-options "-O2 -Wall -fno-tree-vectorize" } */
5 /* After vectorization, the location of the warning that's off,
6    the warning itself is still issued but it's swallowed by
7    the dg-prune-output directive. Refer to pr102700.  */
8 struct shared_count {
9   shared_count () { }
10   shared_count (shared_count &r)
11     : pi (r.pi) { }     // { dg-warning "\\\[-Wuninitialized" }
12   int pi;
15 // There's another (redundant) -Wuninitialized on the line below.
16 struct shared_ptr {
17   int ptr;
18   shared_count refcount;
21 struct Bar {
22   Bar (int, shared_ptr);
25 void g () {
26   shared_ptr foo;
27   Bar (0, foo);
30 // Prune out duplicates.
31 // { dg-prune-output "-Wuninitialized" }