Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/opt/pr79085.C @ 152:2b5abeee2509
update gcc11
author | anatofuz |
---|---|
date | Mon, 25 May 2020 07:50:57 +0900 |
parents | 84e7813d76e9 |
children |
rev | line source |
---|---|
131 | 1 // PR c++/79085 |
2 // { dg-do compile } | |
3 // { dg-options "-Os" } | |
4 // { dg-additional-options "-mstrict-align" { target { aarch64*-*-* powerpc*-*-linux* powerpc*-*-elf* } } } | |
5 | |
6 void *operator new (__SIZE_TYPE__, void *p) { return p; } | |
7 | |
8 struct S | |
9 { | |
10 S (); | |
11 S (const S &); | |
12 ~S (void); | |
13 int i; | |
14 }; | |
15 | |
16 S foo (); | |
17 | |
18 static char buf [sizeof (S) + 1]; | |
19 | |
20 S * | |
21 bar () | |
22 { | |
23 return new (buf + 1) S (foo ()); | |
24 } |