1  /* { dg-do compile { target { ! ia32 } } } */
       2  /* { dg-require-effective-target maybe_x32 } */
       3  /* { dg-options "-O2 -mx32 -mtune=generic -maddress-mode=long -dp" } */
       4  
       5  typedef unsigned int uint32_t;
       6  typedef uint32_t Elf32_Word;
       7  typedef uint32_t Elf32_Addr;
       8  typedef struct {
       9    Elf32_Word st_name;
      10    Elf32_Addr st_value;
      11    Elf32_Word st_size;
      12    unsigned char st_other;
      13  } Elf32_Sym;
      14  typedef struct {
      15    Elf32_Word r_info;
      16  }
      17  Elf32_Rela;
      18  typedef struct {
      19    union {
      20      Elf32_Addr d_ptr;
      21    }
      22    d_un;
      23  } Elf32_Dyn;
      24  struct link_map   {
      25    Elf32_Dyn *l_info[34];
      26  };
      27  extern void symbind32 (Elf32_Sym *);
      28  void
      29  _dl_profile_fixup (struct link_map *l, Elf32_Word reloc_arg)
      30  {
      31    const Elf32_Sym *const symtab  = (const void *) l->l_info[6]->d_un.d_ptr;
      32    const Elf32_Rela *const reloc  = (const void *) (l->l_info[23]->d_un.d_ptr + reloc_arg * sizeof (Elf32_Rela));
      33    Elf32_Sym sym = symtab[(reloc->r_info) >> 8];
      34    symbind32 (&sym);
      35  }
      36  
      37  /* { dg-final { scan-assembler-times "movv1ti_internal" 2 } } */
      38  /* { dg-final { scan-assembler-not "movti_internal" } } */