(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.dg/
bad-dereference.c
       1  /* { dg-options "-fdiagnostics-show-caret" } */
       2  
       3  struct foo
       4  {
       5    int x;
       6  };
       7  
       8  int test_1 (struct foo some_f)
       9  {
      10    return *some_f.x; /* { dg-error "invalid type argument of unary ... .have .int.." } */
      11  /* { dg-begin-multiline-output "" }
      12     return *some_f.x;
      13            ^~~~~~~~~
      14     { dg-end-multiline-output "" } */
      15  }
      16  
      17  int test_2 (struct foo some_f)
      18  {
      19    return *some_f; /* { dg-error "invalid type argument of unary ... .have .struct foo.." } */
      20  /* { dg-begin-multiline-output "" }
      21     return *some_f;
      22            ^~~~~~~
      23     { dg-end-multiline-output "" } */
      24  }