summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr55142-2.c
blob: 34f4687193a4ae58976b2f33b9f10cdab4c882ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* { dg-do compile { target { ! { ia32 } } } } */
/* { dg-require-effective-target maybe_x32 } */
/* { dg-require-effective-target fpic } */
/* { dg-options "-O3 -mx32 -maddress-mode=long -fpic" } */
/* { dg-final { scan-assembler-not "movl\[\\t \]*%.*,\[\\t \]*-1073742592\\(%r(.x|.i|.p|\[1-9\]*)\\)" } } */

typedef int int32_t;
typedef unsigned int uint32_t;
typedef uint32_t Elf32_Word;
typedef int32_t Elf32_Sword;
typedef uint32_t Elf32_Addr;
typedef struct {
  Elf32_Sword d_tag;
  union {
    Elf32_Word d_val;
    Elf32_Addr d_ptr;
  } d_un;
} Elf32_Dyn;
struct link_map {
  Elf32_Dyn *l_ld;
  Elf32_Dyn *l_info[34 + 16 + 3 + 12 + 11];
};
void
elf_get_dynamic_info (struct link_map *l)
{
  Elf32_Dyn *dyn = l->l_ld;
  Elf32_Dyn **info = l->l_info;
  typedef Elf32_Word d_tag_utype;
  while (dyn->d_tag != 0) {
    if ((d_tag_utype) (0x6ffffeff - dyn->d_tag) < 11)
      info[(0x6ffffeff - dyn->d_tag) + 34 + 16 + 3 + 12] = dyn;
    ++dyn;
  }
}