]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/g++.dg/pr79761.C
Daily bump.
[thirdparty/gcc.git] / gcc / testsuite / g++.dg / pr79761.C
CommitLineData
8dc19053
ML
1/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && { ! x32 } } } } */
2/* { dg-options "-fcheck-pointer-bounds -mmpx -mabi=ms" } */
3
4struct Foo
5{
6 Foo() : a(1), b(1), c('a') {}
7 int a;
8 int b;
9 char c;
10};
11
12static Foo copy_foo(Foo) __attribute__((noinline, noclone));
13
14static Foo copy_foo(Foo A)
15{
16 return A;
17}
18
19struct Bar : Foo
20{
21 Bar(Foo t) : Foo(copy_foo(t)) {}
22};
23
24Foo F;
25
26int main (void)
27{
28 Bar B (F);
29
30 if (B.a != 1 || B.b != 1 || B.c != 'a')
31 __builtin_abort ();
32
33 return 0;
34}