gcc/testsuite/g++.dg/lto/odr-5_0.C
raw| 1 | // { dg-lto-do link } |
| 2 | struct wiimote_t { // { dg-lto-message "type" 2 } |
| 3 | // Here we get two warnings: |
| 4 | // warning: type 'struct wiimote_t' violates the C++ One Definition Rule |
| 5 | // note: type 'const int' should match type 'int' |
| 6 | const int unid; // { dg-lto-message "the first difference of corresponding definitions is field 'unid'" 1 } |
| 7 | } * a; |
| 8 | |
| 9 | int |
| 10 | main() |
| 11 | { |
| 12 | } |