1  /* { dg-do compile } */
       2  
       3  #include <stddef.h>
       4  
       5  typedef enum
       6  {
       7   e1,
       8   e2
       9  } my_enum_t;
      10  
      11  typedef struct
      12  {
      13    int a;
      14    int *p;
      15  } my_struct_t;
      16  
      17  typedef volatile struct
      18  {
      19    my_enum_t a;
      20    my_struct_t b;
      21  } __attribute__((uncached)) my_type_t;
      22  
      23  my_type_t x;
      24  
      25  void foo (my_type_t *p)
      26  {
      27    p->a = e2;
      28    p->b.a = 10;
      29    p->b.p = NULL;
      30    *p->b.p = 10;
      31  }
      32  
      33  void bar (void)
      34  {
      35    x.a = e2;
      36    x.b.a = 10;
      37    x.b.p = NULL;
      38    *x.b.p = 10;
      39  }
      40  
      41  /* { dg-final { scan-assembler-times "st\.di" 6 } } */
      42  /* { dg-final { scan-assembler-times "ld\.di" 2 } } */