// PR c++/103681
-// { dg-do compile { target c++11 } }
+// { dg-do compile { target { { c++11 } && { ! default_packed } } } }
// { dg-additional-options "-fabi-version=0 -Wabi=16" }
struct A {
struct C
{
char c;
- decltype(nullptr) n; // { dg-warning "alignment" }
+ decltype(nullptr) n; // { dg-warning "alignment" "" { target { ! default_packed } } }
};
// PR c++/102071
-// { dg-do run { target c++17 } }
+// { dg-do run { target { { c++17 } && { ! default_packed } } } }
// { dg-additional-options -faligned-new=2 }
// { dg-xfail-run-if "AIX operator new" { powerpc-ibm-aix* } }
{
A a;
a.a = 1; a.b = 2; a.c = 3; a.e = 4; a.f = 5;
- C b = __builtin_bit_cast (C, a); // { dg-error "'__builtin_bit_cast' accessing uninitialized byte at offset 3" }
+ C b = __builtin_bit_cast (C, a); // { dg-error "'__builtin_bit_cast' accessing uninitialized byte at offset 3" "" { target { ! default_packed } } }
return false;
}
{
D a;
a.b = 1;
- E b = __builtin_bit_cast (E, a); // { dg-error "'__builtin_bit_cast' accessing uninitialized byte at offset 3" }
+ E b = __builtin_bit_cast (E, a); // { dg-error "'__builtin_bit_cast' accessing uninitialized byte at offset 3" "" { target { ! default_packed } } }
return false;
}
{
D a;
a.c = 1;
- E b = __builtin_bit_cast (E, a); // { dg-error "'__builtin_bit_cast' accessing uninitialized byte at offset 2" }
+ E b = __builtin_bit_cast (E, a); // { dg-error "'__builtin_bit_cast' accessing uninitialized byte at offset 2" "" { target { ! default_packed } } }
return false;
}
__u64 x;
} __attribute__((aligned(8)));
-struct foo5 /* { dg-warning "alignment 4 of 'foo5' is less than 16" } */
+struct foo5 /* { dg-warning "alignment \[0-9\]+ of 'foo5' is less than 16" } */
{
int i1;
int x __attribute__((warn_if_not_aligned(16))); /* { dg-warning "'foo5::x' offset 4 in 'foo5' isn't aligned to 16" } */
__u64 x;
} __attribute__((aligned(8)));
-union bar3 /* { dg-warning "alignment 4 of 'bar3' is less than 16" } */
+union bar3 /* { dg-warning "alignment \[0-9\]+ of 'bar3' is less than 16" } */
{
int i1;
int x __attribute__((warn_if_not_aligned(16)));
// { dg-options "-Wpadded" }
template <class> struct A;
-template <typename> struct B { // { dg-warning "padding struct size to alignment boundary" }
+template <typename> struct B { // { dg-warning "padding struct size to alignment boundary" "" { target { ! default_packed } } }
long long _M_off;
char _M_state;
};