Debian Codegraph @

gcc/testsuite/g++.target/mips/cxx17_empty_base.C

raw
1 // { dg-do compile }
2 // { dg-options "-O2 -std=c++17 -mabi=64 -mhard-float" }
3 // { dg-final { scan-assembler "\\\$f0" } }
4
5 struct empty {};
6
7 struct foo : empty
8 {
9 double a;
10 double b;
11 };
12
13 struct foo
14 make_foo(void) // { dg-message "the ABI for returning a value with C\\\+\\\+17 empty bases but otherwise an aggregate with only one or two floating-point fields was changed in GCC 12.1" }
15 {
16 struct foo ret;
17 ret.a = 114;
18 ret.b = 514;
19 return ret;
20 }