1 /* { dg-do compile { target { ! ia32 } } } */
2 /* { dg-require-effective-target maybe_x32 } */
3 /* { dg-require-effective-target fpic } */
4 /* { dg-options "-O3 -mx32 -maddress-mode=long -fpic" } */
5 /* { dg-final { scan-assembler-not "movl\[\\t \]*%.*,\[\\t \]*-1073742592\\(%r(.x|.i|.p|\[1-9\]*)\\)" } } */
6 
7 typedef int int32_t;
8 typedef unsigned int uint32_t;
9 typedef uint32_t Elf32_Word;
10 typedef int32_t Elf32_Sword;
11 typedef uint32_t Elf32_Addr;
12 typedef struct {
13   Elf32_Sword d_tag;
14   union {
15     Elf32_Word d_val;
16     Elf32_Addr d_ptr;
17   } d_un;
18 } Elf32_Dyn;
19 struct link_map {
20   Elf32_Dyn *l_ld;
21   Elf32_Dyn *l_info[34 + 16 + 3 + 12 + 11];
22 };
23 void
elf_get_dynamic_info(struct link_map * l)24 elf_get_dynamic_info (struct link_map *l)
25 {
26   Elf32_Dyn *dyn = l->l_ld;
27   Elf32_Dyn **info = l->l_info;
28   typedef Elf32_Word d_tag_utype;
29   while (dyn->d_tag != 0) {
30     if ((d_tag_utype) (0x6ffffeff - dyn->d_tag) < 11)
31       info[(0x6ffffeff - dyn->d_tag) + 34 + 16 + 3 + 12] = dyn;
32     ++dyn;
33   }
34 }
35