aboutsummaryrefslogtreecommitdiff
path: root/ld/testsuite/ld-scripts/pr18963.t
blob: b0cd7421eb61662d57eec4cec83e8e9442652c77 (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
SECTIONS
{
  . = 0x80000;
  A = .;
  .text :
  {
    _start = .;
    . = 0x10000;
  }
  B = .;
  .data :
  {
    . = 0x10000;
  }
  C = .;
  .bss :
  {
    . = 0x10000;
  }
  D = A - C + B;
  E = A + B - C;
  /DISCARD/ : {*(*)}
}

ASSERT(D == E, "Addition is not commutative");