Debian Codegraph @

gcc/testsuite/g++.dg/other/empty-class.C

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fdump-tree-gimple" } */
3
4 /* Test that we return retval directly, instead of going through an
5 intermediate temporary, when returning an empty class. */
6
7 class obj {
8 public:
9 obj(int);
10 };
11
12 obj funky(){
13 return obj(555);
14 }
15
16 /* { dg-final { scan-tree-dump-times "return <retval>;" 1 "gimple" } } */