1 // { dg-options "-fdiagnostics-show-caret" }
2 
3 union u
4 {
5   int color;
6   int shape;
7 };
8 
test(union u * ptr)9 int test (union u *ptr)
10 {
11   return ptr->colour; // { dg-error "did you mean .color.?" }
12 }
13 
14 // Verify that we get an underline and a fixit hint.
15 /* { dg-begin-multiline-output "" }
16    return ptr->colour;
17                ^~~~~~
18                color
19    { dg-end-multiline-output "" } */
20