annotate gcc/testsuite/gcc.dg/darwin-segaddr.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Check that -segaddr gets through and works. */
kono
parents:
diff changeset
2 /* { dg-do run { target *-*-darwin* } } */
kono
parents:
diff changeset
3 /* { dg-options "-O0 -segaddr __TEST 0x200000 -fno-pie" { target { *-*-darwin* && { ! lp64 } } } } */
kono
parents:
diff changeset
4 /* { dg-options "-O0 -segaddr __TEST 0x110000000 -fno-pie" { target { *-*-darwin* && lp64 } } } */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 extern void abort ();
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 int t __attribute__((section("__TEST,__test")));
kono
parents:
diff changeset
9
kono
parents:
diff changeset
10 int main (void)
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 #ifdef __LP64__
kono
parents:
diff changeset
13 if ((unsigned long long) &t != 0x110000000ULL)
kono
parents:
diff changeset
14 #else
kono
parents:
diff changeset
15 if ((unsigned long) &t != 0x200000UL)
kono
parents:
diff changeset
16 #endif
kono
parents:
diff changeset
17 abort ();
kono
parents:
diff changeset
18 return 0;
kono
parents:
diff changeset
19 }