(root)/
gcc-13.2.0/
gcc/
testsuite/
gcc.target/
arc/
uncached-9.c
       1  /* { dg-do run } */
       2  /* { dg-options "-O2" } */
       3  
       4  #include <stdlib.h>
       5  
       6  struct uncached_st
       7  {
       8    int value;
       9  } __attribute__((uncached));
      10  
      11  struct cached_st
      12  {
      13    int value;
      14  };
      15  
      16  struct uncached_st g_uncached_st =
      17    {
      18      .value = 17
      19    };
      20  
      21  struct cached_st g_cached_st =
      22    {
      23      .value = 4
      24    };
      25  
      26  void __attribute__((noinline)) test_struct_copy (void)
      27  {
      28    g_cached_st.value = g_uncached_st.value;
      29  }
      30  
      31  int main (void)
      32  {
      33    test_struct_copy();
      34  
      35    if (g_cached_st.value != g_uncached_st.value)
      36      abort ();
      37  
      38    return 0;
      39  }